@epigraph/solutions 1.2.4 → 1.2.5
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/epigraph-solutions.js +51 -51
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Qf=(i=>(i.Release="release",i.Staging="staging",i.Dev="dev",i))(Qf||{});let DQ=class{constructor(e){this.context="EPIGRAPH-LOGGER",this._allModes={release:{name:"release",allows:["error"]},staging:{name:"staging",allows:["warn","error"]},dev:{name:"dev",allows:["info","warn","error"]}},this._currentMode="release",e&&(this.context=e.toLocaleUpperCase())}get modes(){return this._allModes}setCurrentMode(e){if(!Object.keys(this._allModes).includes(e)){console.warn(`"${e}": is not a valid logger mode`);return}this._currentMode=e}_isLogTypeAllowedInCurrentMode(e){return this._allModes[this._currentMode].allows.includes(e)}info({title:e,details:t="",contextOverride:n=void 0}){if(!this._isLogTypeAllowedInCurrentMode("info"))return;const s=n||this.context;console.groupCollapsed(`[${s}]: ${e}`),console.log(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}warn({title:e,details:t="",contextOverride:n=void 0}){if(!this._isLogTypeAllowedInCurrentMode("warn"))return;const s=n||this.context;console.groupCollapsed(`%c[${s}]: ${e}`,"color: orange;"),console.warn(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}error({title:e,details:t="",contextOverride:n=void 0}){if(!this._isLogTypeAllowedInCurrentMode("error"))return;const s=n||this.context;console.groupCollapsed(`%c[${s}]: ${e}`,"color: red;"),console.error(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}table({title:e,details:t={},contextOverride:n=void 0,logType:s="info"}){if(!this._isLogTypeAllowedInCurrentMode(s))return;const r=n||this.context;console.groupCollapsed(`[${r}]: ${e}`),console.table(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}group({title:e,contextOverride:t=void 0,logType:n="info"}){if(!this._isLogTypeAllowedInCurrentMode(n))return;const s=t||this.context;console.group(`%c ${s} GROUP`,e)}groupCollapsed({title:e,contextOverride:t=void 0,logType:n="info"}){if(!this._isLogTypeAllowedInCurrentMode(n))return;const s=t||this.context;console.groupCollapsed(`%c ${s} GROUP`,e)}groupEnd(){this._isLogTypeAllowedInCurrentMode("info")&&(console.log("----------------------------------"),console.groupEnd())}};var Od=(i=>(i.AR="ar",i))(Od||{}),ii=(i=>(i.type="t",i.identifierType="idt",i.identifier="id",i.epigraphSessionId="eid",i.action="a",i.sharedConfig="sc",i))(ii||{});let
|
|
1
|
+
var Qf=(i=>(i.Release="release",i.Staging="staging",i.Dev="dev",i))(Qf||{});let DQ=class{constructor(e){this.context="EPIGRAPH-LOGGER",this._allModes={release:{name:"release",allows:["error"]},staging:{name:"staging",allows:["warn","error"]},dev:{name:"dev",allows:["info","warn","error"]}},this._currentMode="release",e&&(this.context=e.toLocaleUpperCase())}get modes(){return this._allModes}setCurrentMode(e){if(!Object.keys(this._allModes).includes(e)){console.warn(`"${e}": is not a valid logger mode`);return}this._currentMode=e}_isLogTypeAllowedInCurrentMode(e){return this._allModes[this._currentMode].allows.includes(e)}info({title:e,details:t="",contextOverride:n=void 0}){if(!this._isLogTypeAllowedInCurrentMode("info"))return;const s=n||this.context;console.groupCollapsed(`[${s}]: ${e}`),console.log(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}warn({title:e,details:t="",contextOverride:n=void 0}){if(!this._isLogTypeAllowedInCurrentMode("warn"))return;const s=n||this.context;console.groupCollapsed(`%c[${s}]: ${e}`,"color: orange;"),console.warn(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}error({title:e,details:t="",contextOverride:n=void 0}){if(!this._isLogTypeAllowedInCurrentMode("error"))return;const s=n||this.context;console.groupCollapsed(`%c[${s}]: ${e}`,"color: red;"),console.error(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}table({title:e,details:t={},contextOverride:n=void 0,logType:s="info"}){if(!this._isLogTypeAllowedInCurrentMode(s))return;const r=n||this.context;console.groupCollapsed(`[${r}]: ${e}`),console.table(t),console.groupCollapsed("Traceback..."),console.trace(),console.groupEnd(),console.groupEnd()}group({title:e,contextOverride:t=void 0,logType:n="info"}){if(!this._isLogTypeAllowedInCurrentMode(n))return;const s=t||this.context;console.group(`%c ${s} GROUP`,e)}groupCollapsed({title:e,contextOverride:t=void 0,logType:n="info"}){if(!this._isLogTypeAllowedInCurrentMode(n))return;const s=t||this.context;console.groupCollapsed(`%c ${s} GROUP`,e)}groupEnd(){this._isLogTypeAllowedInCurrentMode("info")&&(console.log("----------------------------------"),console.groupEnd())}};var Od=(i=>(i.AR="ar",i))(Od||{}),ii=(i=>(i.type="t",i.identifierType="idt",i.identifier="id",i.epigraphSessionId="eid",i.action="a",i.sharedConfig="sc",i))(ii||{});let V_=class{constructor(e=window.location.href){this._baseUrl=e}get baseUrl(){return this._baseUrl}set baseUrl(e){this._baseUrl=e}getParameterInUrl(e){const t=new URL(this._baseUrl);let n=t.searchParams.get(e);return n||(n=this.decryptQueryParametersInUrl(t).searchParams.get(e)),n}hasParameterInUrl(e){return!!this.getParameterInUrl(e)}generateQrCodeUrl(e={},t=!0){const n=new URL(this._baseUrl);for(const[s,r]of Object.entries(e))n.searchParams.set(s,r);return t&&this.encryptQueryParametersInUrl(n),n}encryptQueryParametersInUrl(e){return e.search=btoa(e.search),e}decryptQueryParametersInUrl(e){let t=e;try{e.search=atob(e.search.slice(1)),t=e}catch(n){window.epigraph.logger.info({title:`Couldn't decode URL: ${e}`,details:n})}return t}};var Gd=(i=>(i.DEVELOPMENT="development",i.STAGING="staging",i.PRODUCTION="production",i))(Gd||{});let Gm=class Y_{constructor(e){if(this._loggerContext="EPIGRAPH",this._isReady=!1,this._logger=new DQ("EPIGRAPH LOGGER"),this._environment=Gd.DEVELOPMENT,this._activeComponentsInSession=new Map,this._staleComponentsInSession=new Map,this._isSessionWebGL2Compatible=!1,window.epigraph)return window.epigraph.registerActiveComponent(e),window.epigraph;this._isSessionWebGL2Compatible=this._checkIfWebGL2IsAvailable(),window.epigraph=this,window.epigraph.registerActiveComponent(e),this.logBranding(),this._initializer=e,this._environment=this._initializer.environment;const t=this.getLoggerModeNameFromEnvironment();this._logger.setCurrentMode(t),this._urlProcessor=new V_,this.id=Y_.safeGenerateUuid();const n=this._urlProcessor.getParameterInUrl(ii.epigraphSessionId);this._epigraphSessionId=n??Y_.safeGenerateUuid(),this._logger.info({title:"Epigraph Object Ready!!",details:this,contextOverride:this._loggerContext}),this._isReady=!0}get isReady(){return this._isReady}get logger(){return this._logger}get urlProcessor(){return this._urlProcessor}get epigraphSessionId(){return this._epigraphSessionId}get environment(){return this._environment}get initializer(){return this._initializer}get activeComponentsInSession(){return this._activeComponentsInSession}get staleComponentsInSession(){return this._staleComponentsInSession}isSessionWebGL2Compatible(){return this._isSessionWebGL2Compatible}logBranding(){console.group("Powered by: "),console.log("%cEPIGRAPH","font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)"),console.log("Visit for more details: www.epigraph.us"),console.groupEnd()}_checkIfWebGL2IsAvailable(){try{const e=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&e.getContext("webgl2"))}catch{return!1}}registerActiveComponent(e){this._activeComponentsInSession.set(e.uuid,e),this._logger.info({title:"Registered a new Active Component",details:e,contextOverride:this._loggerContext})}deregisterActiveComponent(e){const t=this._activeComponentsInSession.get(e.uuid);t&&(this._staleComponentsInSession.set(t.uuid,t),this._activeComponentsInSession.delete(t.uuid),this._logger.info({title:"Deregistered a new Active Component",details:e,contextOverride:this._loggerContext}))}getLoggerModeNameFromEnvironment(){let e=Qf.Dev;return this._environment===Gd.STAGING?e=Qf.Staging:this._environment===Gd.PRODUCTION&&(e=Qf.Release),e}static safeGenerateUuid(){let e="";try{e=crypto.randomUUID()}catch{console.error("crypto not available. Not generating a UUID")}return e}static generateXPath(e){let t="",n=e;for(;n;){let s=1,r=n.previousSibling;for(;r;)r.nodeName===n.nodeName&&s++,r=r.previousSibling;t=`/${n.nodeName.toLowerCase()+(s>1?`[${s}]`:"")}${t}`,n=n.parentNode}return t}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -6,13 +6,13 @@ var Qf=(i=>(i.Release="release",i.Staging="staging",i.Dev="dev",i))(Qf||{});let
|
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:PQ,defineProperty:FQ,getOwnPropertyDescriptor:kQ,getOwnPropertyNames:UQ,getOwnPropertySymbols:OQ,getPrototypeOf:GQ}=Object,em=globalThis,cx=em.trustedTypes,zQ=cx?cx.emptyScript:"",HQ=em.reactiveElementPolyfillSupport,zd=(i,e)=>i,
|
|
9
|
+
*/const{is:PQ,defineProperty:FQ,getOwnPropertyDescriptor:kQ,getOwnPropertyNames:UQ,getOwnPropertySymbols:OQ,getPrototypeOf:GQ}=Object,em=globalThis,cx=em.trustedTypes,zQ=cx?cx.emptyScript:"",HQ=em.reactiveElementPolyfillSupport,zd=(i,e)=>i,q_={toAttribute(i,e){switch(e){case Boolean:i=i?zQ:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},ZT=(i,e)=>!PQ(i,e),hx={attribute:!0,type:String,converter:q_,reflect:!1,useDefault:!1,hasChanged:ZT};Symbol.metadata??=Symbol("metadata"),em.litPropertyMetadata??=new WeakMap;let Kc=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=hx){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),s=this.getPropertyDescriptor(e,n,t);s!==void 0&&FQ(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){const{get:s,set:r}=kQ(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:s,set(a){const o=s?.call(this);r?.call(this,a),this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??hx}static _$Ei(){if(this.hasOwnProperty(zd("elementProperties")))return;const e=GQ(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zd("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zd("properties"))){const t=this.properties,n=[...UQ(t),...OQ(t)];for(const s of n)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,s]of t)this.elementProperties.set(n,s)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const s=this._$Eu(t,n);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const s of n)t.unshift(lx(s))}else e!==void 0&&t.push(lx(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return NQ(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,n);if(s!==void 0&&n.reflect===!0){const r=(n.converter?.toAttribute!==void 0?n.converter:q_).toAttribute(t,n.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,s=n._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const r=n.getPropertyOptions(s),a=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:q_;this._$Em=s,this[s]=a.fromAttribute(t,r.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){const s=this.constructor,r=this[e];if(n??=s.getPropertyOptions(e),!((n.hasChanged??ZT)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:s,wrapped:r},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),r!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[s,r]of n){const{wrapped:a}=r,o=this[s];a!==!0||this._$AL.has(s)||o===void 0||this.C(s,void 0,r,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};Kc.elementStyles=[],Kc.shadowRootOptions={mode:"open"},Kc[zd("elementProperties")]=new Map,Kc[zd("finalized")]=new Map,HQ?.({ReactiveElement:Kc}),(em.reactiveElementVersions??=[]).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const Qv=globalThis,lg=Qv.trustedTypes,ux=lg?lg.createPolicy("lit-html",{createHTML:i=>i}):void 0,eM="$lit$",lo=`lit$${Math.random().toFixed(9).slice(2)}$`,tM="?"+lo,$Q=`<${tM}>`,Ul=document,hA=()=>Ul.createComment(""),uA=i=>i===null||typeof i!="object"&&typeof i!="function",Lv=Array.isArray,VQ=i=>Lv(i)||typeof i?.[Symbol.iterator]=="function",zm=`[
|
|
14
14
|
\f\r]`,Ru=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dx=/-->/g,Ax=/>/g,Go=RegExp(`>|${zm}(?:([^\\s"'>=/]+)(${zm}*=${zm}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),px=/'/g,fx=/"/g,nM=/^(?:script|style|textarea|title)$/i,YQ=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),qQ=YQ(1),Ih=Symbol.for("lit-noChange"),ri=Symbol.for("lit-nothing"),gx=new WeakMap,El=Ul.createTreeWalker(Ul,129);function iM(i,e){if(!Lv(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ux!==void 0?ux.createHTML(e):e}const WQ=(i,e)=>{const t=i.length-1,n=[];let s,r=e===2?"<svg>":e===3?"<math>":"",a=Ru;for(let o=0;o<t;o++){const l=i[o];let c,u,h=-1,d=0;for(;d<l.length&&(a.lastIndex=d,u=a.exec(l),u!==null);)d=a.lastIndex,a===Ru?u[1]==="!--"?a=dx:u[1]!==void 0?a=Ax:u[2]!==void 0?(nM.test(u[2])&&(s=RegExp("</"+u[2],"g")),a=Go):u[3]!==void 0&&(a=Go):a===Go?u[0]===">"?(a=s??Ru,h=-1):u[1]===void 0?h=-2:(h=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?Go:u[3]==='"'?fx:px):a===fx||a===px?a=Go:a===dx||a===Ax?a=Ru:(a=Go,s=void 0);const A=a===Go&&i[o+1].startsWith("/>")?" ":"";r+=a===Ru?l+$Q:h>=0?(n.push(c),l.slice(0,h)+eM+l.slice(h)+lo+A):l+lo+(h===-2?o:A)}return[iM(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),px=/'/g,fx=/"/g,nM=/^(?:script|style|textarea|title)$/i,YQ=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),qQ=YQ(1),Ih=Symbol.for("lit-noChange"),ri=Symbol.for("lit-nothing"),gx=new WeakMap,El=Ul.createTreeWalker(Ul,129);function iM(i,e){if(!Lv(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ux!==void 0?ux.createHTML(e):e}const WQ=(i,e)=>{const t=i.length-1,n=[];let s,r=e===2?"<svg>":e===3?"<math>":"",a=Ru;for(let o=0;o<t;o++){const l=i[o];let c,u,h=-1,d=0;for(;d<l.length&&(a.lastIndex=d,u=a.exec(l),u!==null);)d=a.lastIndex,a===Ru?u[1]==="!--"?a=dx:u[1]!==void 0?a=Ax:u[2]!==void 0?(nM.test(u[2])&&(s=RegExp("</"+u[2],"g")),a=Go):u[3]!==void 0&&(a=Go):a===Go?u[0]===">"?(a=s??Ru,h=-1):u[1]===void 0?h=-2:(h=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?Go:u[3]==='"'?fx:px):a===fx||a===px?a=Go:a===dx||a===Ax?a=Ru:(a=Go,s=void 0);const A=a===Go&&i[o+1].startsWith("/>")?" ":"";r+=a===Ru?l+$Q:h>=0?(n.push(c),l.slice(0,h)+eM+l.slice(h)+lo+A):l+lo+(h===-2?o:A)}return[iM(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let W_=class sM{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,a=0;const o=e.length-1,l=this.parts,[c,u]=WQ(e,t);if(this.el=sM.createElement(c,n),El.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=El.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(eM)){const d=u[a++],A=s.getAttribute(h).split(lo),p=/([.?@])?(.*)/.exec(d);l.push({type:1,index:r,name:p[2],strings:A,ctor:p[1]==="."?XQ:p[1]==="?"?JQ:p[1]==="@"?KQ:tm}),s.removeAttribute(h)}else h.startsWith(lo)&&(l.push({type:6,index:r}),s.removeAttribute(h));if(nM.test(s.tagName)){const h=s.textContent.split(lo),d=h.length-1;if(d>0){s.textContent=lg?lg.emptyScript:"";for(let A=0;A<d;A++)s.append(h[A],hA()),El.nextNode(),l.push({type:2,index:++r});s.append(h[d],hA())}}}else if(s.nodeType===8)if(s.data===tM)l.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(lo,h+1))!==-1;)l.push({type:7,index:r}),h+=lo.length-1}r++}}static createElement(e,t){const n=Ul.createElement("template");return n.innerHTML=e,n}};function wh(i,e,t=i,n){if(e===Ih)return e;let s=n!==void 0?t._$Co?.[n]:t._$Cl;const r=uA(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(i),s._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=s:t._$Cl=s),s!==void 0&&(e=wh(i,s._$AS(i,e.values),s,n)),e}class jQ{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,s=(e?.creationScope??Ul).importNode(t,!0);El.currentNode=s;let r=El.nextNode(),a=0,o=0,l=n[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new Nv(r,r.nextSibling,this,e):l.type===1?c=new l.ctor(r,l.name,l.strings,this,e):l.type===6&&(c=new ZQ(r,this,e)),this._$AV.push(c),l=n[++o]}a!==l?.index&&(r=El.nextNode(),a++)}return El.currentNode=Ul,s}p(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}let Nv=class rM{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,s){this.type=2,this._$AH=ri,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=wh(this,e,t),uA(e)?e===ri||e==null||e===""?(this._$AH!==ri&&this._$AR(),this._$AH=ri):e!==this._$AH&&e!==Ih&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):VQ(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==ri&&uA(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ul.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=W_.createElement(iM(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(t);else{const r=new jQ(s,this),a=r.u(this.options);r.p(t),this.T(a),this._$AH=r}}_$AC(e){let t=gx.get(e.strings);return t===void 0&&gx.set(e.strings,t=new W_(e)),t}k(e){Lv(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,s=0;for(const r of e)s===t.length?t.push(n=new rM(this.O(hA()),this.O(hA()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},tm=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,s,r){this.type=1,this._$AH=ri,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ri}_$AI(e,t=this,n,s){const r=this.strings;let a=!1;if(r===void 0)e=wh(this,e,t,0),a=!uA(e)||e!==this._$AH&&e!==Ih,a&&(this._$AH=e);else{const o=e;let l,c;for(e=r[0],l=0;l<r.length-1;l++)c=wh(this,o[n+l],t,l),c===Ih&&(c=this._$AH[l]),a||=!uA(c)||c!==this._$AH[l],c===ri?e=ri:e!==ri&&(e+=(c??"")+r[l+1]),this._$AH[l]=c}a&&!s&&this.j(e)}j(e){e===ri?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class XQ extends tm{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ri?void 0:e}}class JQ extends tm{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ri)}}let KQ=class extends tm{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){if((e=wh(this,e,t,0)??ri)===Ih)return;const n=this._$AH,s=e===ri&&n!==ri||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==ri&&(n===ri||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}};class ZQ{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){wh(this,e)}}const eL=Qv.litHtmlPolyfillSupport;eL?.(W_,Nv),(Qv.litHtmlVersions??=[]).push("3.3.0");const tL=(i,e,t)=>{const n=t?.renderBefore??e;let s=n._$litPart$;if(s===void 0){const r=t?.renderBefore??null;n._$litPart$=s=new Nv(e.insertBefore(hA(),r),r,void 0,t??{})}return s._$AI(i),s};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -65,7 +65,7 @@ var Qf=(i=>(i.Release="release",i.Staging="staging",i.Dev="dev",i))(Qf||{});let
|
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2010-2025 Three.js Authors
|
|
67
67
|
* SPDX-License-Identifier: MIT
|
|
68
|
-
*/const su="182",TL=0,wx=1,ML=2,Ff=1,RL=2,vd=3,or=0,_i=1,On=2,Os=0,Bl=1,j0=2,Sx=3,Bx=4,DL=5,fl=100,QL=101,LL=102,NL=103,PL=104,FL=200,kL=201,UL=202,OL=203,X0=204,J0=205,GL=206,zL=207,HL=208,$L=209,VL=210,YL=211,qL=212,WL=213,jL=214,K0=0,Z0=1,eE=2,Sh=3,tE=4,nE=5,iE=6,sE=7,$v=0,XL=1,JL=2,Gs=0,Vv=1,Yv=2,qv=3,dA=4,EM=5,Wv=6,Bh=7,Tx="attached",KL="detached",Th=300,So=301,Mh=302,AA=303,rE=304,im=306,lr=1e3,xn=1001,Ol=1002,jt=1003,ru=1004,fo=1005,ft=1006,Tl=1007,Hi=1008,aE=1008,Ze=1009,jv=1010,Xv=1011,pA=1012,sm=1013,ci=1014,Cn=1015,sn=1016,Jv=1017,Kv=1018,fA=1020,rm=35902,am=35899,vM=1021,gA=1022,Gt=1023,Pa=1026,vl=1027,go=1028,Zv=1029,sr=1030,om=1031,Ra=1033,Ah=33776,Ml=33777,ph=33778,Vd=33779,hg=35840,oE=35841,Rh=35842,mA=35843,ug=36196,yA=37492,_A=37496,dg=37488,Ag=37489,pg=37490,fg=37491,Rl=37808,lE=37809,cE=37810,hE=37811,fh=37812,uE=37813,dE=37814,AE=37815,pE=37816,fE=37817,gE=37818,mE=37819,yE=37820,_E=37821,Dh=36492,EE=36494,gg=36495,mg=36283,yg=36284,_g=36285,Eg=36286,Qh=2200,Dl=2201,vg=2202,Lh=2300,Nh=2301,Ym=2302,sh=2400,rh=2401,bg=2402,eb=2500,ZL=2501,eN=0,bM=1,vE=2,tN=3200,tb=0,nN=1,As="",Ot="srgb",pn="srgb-linear",xg="linear",Kt="srgb",hc=7680,Mx=519,iN=512,sN=513,rN=514,nb=515,aN=516,oN=517,ib=518,lN=519,bE=35044,cN=35048,Cg="300 es",wr=2e3,Ig=2001;function xM(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function hN(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function EA(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function uN(){const i=EA("canvas");return i.style.display="block",i}const Rx={};function wg(...i){const e="THREE."+i.shift();console.log(e,...i)}function qe(...i){const e="THREE."+i.shift();console.warn(e,...i)}function rt(...i){const e="THREE."+i.shift();console.error(e,...i)}function vA(...i){const e=i.join(" ");e in Rx||(Rx[e]=!0,qe(...i))}function dN(i,e,t){return new Promise(function(n,s){function r(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:s();break;case i.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}let hr=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const s=n[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const s=n.slice(0);for(let r=0,a=s.length;r<a;r++)s[r].call(this,e);e.target=null}}};const vi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Dx=1234567;const Yd=Math.PI/180,Ph=180/Math.PI;function zs(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(vi[i&255]+vi[i>>8&255]+vi[i>>16&255]+vi[i>>24&255]+"-"+vi[e&255]+vi[e>>8&255]+"-"+vi[e>>16&15|64]+vi[e>>24&255]+"-"+vi[t&63|128]+vi[t>>8&255]+"-"+vi[t>>16&255]+vi[t>>24&255]+vi[n&255]+vi[n>>8&255]+vi[n>>16&255]+vi[n>>24&255]).toLowerCase()}function mt(i,e,t){return Math.max(e,Math.min(t,i))}function sb(i,e){return(i%e+e)%e}function AN(i,e,t,n,s){return n+(i-e)*(s-n)/(t-e)}function pN(i,e,t){return i!==e?(t-i)/(e-i):0}function qd(i,e,t){return(1-t)*i+t*e}function fN(i,e,t,n){return qd(i,e,1-Math.exp(-t*n))}function gN(i,e=1){return e-Math.abs(sb(i,e*2)-e)}function mN(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function yN(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function _N(i,e){return i+Math.floor(Math.random()*(e-i+1))}function EN(i,e){return i+Math.random()*(e-i)}function vN(i){return i*(.5-Math.random())}function bN(i){i!==void 0&&(Dx=i);let e=Dx+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function xN(i){return i*Yd}function CN(i){return i*Ph}function IN(i){return(i&i-1)===0&&i!==0}function wN(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function SN(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function BN(i,e,t,n,s){const r=Math.cos,a=Math.sin,o=r(t/2),l=a(t/2),c=r((e+n)/2),u=a((e+n)/2),h=r((e-n)/2),d=a((e-n)/2),A=r((n-e)/2),p=a((n-e)/2);switch(s){case"XYX":i.set(o*u,l*h,l*d,o*c);break;case"YZY":i.set(l*d,o*u,l*h,o*c);break;case"ZXZ":i.set(l*h,l*d,o*u,o*c);break;case"XZX":i.set(o*u,l*p,l*A,o*c);break;case"YXY":i.set(l*A,o*u,l*p,o*c);break;case"ZYZ":i.set(l*p,l*A,o*u,o*c);break;default:qe("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function tr(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Zt(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const Br={DEG2RAD:Yd,RAD2DEG:Ph,generateUUID:zs,clamp:mt,euclideanModulo:sb,mapLinear:AN,inverseLerp:pN,lerp:qd,damp:fN,pingpong:gN,smoothstep:mN,smootherstep:yN,randInt:_N,randFloat:EN,randFloatSpread:vN,seededRandom:bN,degToRad:xN,radToDeg:CN,isPowerOfTwo:IN,ceilPowerOfTwo:wN,floorPowerOfTwo:SN,setQuaternionFromProperEuler:BN,normalize:Zt,denormalize:tr};class pe{constructor(e=0,t=0){pe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6],this.y=s[1]*t+s[4]*n+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=mt(this.x,e.x,t.x),this.y=mt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=mt(this.x,e,t),this.y=mt(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(mt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(mt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),s=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*s+e.x,this.y=r*s+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Yt{constructor(e=0,t=0,n=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=s}static slerpFlat(e,t,n,s,r,a,o){let l=n[s+0],c=n[s+1],u=n[s+2],h=n[s+3],d=r[a+0],A=r[a+1],p=r[a+2],g=r[a+3];if(o<=0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h;return}if(o>=1){e[t+0]=d,e[t+1]=A,e[t+2]=p,e[t+3]=g;return}if(h!==g||l!==d||c!==A||u!==p){let m=l*d+c*A+u*p+h*g;m<0&&(d=-d,A=-A,p=-p,g=-g,m=-m);let f=1-o;if(m<.9995){const y=Math.acos(m),_=Math.sin(y);f=Math.sin(f*y)/_,o=Math.sin(o*y)/_,l=l*f+d*o,c=c*f+A*o,u=u*f+p*o,h=h*f+g*o}else{l=l*f+d*o,c=c*f+A*o,u=u*f+p*o,h=h*f+g*o;const y=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=y,c*=y,u*=y,h*=y}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,s,r,a){const o=n[s],l=n[s+1],c=n[s+2],u=n[s+3],h=r[a],d=r[a+1],A=r[a+2],p=r[a+3];return e[t]=o*p+u*h+l*A-c*d,e[t+1]=l*p+u*d+c*h-o*A,e[t+2]=c*p+u*A+o*d-l*h,e[t+3]=u*p-o*h-l*d-c*A,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,s){return this._x=e,this._y=t,this._z=n,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,s=e._y,r=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(n/2),u=o(s/2),h=o(r/2),d=l(n/2),A=l(s/2),p=l(r/2);switch(a){case"XYZ":this._x=d*u*h+c*A*p,this._y=c*A*h-d*u*p,this._z=c*u*p+d*A*h,this._w=c*u*h-d*A*p;break;case"YXZ":this._x=d*u*h+c*A*p,this._y=c*A*h-d*u*p,this._z=c*u*p-d*A*h,this._w=c*u*h+d*A*p;break;case"ZXY":this._x=d*u*h-c*A*p,this._y=c*A*h+d*u*p,this._z=c*u*p+d*A*h,this._w=c*u*h-d*A*p;break;case"ZYX":this._x=d*u*h-c*A*p,this._y=c*A*h+d*u*p,this._z=c*u*p-d*A*h,this._w=c*u*h+d*A*p;break;case"YZX":this._x=d*u*h+c*A*p,this._y=c*A*h+d*u*p,this._z=c*u*p-d*A*h,this._w=c*u*h-d*A*p;break;case"XZY":this._x=d*u*h-c*A*p,this._y=c*A*h-d*u*p,this._z=c*u*p+d*A*h,this._w=c*u*h+d*A*p;break;default:qe("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,s=Math.sin(n);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],s=t[4],r=t[8],a=t[1],o=t[5],l=t[9],c=t[2],u=t[6],h=t[10],d=n+o+h;if(d>0){const A=.5/Math.sqrt(d+1);this._w=.25/A,this._x=(u-l)*A,this._y=(r-c)*A,this._z=(a-s)*A}else if(n>o&&n>h){const A=2*Math.sqrt(1+n-o-h);this._w=(u-l)/A,this._x=.25*A,this._y=(s+a)/A,this._z=(r+c)/A}else if(o>h){const A=2*Math.sqrt(1+o-n-h);this._w=(r-c)/A,this._x=(s+a)/A,this._y=.25*A,this._z=(l+u)/A}else{const A=2*Math.sqrt(1+h-n-o);this._w=(a-s)/A,this._x=(r+c)/A,this._y=(l+u)/A,this._z=.25*A}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(mt(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const s=Math.min(1,t/n);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,s=e._y,r=e._z,a=e._w,o=t._x,l=t._y,c=t._z,u=t._w;return this._x=n*u+a*o+s*c-r*l,this._y=s*u+a*l+r*o-n*c,this._z=r*u+a*c+n*l-s*o,this._w=a*u-n*o-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,s=e._y,r=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,s=-s,r=-r,a=-a,o=-o);let l=1-t;if(o<.9995){const c=Math.acos(o),u=Math.sin(c);l=Math.sin(l*c)/u,t=Math.sin(t*c)/u,this._x=this._x*l+n*t,this._y=this._y*l+s*t,this._z=this._z*l+r*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+s*t,this._z=this._z*l+r*t,this._w=this._w*l+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),s=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Q{constructor(e=0,t=0,n=0){Q.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Qx.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Qx.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*s,this.y=r[1]*t+r[4]*n+r[7]*s,this.z=r[2]*t+r[5]*n+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*s+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*s+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*s+r[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,s=this.z,r=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*s-o*n),u=2*(o*t-r*s),h=2*(r*n-a*t);return this.x=t+l*c+a*h-o*u,this.y=n+l*u+o*c-r*h,this.z=s+l*h+r*u-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*s,this.y=r[1]*t+r[5]*n+r[9]*s,this.z=r[2]*t+r[6]*n+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=mt(this.x,e.x,t.x),this.y=mt(this.y,e.y,t.y),this.z=mt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=mt(this.x,e,t),this.y=mt(this.y,e,t),this.z=mt(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(mt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,s=e.y,r=e.z,a=t.x,o=t.y,l=t.z;return this.x=s*l-r*o,this.y=r*a-n*l,this.z=n*o-s*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qm.copy(this).projectOnVector(e),this.sub(qm)}reflect(e){return this.sub(qm.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(mt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,s=this.z-e.z;return t*t+n*n+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const s=Math.sin(t)*e;return this.x=s*Math.sin(n),this.y=Math.cos(t)*e,this.z=s*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qm=new Q,Qx=new Yt;class pt{constructor(e,t,n,s,r,a,o,l,c){pt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,s,r,a,o,l,c)}set(e,t,n,s,r,a,o,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=o,u[3]=t,u[4]=r,u[5]=l,u[6]=n,u[7]=a,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,r=this.elements,a=n[0],o=n[3],l=n[6],c=n[1],u=n[4],h=n[7],d=n[2],A=n[5],p=n[8],g=s[0],m=s[3],f=s[6],y=s[1],_=s[4],E=s[7],v=s[2],C=s[5],x=s[8];return r[0]=a*g+o*y+l*v,r[3]=a*m+o*_+l*C,r[6]=a*f+o*E+l*x,r[1]=c*g+u*y+h*v,r[4]=c*m+u*_+h*C,r[7]=c*f+u*E+h*x,r[2]=d*g+A*y+p*v,r[5]=d*m+A*_+p*C,r[8]=d*f+A*E+p*x,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8];return t*a*u-t*o*c-n*r*u+n*o*l+s*r*c-s*a*l}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=u*a-o*c,d=o*l-u*r,A=c*r-a*l,p=t*h+n*d+s*A;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/p;return e[0]=h*g,e[1]=(s*c-u*n)*g,e[2]=(o*n-s*a)*g,e[3]=d*g,e[4]=(u*t-s*l)*g,e[5]=(s*r-o*t)*g,e[6]=A*g,e[7]=(n*l-c*t)*g,e[8]=(a*t-n*r)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,s,r,a,o){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*a+c*o)+a+e,-s*c,s*l,-s*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Wm.makeScale(e,t)),this}rotate(e){return this.premultiply(Wm.makeRotation(-e)),this}translate(e,t){return this.premultiply(Wm.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<9;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Wm=new pt,Lx=new pt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Nx=new pt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function TN(){const i={enabled:!0,workingColorSpace:pn,spaces:{},convert:function(s,r,a){return this.enabled===!1||r===a||!r||!a||(this.spaces[r].transfer===Kt&&(s.r=Da(s.r),s.g=Da(s.g),s.b=Da(s.b)),this.spaces[r].primaries!==this.spaces[a].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Kt&&(s.r=gh(s.r),s.g=gh(s.g),s.b=gh(s.b))),s},workingToColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},colorSpaceToWorking:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===As?xg:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,a){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,r){return vA("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(s,r)},toWorkingColorSpace:function(s,r){return vA("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(s,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[pn]:{primaries:e,whitePoint:n,transfer:xg,toXYZ:Lx,fromXYZ:Nx,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Ot},outputColorSpaceConfig:{drawingBufferColorSpace:Ot}},[Ot]:{primaries:e,whitePoint:n,transfer:Kt,toXYZ:Lx,fromXYZ:Nx,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Ot}}}),i}const Bt=TN();function Da(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function gh(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}let uc,CM=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{uc===void 0&&(uc=EA("canvas")),uc.width=e.width,uc.height=e.height;const s=uc.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),n=uc}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=EA("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const s=n.getImageData(0,0,e.width,e.height),r=s.data;for(let a=0;a<r.length;a++)r[a]=Da(r[a]/255)*255;return n.putImageData(s,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Da(t[n]/255)*255):t[n]=Da(t[n]);return{data:t,width:e.width,height:e.height}}else return qe("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},MN=0;class lm{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:MN++}),this.uuid=zs(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},s=this.data;if(s!==null){let r;if(Array.isArray(s)){r=[];for(let a=0,o=s.length;a<o;a++)s[a].isDataTexture?r.push(jm(s[a].image)):r.push(jm(s[a]))}else r=jm(s);n.url=r}return t||(e.images[this.uuid]=n),n}}function jm(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?CM.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(qe("Texture: Unable to serialize Texture."),{})}let RN=0;const Xm=new Q;let ln=class kf extends hr{constructor(e=kf.DEFAULT_IMAGE,t=kf.DEFAULT_MAPPING,n=xn,s=xn,r=ft,a=Hi,o=Gt,l=Ze,c=kf.DEFAULT_ANISOTROPY,u=As){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:RN++}),this.uuid=zs(),this.name="",this.source=new lm(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=s,this.magFilter=r,this.minFilter=a,this.anisotropy=c,this.format=o,this.internalFormat=null,this.type=l,this.offset=new pe(0,0),this.repeat=new pe(1,1),this.center=new pe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new pt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Xm).x}get height(){return this.source.getSize(Xm).y}get depth(){return this.source.getSize(Xm).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){qe(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){qe(`Texture.setValues(): property '${t}' does not exist.`);continue}s&&n&&s.isVector2&&n.isVector2||s&&n&&s.isVector3&&n.isVector3||s&&n&&s.isMatrix3&&n.isMatrix3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Th)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case lr:e.x=e.x-Math.floor(e.x);break;case xn:e.x=e.x<0?0:1;break;case Ol:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case lr:e.y=e.y-Math.floor(e.y);break;case xn:e.y=e.y<0?0:1;break;case Ol:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};ln.DEFAULT_IMAGE=null;ln.DEFAULT_MAPPING=Th;ln.DEFAULT_ANISOTROPY=1;class Mt{constructor(e=0,t=0,n=0,s=1){Mt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,s){return this.x=e,this.y=t,this.z=n,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*s+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*s+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*s+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*s+a[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,s,r;const l=e.elements,c=l[0],u=l[4],h=l[8],d=l[1],A=l[5],p=l[9],g=l[2],m=l[6],f=l[10];if(Math.abs(u-d)<.01&&Math.abs(h-g)<.01&&Math.abs(p-m)<.01){if(Math.abs(u+d)<.1&&Math.abs(h+g)<.1&&Math.abs(p+m)<.1&&Math.abs(c+A+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const _=(c+1)/2,E=(A+1)/2,v=(f+1)/2,C=(u+d)/4,x=(h+g)/4,I=(p+m)/4;return _>E&&_>v?_<.01?(n=0,s=.707106781,r=.707106781):(n=Math.sqrt(_),s=C/n,r=x/n):E>v?E<.01?(n=.707106781,s=0,r=.707106781):(s=Math.sqrt(E),n=C/s,r=I/s):v<.01?(n=.707106781,s=.707106781,r=0):(r=Math.sqrt(v),n=x/r,s=I/r),this.set(n,s,r,t),this}let y=Math.sqrt((m-p)*(m-p)+(h-g)*(h-g)+(d-u)*(d-u));return Math.abs(y)<.001&&(y=1),this.x=(m-p)/y,this.y=(h-g)/y,this.z=(d-u)/y,this.w=Math.acos((c+A+f-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=mt(this.x,e.x,t.x),this.y=mt(this.y,e.y,t.y),this.z=mt(this.z,e.z,t.z),this.w=mt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=mt(this.x,e,t),this.y=mt(this.y,e,t),this.z=mt(this.z,e,t),this.w=mt(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(mt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class DN extends hr{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ft,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Mt(0,0,e,t),this.scissorTest=!1,this.viewport=new Mt(0,0,e,t);const s={width:e,height:t,depth:n.depth},r=new ln(s);this.textures=[];const a=n.count;for(let o=0;o<a;o++)this.textures[o]=r.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:ft,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let s=0,r=this.textures.length;s<r;s++)this.textures[s].image.width=e,this.textures[s].image.height=t,this.textures[s].image.depth=n,this.textures[s].isData3DTexture!==!0&&(this.textures[s].isArrayTexture=this.textures[s].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const s=Object.assign({},e.textures[t].image);this.textures[t].source=new lm(s)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Sn extends DN{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class Tr extends ln{constructor(e=null,t=1,n=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=jt,this.minFilter=jt,this.wrapR=xn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class IM extends Sn{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new Tr(null,e,t,n),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class rb extends ln{constructor(e=null,t=1,n=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=jt,this.minFilter=jt,this.wrapR=xn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Rn{constructor(e=new Q(1/0,1/0,1/0),t=new Q(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Ws.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Ws.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ws.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=r.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,Ws):Ws.fromBufferAttribute(r,a),Ws.applyMatrix4(e.matrixWorld),this.expandByPoint(Ws);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),lp.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),lp.copy(n.boundingBox)),lp.applyMatrix4(e.matrixWorld),this.union(lp)}const s=e.children;for(let r=0,a=s.length;r<a;r++)this.expandByObject(s[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ws),Ws.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Qu),cp.subVectors(this.max,Qu),dc.subVectors(e.a,Qu),Ac.subVectors(e.b,Qu),pc.subVectors(e.c,Qu),Va.subVectors(Ac,dc),Ya.subVectors(pc,Ac),zo.subVectors(dc,pc);let t=[0,-Va.z,Va.y,0,-Ya.z,Ya.y,0,-zo.z,zo.y,Va.z,0,-Va.x,Ya.z,0,-Ya.x,zo.z,0,-zo.x,-Va.y,Va.x,0,-Ya.y,Ya.x,0,-zo.y,zo.x,0];return!Jm(t,dc,Ac,pc,cp)||(t=[1,0,0,0,1,0,0,0,1],!Jm(t,dc,Ac,pc,cp))?!1:(hp.crossVectors(Va,Ya),t=[hp.x,hp.y,hp.z],Jm(t,dc,Ac,pc,cp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ws).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ws).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Vr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Vr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Vr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Vr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Vr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Vr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Vr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Vr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Vr),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Vr=[new Q,new Q,new Q,new Q,new Q,new Q,new Q,new Q],Ws=new Q,lp=new Rn,dc=new Q,Ac=new Q,pc=new Q,Va=new Q,Ya=new Q,zo=new Q,Qu=new Q,cp=new Q,hp=new Q,Ho=new Q;function Jm(i,e,t,n,s){for(let r=0,a=i.length-3;r<=a;r+=3){Ho.fromArray(i,r);const o=s.x*Math.abs(Ho.x)+s.y*Math.abs(Ho.y)+s.z*Math.abs(Ho.z),l=e.dot(Ho),c=t.dot(Ho),u=n.dot(Ho);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>o)return!1}return!0}const QN=new Rn,Lu=new Q,Km=new Q;class es{constructor(e=new Q,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):QN.setFromPoints(e).getCenter(n);let s=0;for(let r=0,a=e.length;r<a;r++)s=Math.max(s,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(s),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Lu.subVectors(e,this.center);const t=Lu.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),s=(n-this.radius)*.5;this.center.addScaledVector(Lu,s/n),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Km.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Lu.copy(e.center).add(Km)),this.expandByPoint(Lu.copy(e.center).sub(Km))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const Yr=new Q,Zm=new Q,up=new Q,qa=new Q,ey=new Q,dp=new Q,ty=new Q;class zA{constructor(e=new Q,t=new Q(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Yr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Yr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Yr.copy(this.origin).addScaledVector(this.direction,t),Yr.distanceToSquared(e))}distanceSqToSegment(e,t,n,s){Zm.copy(e).add(t).multiplyScalar(.5),up.copy(t).sub(e).normalize(),qa.copy(this.origin).sub(Zm);const r=e.distanceTo(t)*.5,a=-this.direction.dot(up),o=qa.dot(this.direction),l=-qa.dot(up),c=qa.lengthSq(),u=Math.abs(1-a*a);let h,d,A,p;if(u>0)if(h=a*l-o,d=a*o-l,p=r*u,h>=0)if(d>=-p)if(d<=p){const g=1/u;h*=g,d*=g,A=h*(h+a*d+2*o)+d*(a*h+d+2*l)+c}else d=r,h=Math.max(0,-(a*d+o)),A=-h*h+d*(d+2*l)+c;else d=-r,h=Math.max(0,-(a*d+o)),A=-h*h+d*(d+2*l)+c;else d<=-p?(h=Math.max(0,-(-a*r+o)),d=h>0?-r:Math.min(Math.max(-r,-l),r),A=-h*h+d*(d+2*l)+c):d<=p?(h=0,d=Math.min(Math.max(-r,-l),r),A=d*(d+2*l)+c):(h=Math.max(0,-(a*r+o)),d=h>0?r:Math.min(Math.max(-r,-l),r),A=-h*h+d*(d+2*l)+c);else d=a>0?-r:r,h=Math.max(0,-(a*d+o)),A=-h*h+d*(d+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),s&&s.copy(Zm).addScaledVector(up,d),A}intersectSphere(e,t){Yr.subVectors(e.center,this.origin);const n=Yr.dot(this.direction),s=Yr.dot(Yr)-n*n,r=e.radius*e.radius;if(s>r)return null;const a=Math.sqrt(r-s),o=n-a,l=n+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,s,r,a,o,l;const c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,s=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,s=(e.min.x-d.x)*c),u>=0?(r=(e.min.y-d.y)*u,a=(e.max.y-d.y)*u):(r=(e.max.y-d.y)*u,a=(e.min.y-d.y)*u),n>a||r>s||((r>n||isNaN(n))&&(n=r),(a<s||isNaN(s))&&(s=a),h>=0?(o=(e.min.z-d.z)*h,l=(e.max.z-d.z)*h):(o=(e.max.z-d.z)*h,l=(e.min.z-d.z)*h),n>l||o>s)||((o>n||n!==n)&&(n=o),(l<s||s!==s)&&(s=l),s<0)?null:this.at(n>=0?n:s,t)}intersectsBox(e){return this.intersectBox(e,Yr)!==null}intersectTriangle(e,t,n,s,r){ey.subVectors(t,e),dp.subVectors(n,e),ty.crossVectors(ey,dp);let a=this.direction.dot(ty),o;if(a>0){if(s)return null;o=1}else if(a<0)o=-1,a=-a;else return null;qa.subVectors(this.origin,e);const l=o*this.direction.dot(dp.crossVectors(qa,dp));if(l<0)return null;const c=o*this.direction.dot(ey.cross(qa));if(c<0||l+c>a)return null;const u=-o*qa.dot(ty);return u<0?null:this.at(u/a,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class We{constructor(e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m){We.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m)}set(e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m){const f=this.elements;return f[0]=e,f[4]=t,f[8]=n,f[12]=s,f[1]=r,f[5]=a,f[9]=o,f[13]=l,f[2]=c,f[6]=u,f[10]=h,f[14]=d,f[3]=A,f[7]=p,f[11]=g,f[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new We().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const t=this.elements,n=e.elements,s=1/fc.setFromMatrixColumn(e,0).length(),r=1/fc.setFromMatrixColumn(e,1).length(),a=1/fc.setFromMatrixColumn(e,2).length();return t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,s=e.y,r=e.z,a=Math.cos(n),o=Math.sin(n),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const d=a*u,A=a*h,p=o*u,g=o*h;t[0]=l*u,t[4]=-l*h,t[8]=c,t[1]=A+p*c,t[5]=d-g*c,t[9]=-o*l,t[2]=g-d*c,t[6]=p+A*c,t[10]=a*l}else if(e.order==="YXZ"){const d=l*u,A=l*h,p=c*u,g=c*h;t[0]=d+g*o,t[4]=p*o-A,t[8]=a*c,t[1]=a*h,t[5]=a*u,t[9]=-o,t[2]=A*o-p,t[6]=g+d*o,t[10]=a*l}else if(e.order==="ZXY"){const d=l*u,A=l*h,p=c*u,g=c*h;t[0]=d-g*o,t[4]=-a*h,t[8]=p+A*o,t[1]=A+p*o,t[5]=a*u,t[9]=g-d*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const d=a*u,A=a*h,p=o*u,g=o*h;t[0]=l*u,t[4]=p*c-A,t[8]=d*c+g,t[1]=l*h,t[5]=g*c+d,t[9]=A*c-p,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const d=a*l,A=a*c,p=o*l,g=o*c;t[0]=l*u,t[4]=g-d*h,t[8]=p*h+A,t[1]=h,t[5]=a*u,t[9]=-o*u,t[2]=-c*u,t[6]=A*h+p,t[10]=d-g*h}else if(e.order==="XZY"){const d=a*l,A=a*c,p=o*l,g=o*c;t[0]=l*u,t[4]=-h,t[8]=c*u,t[1]=d*h+g,t[5]=a*u,t[9]=A*h-p,t[2]=p*h-A,t[6]=o*u,t[10]=g*h+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(LN,e,NN)}lookAt(e,t,n){const s=this.elements;return os.subVectors(e,t),os.lengthSq()===0&&(os.z=1),os.normalize(),Wa.crossVectors(n,os),Wa.lengthSq()===0&&(Math.abs(n.z)===1?os.x+=1e-4:os.z+=1e-4,os.normalize(),Wa.crossVectors(n,os)),Wa.normalize(),Ap.crossVectors(os,Wa),s[0]=Wa.x,s[4]=Ap.x,s[8]=os.x,s[1]=Wa.y,s[5]=Ap.y,s[9]=os.y,s[2]=Wa.z,s[6]=Ap.z,s[10]=os.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,r=this.elements,a=n[0],o=n[4],l=n[8],c=n[12],u=n[1],h=n[5],d=n[9],A=n[13],p=n[2],g=n[6],m=n[10],f=n[14],y=n[3],_=n[7],E=n[11],v=n[15],C=s[0],x=s[4],I=s[8],b=s[12],w=s[1],S=s[5],B=s[9],T=s[13],D=s[2],P=s[6],R=s[10],L=s[14],F=s[3],$=s[7],J=s[11],W=s[15];return r[0]=a*C+o*w+l*D+c*F,r[4]=a*x+o*S+l*P+c*$,r[8]=a*I+o*B+l*R+c*J,r[12]=a*b+o*T+l*L+c*W,r[1]=u*C+h*w+d*D+A*F,r[5]=u*x+h*S+d*P+A*$,r[9]=u*I+h*B+d*R+A*J,r[13]=u*b+h*T+d*L+A*W,r[2]=p*C+g*w+m*D+f*F,r[6]=p*x+g*S+m*P+f*$,r[10]=p*I+g*B+m*R+f*J,r[14]=p*b+g*T+m*L+f*W,r[3]=y*C+_*w+E*D+v*F,r[7]=y*x+_*S+E*P+v*$,r[11]=y*I+_*B+E*R+v*J,r[15]=y*b+_*T+E*L+v*W,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],s=e[8],r=e[12],a=e[1],o=e[5],l=e[9],c=e[13],u=e[2],h=e[6],d=e[10],A=e[14],p=e[3],g=e[7],m=e[11],f=e[15],y=l*A-c*d,_=o*A-c*h,E=o*d-l*h,v=a*A-c*u,C=a*d-l*u,x=a*h-o*u;return t*(g*y-m*_+f*E)-n*(p*y-m*v+f*C)+s*(p*_-g*v+f*x)-r*(p*E-g*C+m*x)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],A=e[11],p=e[12],g=e[13],m=e[14],f=e[15],y=h*m*c-g*d*c+g*l*A-o*m*A-h*l*f+o*d*f,_=p*d*c-u*m*c-p*l*A+a*m*A+u*l*f-a*d*f,E=u*g*c-p*h*c+p*o*A-a*g*A-u*o*f+a*h*f,v=p*h*l-u*g*l-p*o*d+a*g*d+u*o*m-a*h*m,C=t*y+n*_+s*E+r*v;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/C;return e[0]=y*x,e[1]=(g*d*r-h*m*r-g*s*A+n*m*A+h*s*f-n*d*f)*x,e[2]=(o*m*r-g*l*r+g*s*c-n*m*c-o*s*f+n*l*f)*x,e[3]=(h*l*r-o*d*r-h*s*c+n*d*c+o*s*A-n*l*A)*x,e[4]=_*x,e[5]=(u*m*r-p*d*r+p*s*A-t*m*A-u*s*f+t*d*f)*x,e[6]=(p*l*r-a*m*r-p*s*c+t*m*c+a*s*f-t*l*f)*x,e[7]=(a*d*r-u*l*r+u*s*c-t*d*c-a*s*A+t*l*A)*x,e[8]=E*x,e[9]=(p*h*r-u*g*r-p*n*A+t*g*A+u*n*f-t*h*f)*x,e[10]=(a*g*r-p*o*r+p*n*c-t*g*c-a*n*f+t*o*f)*x,e[11]=(u*o*r-a*h*r-u*n*c+t*h*c+a*n*A-t*o*A)*x,e[12]=v*x,e[13]=(u*g*s-p*h*s+p*n*d-t*g*d-u*n*m+t*h*m)*x,e[14]=(p*o*s-a*g*s-p*n*l+t*g*l+a*n*m-t*o*m)*x,e[15]=(a*h*s-u*o*s+u*n*l-t*h*l-a*n*d+t*o*d)*x,this}scale(e){const t=this.elements,n=e.x,s=e.y,r=e.z;return t[0]*=n,t[4]*=s,t[8]*=r,t[1]*=n,t[5]*=s,t[9]*=r,t[2]*=n,t[6]*=s,t[10]*=r,t[3]*=n,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,s))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),s=Math.sin(t),r=1-n,a=e.x,o=e.y,l=e.z,c=r*a,u=r*o;return this.set(c*a+n,c*o-s*l,c*l+s*o,0,c*o+s*l,u*o+n,u*l-s*a,0,c*l-s*o,u*l+s*a,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,s,r,a){return this.set(1,n,r,0,e,1,a,0,t,s,1,0,0,0,0,1),this}compose(e,t,n){const s=this.elements,r=t._x,a=t._y,o=t._z,l=t._w,c=r+r,u=a+a,h=o+o,d=r*c,A=r*u,p=r*h,g=a*u,m=a*h,f=o*h,y=l*c,_=l*u,E=l*h,v=n.x,C=n.y,x=n.z;return s[0]=(1-(g+f))*v,s[1]=(A+E)*v,s[2]=(p-_)*v,s[3]=0,s[4]=(A-E)*C,s[5]=(1-(d+f))*C,s[6]=(m+y)*C,s[7]=0,s[8]=(p+_)*x,s[9]=(m-y)*x,s[10]=(1-(d+g))*x,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,n){const s=this.elements;if(e.x=s[12],e.y=s[13],e.z=s[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let r=fc.set(s[0],s[1],s[2]).length();const a=fc.set(s[4],s[5],s[6]).length(),o=fc.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),js.copy(this);const c=1/r,u=1/a,h=1/o;return js.elements[0]*=c,js.elements[1]*=c,js.elements[2]*=c,js.elements[4]*=u,js.elements[5]*=u,js.elements[6]*=u,js.elements[8]*=h,js.elements[9]*=h,js.elements[10]*=h,t.setFromRotationMatrix(js),n.x=r,n.y=a,n.z=o,this}makePerspective(e,t,n,s,r,a,o=wr,l=!1){const c=this.elements,u=2*r/(t-e),h=2*r/(n-s),d=(t+e)/(t-e),A=(n+s)/(n-s);let p,g;if(l)p=r/(a-r),g=a*r/(a-r);else if(o===wr)p=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===Ig)p=-a/(a-r),g=-a*r/(a-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return c[0]=u,c[4]=0,c[8]=d,c[12]=0,c[1]=0,c[5]=h,c[9]=A,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=g,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,s,r,a,o=wr,l=!1){const c=this.elements,u=2/(t-e),h=2/(n-s),d=-(t+e)/(t-e),A=-(n+s)/(n-s);let p,g;if(l)p=1/(a-r),g=a/(a-r);else if(o===wr)p=-2/(a-r),g=-(a+r)/(a-r);else if(o===Ig)p=-1/(a-r),g=-r/(a-r);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return c[0]=u,c[4]=0,c[8]=0,c[12]=d,c[1]=0,c[5]=h,c[9]=0,c[13]=A,c[2]=0,c[6]=0,c[10]=p,c[14]=g,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<16;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const fc=new Q,js=new We,LN=new Q(0,0,0),NN=new Q(1,1,1),Wa=new Q,Ap=new Q,os=new Q,Px=new We,Fx=new Yt;class Zi{constructor(e=0,t=0,n=0,s=Zi.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,s=this._order){return this._x=e,this._y=t,this._z=n,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const s=e.elements,r=s[0],a=s[4],o=s[8],l=s[1],c=s[5],u=s[9],h=s[2],d=s[6],A=s[10];switch(t){case"XYZ":this._y=Math.asin(mt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,A),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-mt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,A),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(mt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,A),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-mt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,A),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(mt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(o,A));break;case"XZY":this._z=Math.asin(-mt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-u,A),this._y=0);break;default:qe("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Px.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Px,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Fx.setFromEuler(this),this.setFromQuaternion(Fx,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Zi.DEFAULT_ORDER="XYZ";class ab{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let PN=0;const kx=new Q,gc=new Yt,qr=new We,pp=new Q,Nu=new Q,FN=new Q,kN=new Yt,Ux=new Q(1,0,0),Ox=new Q(0,1,0),Gx=new Q(0,0,1),zx={type:"added"},UN={type:"removed"},mc={type:"childadded",child:null},ny={type:"childremoved",child:null};class Rt extends hr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:PN++}),this.uuid=zs(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Rt.DEFAULT_UP.clone();const e=new Q,t=new Zi,n=new Yt,s=new Q(1,1,1);function r(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new We},normalMatrix:{value:new pt}}),this.matrix=new We,this.matrixWorld=new We,this.matrixAutoUpdate=Rt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Rt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new ab,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return gc.setFromAxisAngle(e,t),this.quaternion.multiply(gc),this}rotateOnWorldAxis(e,t){return gc.setFromAxisAngle(e,t),this.quaternion.premultiply(gc),this}rotateX(e){return this.rotateOnAxis(Ux,e)}rotateY(e){return this.rotateOnAxis(Ox,e)}rotateZ(e){return this.rotateOnAxis(Gx,e)}translateOnAxis(e,t){return kx.copy(e).applyQuaternion(this.quaternion),this.position.add(kx.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ux,e)}translateY(e){return this.translateOnAxis(Ox,e)}translateZ(e){return this.translateOnAxis(Gx,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(qr.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?pp.copy(e):pp.set(e,t,n);const s=this.parent;this.updateWorldMatrix(!0,!1),Nu.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?qr.lookAt(Nu,pp,this.up):qr.lookAt(pp,Nu,this.up),this.quaternion.setFromRotationMatrix(qr),s&&(qr.extractRotation(s.matrixWorld),gc.setFromRotationMatrix(qr),this.quaternion.premultiply(gc.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(rt("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(zx),mc.child=e,this.dispatchEvent(mc),mc.child=null):rt("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(UN),ny.child=e,this.dispatchEvent(ny),ny.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),qr.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),qr.multiply(e.parent.matrixWorld)),e.applyMatrix4(qr),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(zx),mc.child=e,this.dispatchEvent(mc),mc.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,s=this.children.length;n<s;n++){const a=this.children[n].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const s=this.children;for(let r=0,a=s.length;r<a;r++)s[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Nu,e,FN),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Nu,kN,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const s=this.children;for(let r=0,a=s.length;r<a;r++)s[r].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(o=>({...o})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function r(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){const h=l[c];r(e.shapes,h)}else r(e.shapes,l)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,c=this.material.length;l<c;l++)o.push(r(e.materials,this.material[l]));s.material=o}else s.material=r(e.materials,this.material);if(this.children.length>0){s.children=[];for(let o=0;o<this.children.length;o++)s.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){s.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];s.animations.push(r(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),c=a(e.textures),u=a(e.images),h=a(e.shapes),d=a(e.skeletons),A=a(e.animations),p=a(e.nodes);o.length>0&&(n.geometries=o),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),d.length>0&&(n.skeletons=d),A.length>0&&(n.animations=A),p.length>0&&(n.nodes=p)}return n.object=s,n;function a(o){const l=[];for(const c in o){const u=o[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const s=e.children[n];this.add(s.clone())}return this}}Rt.DEFAULT_UP=new Q(0,1,0);Rt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Rt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Xs=new Q,Wr=new Q,iy=new Q,jr=new Q,yc=new Q,_c=new Q,Hx=new Q,sy=new Q,ry=new Q,ay=new Q,oy=new Mt,ly=new Mt,cy=new Mt;class ps{constructor(e=new Q,t=new Q,n=new Q){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,s){s.subVectors(n,t),Xs.subVectors(e,t),s.cross(Xs);const r=s.lengthSq();return r>0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,n,s,r){Xs.subVectors(s,t),Wr.subVectors(n,t),iy.subVectors(e,t);const a=Xs.dot(Xs),o=Xs.dot(Wr),l=Xs.dot(iy),c=Wr.dot(Wr),u=Wr.dot(iy),h=a*c-o*o;if(h===0)return r.set(0,0,0),null;const d=1/h,A=(c*l-o*u)*d,p=(a*u-o*l)*d;return r.set(1-A-p,p,A)}static containsPoint(e,t,n,s){return this.getBarycoord(e,t,n,s,jr)===null?!1:jr.x>=0&&jr.y>=0&&jr.x+jr.y<=1}static getInterpolation(e,t,n,s,r,a,o,l){return this.getBarycoord(e,t,n,s,jr)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,jr.x),l.addScaledVector(a,jr.y),l.addScaledVector(o,jr.z),l)}static getInterpolatedAttribute(e,t,n,s,r,a){return oy.setScalar(0),ly.setScalar(0),cy.setScalar(0),oy.fromBufferAttribute(e,t),ly.fromBufferAttribute(e,n),cy.fromBufferAttribute(e,s),a.setScalar(0),a.addScaledVector(oy,r.x),a.addScaledVector(ly,r.y),a.addScaledVector(cy,r.z),a}static isFrontFacing(e,t,n,s){return Xs.subVectors(n,t),Wr.subVectors(e,t),Xs.cross(Wr).dot(s)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,s){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,n,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Xs.subVectors(this.c,this.b),Wr.subVectors(this.a,this.b),Xs.cross(Wr).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ps.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ps.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,s,r){return ps.getInterpolation(e,this.a,this.b,this.c,t,n,s,r)}containsPoint(e){return ps.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ps.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,s=this.b,r=this.c;let a,o;yc.subVectors(s,n),_c.subVectors(r,n),sy.subVectors(e,n);const l=yc.dot(sy),c=_c.dot(sy);if(l<=0&&c<=0)return t.copy(n);ry.subVectors(e,s);const u=yc.dot(ry),h=_c.dot(ry);if(u>=0&&h<=u)return t.copy(s);const d=l*h-u*c;if(d<=0&&l>=0&&u<=0)return a=l/(l-u),t.copy(n).addScaledVector(yc,a);ay.subVectors(e,r);const A=yc.dot(ay),p=_c.dot(ay);if(p>=0&&A<=p)return t.copy(r);const g=A*c-l*p;if(g<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(_c,o);const m=u*p-A*h;if(m<=0&&h-u>=0&&A-p>=0)return Hx.subVectors(r,s),o=(h-u)/(h-u+(A-p)),t.copy(s).addScaledVector(Hx,o);const f=1/(m+g+d);return a=g*f,o=d*f,t.copy(n).addScaledVector(yc,a).addScaledVector(_c,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const wM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ja={h:0,s:0,l:0},fp={h:0,s:0,l:0};function hy(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class we{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ot){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,s=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Bt.colorSpaceToWorking(this,s),this}setHSL(e,t,n,s=Bt.workingColorSpace){if(e=sb(e,1),t=mt(t,0,1),n=mt(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,a=2*n-r;this.r=hy(a,r,e+1/3),this.g=hy(a,r,e),this.b=hy(a,r,e-1/3)}return Bt.colorSpaceToWorking(this,s),this}setStyle(e,t=Ot){function n(r){r!==void 0&&parseFloat(r)<1&&qe("Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const a=s[1],o=s[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:qe("Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],a=r.length;if(a===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(r,16),t);qe("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ot){const n=wM[e.toLowerCase()];return n!==void 0?this.setHex(n,t):qe("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Da(e.r),this.g=Da(e.g),this.b=Da(e.b),this}copyLinearToSRGB(e){return this.r=gh(e.r),this.g=gh(e.g),this.b=gh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ot){return Bt.workingToColorSpace(bi.copy(this),e),Math.round(mt(bi.r*255,0,255))*65536+Math.round(mt(bi.g*255,0,255))*256+Math.round(mt(bi.b*255,0,255))}getHexString(e=Ot){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.workingToColorSpace(bi.copy(this),t);const n=bi.r,s=bi.g,r=bi.b,a=Math.max(n,s,r),o=Math.min(n,s,r);let l,c;const u=(o+a)/2;if(o===a)l=0,c=0;else{const h=a-o;switch(c=u<=.5?h/(a+o):h/(2-a-o),a){case n:l=(s-r)/h+(s<r?6:0);break;case s:l=(r-n)/h+2;break;case r:l=(n-s)/h+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=Bt.workingColorSpace){return Bt.workingToColorSpace(bi.copy(this),t),e.r=bi.r,e.g=bi.g,e.b=bi.b,e}getStyle(e=Ot){Bt.workingToColorSpace(bi.copy(this),e);const t=bi.r,n=bi.g,s=bi.b;return e!==Ot?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(s*255)})`}offsetHSL(e,t,n){return this.getHSL(ja),this.setHSL(ja.h+e,ja.s+t,ja.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(ja),e.getHSL(fp);const n=qd(ja.h,fp.h,t),s=qd(ja.s,fp.s,t),r=qd(ja.l,fp.l,t);return this.setHSL(n,s,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,s=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*s,this.g=r[1]*t+r[4]*n+r[7]*s,this.b=r[2]*t+r[5]*n+r[8]*s,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const bi=new we;we.NAMES=wM;let ON=0,_s=class extends hr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ON++}),this.uuid=zs(),this.name="",this.type="Material",this.blending=Bl,this.side=or,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=X0,this.blendDst=J0,this.blendEquation=fl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new we(0,0,0),this.blendAlpha=0,this.depthFunc=Sh,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Mx,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=hc,this.stencilZFail=hc,this.stencilZPass=hc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){qe(`Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){qe(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(n):s&&s.isVector3&&n&&n.isVector3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Bl&&(n.blending=this.blending),this.side!==or&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==X0&&(n.blendSrc=this.blendSrc),this.blendDst!==J0&&(n.blendDst=this.blendDst),this.blendEquation!==fl&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Sh&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Mx&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==hc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==hc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==hc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function s(r){const a=[];for(const o in r){const l=r[o];delete l.metadata,a.push(l)}return a}if(t){const r=s(e.textures),a=s(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const s=t.length;n=new Array(s);for(let r=0;r!==s;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};class Xn extends _s{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new we(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Zi,this.combine=$v,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const xa=GN();function GN(){const i=new ArrayBuffer(4),e=new Float32Array(i),t=new Uint32Array(i),n=new Uint32Array(512),s=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(n[l]=0,n[l|256]=32768,s[l]=24,s[l|256]=24):c<-14?(n[l]=1024>>-c-14,n[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(n[l]=c+15<<10,n[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(n[l]=31744,n[l|256]=64512,s[l]=24,s[l|256]=24):(n[l]=31744,n[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;(c&8388608)===0;)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(o[l]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:s,mantissaTable:r,exponentTable:a,offsetTable:o}}function zN(i){Math.abs(i)>65504&&qe("DataUtils.toHalfFloat(): Value out of range."),i=mt(i,-65504,65504),xa.floatView[0]=i;const e=xa.uint32View[0],t=e>>23&511;return xa.baseTable[t]+((e&8388607)>>xa.shiftTable[t])}function HN(i){const e=i>>10;return xa.uint32View[0]=xa.mantissaTable[xa.offsetTable[e]+(i&1023)]+xa.exponentTable[e],xa.floatView[0]}class gp{static toHalfFloat(e){return zN(e)}static fromHalfFloat(e){return HN(e)}}const zn=new Q,mp=new pe;let $N=0;class rn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:$N++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=bE,this.updateRanges=[],this.gpuType=Cn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let s=0,r=this.itemSize;s<r;s++)this.array[e+s]=t.array[n+s];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)mp.fromBufferAttribute(this,t),mp.applyMatrix3(e),this.setXY(t,mp.x,mp.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyMatrix3(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyMatrix4(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyNormalMatrix(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.transformDirection(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=tr(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Zt(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=tr(t,this.array)),t}setX(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=tr(t,this.array)),t}setY(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=tr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=tr(t,this.array)),t}setW(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Zt(t,this.array),n=Zt(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,s){return e*=this.itemSize,this.normalized&&(t=Zt(t,this.array),n=Zt(n,this.array),s=Zt(s,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=s,this}setXYZW(e,t,n,s,r){return e*=this.itemSize,this.normalized&&(t=Zt(t,this.array),n=Zt(n,this.array),s=Zt(s,this.array),r=Zt(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=s,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==bE&&(e.usage=this.usage),e}}class SM extends rn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class BM extends rn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class en extends rn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let VN=0;const ws=new We,uy=new Rt,Ec=new Q,ls=new Rn,Pu=new Rn,ei=new Q;class fn extends hr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:VN++}),this.uuid=zs(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(xM(e)?BM:SM)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const r=new pt().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(e),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ws.makeRotationFromQuaternion(e),this.applyMatrix4(ws),this}rotateX(e){return ws.makeRotationX(e),this.applyMatrix4(ws),this}rotateY(e){return ws.makeRotationY(e),this.applyMatrix4(ws),this}rotateZ(e){return ws.makeRotationZ(e),this.applyMatrix4(ws),this}translate(e,t,n){return ws.makeTranslation(e,t,n),this.applyMatrix4(ws),this}scale(e,t,n){return ws.makeScale(e,t,n),this.applyMatrix4(ws),this}lookAt(e){return uy.lookAt(e),uy.updateMatrix(),this.applyMatrix4(uy.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ec).negate(),this.translate(Ec.x,Ec.y,Ec.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let s=0,r=e.length;s<r;s++){const a=e[s];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new en(n,3))}else{const n=Math.min(e.length,t.count);for(let s=0;s<n;s++){const r=e[s];t.setXYZ(s,r.x,r.y,r.z||0)}e.length>t.count&&qe("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Rn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){rt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Q(-1/0,-1/0,-1/0),new Q(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,s=t.length;n<s;n++){const r=t[n];ls.setFromBufferAttribute(r),this.morphTargetsRelative?(ei.addVectors(this.boundingBox.min,ls.min),this.boundingBox.expandByPoint(ei),ei.addVectors(this.boundingBox.max,ls.max),this.boundingBox.expandByPoint(ei)):(this.boundingBox.expandByPoint(ls.min),this.boundingBox.expandByPoint(ls.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&rt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new es);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){rt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Q,1/0);return}if(e){const n=this.boundingSphere.center;if(ls.setFromBufferAttribute(e),t)for(let r=0,a=t.length;r<a;r++){const o=t[r];Pu.setFromBufferAttribute(o),this.morphTargetsRelative?(ei.addVectors(ls.min,Pu.min),ls.expandByPoint(ei),ei.addVectors(ls.max,Pu.max),ls.expandByPoint(ei)):(ls.expandByPoint(Pu.min),ls.expandByPoint(Pu.max))}ls.getCenter(n);let s=0;for(let r=0,a=e.count;r<a;r++)ei.fromBufferAttribute(e,r),s=Math.max(s,n.distanceToSquared(ei));if(t)for(let r=0,a=t.length;r<a;r++){const o=t[r],l=this.morphTargetsRelative;for(let c=0,u=o.count;c<u;c++)ei.fromBufferAttribute(o,c),l&&(Ec.fromBufferAttribute(e,c),ei.add(Ec)),s=Math.max(s,n.distanceToSquared(ei))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&rt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){rt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,s=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new rn(new Float32Array(4*n.count),4));const a=this.getAttribute("tangent"),o=[],l=[];for(let I=0;I<n.count;I++)o[I]=new Q,l[I]=new Q;const c=new Q,u=new Q,h=new Q,d=new pe,A=new pe,p=new pe,g=new Q,m=new Q;function f(I,b,w){c.fromBufferAttribute(n,I),u.fromBufferAttribute(n,b),h.fromBufferAttribute(n,w),d.fromBufferAttribute(r,I),A.fromBufferAttribute(r,b),p.fromBufferAttribute(r,w),u.sub(c),h.sub(c),A.sub(d),p.sub(d);const S=1/(A.x*p.y-p.x*A.y);isFinite(S)&&(g.copy(u).multiplyScalar(p.y).addScaledVector(h,-A.y).multiplyScalar(S),m.copy(h).multiplyScalar(A.x).addScaledVector(u,-p.x).multiplyScalar(S),o[I].add(g),o[b].add(g),o[w].add(g),l[I].add(m),l[b].add(m),l[w].add(m))}let y=this.groups;y.length===0&&(y=[{start:0,count:e.count}]);for(let I=0,b=y.length;I<b;++I){const w=y[I],S=w.start,B=w.count;for(let T=S,D=S+B;T<D;T+=3)f(e.getX(T+0),e.getX(T+1),e.getX(T+2))}const _=new Q,E=new Q,v=new Q,C=new Q;function x(I){v.fromBufferAttribute(s,I),C.copy(v);const b=o[I];_.copy(b),_.sub(v.multiplyScalar(v.dot(b))).normalize(),E.crossVectors(C,b);const S=E.dot(l[I])<0?-1:1;a.setXYZW(I,_.x,_.y,_.z,S)}for(let I=0,b=y.length;I<b;++I){const w=y[I],S=w.start,B=w.count;for(let T=S,D=S+B;T<D;T+=3)x(e.getX(T+0)),x(e.getX(T+1)),x(e.getX(T+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new rn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let d=0,A=n.count;d<A;d++)n.setXYZ(d,0,0,0);const s=new Q,r=new Q,a=new Q,o=new Q,l=new Q,c=new Q,u=new Q,h=new Q;if(e)for(let d=0,A=e.count;d<A;d+=3){const p=e.getX(d+0),g=e.getX(d+1),m=e.getX(d+2);s.fromBufferAttribute(t,p),r.fromBufferAttribute(t,g),a.fromBufferAttribute(t,m),u.subVectors(a,r),h.subVectors(s,r),u.cross(h),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,m),o.add(u),l.add(u),c.add(u),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(m,c.x,c.y,c.z)}else for(let d=0,A=t.count;d<A;d+=3)s.fromBufferAttribute(t,d+0),r.fromBufferAttribute(t,d+1),a.fromBufferAttribute(t,d+2),u.subVectors(a,r),h.subVectors(s,r),u.cross(h),n.setXYZ(d+0,u.x,u.y,u.z),n.setXYZ(d+1,u.x,u.y,u.z),n.setXYZ(d+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ei.fromBufferAttribute(e,t),ei.normalize(),e.setXYZ(t,ei.x,ei.y,ei.z)}toNonIndexed(){function e(o,l){const c=o.array,u=o.itemSize,h=o.normalized,d=new c.constructor(l.length*u);let A=0,p=0;for(let g=0,m=l.length;g<m;g++){o.isInterleavedBufferAttribute?A=l[g]*o.data.stride+o.offset:A=l[g]*u;for(let f=0;f<u;f++)d[p++]=c[A++]}return new rn(d,u,h)}if(this.index===null)return qe("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new fn,n=this.index.array,s=this.attributes;for(const o in s){const l=s[o],c=e(l,n);t.setAttribute(o,c)}const r=this.morphAttributes;for(const o in r){const l=[],c=r[o];for(let u=0,h=c.length;u<h;u++){const d=c[u],A=e(d,n);l.push(A)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const c=a[o];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,d=c.length;h<d;h++){const A=c[h];u.push(A.toJSON(e.data))}u.length>0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],h=r[c];for(let d=0,A=h.length;d<A;d++)u.push(h[d].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let c=0,u=a.length;c<u;c++){const h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const $x=new We,$o=new zA,yp=new es,Vx=new Q,_p=new Q,Ep=new Q,vp=new Q,dy=new Q,bp=new Q,Yx=new Q,xp=new Q;let Je=class extends Rt{constructor(e=new fn,t=new Xn){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=s.length;r<a;r++){const o=s[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}getVertexPosition(e,t){const n=this.geometry,s=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(s,e);const o=this.morphTargetInfluences;if(r&&o){bp.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const u=o[l],h=r[l];u!==0&&(dy.fromBufferAttribute(h,e),a?bp.addScaledVector(dy,u):bp.addScaledVector(dy.sub(t),u))}t.add(bp)}return t}raycast(e,t){const n=this.geometry,s=this.material,r=this.matrixWorld;s!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),yp.copy(n.boundingSphere),yp.applyMatrix4(r),$o.copy(e.ray).recast(e.near),!(yp.containsPoint($o.origin)===!1&&($o.intersectSphere(yp,Vx)===null||$o.origin.distanceToSquared(Vx)>(e.far-e.near)**2))&&($x.copy(r).invert(),$o.copy(e.ray).applyMatrix4($x),!(n.boundingBox!==null&&$o.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,$o)))}_computeIntersections(e,t,n){let s;const r=this.geometry,a=this.material,o=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,h=r.attributes.normal,d=r.groups,A=r.drawRange;if(o!==null)if(Array.isArray(a))for(let p=0,g=d.length;p<g;p++){const m=d[p],f=a[m.materialIndex],y=Math.max(m.start,A.start),_=Math.min(o.count,Math.min(m.start+m.count,A.start+A.count));for(let E=y,v=_;E<v;E+=3){const C=o.getX(E),x=o.getX(E+1),I=o.getX(E+2);s=Cp(this,f,e,n,c,u,h,C,x,I),s&&(s.faceIndex=Math.floor(E/3),s.face.materialIndex=m.materialIndex,t.push(s))}}else{const p=Math.max(0,A.start),g=Math.min(o.count,A.start+A.count);for(let m=p,f=g;m<f;m+=3){const y=o.getX(m),_=o.getX(m+1),E=o.getX(m+2);s=Cp(this,a,e,n,c,u,h,y,_,E),s&&(s.faceIndex=Math.floor(m/3),t.push(s))}}else if(l!==void 0)if(Array.isArray(a))for(let p=0,g=d.length;p<g;p++){const m=d[p],f=a[m.materialIndex],y=Math.max(m.start,A.start),_=Math.min(l.count,Math.min(m.start+m.count,A.start+A.count));for(let E=y,v=_;E<v;E+=3){const C=E,x=E+1,I=E+2;s=Cp(this,f,e,n,c,u,h,C,x,I),s&&(s.faceIndex=Math.floor(E/3),s.face.materialIndex=m.materialIndex,t.push(s))}}else{const p=Math.max(0,A.start),g=Math.min(l.count,A.start+A.count);for(let m=p,f=g;m<f;m+=3){const y=m,_=m+1,E=m+2;s=Cp(this,a,e,n,c,u,h,y,_,E),s&&(s.faceIndex=Math.floor(m/3),t.push(s))}}}};function YN(i,e,t,n,s,r,a,o){let l;if(e.side===_i?l=n.intersectTriangle(a,r,s,!0,o):l=n.intersectTriangle(s,r,a,e.side===or,o),l===null)return null;xp.copy(o),xp.applyMatrix4(i.matrixWorld);const c=t.ray.origin.distanceTo(xp);return c<t.near||c>t.far?null:{distance:c,point:xp.clone(),object:i}}function Cp(i,e,t,n,s,r,a,o,l,c){i.getVertexPosition(o,_p),i.getVertexPosition(l,Ep),i.getVertexPosition(c,vp);const u=YN(i,e,t,n,_p,Ep,vp,Yx);if(u){const h=new Q;ps.getBarycoord(Yx,_p,Ep,vp,h),s&&(u.uv=ps.getInterpolatedAttribute(s,o,l,c,h,new pe)),r&&(u.uv1=ps.getInterpolatedAttribute(r,o,l,c,h,new pe)),a&&(u.normal=ps.getInterpolatedAttribute(a,o,l,c,h,new Q),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));const d={a:o,b:l,c,normal:new Q,materialIndex:0};ps.getNormal(_p,Ep,vp,d.normal),u.face=d,u.barycoord=h}return u}class Hs extends fn{constructor(e=1,t=1,n=1,s=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:s,heightSegments:r,depthSegments:a};const o=this;s=Math.floor(s),r=Math.floor(r),a=Math.floor(a);const l=[],c=[],u=[],h=[];let d=0,A=0;p("z","y","x",-1,-1,n,t,e,a,r,0),p("z","y","x",1,-1,n,t,-e,a,r,1),p("x","z","y",1,1,e,n,t,s,a,2),p("x","z","y",1,-1,e,n,-t,s,a,3),p("x","y","z",1,-1,e,t,n,s,r,4),p("x","y","z",-1,-1,e,t,-n,s,r,5),this.setIndex(l),this.setAttribute("position",new en(c,3)),this.setAttribute("normal",new en(u,3)),this.setAttribute("uv",new en(h,2));function p(g,m,f,y,_,E,v,C,x,I,b){const w=E/x,S=v/I,B=E/2,T=v/2,D=C/2,P=x+1,R=I+1;let L=0,F=0;const $=new Q;for(let J=0;J<R;J++){const W=J*S-T;for(let he=0;he<P;he++){const le=he*w-B;$[g]=le*y,$[m]=W*_,$[f]=D,c.push($.x,$.y,$.z),$[g]=0,$[m]=0,$[f]=C>0?1:-1,u.push($.x,$.y,$.z),h.push(he/x),h.push(1-J/I),L+=1}}for(let J=0;J<I;J++)for(let W=0;W<x;W++){const he=d+W+P*J,le=d+W+P*(J+1),Z=d+(W+1)+P*(J+1),ne=d+(W+1)+P*J;l.push(he,le,ne),l.push(le,Z,ne),F+=6}o.addGroup(A,F,b),A+=F,d+=L}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Hs(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Fh(i){const e={};for(const t in i){e[t]={};for(const n in i[t]){const s=i[t][n];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)?s.isRenderTargetTexture?(qe("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=s.clone():Array.isArray(s)?e[t][n]=s.slice():e[t][n]=s}}return e}function Fi(i){const e={};for(let t=0;t<i.length;t++){const n=Fh(i[t]);for(const s in n)e[s]=n[s]}return e}function qN(i){const e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function TM(i){const e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Bt.workingColorSpace}const ob={clone:Fh,merge:Fi};var WN=`void main() {
|
|
68
|
+
*/const su="182",TL=0,wx=1,ML=2,Ff=1,RL=2,vd=3,or=0,_i=1,On=2,Os=0,Bl=1,j_=2,Sx=3,Bx=4,DL=5,fl=100,QL=101,LL=102,NL=103,PL=104,FL=200,kL=201,UL=202,OL=203,X_=204,J_=205,GL=206,zL=207,HL=208,$L=209,VL=210,YL=211,qL=212,WL=213,jL=214,K_=0,Z_=1,eE=2,Sh=3,tE=4,nE=5,iE=6,sE=7,$v=0,XL=1,JL=2,Gs=0,Vv=1,Yv=2,qv=3,dA=4,EM=5,Wv=6,Bh=7,Tx="attached",KL="detached",Th=300,So=301,Mh=302,AA=303,rE=304,im=306,lr=1e3,xn=1001,Ol=1002,jt=1003,ru=1004,fo=1005,ft=1006,Tl=1007,Hi=1008,aE=1008,Ze=1009,jv=1010,Xv=1011,pA=1012,sm=1013,ci=1014,Cn=1015,sn=1016,Jv=1017,Kv=1018,fA=1020,rm=35902,am=35899,vM=1021,gA=1022,Gt=1023,Pa=1026,vl=1027,go=1028,Zv=1029,sr=1030,om=1031,Ra=1033,Ah=33776,Ml=33777,ph=33778,Vd=33779,hg=35840,oE=35841,Rh=35842,mA=35843,ug=36196,yA=37492,_A=37496,dg=37488,Ag=37489,pg=37490,fg=37491,Rl=37808,lE=37809,cE=37810,hE=37811,fh=37812,uE=37813,dE=37814,AE=37815,pE=37816,fE=37817,gE=37818,mE=37819,yE=37820,_E=37821,Dh=36492,EE=36494,gg=36495,mg=36283,yg=36284,_g=36285,Eg=36286,Qh=2200,Dl=2201,vg=2202,Lh=2300,Nh=2301,Ym=2302,sh=2400,rh=2401,bg=2402,eb=2500,ZL=2501,eN=0,bM=1,vE=2,tN=3200,tb=0,nN=1,As="",Ot="srgb",pn="srgb-linear",xg="linear",Kt="srgb",hc=7680,Mx=519,iN=512,sN=513,rN=514,nb=515,aN=516,oN=517,ib=518,lN=519,bE=35044,cN=35048,Cg="300 es",wr=2e3,Ig=2001;function xM(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function hN(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function EA(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function uN(){const i=EA("canvas");return i.style.display="block",i}const Rx={};function wg(...i){const e="THREE."+i.shift();console.log(e,...i)}function qe(...i){const e="THREE."+i.shift();console.warn(e,...i)}function rt(...i){const e="THREE."+i.shift();console.error(e,...i)}function vA(...i){const e=i.join(" ");e in Rx||(Rx[e]=!0,qe(...i))}function dN(i,e,t){return new Promise(function(n,s){function r(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:s();break;case i.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}let hr=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const s=n[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const s=n.slice(0);for(let r=0,a=s.length;r<a;r++)s[r].call(this,e);e.target=null}}};const vi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Dx=1234567;const Yd=Math.PI/180,Ph=180/Math.PI;function zs(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(vi[i&255]+vi[i>>8&255]+vi[i>>16&255]+vi[i>>24&255]+"-"+vi[e&255]+vi[e>>8&255]+"-"+vi[e>>16&15|64]+vi[e>>24&255]+"-"+vi[t&63|128]+vi[t>>8&255]+"-"+vi[t>>16&255]+vi[t>>24&255]+vi[n&255]+vi[n>>8&255]+vi[n>>16&255]+vi[n>>24&255]).toLowerCase()}function mt(i,e,t){return Math.max(e,Math.min(t,i))}function sb(i,e){return(i%e+e)%e}function AN(i,e,t,n,s){return n+(i-e)*(s-n)/(t-e)}function pN(i,e,t){return i!==e?(t-i)/(e-i):0}function qd(i,e,t){return(1-t)*i+t*e}function fN(i,e,t,n){return qd(i,e,1-Math.exp(-t*n))}function gN(i,e=1){return e-Math.abs(sb(i,e*2)-e)}function mN(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function yN(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function _N(i,e){return i+Math.floor(Math.random()*(e-i+1))}function EN(i,e){return i+Math.random()*(e-i)}function vN(i){return i*(.5-Math.random())}function bN(i){i!==void 0&&(Dx=i);let e=Dx+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function xN(i){return i*Yd}function CN(i){return i*Ph}function IN(i){return(i&i-1)===0&&i!==0}function wN(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function SN(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function BN(i,e,t,n,s){const r=Math.cos,a=Math.sin,o=r(t/2),l=a(t/2),c=r((e+n)/2),u=a((e+n)/2),h=r((e-n)/2),d=a((e-n)/2),A=r((n-e)/2),p=a((n-e)/2);switch(s){case"XYX":i.set(o*u,l*h,l*d,o*c);break;case"YZY":i.set(l*d,o*u,l*h,o*c);break;case"ZXZ":i.set(l*h,l*d,o*u,o*c);break;case"XZX":i.set(o*u,l*p,l*A,o*c);break;case"YXY":i.set(l*A,o*u,l*p,o*c);break;case"ZYZ":i.set(l*p,l*A,o*u,o*c);break;default:qe("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function tr(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Zt(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const Br={DEG2RAD:Yd,RAD2DEG:Ph,generateUUID:zs,clamp:mt,euclideanModulo:sb,mapLinear:AN,inverseLerp:pN,lerp:qd,damp:fN,pingpong:gN,smoothstep:mN,smootherstep:yN,randInt:_N,randFloat:EN,randFloatSpread:vN,seededRandom:bN,degToRad:xN,radToDeg:CN,isPowerOfTwo:IN,ceilPowerOfTwo:wN,floorPowerOfTwo:SN,setQuaternionFromProperEuler:BN,normalize:Zt,denormalize:tr};class pe{constructor(e=0,t=0){pe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6],this.y=s[1]*t+s[4]*n+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=mt(this.x,e.x,t.x),this.y=mt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=mt(this.x,e,t),this.y=mt(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(mt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(mt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),s=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*s+e.x,this.y=r*s+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Yt{constructor(e=0,t=0,n=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=s}static slerpFlat(e,t,n,s,r,a,o){let l=n[s+0],c=n[s+1],u=n[s+2],h=n[s+3],d=r[a+0],A=r[a+1],p=r[a+2],g=r[a+3];if(o<=0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h;return}if(o>=1){e[t+0]=d,e[t+1]=A,e[t+2]=p,e[t+3]=g;return}if(h!==g||l!==d||c!==A||u!==p){let m=l*d+c*A+u*p+h*g;m<0&&(d=-d,A=-A,p=-p,g=-g,m=-m);let f=1-o;if(m<.9995){const y=Math.acos(m),_=Math.sin(y);f=Math.sin(f*y)/_,o=Math.sin(o*y)/_,l=l*f+d*o,c=c*f+A*o,u=u*f+p*o,h=h*f+g*o}else{l=l*f+d*o,c=c*f+A*o,u=u*f+p*o,h=h*f+g*o;const y=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=y,c*=y,u*=y,h*=y}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,s,r,a){const o=n[s],l=n[s+1],c=n[s+2],u=n[s+3],h=r[a],d=r[a+1],A=r[a+2],p=r[a+3];return e[t]=o*p+u*h+l*A-c*d,e[t+1]=l*p+u*d+c*h-o*A,e[t+2]=c*p+u*A+o*d-l*h,e[t+3]=u*p-o*h-l*d-c*A,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,s){return this._x=e,this._y=t,this._z=n,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,s=e._y,r=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(n/2),u=o(s/2),h=o(r/2),d=l(n/2),A=l(s/2),p=l(r/2);switch(a){case"XYZ":this._x=d*u*h+c*A*p,this._y=c*A*h-d*u*p,this._z=c*u*p+d*A*h,this._w=c*u*h-d*A*p;break;case"YXZ":this._x=d*u*h+c*A*p,this._y=c*A*h-d*u*p,this._z=c*u*p-d*A*h,this._w=c*u*h+d*A*p;break;case"ZXY":this._x=d*u*h-c*A*p,this._y=c*A*h+d*u*p,this._z=c*u*p+d*A*h,this._w=c*u*h-d*A*p;break;case"ZYX":this._x=d*u*h-c*A*p,this._y=c*A*h+d*u*p,this._z=c*u*p-d*A*h,this._w=c*u*h+d*A*p;break;case"YZX":this._x=d*u*h+c*A*p,this._y=c*A*h+d*u*p,this._z=c*u*p-d*A*h,this._w=c*u*h-d*A*p;break;case"XZY":this._x=d*u*h-c*A*p,this._y=c*A*h-d*u*p,this._z=c*u*p+d*A*h,this._w=c*u*h+d*A*p;break;default:qe("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,s=Math.sin(n);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],s=t[4],r=t[8],a=t[1],o=t[5],l=t[9],c=t[2],u=t[6],h=t[10],d=n+o+h;if(d>0){const A=.5/Math.sqrt(d+1);this._w=.25/A,this._x=(u-l)*A,this._y=(r-c)*A,this._z=(a-s)*A}else if(n>o&&n>h){const A=2*Math.sqrt(1+n-o-h);this._w=(u-l)/A,this._x=.25*A,this._y=(s+a)/A,this._z=(r+c)/A}else if(o>h){const A=2*Math.sqrt(1+o-n-h);this._w=(r-c)/A,this._x=(s+a)/A,this._y=.25*A,this._z=(l+u)/A}else{const A=2*Math.sqrt(1+h-n-o);this._w=(a-s)/A,this._x=(r+c)/A,this._y=(l+u)/A,this._z=.25*A}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(mt(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const s=Math.min(1,t/n);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,s=e._y,r=e._z,a=e._w,o=t._x,l=t._y,c=t._z,u=t._w;return this._x=n*u+a*o+s*c-r*l,this._y=s*u+a*l+r*o-n*c,this._z=r*u+a*c+n*l-s*o,this._w=a*u-n*o-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,s=e._y,r=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,s=-s,r=-r,a=-a,o=-o);let l=1-t;if(o<.9995){const c=Math.acos(o),u=Math.sin(c);l=Math.sin(l*c)/u,t=Math.sin(t*c)/u,this._x=this._x*l+n*t,this._y=this._y*l+s*t,this._z=this._z*l+r*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+s*t,this._z=this._z*l+r*t,this._w=this._w*l+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),s=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Q{constructor(e=0,t=0,n=0){Q.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Qx.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Qx.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*s,this.y=r[1]*t+r[4]*n+r[7]*s,this.z=r[2]*t+r[5]*n+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*s+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*s+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*s+r[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,s=this.z,r=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*s-o*n),u=2*(o*t-r*s),h=2*(r*n-a*t);return this.x=t+l*c+a*h-o*u,this.y=n+l*u+o*c-r*h,this.z=s+l*h+r*u-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*s,this.y=r[1]*t+r[5]*n+r[9]*s,this.z=r[2]*t+r[6]*n+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=mt(this.x,e.x,t.x),this.y=mt(this.y,e.y,t.y),this.z=mt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=mt(this.x,e,t),this.y=mt(this.y,e,t),this.z=mt(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(mt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,s=e.y,r=e.z,a=t.x,o=t.y,l=t.z;return this.x=s*l-r*o,this.y=r*a-n*l,this.z=n*o-s*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qm.copy(this).projectOnVector(e),this.sub(qm)}reflect(e){return this.sub(qm.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(mt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,s=this.z-e.z;return t*t+n*n+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const s=Math.sin(t)*e;return this.x=s*Math.sin(n),this.y=Math.cos(t)*e,this.z=s*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qm=new Q,Qx=new Yt;class pt{constructor(e,t,n,s,r,a,o,l,c){pt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,s,r,a,o,l,c)}set(e,t,n,s,r,a,o,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=o,u[3]=t,u[4]=r,u[5]=l,u[6]=n,u[7]=a,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,r=this.elements,a=n[0],o=n[3],l=n[6],c=n[1],u=n[4],h=n[7],d=n[2],A=n[5],p=n[8],g=s[0],m=s[3],f=s[6],y=s[1],_=s[4],E=s[7],v=s[2],C=s[5],x=s[8];return r[0]=a*g+o*y+l*v,r[3]=a*m+o*_+l*C,r[6]=a*f+o*E+l*x,r[1]=c*g+u*y+h*v,r[4]=c*m+u*_+h*C,r[7]=c*f+u*E+h*x,r[2]=d*g+A*y+p*v,r[5]=d*m+A*_+p*C,r[8]=d*f+A*E+p*x,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8];return t*a*u-t*o*c-n*r*u+n*o*l+s*r*c-s*a*l}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=u*a-o*c,d=o*l-u*r,A=c*r-a*l,p=t*h+n*d+s*A;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/p;return e[0]=h*g,e[1]=(s*c-u*n)*g,e[2]=(o*n-s*a)*g,e[3]=d*g,e[4]=(u*t-s*l)*g,e[5]=(s*r-o*t)*g,e[6]=A*g,e[7]=(n*l-c*t)*g,e[8]=(a*t-n*r)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,s,r,a,o){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*a+c*o)+a+e,-s*c,s*l,-s*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Wm.makeScale(e,t)),this}rotate(e){return this.premultiply(Wm.makeRotation(-e)),this}translate(e,t){return this.premultiply(Wm.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<9;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Wm=new pt,Lx=new pt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Nx=new pt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function TN(){const i={enabled:!0,workingColorSpace:pn,spaces:{},convert:function(s,r,a){return this.enabled===!1||r===a||!r||!a||(this.spaces[r].transfer===Kt&&(s.r=Da(s.r),s.g=Da(s.g),s.b=Da(s.b)),this.spaces[r].primaries!==this.spaces[a].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Kt&&(s.r=gh(s.r),s.g=gh(s.g),s.b=gh(s.b))),s},workingToColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},colorSpaceToWorking:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===As?xg:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,a){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,r){return vA("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(s,r)},toWorkingColorSpace:function(s,r){return vA("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(s,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[pn]:{primaries:e,whitePoint:n,transfer:xg,toXYZ:Lx,fromXYZ:Nx,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Ot},outputColorSpaceConfig:{drawingBufferColorSpace:Ot}},[Ot]:{primaries:e,whitePoint:n,transfer:Kt,toXYZ:Lx,fromXYZ:Nx,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Ot}}}),i}const Bt=TN();function Da(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function gh(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}let uc,CM=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{uc===void 0&&(uc=EA("canvas")),uc.width=e.width,uc.height=e.height;const s=uc.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),n=uc}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=EA("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const s=n.getImageData(0,0,e.width,e.height),r=s.data;for(let a=0;a<r.length;a++)r[a]=Da(r[a]/255)*255;return n.putImageData(s,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Da(t[n]/255)*255):t[n]=Da(t[n]);return{data:t,width:e.width,height:e.height}}else return qe("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},MN=0;class lm{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:MN++}),this.uuid=zs(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},s=this.data;if(s!==null){let r;if(Array.isArray(s)){r=[];for(let a=0,o=s.length;a<o;a++)s[a].isDataTexture?r.push(jm(s[a].image)):r.push(jm(s[a]))}else r=jm(s);n.url=r}return t||(e.images[this.uuid]=n),n}}function jm(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?CM.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(qe("Texture: Unable to serialize Texture."),{})}let RN=0;const Xm=new Q;let ln=class kf extends hr{constructor(e=kf.DEFAULT_IMAGE,t=kf.DEFAULT_MAPPING,n=xn,s=xn,r=ft,a=Hi,o=Gt,l=Ze,c=kf.DEFAULT_ANISOTROPY,u=As){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:RN++}),this.uuid=zs(),this.name="",this.source=new lm(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=s,this.magFilter=r,this.minFilter=a,this.anisotropy=c,this.format=o,this.internalFormat=null,this.type=l,this.offset=new pe(0,0),this.repeat=new pe(1,1),this.center=new pe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new pt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Xm).x}get height(){return this.source.getSize(Xm).y}get depth(){return this.source.getSize(Xm).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){qe(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){qe(`Texture.setValues(): property '${t}' does not exist.`);continue}s&&n&&s.isVector2&&n.isVector2||s&&n&&s.isVector3&&n.isVector3||s&&n&&s.isMatrix3&&n.isMatrix3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Th)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case lr:e.x=e.x-Math.floor(e.x);break;case xn:e.x=e.x<0?0:1;break;case Ol:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case lr:e.y=e.y-Math.floor(e.y);break;case xn:e.y=e.y<0?0:1;break;case Ol:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};ln.DEFAULT_IMAGE=null;ln.DEFAULT_MAPPING=Th;ln.DEFAULT_ANISOTROPY=1;class Mt{constructor(e=0,t=0,n=0,s=1){Mt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,s){return this.x=e,this.y=t,this.z=n,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*s+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*s+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*s+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*s+a[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,s,r;const l=e.elements,c=l[0],u=l[4],h=l[8],d=l[1],A=l[5],p=l[9],g=l[2],m=l[6],f=l[10];if(Math.abs(u-d)<.01&&Math.abs(h-g)<.01&&Math.abs(p-m)<.01){if(Math.abs(u+d)<.1&&Math.abs(h+g)<.1&&Math.abs(p+m)<.1&&Math.abs(c+A+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const _=(c+1)/2,E=(A+1)/2,v=(f+1)/2,C=(u+d)/4,x=(h+g)/4,I=(p+m)/4;return _>E&&_>v?_<.01?(n=0,s=.707106781,r=.707106781):(n=Math.sqrt(_),s=C/n,r=x/n):E>v?E<.01?(n=.707106781,s=0,r=.707106781):(s=Math.sqrt(E),n=C/s,r=I/s):v<.01?(n=.707106781,s=.707106781,r=0):(r=Math.sqrt(v),n=x/r,s=I/r),this.set(n,s,r,t),this}let y=Math.sqrt((m-p)*(m-p)+(h-g)*(h-g)+(d-u)*(d-u));return Math.abs(y)<.001&&(y=1),this.x=(m-p)/y,this.y=(h-g)/y,this.z=(d-u)/y,this.w=Math.acos((c+A+f-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=mt(this.x,e.x,t.x),this.y=mt(this.y,e.y,t.y),this.z=mt(this.z,e.z,t.z),this.w=mt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=mt(this.x,e,t),this.y=mt(this.y,e,t),this.z=mt(this.z,e,t),this.w=mt(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(mt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class DN extends hr{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ft,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Mt(0,0,e,t),this.scissorTest=!1,this.viewport=new Mt(0,0,e,t);const s={width:e,height:t,depth:n.depth},r=new ln(s);this.textures=[];const a=n.count;for(let o=0;o<a;o++)this.textures[o]=r.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:ft,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let s=0,r=this.textures.length;s<r;s++)this.textures[s].image.width=e,this.textures[s].image.height=t,this.textures[s].image.depth=n,this.textures[s].isData3DTexture!==!0&&(this.textures[s].isArrayTexture=this.textures[s].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const s=Object.assign({},e.textures[t].image);this.textures[t].source=new lm(s)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Sn extends DN{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class Tr extends ln{constructor(e=null,t=1,n=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=jt,this.minFilter=jt,this.wrapR=xn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class IM extends Sn{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new Tr(null,e,t,n),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class rb extends ln{constructor(e=null,t=1,n=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=jt,this.minFilter=jt,this.wrapR=xn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Rn{constructor(e=new Q(1/0,1/0,1/0),t=new Q(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Ws.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Ws.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ws.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=r.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,Ws):Ws.fromBufferAttribute(r,a),Ws.applyMatrix4(e.matrixWorld),this.expandByPoint(Ws);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),lp.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),lp.copy(n.boundingBox)),lp.applyMatrix4(e.matrixWorld),this.union(lp)}const s=e.children;for(let r=0,a=s.length;r<a;r++)this.expandByObject(s[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ws),Ws.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Qu),cp.subVectors(this.max,Qu),dc.subVectors(e.a,Qu),Ac.subVectors(e.b,Qu),pc.subVectors(e.c,Qu),Va.subVectors(Ac,dc),Ya.subVectors(pc,Ac),zo.subVectors(dc,pc);let t=[0,-Va.z,Va.y,0,-Ya.z,Ya.y,0,-zo.z,zo.y,Va.z,0,-Va.x,Ya.z,0,-Ya.x,zo.z,0,-zo.x,-Va.y,Va.x,0,-Ya.y,Ya.x,0,-zo.y,zo.x,0];return!Jm(t,dc,Ac,pc,cp)||(t=[1,0,0,0,1,0,0,0,1],!Jm(t,dc,Ac,pc,cp))?!1:(hp.crossVectors(Va,Ya),t=[hp.x,hp.y,hp.z],Jm(t,dc,Ac,pc,cp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ws).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ws).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Vr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Vr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Vr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Vr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Vr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Vr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Vr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Vr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Vr),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Vr=[new Q,new Q,new Q,new Q,new Q,new Q,new Q,new Q],Ws=new Q,lp=new Rn,dc=new Q,Ac=new Q,pc=new Q,Va=new Q,Ya=new Q,zo=new Q,Qu=new Q,cp=new Q,hp=new Q,Ho=new Q;function Jm(i,e,t,n,s){for(let r=0,a=i.length-3;r<=a;r+=3){Ho.fromArray(i,r);const o=s.x*Math.abs(Ho.x)+s.y*Math.abs(Ho.y)+s.z*Math.abs(Ho.z),l=e.dot(Ho),c=t.dot(Ho),u=n.dot(Ho);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>o)return!1}return!0}const QN=new Rn,Lu=new Q,Km=new Q;class es{constructor(e=new Q,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):QN.setFromPoints(e).getCenter(n);let s=0;for(let r=0,a=e.length;r<a;r++)s=Math.max(s,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(s),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Lu.subVectors(e,this.center);const t=Lu.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),s=(n-this.radius)*.5;this.center.addScaledVector(Lu,s/n),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Km.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Lu.copy(e.center).add(Km)),this.expandByPoint(Lu.copy(e.center).sub(Km))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const Yr=new Q,Zm=new Q,up=new Q,qa=new Q,ey=new Q,dp=new Q,ty=new Q;class zA{constructor(e=new Q,t=new Q(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Yr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Yr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Yr.copy(this.origin).addScaledVector(this.direction,t),Yr.distanceToSquared(e))}distanceSqToSegment(e,t,n,s){Zm.copy(e).add(t).multiplyScalar(.5),up.copy(t).sub(e).normalize(),qa.copy(this.origin).sub(Zm);const r=e.distanceTo(t)*.5,a=-this.direction.dot(up),o=qa.dot(this.direction),l=-qa.dot(up),c=qa.lengthSq(),u=Math.abs(1-a*a);let h,d,A,p;if(u>0)if(h=a*l-o,d=a*o-l,p=r*u,h>=0)if(d>=-p)if(d<=p){const g=1/u;h*=g,d*=g,A=h*(h+a*d+2*o)+d*(a*h+d+2*l)+c}else d=r,h=Math.max(0,-(a*d+o)),A=-h*h+d*(d+2*l)+c;else d=-r,h=Math.max(0,-(a*d+o)),A=-h*h+d*(d+2*l)+c;else d<=-p?(h=Math.max(0,-(-a*r+o)),d=h>0?-r:Math.min(Math.max(-r,-l),r),A=-h*h+d*(d+2*l)+c):d<=p?(h=0,d=Math.min(Math.max(-r,-l),r),A=d*(d+2*l)+c):(h=Math.max(0,-(a*r+o)),d=h>0?r:Math.min(Math.max(-r,-l),r),A=-h*h+d*(d+2*l)+c);else d=a>0?-r:r,h=Math.max(0,-(a*d+o)),A=-h*h+d*(d+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),s&&s.copy(Zm).addScaledVector(up,d),A}intersectSphere(e,t){Yr.subVectors(e.center,this.origin);const n=Yr.dot(this.direction),s=Yr.dot(Yr)-n*n,r=e.radius*e.radius;if(s>r)return null;const a=Math.sqrt(r-s),o=n-a,l=n+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,s,r,a,o,l;const c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,s=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,s=(e.min.x-d.x)*c),u>=0?(r=(e.min.y-d.y)*u,a=(e.max.y-d.y)*u):(r=(e.max.y-d.y)*u,a=(e.min.y-d.y)*u),n>a||r>s||((r>n||isNaN(n))&&(n=r),(a<s||isNaN(s))&&(s=a),h>=0?(o=(e.min.z-d.z)*h,l=(e.max.z-d.z)*h):(o=(e.max.z-d.z)*h,l=(e.min.z-d.z)*h),n>l||o>s)||((o>n||n!==n)&&(n=o),(l<s||s!==s)&&(s=l),s<0)?null:this.at(n>=0?n:s,t)}intersectsBox(e){return this.intersectBox(e,Yr)!==null}intersectTriangle(e,t,n,s,r){ey.subVectors(t,e),dp.subVectors(n,e),ty.crossVectors(ey,dp);let a=this.direction.dot(ty),o;if(a>0){if(s)return null;o=1}else if(a<0)o=-1,a=-a;else return null;qa.subVectors(this.origin,e);const l=o*this.direction.dot(dp.crossVectors(qa,dp));if(l<0)return null;const c=o*this.direction.dot(ey.cross(qa));if(c<0||l+c>a)return null;const u=-o*qa.dot(ty);return u<0?null:this.at(u/a,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class We{constructor(e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m){We.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m)}set(e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m){const f=this.elements;return f[0]=e,f[4]=t,f[8]=n,f[12]=s,f[1]=r,f[5]=a,f[9]=o,f[13]=l,f[2]=c,f[6]=u,f[10]=h,f[14]=d,f[3]=A,f[7]=p,f[11]=g,f[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new We().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const t=this.elements,n=e.elements,s=1/fc.setFromMatrixColumn(e,0).length(),r=1/fc.setFromMatrixColumn(e,1).length(),a=1/fc.setFromMatrixColumn(e,2).length();return t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,s=e.y,r=e.z,a=Math.cos(n),o=Math.sin(n),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const d=a*u,A=a*h,p=o*u,g=o*h;t[0]=l*u,t[4]=-l*h,t[8]=c,t[1]=A+p*c,t[5]=d-g*c,t[9]=-o*l,t[2]=g-d*c,t[6]=p+A*c,t[10]=a*l}else if(e.order==="YXZ"){const d=l*u,A=l*h,p=c*u,g=c*h;t[0]=d+g*o,t[4]=p*o-A,t[8]=a*c,t[1]=a*h,t[5]=a*u,t[9]=-o,t[2]=A*o-p,t[6]=g+d*o,t[10]=a*l}else if(e.order==="ZXY"){const d=l*u,A=l*h,p=c*u,g=c*h;t[0]=d-g*o,t[4]=-a*h,t[8]=p+A*o,t[1]=A+p*o,t[5]=a*u,t[9]=g-d*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const d=a*u,A=a*h,p=o*u,g=o*h;t[0]=l*u,t[4]=p*c-A,t[8]=d*c+g,t[1]=l*h,t[5]=g*c+d,t[9]=A*c-p,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const d=a*l,A=a*c,p=o*l,g=o*c;t[0]=l*u,t[4]=g-d*h,t[8]=p*h+A,t[1]=h,t[5]=a*u,t[9]=-o*u,t[2]=-c*u,t[6]=A*h+p,t[10]=d-g*h}else if(e.order==="XZY"){const d=a*l,A=a*c,p=o*l,g=o*c;t[0]=l*u,t[4]=-h,t[8]=c*u,t[1]=d*h+g,t[5]=a*u,t[9]=A*h-p,t[2]=p*h-A,t[6]=o*u,t[10]=g*h+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(LN,e,NN)}lookAt(e,t,n){const s=this.elements;return os.subVectors(e,t),os.lengthSq()===0&&(os.z=1),os.normalize(),Wa.crossVectors(n,os),Wa.lengthSq()===0&&(Math.abs(n.z)===1?os.x+=1e-4:os.z+=1e-4,os.normalize(),Wa.crossVectors(n,os)),Wa.normalize(),Ap.crossVectors(os,Wa),s[0]=Wa.x,s[4]=Ap.x,s[8]=os.x,s[1]=Wa.y,s[5]=Ap.y,s[9]=os.y,s[2]=Wa.z,s[6]=Ap.z,s[10]=os.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,r=this.elements,a=n[0],o=n[4],l=n[8],c=n[12],u=n[1],h=n[5],d=n[9],A=n[13],p=n[2],g=n[6],m=n[10],f=n[14],y=n[3],_=n[7],E=n[11],v=n[15],C=s[0],x=s[4],I=s[8],b=s[12],w=s[1],S=s[5],B=s[9],T=s[13],D=s[2],P=s[6],R=s[10],L=s[14],F=s[3],$=s[7],J=s[11],W=s[15];return r[0]=a*C+o*w+l*D+c*F,r[4]=a*x+o*S+l*P+c*$,r[8]=a*I+o*B+l*R+c*J,r[12]=a*b+o*T+l*L+c*W,r[1]=u*C+h*w+d*D+A*F,r[5]=u*x+h*S+d*P+A*$,r[9]=u*I+h*B+d*R+A*J,r[13]=u*b+h*T+d*L+A*W,r[2]=p*C+g*w+m*D+f*F,r[6]=p*x+g*S+m*P+f*$,r[10]=p*I+g*B+m*R+f*J,r[14]=p*b+g*T+m*L+f*W,r[3]=y*C+_*w+E*D+v*F,r[7]=y*x+_*S+E*P+v*$,r[11]=y*I+_*B+E*R+v*J,r[15]=y*b+_*T+E*L+v*W,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],s=e[8],r=e[12],a=e[1],o=e[5],l=e[9],c=e[13],u=e[2],h=e[6],d=e[10],A=e[14],p=e[3],g=e[7],m=e[11],f=e[15],y=l*A-c*d,_=o*A-c*h,E=o*d-l*h,v=a*A-c*u,C=a*d-l*u,x=a*h-o*u;return t*(g*y-m*_+f*E)-n*(p*y-m*v+f*C)+s*(p*_-g*v+f*x)-r*(p*E-g*C+m*x)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],A=e[11],p=e[12],g=e[13],m=e[14],f=e[15],y=h*m*c-g*d*c+g*l*A-o*m*A-h*l*f+o*d*f,_=p*d*c-u*m*c-p*l*A+a*m*A+u*l*f-a*d*f,E=u*g*c-p*h*c+p*o*A-a*g*A-u*o*f+a*h*f,v=p*h*l-u*g*l-p*o*d+a*g*d+u*o*m-a*h*m,C=t*y+n*_+s*E+r*v;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/C;return e[0]=y*x,e[1]=(g*d*r-h*m*r-g*s*A+n*m*A+h*s*f-n*d*f)*x,e[2]=(o*m*r-g*l*r+g*s*c-n*m*c-o*s*f+n*l*f)*x,e[3]=(h*l*r-o*d*r-h*s*c+n*d*c+o*s*A-n*l*A)*x,e[4]=_*x,e[5]=(u*m*r-p*d*r+p*s*A-t*m*A-u*s*f+t*d*f)*x,e[6]=(p*l*r-a*m*r-p*s*c+t*m*c+a*s*f-t*l*f)*x,e[7]=(a*d*r-u*l*r+u*s*c-t*d*c-a*s*A+t*l*A)*x,e[8]=E*x,e[9]=(p*h*r-u*g*r-p*n*A+t*g*A+u*n*f-t*h*f)*x,e[10]=(a*g*r-p*o*r+p*n*c-t*g*c-a*n*f+t*o*f)*x,e[11]=(u*o*r-a*h*r-u*n*c+t*h*c+a*n*A-t*o*A)*x,e[12]=v*x,e[13]=(u*g*s-p*h*s+p*n*d-t*g*d-u*n*m+t*h*m)*x,e[14]=(p*o*s-a*g*s-p*n*l+t*g*l+a*n*m-t*o*m)*x,e[15]=(a*h*s-u*o*s+u*n*l-t*h*l-a*n*d+t*o*d)*x,this}scale(e){const t=this.elements,n=e.x,s=e.y,r=e.z;return t[0]*=n,t[4]*=s,t[8]*=r,t[1]*=n,t[5]*=s,t[9]*=r,t[2]*=n,t[6]*=s,t[10]*=r,t[3]*=n,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,s))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),s=Math.sin(t),r=1-n,a=e.x,o=e.y,l=e.z,c=r*a,u=r*o;return this.set(c*a+n,c*o-s*l,c*l+s*o,0,c*o+s*l,u*o+n,u*l-s*a,0,c*l-s*o,u*l+s*a,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,s,r,a){return this.set(1,n,r,0,e,1,a,0,t,s,1,0,0,0,0,1),this}compose(e,t,n){const s=this.elements,r=t._x,a=t._y,o=t._z,l=t._w,c=r+r,u=a+a,h=o+o,d=r*c,A=r*u,p=r*h,g=a*u,m=a*h,f=o*h,y=l*c,_=l*u,E=l*h,v=n.x,C=n.y,x=n.z;return s[0]=(1-(g+f))*v,s[1]=(A+E)*v,s[2]=(p-_)*v,s[3]=0,s[4]=(A-E)*C,s[5]=(1-(d+f))*C,s[6]=(m+y)*C,s[7]=0,s[8]=(p+_)*x,s[9]=(m-y)*x,s[10]=(1-(d+g))*x,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,n){const s=this.elements;if(e.x=s[12],e.y=s[13],e.z=s[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let r=fc.set(s[0],s[1],s[2]).length();const a=fc.set(s[4],s[5],s[6]).length(),o=fc.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),js.copy(this);const c=1/r,u=1/a,h=1/o;return js.elements[0]*=c,js.elements[1]*=c,js.elements[2]*=c,js.elements[4]*=u,js.elements[5]*=u,js.elements[6]*=u,js.elements[8]*=h,js.elements[9]*=h,js.elements[10]*=h,t.setFromRotationMatrix(js),n.x=r,n.y=a,n.z=o,this}makePerspective(e,t,n,s,r,a,o=wr,l=!1){const c=this.elements,u=2*r/(t-e),h=2*r/(n-s),d=(t+e)/(t-e),A=(n+s)/(n-s);let p,g;if(l)p=r/(a-r),g=a*r/(a-r);else if(o===wr)p=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===Ig)p=-a/(a-r),g=-a*r/(a-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return c[0]=u,c[4]=0,c[8]=d,c[12]=0,c[1]=0,c[5]=h,c[9]=A,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=g,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,s,r,a,o=wr,l=!1){const c=this.elements,u=2/(t-e),h=2/(n-s),d=-(t+e)/(t-e),A=-(n+s)/(n-s);let p,g;if(l)p=1/(a-r),g=a/(a-r);else if(o===wr)p=-2/(a-r),g=-(a+r)/(a-r);else if(o===Ig)p=-1/(a-r),g=-r/(a-r);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return c[0]=u,c[4]=0,c[8]=0,c[12]=d,c[1]=0,c[5]=h,c[9]=0,c[13]=A,c[2]=0,c[6]=0,c[10]=p,c[14]=g,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<16;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const fc=new Q,js=new We,LN=new Q(0,0,0),NN=new Q(1,1,1),Wa=new Q,Ap=new Q,os=new Q,Px=new We,Fx=new Yt;class Zi{constructor(e=0,t=0,n=0,s=Zi.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,s=this._order){return this._x=e,this._y=t,this._z=n,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const s=e.elements,r=s[0],a=s[4],o=s[8],l=s[1],c=s[5],u=s[9],h=s[2],d=s[6],A=s[10];switch(t){case"XYZ":this._y=Math.asin(mt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,A),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-mt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,A),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(mt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,A),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-mt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,A),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(mt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(o,A));break;case"XZY":this._z=Math.asin(-mt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-u,A),this._y=0);break;default:qe("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Px.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Px,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Fx.setFromEuler(this),this.setFromQuaternion(Fx,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Zi.DEFAULT_ORDER="XYZ";class ab{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let PN=0;const kx=new Q,gc=new Yt,qr=new We,pp=new Q,Nu=new Q,FN=new Q,kN=new Yt,Ux=new Q(1,0,0),Ox=new Q(0,1,0),Gx=new Q(0,0,1),zx={type:"added"},UN={type:"removed"},mc={type:"childadded",child:null},ny={type:"childremoved",child:null};class Rt extends hr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:PN++}),this.uuid=zs(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Rt.DEFAULT_UP.clone();const e=new Q,t=new Zi,n=new Yt,s=new Q(1,1,1);function r(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new We},normalMatrix:{value:new pt}}),this.matrix=new We,this.matrixWorld=new We,this.matrixAutoUpdate=Rt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Rt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new ab,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return gc.setFromAxisAngle(e,t),this.quaternion.multiply(gc),this}rotateOnWorldAxis(e,t){return gc.setFromAxisAngle(e,t),this.quaternion.premultiply(gc),this}rotateX(e){return this.rotateOnAxis(Ux,e)}rotateY(e){return this.rotateOnAxis(Ox,e)}rotateZ(e){return this.rotateOnAxis(Gx,e)}translateOnAxis(e,t){return kx.copy(e).applyQuaternion(this.quaternion),this.position.add(kx.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ux,e)}translateY(e){return this.translateOnAxis(Ox,e)}translateZ(e){return this.translateOnAxis(Gx,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(qr.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?pp.copy(e):pp.set(e,t,n);const s=this.parent;this.updateWorldMatrix(!0,!1),Nu.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?qr.lookAt(Nu,pp,this.up):qr.lookAt(pp,Nu,this.up),this.quaternion.setFromRotationMatrix(qr),s&&(qr.extractRotation(s.matrixWorld),gc.setFromRotationMatrix(qr),this.quaternion.premultiply(gc.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(rt("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(zx),mc.child=e,this.dispatchEvent(mc),mc.child=null):rt("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(UN),ny.child=e,this.dispatchEvent(ny),ny.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),qr.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),qr.multiply(e.parent.matrixWorld)),e.applyMatrix4(qr),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(zx),mc.child=e,this.dispatchEvent(mc),mc.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,s=this.children.length;n<s;n++){const a=this.children[n].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const s=this.children;for(let r=0,a=s.length;r<a;r++)s[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Nu,e,FN),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Nu,kN,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const s=this.children;for(let r=0,a=s.length;r<a;r++)s[r].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(o=>({...o})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function r(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){const h=l[c];r(e.shapes,h)}else r(e.shapes,l)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,c=this.material.length;l<c;l++)o.push(r(e.materials,this.material[l]));s.material=o}else s.material=r(e.materials,this.material);if(this.children.length>0){s.children=[];for(let o=0;o<this.children.length;o++)s.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){s.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];s.animations.push(r(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),c=a(e.textures),u=a(e.images),h=a(e.shapes),d=a(e.skeletons),A=a(e.animations),p=a(e.nodes);o.length>0&&(n.geometries=o),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),d.length>0&&(n.skeletons=d),A.length>0&&(n.animations=A),p.length>0&&(n.nodes=p)}return n.object=s,n;function a(o){const l=[];for(const c in o){const u=o[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const s=e.children[n];this.add(s.clone())}return this}}Rt.DEFAULT_UP=new Q(0,1,0);Rt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Rt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Xs=new Q,Wr=new Q,iy=new Q,jr=new Q,yc=new Q,_c=new Q,Hx=new Q,sy=new Q,ry=new Q,ay=new Q,oy=new Mt,ly=new Mt,cy=new Mt;class ps{constructor(e=new Q,t=new Q,n=new Q){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,s){s.subVectors(n,t),Xs.subVectors(e,t),s.cross(Xs);const r=s.lengthSq();return r>0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,n,s,r){Xs.subVectors(s,t),Wr.subVectors(n,t),iy.subVectors(e,t);const a=Xs.dot(Xs),o=Xs.dot(Wr),l=Xs.dot(iy),c=Wr.dot(Wr),u=Wr.dot(iy),h=a*c-o*o;if(h===0)return r.set(0,0,0),null;const d=1/h,A=(c*l-o*u)*d,p=(a*u-o*l)*d;return r.set(1-A-p,p,A)}static containsPoint(e,t,n,s){return this.getBarycoord(e,t,n,s,jr)===null?!1:jr.x>=0&&jr.y>=0&&jr.x+jr.y<=1}static getInterpolation(e,t,n,s,r,a,o,l){return this.getBarycoord(e,t,n,s,jr)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,jr.x),l.addScaledVector(a,jr.y),l.addScaledVector(o,jr.z),l)}static getInterpolatedAttribute(e,t,n,s,r,a){return oy.setScalar(0),ly.setScalar(0),cy.setScalar(0),oy.fromBufferAttribute(e,t),ly.fromBufferAttribute(e,n),cy.fromBufferAttribute(e,s),a.setScalar(0),a.addScaledVector(oy,r.x),a.addScaledVector(ly,r.y),a.addScaledVector(cy,r.z),a}static isFrontFacing(e,t,n,s){return Xs.subVectors(n,t),Wr.subVectors(e,t),Xs.cross(Wr).dot(s)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,s){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,n,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Xs.subVectors(this.c,this.b),Wr.subVectors(this.a,this.b),Xs.cross(Wr).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ps.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ps.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,s,r){return ps.getInterpolation(e,this.a,this.b,this.c,t,n,s,r)}containsPoint(e){return ps.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ps.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,s=this.b,r=this.c;let a,o;yc.subVectors(s,n),_c.subVectors(r,n),sy.subVectors(e,n);const l=yc.dot(sy),c=_c.dot(sy);if(l<=0&&c<=0)return t.copy(n);ry.subVectors(e,s);const u=yc.dot(ry),h=_c.dot(ry);if(u>=0&&h<=u)return t.copy(s);const d=l*h-u*c;if(d<=0&&l>=0&&u<=0)return a=l/(l-u),t.copy(n).addScaledVector(yc,a);ay.subVectors(e,r);const A=yc.dot(ay),p=_c.dot(ay);if(p>=0&&A<=p)return t.copy(r);const g=A*c-l*p;if(g<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(_c,o);const m=u*p-A*h;if(m<=0&&h-u>=0&&A-p>=0)return Hx.subVectors(r,s),o=(h-u)/(h-u+(A-p)),t.copy(s).addScaledVector(Hx,o);const f=1/(m+g+d);return a=g*f,o=d*f,t.copy(n).addScaledVector(yc,a).addScaledVector(_c,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const wM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ja={h:0,s:0,l:0},fp={h:0,s:0,l:0};function hy(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class we{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ot){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,s=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Bt.colorSpaceToWorking(this,s),this}setHSL(e,t,n,s=Bt.workingColorSpace){if(e=sb(e,1),t=mt(t,0,1),n=mt(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,a=2*n-r;this.r=hy(a,r,e+1/3),this.g=hy(a,r,e),this.b=hy(a,r,e-1/3)}return Bt.colorSpaceToWorking(this,s),this}setStyle(e,t=Ot){function n(r){r!==void 0&&parseFloat(r)<1&&qe("Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const a=s[1],o=s[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:qe("Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],a=r.length;if(a===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(r,16),t);qe("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ot){const n=wM[e.toLowerCase()];return n!==void 0?this.setHex(n,t):qe("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Da(e.r),this.g=Da(e.g),this.b=Da(e.b),this}copyLinearToSRGB(e){return this.r=gh(e.r),this.g=gh(e.g),this.b=gh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ot){return Bt.workingToColorSpace(bi.copy(this),e),Math.round(mt(bi.r*255,0,255))*65536+Math.round(mt(bi.g*255,0,255))*256+Math.round(mt(bi.b*255,0,255))}getHexString(e=Ot){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.workingToColorSpace(bi.copy(this),t);const n=bi.r,s=bi.g,r=bi.b,a=Math.max(n,s,r),o=Math.min(n,s,r);let l,c;const u=(o+a)/2;if(o===a)l=0,c=0;else{const h=a-o;switch(c=u<=.5?h/(a+o):h/(2-a-o),a){case n:l=(s-r)/h+(s<r?6:0);break;case s:l=(r-n)/h+2;break;case r:l=(n-s)/h+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=Bt.workingColorSpace){return Bt.workingToColorSpace(bi.copy(this),t),e.r=bi.r,e.g=bi.g,e.b=bi.b,e}getStyle(e=Ot){Bt.workingToColorSpace(bi.copy(this),e);const t=bi.r,n=bi.g,s=bi.b;return e!==Ot?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(s*255)})`}offsetHSL(e,t,n){return this.getHSL(ja),this.setHSL(ja.h+e,ja.s+t,ja.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(ja),e.getHSL(fp);const n=qd(ja.h,fp.h,t),s=qd(ja.s,fp.s,t),r=qd(ja.l,fp.l,t);return this.setHSL(n,s,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,s=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*s,this.g=r[1]*t+r[4]*n+r[7]*s,this.b=r[2]*t+r[5]*n+r[8]*s,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const bi=new we;we.NAMES=wM;let ON=0,_s=class extends hr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ON++}),this.uuid=zs(),this.name="",this.type="Material",this.blending=Bl,this.side=or,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=X_,this.blendDst=J_,this.blendEquation=fl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new we(0,0,0),this.blendAlpha=0,this.depthFunc=Sh,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Mx,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=hc,this.stencilZFail=hc,this.stencilZPass=hc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){qe(`Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){qe(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(n):s&&s.isVector3&&n&&n.isVector3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Bl&&(n.blending=this.blending),this.side!==or&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==X_&&(n.blendSrc=this.blendSrc),this.blendDst!==J_&&(n.blendDst=this.blendDst),this.blendEquation!==fl&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Sh&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Mx&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==hc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==hc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==hc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function s(r){const a=[];for(const o in r){const l=r[o];delete l.metadata,a.push(l)}return a}if(t){const r=s(e.textures),a=s(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const s=t.length;n=new Array(s);for(let r=0;r!==s;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};class Xn extends _s{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new we(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Zi,this.combine=$v,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const xa=GN();function GN(){const i=new ArrayBuffer(4),e=new Float32Array(i),t=new Uint32Array(i),n=new Uint32Array(512),s=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(n[l]=0,n[l|256]=32768,s[l]=24,s[l|256]=24):c<-14?(n[l]=1024>>-c-14,n[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(n[l]=c+15<<10,n[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(n[l]=31744,n[l|256]=64512,s[l]=24,s[l|256]=24):(n[l]=31744,n[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;(c&8388608)===0;)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(o[l]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:s,mantissaTable:r,exponentTable:a,offsetTable:o}}function zN(i){Math.abs(i)>65504&&qe("DataUtils.toHalfFloat(): Value out of range."),i=mt(i,-65504,65504),xa.floatView[0]=i;const e=xa.uint32View[0],t=e>>23&511;return xa.baseTable[t]+((e&8388607)>>xa.shiftTable[t])}function HN(i){const e=i>>10;return xa.uint32View[0]=xa.mantissaTable[xa.offsetTable[e]+(i&1023)]+xa.exponentTable[e],xa.floatView[0]}class gp{static toHalfFloat(e){return zN(e)}static fromHalfFloat(e){return HN(e)}}const zn=new Q,mp=new pe;let $N=0;class rn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:$N++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=bE,this.updateRanges=[],this.gpuType=Cn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let s=0,r=this.itemSize;s<r;s++)this.array[e+s]=t.array[n+s];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)mp.fromBufferAttribute(this,t),mp.applyMatrix3(e),this.setXY(t,mp.x,mp.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyMatrix3(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyMatrix4(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyNormalMatrix(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.transformDirection(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=tr(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Zt(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=tr(t,this.array)),t}setX(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=tr(t,this.array)),t}setY(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=tr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=tr(t,this.array)),t}setW(e,t){return this.normalized&&(t=Zt(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Zt(t,this.array),n=Zt(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,s){return e*=this.itemSize,this.normalized&&(t=Zt(t,this.array),n=Zt(n,this.array),s=Zt(s,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=s,this}setXYZW(e,t,n,s,r){return e*=this.itemSize,this.normalized&&(t=Zt(t,this.array),n=Zt(n,this.array),s=Zt(s,this.array),r=Zt(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=s,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==bE&&(e.usage=this.usage),e}}class SM extends rn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class BM extends rn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class en extends rn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let VN=0;const ws=new We,uy=new Rt,Ec=new Q,ls=new Rn,Pu=new Rn,ei=new Q;class fn extends hr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:VN++}),this.uuid=zs(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(xM(e)?BM:SM)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const r=new pt().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(e),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ws.makeRotationFromQuaternion(e),this.applyMatrix4(ws),this}rotateX(e){return ws.makeRotationX(e),this.applyMatrix4(ws),this}rotateY(e){return ws.makeRotationY(e),this.applyMatrix4(ws),this}rotateZ(e){return ws.makeRotationZ(e),this.applyMatrix4(ws),this}translate(e,t,n){return ws.makeTranslation(e,t,n),this.applyMatrix4(ws),this}scale(e,t,n){return ws.makeScale(e,t,n),this.applyMatrix4(ws),this}lookAt(e){return uy.lookAt(e),uy.updateMatrix(),this.applyMatrix4(uy.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ec).negate(),this.translate(Ec.x,Ec.y,Ec.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let s=0,r=e.length;s<r;s++){const a=e[s];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new en(n,3))}else{const n=Math.min(e.length,t.count);for(let s=0;s<n;s++){const r=e[s];t.setXYZ(s,r.x,r.y,r.z||0)}e.length>t.count&&qe("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Rn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){rt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Q(-1/0,-1/0,-1/0),new Q(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,s=t.length;n<s;n++){const r=t[n];ls.setFromBufferAttribute(r),this.morphTargetsRelative?(ei.addVectors(this.boundingBox.min,ls.min),this.boundingBox.expandByPoint(ei),ei.addVectors(this.boundingBox.max,ls.max),this.boundingBox.expandByPoint(ei)):(this.boundingBox.expandByPoint(ls.min),this.boundingBox.expandByPoint(ls.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&rt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new es);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){rt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Q,1/0);return}if(e){const n=this.boundingSphere.center;if(ls.setFromBufferAttribute(e),t)for(let r=0,a=t.length;r<a;r++){const o=t[r];Pu.setFromBufferAttribute(o),this.morphTargetsRelative?(ei.addVectors(ls.min,Pu.min),ls.expandByPoint(ei),ei.addVectors(ls.max,Pu.max),ls.expandByPoint(ei)):(ls.expandByPoint(Pu.min),ls.expandByPoint(Pu.max))}ls.getCenter(n);let s=0;for(let r=0,a=e.count;r<a;r++)ei.fromBufferAttribute(e,r),s=Math.max(s,n.distanceToSquared(ei));if(t)for(let r=0,a=t.length;r<a;r++){const o=t[r],l=this.morphTargetsRelative;for(let c=0,u=o.count;c<u;c++)ei.fromBufferAttribute(o,c),l&&(Ec.fromBufferAttribute(e,c),ei.add(Ec)),s=Math.max(s,n.distanceToSquared(ei))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&rt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){rt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,s=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new rn(new Float32Array(4*n.count),4));const a=this.getAttribute("tangent"),o=[],l=[];for(let I=0;I<n.count;I++)o[I]=new Q,l[I]=new Q;const c=new Q,u=new Q,h=new Q,d=new pe,A=new pe,p=new pe,g=new Q,m=new Q;function f(I,b,w){c.fromBufferAttribute(n,I),u.fromBufferAttribute(n,b),h.fromBufferAttribute(n,w),d.fromBufferAttribute(r,I),A.fromBufferAttribute(r,b),p.fromBufferAttribute(r,w),u.sub(c),h.sub(c),A.sub(d),p.sub(d);const S=1/(A.x*p.y-p.x*A.y);isFinite(S)&&(g.copy(u).multiplyScalar(p.y).addScaledVector(h,-A.y).multiplyScalar(S),m.copy(h).multiplyScalar(A.x).addScaledVector(u,-p.x).multiplyScalar(S),o[I].add(g),o[b].add(g),o[w].add(g),l[I].add(m),l[b].add(m),l[w].add(m))}let y=this.groups;y.length===0&&(y=[{start:0,count:e.count}]);for(let I=0,b=y.length;I<b;++I){const w=y[I],S=w.start,B=w.count;for(let T=S,D=S+B;T<D;T+=3)f(e.getX(T+0),e.getX(T+1),e.getX(T+2))}const _=new Q,E=new Q,v=new Q,C=new Q;function x(I){v.fromBufferAttribute(s,I),C.copy(v);const b=o[I];_.copy(b),_.sub(v.multiplyScalar(v.dot(b))).normalize(),E.crossVectors(C,b);const S=E.dot(l[I])<0?-1:1;a.setXYZW(I,_.x,_.y,_.z,S)}for(let I=0,b=y.length;I<b;++I){const w=y[I],S=w.start,B=w.count;for(let T=S,D=S+B;T<D;T+=3)x(e.getX(T+0)),x(e.getX(T+1)),x(e.getX(T+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new rn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let d=0,A=n.count;d<A;d++)n.setXYZ(d,0,0,0);const s=new Q,r=new Q,a=new Q,o=new Q,l=new Q,c=new Q,u=new Q,h=new Q;if(e)for(let d=0,A=e.count;d<A;d+=3){const p=e.getX(d+0),g=e.getX(d+1),m=e.getX(d+2);s.fromBufferAttribute(t,p),r.fromBufferAttribute(t,g),a.fromBufferAttribute(t,m),u.subVectors(a,r),h.subVectors(s,r),u.cross(h),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,m),o.add(u),l.add(u),c.add(u),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(m,c.x,c.y,c.z)}else for(let d=0,A=t.count;d<A;d+=3)s.fromBufferAttribute(t,d+0),r.fromBufferAttribute(t,d+1),a.fromBufferAttribute(t,d+2),u.subVectors(a,r),h.subVectors(s,r),u.cross(h),n.setXYZ(d+0,u.x,u.y,u.z),n.setXYZ(d+1,u.x,u.y,u.z),n.setXYZ(d+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ei.fromBufferAttribute(e,t),ei.normalize(),e.setXYZ(t,ei.x,ei.y,ei.z)}toNonIndexed(){function e(o,l){const c=o.array,u=o.itemSize,h=o.normalized,d=new c.constructor(l.length*u);let A=0,p=0;for(let g=0,m=l.length;g<m;g++){o.isInterleavedBufferAttribute?A=l[g]*o.data.stride+o.offset:A=l[g]*u;for(let f=0;f<u;f++)d[p++]=c[A++]}return new rn(d,u,h)}if(this.index===null)return qe("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new fn,n=this.index.array,s=this.attributes;for(const o in s){const l=s[o],c=e(l,n);t.setAttribute(o,c)}const r=this.morphAttributes;for(const o in r){const l=[],c=r[o];for(let u=0,h=c.length;u<h;u++){const d=c[u],A=e(d,n);l.push(A)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const c=a[o];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,d=c.length;h<d;h++){const A=c[h];u.push(A.toJSON(e.data))}u.length>0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],h=r[c];for(let d=0,A=h.length;d<A;d++)u.push(h[d].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let c=0,u=a.length;c<u;c++){const h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const $x=new We,$o=new zA,yp=new es,Vx=new Q,_p=new Q,Ep=new Q,vp=new Q,dy=new Q,bp=new Q,Yx=new Q,xp=new Q;let Je=class extends Rt{constructor(e=new fn,t=new Xn){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=s.length;r<a;r++){const o=s[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}getVertexPosition(e,t){const n=this.geometry,s=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(s,e);const o=this.morphTargetInfluences;if(r&&o){bp.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const u=o[l],h=r[l];u!==0&&(dy.fromBufferAttribute(h,e),a?bp.addScaledVector(dy,u):bp.addScaledVector(dy.sub(t),u))}t.add(bp)}return t}raycast(e,t){const n=this.geometry,s=this.material,r=this.matrixWorld;s!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),yp.copy(n.boundingSphere),yp.applyMatrix4(r),$o.copy(e.ray).recast(e.near),!(yp.containsPoint($o.origin)===!1&&($o.intersectSphere(yp,Vx)===null||$o.origin.distanceToSquared(Vx)>(e.far-e.near)**2))&&($x.copy(r).invert(),$o.copy(e.ray).applyMatrix4($x),!(n.boundingBox!==null&&$o.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,$o)))}_computeIntersections(e,t,n){let s;const r=this.geometry,a=this.material,o=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,h=r.attributes.normal,d=r.groups,A=r.drawRange;if(o!==null)if(Array.isArray(a))for(let p=0,g=d.length;p<g;p++){const m=d[p],f=a[m.materialIndex],y=Math.max(m.start,A.start),_=Math.min(o.count,Math.min(m.start+m.count,A.start+A.count));for(let E=y,v=_;E<v;E+=3){const C=o.getX(E),x=o.getX(E+1),I=o.getX(E+2);s=Cp(this,f,e,n,c,u,h,C,x,I),s&&(s.faceIndex=Math.floor(E/3),s.face.materialIndex=m.materialIndex,t.push(s))}}else{const p=Math.max(0,A.start),g=Math.min(o.count,A.start+A.count);for(let m=p,f=g;m<f;m+=3){const y=o.getX(m),_=o.getX(m+1),E=o.getX(m+2);s=Cp(this,a,e,n,c,u,h,y,_,E),s&&(s.faceIndex=Math.floor(m/3),t.push(s))}}else if(l!==void 0)if(Array.isArray(a))for(let p=0,g=d.length;p<g;p++){const m=d[p],f=a[m.materialIndex],y=Math.max(m.start,A.start),_=Math.min(l.count,Math.min(m.start+m.count,A.start+A.count));for(let E=y,v=_;E<v;E+=3){const C=E,x=E+1,I=E+2;s=Cp(this,f,e,n,c,u,h,C,x,I),s&&(s.faceIndex=Math.floor(E/3),s.face.materialIndex=m.materialIndex,t.push(s))}}else{const p=Math.max(0,A.start),g=Math.min(l.count,A.start+A.count);for(let m=p,f=g;m<f;m+=3){const y=m,_=m+1,E=m+2;s=Cp(this,a,e,n,c,u,h,y,_,E),s&&(s.faceIndex=Math.floor(m/3),t.push(s))}}}};function YN(i,e,t,n,s,r,a,o){let l;if(e.side===_i?l=n.intersectTriangle(a,r,s,!0,o):l=n.intersectTriangle(s,r,a,e.side===or,o),l===null)return null;xp.copy(o),xp.applyMatrix4(i.matrixWorld);const c=t.ray.origin.distanceTo(xp);return c<t.near||c>t.far?null:{distance:c,point:xp.clone(),object:i}}function Cp(i,e,t,n,s,r,a,o,l,c){i.getVertexPosition(o,_p),i.getVertexPosition(l,Ep),i.getVertexPosition(c,vp);const u=YN(i,e,t,n,_p,Ep,vp,Yx);if(u){const h=new Q;ps.getBarycoord(Yx,_p,Ep,vp,h),s&&(u.uv=ps.getInterpolatedAttribute(s,o,l,c,h,new pe)),r&&(u.uv1=ps.getInterpolatedAttribute(r,o,l,c,h,new pe)),a&&(u.normal=ps.getInterpolatedAttribute(a,o,l,c,h,new Q),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));const d={a:o,b:l,c,normal:new Q,materialIndex:0};ps.getNormal(_p,Ep,vp,d.normal),u.face=d,u.barycoord=h}return u}class Hs extends fn{constructor(e=1,t=1,n=1,s=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:s,heightSegments:r,depthSegments:a};const o=this;s=Math.floor(s),r=Math.floor(r),a=Math.floor(a);const l=[],c=[],u=[],h=[];let d=0,A=0;p("z","y","x",-1,-1,n,t,e,a,r,0),p("z","y","x",1,-1,n,t,-e,a,r,1),p("x","z","y",1,1,e,n,t,s,a,2),p("x","z","y",1,-1,e,n,-t,s,a,3),p("x","y","z",1,-1,e,t,n,s,r,4),p("x","y","z",-1,-1,e,t,-n,s,r,5),this.setIndex(l),this.setAttribute("position",new en(c,3)),this.setAttribute("normal",new en(u,3)),this.setAttribute("uv",new en(h,2));function p(g,m,f,y,_,E,v,C,x,I,b){const w=E/x,S=v/I,B=E/2,T=v/2,D=C/2,P=x+1,R=I+1;let L=0,F=0;const $=new Q;for(let J=0;J<R;J++){const W=J*S-T;for(let he=0;he<P;he++){const le=he*w-B;$[g]=le*y,$[m]=W*_,$[f]=D,c.push($.x,$.y,$.z),$[g]=0,$[m]=0,$[f]=C>0?1:-1,u.push($.x,$.y,$.z),h.push(he/x),h.push(1-J/I),L+=1}}for(let J=0;J<I;J++)for(let W=0;W<x;W++){const he=d+W+P*J,le=d+W+P*(J+1),Z=d+(W+1)+P*(J+1),ne=d+(W+1)+P*J;l.push(he,le,ne),l.push(le,Z,ne),F+=6}o.addGroup(A,F,b),A+=F,d+=L}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Hs(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Fh(i){const e={};for(const t in i){e[t]={};for(const n in i[t]){const s=i[t][n];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)?s.isRenderTargetTexture?(qe("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=s.clone():Array.isArray(s)?e[t][n]=s.slice():e[t][n]=s}}return e}function Fi(i){const e={};for(let t=0;t<i.length;t++){const n=Fh(i[t]);for(const s in n)e[s]=n[s]}return e}function qN(i){const e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function TM(i){const e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Bt.workingColorSpace}const ob={clone:Fh,merge:Fi};var WN=`void main() {
|
|
69
69
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
70
70
|
}`,jN=`void main() {
|
|
71
71
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -4055,7 +4055,7 @@ void main() {
|
|
|
4055
4055
|
squared_mean = squared_mean / samples;
|
|
4056
4056
|
float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
|
|
4057
4057
|
gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
|
|
4058
|
-
}`,nG=[new Q(1,0,0),new Q(-1,0,0),new Q(0,1,0),new Q(0,-1,0),new Q(0,0,1),new Q(0,0,-1)],iG=[new Q(0,-1,0),new Q(0,-1,0),new Q(0,0,1),new Q(0,0,-1),new Q(0,-1,0),new Q(0,-1,0)],HC=new We,Gu=new Q,My=new Q;function sG(i,e,t){let n=new cb;const s=new pe,r=new pe,a=new Mt,o=new gb,l=new $P,c={},u=t.maxTextureSize,h={[or]:_i,[_i]:or,[On]:On},d=new kn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:eG,fragmentShader:tG}),A=d.clone();A.defines.HORIZONTAL_PASS=1;const p=new fn;p.setAttribute("position",new rn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new Je(p,d),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ff;let f=this.type;this.render=function(C,x,I){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||C.length===0)return;C.type===RL&&(qe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),C.type=Ff);const b=i.getRenderTarget(),w=i.getActiveCubeFace(),S=i.getActiveMipmapLevel(),B=i.state;B.setBlending(Os),B.buffers.depth.getReversed()===!0?B.buffers.color.setClear(0,0,0,0):B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const T=f!==this.type;T&&x.traverse(function(D){D.material&&(Array.isArray(D.material)?D.material.forEach(P=>P.needsUpdate=!0):D.material.needsUpdate=!0)});for(let D=0,P=C.length;D<P;D++){const R=C[D],L=R.shadow;if(L===void 0){qe("WebGLShadowMap:",R,"has no shadow.");continue}if(L.autoUpdate===!1&&L.needsUpdate===!1)continue;s.copy(L.mapSize);const F=L.getFrameExtents();if(s.multiply(F),r.copy(L.mapSize),(s.x>u||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/F.x),s.x=r.x*F.x,L.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/F.y),s.y=r.y*F.y,L.mapSize.y=r.y)),L.map===null||T===!0){if(L.map!==null&&(L.map.depthTexture!==null&&(L.map.depthTexture.dispose(),L.map.depthTexture=null),L.map.dispose()),this.type===vd){if(R.isPointLight){qe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}L.map=new Sn(s.x,s.y,{format:sr,type:sn,minFilter:ft,magFilter:ft,generateMipmaps:!1}),L.map.texture.name=R.name+".shadowMap",L.map.depthTexture=new bA(s.x,s.y,Cn),L.map.depthTexture.name=R.name+".shadowMapDepth",L.map.depthTexture.format=Pa,L.map.depthTexture.compareFunction=null,L.map.depthTexture.minFilter=jt,L.map.depthTexture.magFilter=jt}else{R.isPointLight?(L.map=new HA(s.x),L.map.depthTexture=new hP(s.x,ci)):(L.map=new Sn(s.x,s.y),L.map.depthTexture=new bA(s.x,s.y,ci)),L.map.depthTexture.name=R.name+".shadowMap",L.map.depthTexture.format=Pa;const J=i.state.buffers.depth.getReversed();this.type===Ff?(L.map.depthTexture.compareFunction=J?ib:nb,L.map.depthTexture.minFilter=ft,L.map.depthTexture.magFilter=ft):(L.map.depthTexture.compareFunction=null,L.map.depthTexture.minFilter=jt,L.map.depthTexture.magFilter=jt)}L.camera.updateProjectionMatrix()}const $=L.map.isWebGLCubeRenderTarget?6:1;for(let J=0;J<$;J++){if(L.map.isWebGLCubeRenderTarget)i.setRenderTarget(L.map,J),i.clear();else{J===0&&(i.setRenderTarget(L.map),i.clear());const W=L.getViewport(J);a.set(r.x*W.x,r.y*W.y,r.x*W.z,r.y*W.w),B.viewport(a)}if(R.isPointLight){const W=L.camera,he=L.matrix,le=R.distance||W.far;le!==W.far&&(W.far=le,W.updateProjectionMatrix()),Gu.setFromMatrixPosition(R.matrixWorld),W.position.copy(Gu),My.copy(W.position),My.add(nG[J]),W.up.copy(iG[J]),W.lookAt(My),W.updateMatrixWorld(),he.makeTranslation(-Gu.x,-Gu.y,-Gu.z),HC.multiplyMatrices(W.projectionMatrix,W.matrixWorldInverse),L._frustum.setFromProjectionMatrix(HC,W.coordinateSystem,W.reversedDepth)}else L.updateMatrices(R);n=L.getFrustum(),E(x,I,L.camera,R,this.type)}L.isPointLightShadow!==!0&&this.type===vd&&y(L,I),L.needsUpdate=!1}f=this.type,m.needsUpdate=!1,i.setRenderTarget(b,w,S)};function y(C,x){const I=e.update(g);d.defines.VSM_SAMPLES!==C.blurSamples&&(d.defines.VSM_SAMPLES=C.blurSamples,A.defines.VSM_SAMPLES=C.blurSamples,d.needsUpdate=!0,A.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new Sn(s.x,s.y,{format:sr,type:sn})),d.uniforms.shadow_pass.value=C.map.depthTexture,d.uniforms.resolution.value=C.mapSize,d.uniforms.radius.value=C.radius,i.setRenderTarget(C.mapPass),i.clear(),i.renderBufferDirect(x,null,I,d,g,null),A.uniforms.shadow_pass.value=C.mapPass.texture,A.uniforms.resolution.value=C.mapSize,A.uniforms.radius.value=C.radius,i.setRenderTarget(C.map),i.clear(),i.renderBufferDirect(x,null,I,A,g,null)}function _(C,x,I,b){let w=null;const S=I.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(S!==void 0)w=S;else if(w=I.isPointLight===!0?l:o,i.localClippingEnabled&&x.clipShadows===!0&&Array.isArray(x.clippingPlanes)&&x.clippingPlanes.length!==0||x.displacementMap&&x.displacementScale!==0||x.alphaMap&&x.alphaTest>0||x.map&&x.alphaTest>0||x.alphaToCoverage===!0){const B=w.uuid,T=x.uuid;let D=c[B];D===void 0&&(D={},c[B]=D);let P=D[T];P===void 0&&(P=w.clone(),D[T]=P,x.addEventListener("dispose",v)),w=P}if(w.visible=x.visible,w.wireframe=x.wireframe,b===vd?w.side=x.shadowSide!==null?x.shadowSide:x.side:w.side=x.shadowSide!==null?x.shadowSide:h[x.side],w.alphaMap=x.alphaMap,w.alphaTest=x.alphaToCoverage===!0?.5:x.alphaTest,w.map=x.map,w.clipShadows=x.clipShadows,w.clippingPlanes=x.clippingPlanes,w.clipIntersection=x.clipIntersection,w.displacementMap=x.displacementMap,w.displacementScale=x.displacementScale,w.displacementBias=x.displacementBias,w.wireframeLinewidth=x.wireframeLinewidth,w.linewidth=x.linewidth,I.isPointLight===!0&&w.isMeshDistanceMaterial===!0){const B=i.properties.get(w);B.light=I}return w}function E(C,x,I,b,w){if(C.visible===!1)return;if(C.layers.test(x.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&w===vd)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,C.matrixWorld);const T=e.update(C),D=C.material;if(Array.isArray(D)){const P=T.groups;for(let R=0,L=P.length;R<L;R++){const F=P[R],$=D[F.materialIndex];if($&&$.visible){const J=_(C,$,b,w);C.onBeforeShadow(i,C,x,I,T,J,F),i.renderBufferDirect(I,null,T,J,C,F),C.onAfterShadow(i,C,x,I,T,J,F)}}}else if(D.visible){const P=_(C,D,b,w);C.onBeforeShadow(i,C,x,I,T,P,null),i.renderBufferDirect(I,null,T,P,C,null),C.onAfterShadow(i,C,x,I,T,P,null)}}const B=C.children;for(let T=0,D=B.length;T<D;T++)E(B[T],x,I,b,w)}function v(C){C.target.removeEventListener("dispose",v);for(const I in c){const b=c[I],w=C.target.uuid;w in b&&(b[w].dispose(),delete b[w])}}}const rG={[K0]:Z0,[eE]:iE,[tE]:sE,[Sh]:nE,[Z0]:K0,[iE]:eE,[sE]:tE,[nE]:Sh};function aG(i,e){function t(){let q=!1;const Te=new Mt;let Ee=null;const Ne=new Mt(0,0,0,0);return{setMask:function(ge){Ee!==ge&&!q&&(i.colorMask(ge,ge,ge,ge),Ee=ge)},setLocked:function(ge){q=ge},setClear:function(ge,ue,Ie,ze,Lt){Lt===!0&&(ge*=ze,ue*=ze,Ie*=ze),Te.set(ge,ue,Ie,ze),Ne.equals(Te)===!1&&(i.clearColor(ge,ue,Ie,ze),Ne.copy(Te))},reset:function(){q=!1,Ee=null,Ne.set(-1,0,0,0)}}}function n(){let q=!1,Te=!1,Ee=null,Ne=null,ge=null;return{setReversed:function(ue){if(Te!==ue){const Ie=e.get("EXT_clip_control");ue?Ie.clipControlEXT(Ie.LOWER_LEFT_EXT,Ie.ZERO_TO_ONE_EXT):Ie.clipControlEXT(Ie.LOWER_LEFT_EXT,Ie.NEGATIVE_ONE_TO_ONE_EXT),Te=ue;const ze=ge;ge=null,this.setClear(ze)}},getReversed:function(){return Te},setTest:function(ue){ue?z(i.DEPTH_TEST):ae(i.DEPTH_TEST)},setMask:function(ue){Ee!==ue&&!q&&(i.depthMask(ue),Ee=ue)},setFunc:function(ue){if(Te&&(ue=rG[ue]),Ne!==ue){switch(ue){case K0:i.depthFunc(i.NEVER);break;case Z0:i.depthFunc(i.ALWAYS);break;case eE:i.depthFunc(i.LESS);break;case Sh:i.depthFunc(i.LEQUAL);break;case tE:i.depthFunc(i.EQUAL);break;case nE:i.depthFunc(i.GEQUAL);break;case iE:i.depthFunc(i.GREATER);break;case sE:i.depthFunc(i.NOTEQUAL);break;default:i.depthFunc(i.LEQUAL)}Ne=ue}},setLocked:function(ue){q=ue},setClear:function(ue){ge!==ue&&(Te&&(ue=1-ue),i.clearDepth(ue),ge=ue)},reset:function(){q=!1,Ee=null,Ne=null,ge=null,Te=!1}}}function s(){let q=!1,Te=null,Ee=null,Ne=null,ge=null,ue=null,Ie=null,ze=null,Lt=null;return{setTest:function(Ht){q||(Ht?z(i.STENCIL_TEST):ae(i.STENCIL_TEST))},setMask:function(Ht){Te!==Ht&&!q&&(i.stencilMask(Ht),Te=Ht)},setFunc:function(Ht,ns,is){(Ee!==Ht||Ne!==ns||ge!==is)&&(i.stencilFunc(Ht,ns,is),Ee=Ht,Ne=ns,ge=is)},setOp:function(Ht,ns,is){(ue!==Ht||Ie!==ns||ze!==is)&&(i.stencilOp(Ht,ns,is),ue=Ht,Ie=ns,ze=is)},setLocked:function(Ht){q=Ht},setClear:function(Ht){Lt!==Ht&&(i.clearStencil(Ht),Lt=Ht)},reset:function(){q=!1,Te=null,Ee=null,Ne=null,ge=null,ue=null,Ie=null,ze=null,Lt=null}}}const r=new t,a=new n,o=new s,l=new WeakMap,c=new WeakMap;let u={},h={},d=new WeakMap,A=[],p=null,g=!1,m=null,f=null,y=null,_=null,E=null,v=null,C=null,x=new we(0,0,0),I=0,b=!1,w=null,S=null,B=null,T=null,D=null;const P=i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let R=!1,L=0;const F=i.getParameter(i.VERSION);F.indexOf("WebGL")!==-1?(L=parseFloat(/^WebGL (\d)/.exec(F)[1]),R=L>=1):F.indexOf("OpenGL ES")!==-1&&(L=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),R=L>=2);let $=null,J={};const W=i.getParameter(i.SCISSOR_BOX),he=i.getParameter(i.VIEWPORT),le=new Mt().fromArray(W),Z=new Mt().fromArray(he);function ne(q,Te,Ee,Ne){const ge=new Uint8Array(4),ue=i.createTexture();i.bindTexture(q,ue),i.texParameteri(q,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(q,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Ie=0;Ie<Ee;Ie++)q===i.TEXTURE_3D||q===i.TEXTURE_2D_ARRAY?i.texImage3D(Te,0,i.RGBA,1,1,Ne,0,i.RGBA,i.UNSIGNED_BYTE,ge):i.texImage2D(Te+Ie,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,ge);return ue}const G={};G[i.TEXTURE_2D]=ne(i.TEXTURE_2D,i.TEXTURE_2D,1),G[i.TEXTURE_CUBE_MAP]=ne(i.TEXTURE_CUBE_MAP,i.TEXTURE_CUBE_MAP_POSITIVE_X,6),G[i.TEXTURE_2D_ARRAY]=ne(i.TEXTURE_2D_ARRAY,i.TEXTURE_2D_ARRAY,1,1),G[i.TEXTURE_3D]=ne(i.TEXTURE_3D,i.TEXTURE_3D,1,1),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),z(i.DEPTH_TEST),a.setFunc(Sh),Ke(!1),Ct(wx),z(i.CULL_FACE),Ye(Os);function z(q){u[q]!==!0&&(i.enable(q),u[q]=!0)}function ae(q){u[q]!==!1&&(i.disable(q),u[q]=!1)}function Be(q,Te){return h[q]!==Te?(i.bindFramebuffer(q,Te),h[q]=Te,q===i.DRAW_FRAMEBUFFER&&(h[i.FRAMEBUFFER]=Te),q===i.FRAMEBUFFER&&(h[i.DRAW_FRAMEBUFFER]=Te),!0):!1}function fe(q,Te){let Ee=A,Ne=!1;if(q){Ee=d.get(Te),Ee===void 0&&(Ee=[],d.set(Te,Ee));const ge=q.textures;if(Ee.length!==ge.length||Ee[0]!==i.COLOR_ATTACHMENT0){for(let ue=0,Ie=ge.length;ue<Ie;ue++)Ee[ue]=i.COLOR_ATTACHMENT0+ue;Ee.length=ge.length,Ne=!0}}else Ee[0]!==i.BACK&&(Ee[0]=i.BACK,Ne=!0);Ne&&i.drawBuffers(Ee)}function De(q){return p!==q?(i.useProgram(q),p=q,!0):!1}const ut={[fl]:i.FUNC_ADD,[QL]:i.FUNC_SUBTRACT,[LL]:i.FUNC_REVERSE_SUBTRACT};ut[NL]=i.MIN,ut[PL]=i.MAX;const Qe={[FL]:i.ZERO,[kL]:i.ONE,[UL]:i.SRC_COLOR,[X0]:i.SRC_ALPHA,[VL]:i.SRC_ALPHA_SATURATE,[HL]:i.DST_COLOR,[GL]:i.DST_ALPHA,[OL]:i.ONE_MINUS_SRC_COLOR,[J0]:i.ONE_MINUS_SRC_ALPHA,[$L]:i.ONE_MINUS_DST_COLOR,[zL]:i.ONE_MINUS_DST_ALPHA,[YL]:i.CONSTANT_COLOR,[qL]:i.ONE_MINUS_CONSTANT_COLOR,[WL]:i.CONSTANT_ALPHA,[jL]:i.ONE_MINUS_CONSTANT_ALPHA};function Ye(q,Te,Ee,Ne,ge,ue,Ie,ze,Lt,Ht){if(q===Os){g===!0&&(ae(i.BLEND),g=!1);return}if(g===!1&&(z(i.BLEND),g=!0),q!==DL){if(q!==m||Ht!==b){if((f!==fl||E!==fl)&&(i.blendEquation(i.FUNC_ADD),f=fl,E=fl),Ht)switch(q){case Bl:i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case j0:i.blendFunc(i.ONE,i.ONE);break;case Sx:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Bx:i.blendFuncSeparate(i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ZERO,i.ONE);break;default:rt("WebGLState: Invalid blending: ",q);break}else switch(q){case Bl:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case j0:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE,i.ONE,i.ONE);break;case Sx:rt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case Bx:rt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:rt("WebGLState: Invalid blending: ",q);break}y=null,_=null,v=null,C=null,x.set(0,0,0),I=0,m=q,b=Ht}return}ge=ge||Te,ue=ue||Ee,Ie=Ie||Ne,(Te!==f||ge!==E)&&(i.blendEquationSeparate(ut[Te],ut[ge]),f=Te,E=ge),(Ee!==y||Ne!==_||ue!==v||Ie!==C)&&(i.blendFuncSeparate(Qe[Ee],Qe[Ne],Qe[ue],Qe[Ie]),y=Ee,_=Ne,v=ue,C=Ie),(ze.equals(x)===!1||Lt!==I)&&(i.blendColor(ze.r,ze.g,ze.b,Lt),x.copy(ze),I=Lt),m=q,b=!1}function ot(q,Te){q.side===On?ae(i.CULL_FACE):z(i.CULL_FACE);let Ee=q.side===_i;Te&&(Ee=!Ee),Ke(Ee),q.blending===Bl&&q.transparent===!1?Ye(Os):Ye(q.blending,q.blendEquation,q.blendSrc,q.blendDst,q.blendEquationAlpha,q.blendSrcAlpha,q.blendDstAlpha,q.blendColor,q.blendAlpha,q.premultipliedAlpha),a.setFunc(q.depthFunc),a.setTest(q.depthTest),a.setMask(q.depthWrite),r.setMask(q.colorWrite);const Ne=q.stencilWrite;o.setTest(Ne),Ne&&(o.setMask(q.stencilWriteMask),o.setFunc(q.stencilFunc,q.stencilRef,q.stencilFuncMask),o.setOp(q.stencilFail,q.stencilZFail,q.stencilZPass)),yt(q.polygonOffset,q.polygonOffsetFactor,q.polygonOffsetUnits),q.alphaToCoverage===!0?z(i.SAMPLE_ALPHA_TO_COVERAGE):ae(i.SAMPLE_ALPHA_TO_COVERAGE)}function Ke(q){w!==q&&(q?i.frontFace(i.CW):i.frontFace(i.CCW),w=q)}function Ct(q){q!==TL?(z(i.CULL_FACE),q!==S&&(q===wx?i.cullFace(i.BACK):q===ML?i.cullFace(i.FRONT):i.cullFace(i.FRONT_AND_BACK))):ae(i.CULL_FACE),S=q}function U(q){q!==B&&(R&&i.lineWidth(q),B=q)}function yt(q,Te,Ee){q?(z(i.POLYGON_OFFSET_FILL),(T!==Te||D!==Ee)&&(i.polygonOffset(Te,Ee),T=Te,D=Ee)):ae(i.POLYGON_OFFSET_FILL)}function je(q){q?z(i.SCISSOR_TEST):ae(i.SCISSOR_TEST)}function Dt(q){q===void 0&&(q=i.TEXTURE0+P-1),$!==q&&(i.activeTexture(q),$=q)}function Fe(q,Te,Ee){Ee===void 0&&($===null?Ee=i.TEXTURE0+P-1:Ee=$);let Ne=J[Ee];Ne===void 0&&(Ne={type:void 0,texture:void 0},J[Ee]=Ne),(Ne.type!==q||Ne.texture!==Te)&&($!==Ee&&(i.activeTexture(Ee),$=Ee),i.bindTexture(q,Te||G[q]),Ne.type=q,Ne.texture=Te)}function k(){const q=J[$];q!==void 0&&q.type!==void 0&&(i.bindTexture(q.type,null),q.type=void 0,q.texture=void 0)}function M(){try{i.compressedTexImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function Y(){try{i.compressedTexImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function se(){try{i.texSubImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function ce(){try{i.texSubImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function ie(){try{i.compressedTexSubImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function Ve(){try{i.compressedTexSubImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function be(){try{i.texStorage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function Ge(){try{i.texStorage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function it(){try{i.texImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function me(){try{i.texImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function xe(q){le.equals(q)===!1&&(i.scissor(q.x,q.y,q.z,q.w),le.copy(q))}function Le(q){Z.equals(q)===!1&&(i.viewport(q.x,q.y,q.z,q.w),Z.copy(q))}function ke(q,Te){let Ee=c.get(Te);Ee===void 0&&(Ee=new WeakMap,c.set(Te,Ee));let Ne=Ee.get(q);Ne===void 0&&(Ne=i.getUniformBlockIndex(Te,q.name),Ee.set(q,Ne))}function Ce(q,Te){const Ne=c.get(Te).get(q);l.get(Te)!==Ne&&(i.uniformBlockBinding(Te,Ne,q.__bindingPointIndex),l.set(Te,Ne))}function gt(){i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.DEPTH_TEST),i.disable(i.POLYGON_OFFSET_FILL),i.disable(i.SCISSOR_TEST),i.disable(i.STENCIL_TEST),i.disable(i.SAMPLE_ALPHA_TO_COVERAGE),i.blendEquation(i.FUNC_ADD),i.blendFunc(i.ONE,i.ZERO),i.blendFuncSeparate(i.ONE,i.ZERO,i.ONE,i.ZERO),i.blendColor(0,0,0,0),i.colorMask(!0,!0,!0,!0),i.clearColor(0,0,0,0),i.depthMask(!0),i.depthFunc(i.LESS),a.setReversed(!1),i.clearDepth(1),i.stencilMask(4294967295),i.stencilFunc(i.ALWAYS,0,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),i.clearStencil(0),i.cullFace(i.BACK),i.frontFace(i.CCW),i.polygonOffset(0,0),i.activeTexture(i.TEXTURE0),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.useProgram(null),i.lineWidth(1),i.scissor(0,0,i.canvas.width,i.canvas.height),i.viewport(0,0,i.canvas.width,i.canvas.height),u={},$=null,J={},h={},d=new WeakMap,A=[],p=null,g=!1,m=null,f=null,y=null,_=null,E=null,v=null,C=null,x=new we(0,0,0),I=0,b=!1,w=null,S=null,B=null,T=null,D=null,le.set(0,0,i.canvas.width,i.canvas.height),Z.set(0,0,i.canvas.width,i.canvas.height),r.reset(),a.reset(),o.reset()}return{buffers:{color:r,depth:a,stencil:o},enable:z,disable:ae,bindFramebuffer:Be,drawBuffers:fe,useProgram:De,setBlending:Ye,setMaterial:ot,setFlipSided:Ke,setCullFace:Ct,setLineWidth:U,setPolygonOffset:yt,setScissorTest:je,activeTexture:Dt,bindTexture:Fe,unbindTexture:k,compressedTexImage2D:M,compressedTexImage3D:Y,texImage2D:it,texImage3D:me,updateUBOMapping:ke,uniformBlockBinding:Ce,texStorage2D:be,texStorage3D:Ge,texSubImage2D:se,texSubImage3D:ce,compressedTexSubImage2D:ie,compressedTexSubImage3D:Ve,scissor:xe,viewport:Le,reset:gt}}function oG(i,e,t,n,s,r,a){const o=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new pe,u=new WeakMap;let h;const d=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(k,M){return A?new OffscreenCanvas(k,M):EA("canvas")}function g(k,M,Y){let se=1;const ce=Fe(k);if((ce.width>Y||ce.height>Y)&&(se=Y/Math.max(ce.width,ce.height)),se<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const ie=Math.floor(se*ce.width),Ve=Math.floor(se*ce.height);h===void 0&&(h=p(ie,Ve));const be=M?p(ie,Ve):h;return be.width=ie,be.height=Ve,be.getContext("2d").drawImage(k,0,0,ie,Ve),qe("WebGLRenderer: Texture has been resized from ("+ce.width+"x"+ce.height+") to ("+ie+"x"+Ve+")."),be}else return"data"in k&&qe("WebGLRenderer: Image in DataTexture is too big ("+ce.width+"x"+ce.height+")."),k;return k}function m(k){return k.generateMipmaps}function f(k){i.generateMipmap(k)}function y(k){return k.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?i.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?i.TEXTURE_2D_ARRAY:i.TEXTURE_2D}function _(k,M,Y,se,ce=!1){if(k!==null){if(i[k]!==void 0)return i[k];qe("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let ie=M;if(M===i.RED&&(Y===i.FLOAT&&(ie=i.R32F),Y===i.HALF_FLOAT&&(ie=i.R16F),Y===i.UNSIGNED_BYTE&&(ie=i.R8)),M===i.RED_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.R8UI),Y===i.UNSIGNED_SHORT&&(ie=i.R16UI),Y===i.UNSIGNED_INT&&(ie=i.R32UI),Y===i.BYTE&&(ie=i.R8I),Y===i.SHORT&&(ie=i.R16I),Y===i.INT&&(ie=i.R32I)),M===i.RG&&(Y===i.FLOAT&&(ie=i.RG32F),Y===i.HALF_FLOAT&&(ie=i.RG16F),Y===i.UNSIGNED_BYTE&&(ie=i.RG8)),M===i.RG_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.RG8UI),Y===i.UNSIGNED_SHORT&&(ie=i.RG16UI),Y===i.UNSIGNED_INT&&(ie=i.RG32UI),Y===i.BYTE&&(ie=i.RG8I),Y===i.SHORT&&(ie=i.RG16I),Y===i.INT&&(ie=i.RG32I)),M===i.RGB_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.RGB8UI),Y===i.UNSIGNED_SHORT&&(ie=i.RGB16UI),Y===i.UNSIGNED_INT&&(ie=i.RGB32UI),Y===i.BYTE&&(ie=i.RGB8I),Y===i.SHORT&&(ie=i.RGB16I),Y===i.INT&&(ie=i.RGB32I)),M===i.RGBA_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.RGBA8UI),Y===i.UNSIGNED_SHORT&&(ie=i.RGBA16UI),Y===i.UNSIGNED_INT&&(ie=i.RGBA32UI),Y===i.BYTE&&(ie=i.RGBA8I),Y===i.SHORT&&(ie=i.RGBA16I),Y===i.INT&&(ie=i.RGBA32I)),M===i.RGB&&(Y===i.UNSIGNED_INT_5_9_9_9_REV&&(ie=i.RGB9_E5),Y===i.UNSIGNED_INT_10F_11F_11F_REV&&(ie=i.R11F_G11F_B10F)),M===i.RGBA){const Ve=ce?xg:Bt.getTransfer(se);Y===i.FLOAT&&(ie=i.RGBA32F),Y===i.HALF_FLOAT&&(ie=i.RGBA16F),Y===i.UNSIGNED_BYTE&&(ie=Ve===Kt?i.SRGB8_ALPHA8:i.RGBA8),Y===i.UNSIGNED_SHORT_4_4_4_4&&(ie=i.RGBA4),Y===i.UNSIGNED_SHORT_5_5_5_1&&(ie=i.RGB5_A1)}return(ie===i.R16F||ie===i.R32F||ie===i.RG16F||ie===i.RG32F||ie===i.RGBA16F||ie===i.RGBA32F)&&e.get("EXT_color_buffer_float"),ie}function E(k,M){let Y;return k?M===null||M===ci||M===fA?Y=i.DEPTH24_STENCIL8:M===Cn?Y=i.DEPTH32F_STENCIL8:M===pA&&(Y=i.DEPTH24_STENCIL8,qe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):M===null||M===ci||M===fA?Y=i.DEPTH_COMPONENT24:M===Cn?Y=i.DEPTH_COMPONENT32F:M===pA&&(Y=i.DEPTH_COMPONENT16),Y}function v(k,M){return m(k)===!0||k.isFramebufferTexture&&k.minFilter!==jt&&k.minFilter!==ft?Math.log2(Math.max(M.width,M.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?M.mipmaps.length:1}function C(k){const M=k.target;M.removeEventListener("dispose",C),I(M),M.isVideoTexture&&u.delete(M)}function x(k){const M=k.target;M.removeEventListener("dispose",x),w(M)}function I(k){const M=n.get(k);if(M.__webglInit===void 0)return;const Y=k.source,se=d.get(Y);if(se){const ce=se[M.__cacheKey];ce.usedTimes--,ce.usedTimes===0&&b(k),Object.keys(se).length===0&&d.delete(Y)}n.remove(k)}function b(k){const M=n.get(k);i.deleteTexture(M.__webglTexture);const Y=k.source,se=d.get(Y);delete se[M.__cacheKey],a.memory.textures--}function w(k){const M=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let se=0;se<6;se++){if(Array.isArray(M.__webglFramebuffer[se]))for(let ce=0;ce<M.__webglFramebuffer[se].length;ce++)i.deleteFramebuffer(M.__webglFramebuffer[se][ce]);else i.deleteFramebuffer(M.__webglFramebuffer[se]);M.__webglDepthbuffer&&i.deleteRenderbuffer(M.__webglDepthbuffer[se])}else{if(Array.isArray(M.__webglFramebuffer))for(let se=0;se<M.__webglFramebuffer.length;se++)i.deleteFramebuffer(M.__webglFramebuffer[se]);else i.deleteFramebuffer(M.__webglFramebuffer);if(M.__webglDepthbuffer&&i.deleteRenderbuffer(M.__webglDepthbuffer),M.__webglMultisampledFramebuffer&&i.deleteFramebuffer(M.__webglMultisampledFramebuffer),M.__webglColorRenderbuffer)for(let se=0;se<M.__webglColorRenderbuffer.length;se++)M.__webglColorRenderbuffer[se]&&i.deleteRenderbuffer(M.__webglColorRenderbuffer[se]);M.__webglDepthRenderbuffer&&i.deleteRenderbuffer(M.__webglDepthRenderbuffer)}const Y=k.textures;for(let se=0,ce=Y.length;se<ce;se++){const ie=n.get(Y[se]);ie.__webglTexture&&(i.deleteTexture(ie.__webglTexture),a.memory.textures--),n.remove(Y[se])}n.remove(k)}let S=0;function B(){S=0}function T(){const k=S;return k>=s.maxTextures&&qe("WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+s.maxTextures),S+=1,k}function D(k){const M=[];return M.push(k.wrapS),M.push(k.wrapT),M.push(k.wrapR||0),M.push(k.magFilter),M.push(k.minFilter),M.push(k.anisotropy),M.push(k.internalFormat),M.push(k.format),M.push(k.type),M.push(k.generateMipmaps),M.push(k.premultiplyAlpha),M.push(k.flipY),M.push(k.unpackAlignment),M.push(k.colorSpace),M.join()}function P(k,M){const Y=n.get(k);if(k.isVideoTexture&&je(k),k.isRenderTargetTexture===!1&&k.isExternalTexture!==!0&&k.version>0&&Y.__version!==k.version){const se=k.image;if(se===null)qe("WebGLRenderer: Texture marked for update but no image data found.");else if(se.complete===!1)qe("WebGLRenderer: Texture marked for update but image is incomplete");else{G(Y,k,M);return}}else k.isExternalTexture&&(Y.__webglTexture=k.sourceTexture?k.sourceTexture:null);t.bindTexture(i.TEXTURE_2D,Y.__webglTexture,i.TEXTURE0+M)}function R(k,M){const Y=n.get(k);if(k.isRenderTargetTexture===!1&&k.version>0&&Y.__version!==k.version){G(Y,k,M);return}else k.isExternalTexture&&(Y.__webglTexture=k.sourceTexture?k.sourceTexture:null);t.bindTexture(i.TEXTURE_2D_ARRAY,Y.__webglTexture,i.TEXTURE0+M)}function L(k,M){const Y=n.get(k);if(k.isRenderTargetTexture===!1&&k.version>0&&Y.__version!==k.version){G(Y,k,M);return}t.bindTexture(i.TEXTURE_3D,Y.__webglTexture,i.TEXTURE0+M)}function F(k,M){const Y=n.get(k);if(k.isCubeDepthTexture!==!0&&k.version>0&&Y.__version!==k.version){z(Y,k,M);return}t.bindTexture(i.TEXTURE_CUBE_MAP,Y.__webglTexture,i.TEXTURE0+M)}const $={[lr]:i.REPEAT,[xn]:i.CLAMP_TO_EDGE,[Ol]:i.MIRRORED_REPEAT},J={[jt]:i.NEAREST,[ru]:i.NEAREST_MIPMAP_NEAREST,[fo]:i.NEAREST_MIPMAP_LINEAR,[ft]:i.LINEAR,[Tl]:i.LINEAR_MIPMAP_NEAREST,[Hi]:i.LINEAR_MIPMAP_LINEAR},W={[iN]:i.NEVER,[lN]:i.ALWAYS,[sN]:i.LESS,[nb]:i.LEQUAL,[rN]:i.EQUAL,[ib]:i.GEQUAL,[aN]:i.GREATER,[oN]:i.NOTEQUAL};function he(k,M){if(M.type===Cn&&e.has("OES_texture_float_linear")===!1&&(M.magFilter===ft||M.magFilter===Tl||M.magFilter===fo||M.magFilter===Hi||M.minFilter===ft||M.minFilter===Tl||M.minFilter===fo||M.minFilter===Hi)&&qe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(k,i.TEXTURE_WRAP_S,$[M.wrapS]),i.texParameteri(k,i.TEXTURE_WRAP_T,$[M.wrapT]),(k===i.TEXTURE_3D||k===i.TEXTURE_2D_ARRAY)&&i.texParameteri(k,i.TEXTURE_WRAP_R,$[M.wrapR]),i.texParameteri(k,i.TEXTURE_MAG_FILTER,J[M.magFilter]),i.texParameteri(k,i.TEXTURE_MIN_FILTER,J[M.minFilter]),M.compareFunction&&(i.texParameteri(k,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(k,i.TEXTURE_COMPARE_FUNC,W[M.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(M.magFilter===jt||M.minFilter!==fo&&M.minFilter!==Hi||M.type===Cn&&e.has("OES_texture_float_linear")===!1)return;if(M.anisotropy>1||n.get(M).__currentAnisotropy){const Y=e.get("EXT_texture_filter_anisotropic");i.texParameterf(k,Y.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(M.anisotropy,s.getMaxAnisotropy())),n.get(M).__currentAnisotropy=M.anisotropy}}}function le(k,M){let Y=!1;k.__webglInit===void 0&&(k.__webglInit=!0,M.addEventListener("dispose",C));const se=M.source;let ce=d.get(se);ce===void 0&&(ce={},d.set(se,ce));const ie=D(M);if(ie!==k.__cacheKey){ce[ie]===void 0&&(ce[ie]={texture:i.createTexture(),usedTimes:0},a.memory.textures++,Y=!0),ce[ie].usedTimes++;const Ve=ce[k.__cacheKey];Ve!==void 0&&(ce[k.__cacheKey].usedTimes--,Ve.usedTimes===0&&b(M)),k.__cacheKey=ie,k.__webglTexture=ce[ie].texture}return Y}function Z(k,M,Y){return Math.floor(Math.floor(k/Y)/M)}function ne(k,M,Y,se){const ie=k.updateRanges;if(ie.length===0)t.texSubImage2D(i.TEXTURE_2D,0,0,0,M.width,M.height,Y,se,M.data);else{ie.sort((me,xe)=>me.start-xe.start);let Ve=0;for(let me=1;me<ie.length;me++){const xe=ie[Ve],Le=ie[me],ke=xe.start+xe.count,Ce=Z(Le.start,M.width,4),gt=Z(xe.start,M.width,4);Le.start<=ke+1&&Ce===gt&&Z(Le.start+Le.count-1,M.width,4)===Ce?xe.count=Math.max(xe.count,Le.start+Le.count-xe.start):(++Ve,ie[Ve]=Le)}ie.length=Ve+1;const be=i.getParameter(i.UNPACK_ROW_LENGTH),Ge=i.getParameter(i.UNPACK_SKIP_PIXELS),it=i.getParameter(i.UNPACK_SKIP_ROWS);i.pixelStorei(i.UNPACK_ROW_LENGTH,M.width);for(let me=0,xe=ie.length;me<xe;me++){const Le=ie[me],ke=Math.floor(Le.start/4),Ce=Math.ceil(Le.count/4),gt=ke%M.width,q=Math.floor(ke/M.width),Te=Ce,Ee=1;i.pixelStorei(i.UNPACK_SKIP_PIXELS,gt),i.pixelStorei(i.UNPACK_SKIP_ROWS,q),t.texSubImage2D(i.TEXTURE_2D,0,gt,q,Te,Ee,Y,se,M.data)}k.clearUpdateRanges(),i.pixelStorei(i.UNPACK_ROW_LENGTH,be),i.pixelStorei(i.UNPACK_SKIP_PIXELS,Ge),i.pixelStorei(i.UNPACK_SKIP_ROWS,it)}}function G(k,M,Y){let se=i.TEXTURE_2D;(M.isDataArrayTexture||M.isCompressedArrayTexture)&&(se=i.TEXTURE_2D_ARRAY),M.isData3DTexture&&(se=i.TEXTURE_3D);const ce=le(k,M),ie=M.source;t.bindTexture(se,k.__webglTexture,i.TEXTURE0+Y);const Ve=n.get(ie);if(ie.version!==Ve.__version||ce===!0){t.activeTexture(i.TEXTURE0+Y);const be=Bt.getPrimaries(Bt.workingColorSpace),Ge=M.colorSpace===As?null:Bt.getPrimaries(M.colorSpace),it=M.colorSpace===As||be===Ge?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,M.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,M.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,M.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,it);let me=g(M.image,!1,s.maxTextureSize);me=Dt(M,me);const xe=r.convert(M.format,M.colorSpace),Le=r.convert(M.type);let ke=_(M.internalFormat,xe,Le,M.colorSpace,M.isVideoTexture);he(se,M);let Ce;const gt=M.mipmaps,q=M.isVideoTexture!==!0,Te=Ve.__version===void 0||ce===!0,Ee=ie.dataReady,Ne=v(M,me);if(M.isDepthTexture)ke=E(M.format===vl,M.type),Te&&(q?t.texStorage2D(i.TEXTURE_2D,1,ke,me.width,me.height):t.texImage2D(i.TEXTURE_2D,0,ke,me.width,me.height,0,xe,Le,null));else if(M.isDataTexture)if(gt.length>0){q&&Te&&t.texStorage2D(i.TEXTURE_2D,Ne,ke,gt[0].width,gt[0].height);for(let ge=0,ue=gt.length;ge<ue;ge++)Ce=gt[ge],q?Ee&&t.texSubImage2D(i.TEXTURE_2D,ge,0,0,Ce.width,Ce.height,xe,Le,Ce.data):t.texImage2D(i.TEXTURE_2D,ge,ke,Ce.width,Ce.height,0,xe,Le,Ce.data);M.generateMipmaps=!1}else q?(Te&&t.texStorage2D(i.TEXTURE_2D,Ne,ke,me.width,me.height),Ee&&ne(M,me,xe,Le)):t.texImage2D(i.TEXTURE_2D,0,ke,me.width,me.height,0,xe,Le,me.data);else if(M.isCompressedTexture)if(M.isCompressedArrayTexture){q&&Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Ne,ke,gt[0].width,gt[0].height,me.depth);for(let ge=0,ue=gt.length;ge<ue;ge++)if(Ce=gt[ge],M.format!==Gt)if(xe!==null)if(q){if(Ee)if(M.layerUpdates.size>0){const Ie=vC(Ce.width,Ce.height,M.format,M.type);for(const ze of M.layerUpdates){const Lt=Ce.data.subarray(ze*Ie/Ce.data.BYTES_PER_ELEMENT,(ze+1)*Ie/Ce.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,ge,0,0,ze,Ce.width,Ce.height,1,xe,Lt)}M.clearLayerUpdates()}else t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,ge,0,0,0,Ce.width,Ce.height,me.depth,xe,Ce.data)}else t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,ge,ke,Ce.width,Ce.height,me.depth,0,Ce.data,0,0);else qe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?Ee&&t.texSubImage3D(i.TEXTURE_2D_ARRAY,ge,0,0,0,Ce.width,Ce.height,me.depth,xe,Le,Ce.data):t.texImage3D(i.TEXTURE_2D_ARRAY,ge,ke,Ce.width,Ce.height,me.depth,0,xe,Le,Ce.data)}else{q&&Te&&t.texStorage2D(i.TEXTURE_2D,Ne,ke,gt[0].width,gt[0].height);for(let ge=0,ue=gt.length;ge<ue;ge++)Ce=gt[ge],M.format!==Gt?xe!==null?q?Ee&&t.compressedTexSubImage2D(i.TEXTURE_2D,ge,0,0,Ce.width,Ce.height,xe,Ce.data):t.compressedTexImage2D(i.TEXTURE_2D,ge,ke,Ce.width,Ce.height,0,Ce.data):qe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):q?Ee&&t.texSubImage2D(i.TEXTURE_2D,ge,0,0,Ce.width,Ce.height,xe,Le,Ce.data):t.texImage2D(i.TEXTURE_2D,ge,ke,Ce.width,Ce.height,0,xe,Le,Ce.data)}else if(M.isDataArrayTexture)if(q){if(Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Ne,ke,me.width,me.height,me.depth),Ee)if(M.layerUpdates.size>0){const ge=vC(me.width,me.height,M.format,M.type);for(const ue of M.layerUpdates){const Ie=me.data.subarray(ue*ge/me.data.BYTES_PER_ELEMENT,(ue+1)*ge/me.data.BYTES_PER_ELEMENT);t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,ue,me.width,me.height,1,xe,Le,Ie)}M.clearLayerUpdates()}else t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,me.width,me.height,me.depth,xe,Le,me.data)}else t.texImage3D(i.TEXTURE_2D_ARRAY,0,ke,me.width,me.height,me.depth,0,xe,Le,me.data);else if(M.isData3DTexture)q?(Te&&t.texStorage3D(i.TEXTURE_3D,Ne,ke,me.width,me.height,me.depth),Ee&&t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,me.width,me.height,me.depth,xe,Le,me.data)):t.texImage3D(i.TEXTURE_3D,0,ke,me.width,me.height,me.depth,0,xe,Le,me.data);else if(M.isFramebufferTexture){if(Te)if(q)t.texStorage2D(i.TEXTURE_2D,Ne,ke,me.width,me.height);else{let ge=me.width,ue=me.height;for(let Ie=0;Ie<Ne;Ie++)t.texImage2D(i.TEXTURE_2D,Ie,ke,ge,ue,0,xe,Le,null),ge>>=1,ue>>=1}}else if(gt.length>0){if(q&&Te){const ge=Fe(gt[0]);t.texStorage2D(i.TEXTURE_2D,Ne,ke,ge.width,ge.height)}for(let ge=0,ue=gt.length;ge<ue;ge++)Ce=gt[ge],q?Ee&&t.texSubImage2D(i.TEXTURE_2D,ge,0,0,xe,Le,Ce):t.texImage2D(i.TEXTURE_2D,ge,ke,xe,Le,Ce);M.generateMipmaps=!1}else if(q){if(Te){const ge=Fe(me);t.texStorage2D(i.TEXTURE_2D,Ne,ke,ge.width,ge.height)}Ee&&t.texSubImage2D(i.TEXTURE_2D,0,0,0,xe,Le,me)}else t.texImage2D(i.TEXTURE_2D,0,ke,xe,Le,me);m(M)&&f(se),Ve.__version=ie.version,M.onUpdate&&M.onUpdate(M)}k.__version=M.version}function z(k,M,Y){if(M.image.length!==6)return;const se=le(k,M),ce=M.source;t.bindTexture(i.TEXTURE_CUBE_MAP,k.__webglTexture,i.TEXTURE0+Y);const ie=n.get(ce);if(ce.version!==ie.__version||se===!0){t.activeTexture(i.TEXTURE0+Y);const Ve=Bt.getPrimaries(Bt.workingColorSpace),be=M.colorSpace===As?null:Bt.getPrimaries(M.colorSpace),Ge=M.colorSpace===As||Ve===be?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,M.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,M.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,M.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ge);const it=M.isCompressedTexture||M.image[0].isCompressedTexture,me=M.image[0]&&M.image[0].isDataTexture,xe=[];for(let ue=0;ue<6;ue++)!it&&!me?xe[ue]=g(M.image[ue],!0,s.maxCubemapSize):xe[ue]=me?M.image[ue].image:M.image[ue],xe[ue]=Dt(M,xe[ue]);const Le=xe[0],ke=r.convert(M.format,M.colorSpace),Ce=r.convert(M.type),gt=_(M.internalFormat,ke,Ce,M.colorSpace),q=M.isVideoTexture!==!0,Te=ie.__version===void 0||se===!0,Ee=ce.dataReady;let Ne=v(M,Le);he(i.TEXTURE_CUBE_MAP,M);let ge;if(it){q&&Te&&t.texStorage2D(i.TEXTURE_CUBE_MAP,Ne,gt,Le.width,Le.height);for(let ue=0;ue<6;ue++){ge=xe[ue].mipmaps;for(let Ie=0;Ie<ge.length;Ie++){const ze=ge[Ie];M.format!==Gt?ke!==null?q?Ee&&t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,0,0,ze.width,ze.height,ke,ze.data):t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,gt,ze.width,ze.height,0,ze.data):qe("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,0,0,ze.width,ze.height,ke,Ce,ze.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,gt,ze.width,ze.height,0,ke,Ce,ze.data)}}}else{if(ge=M.mipmaps,q&&Te){ge.length>0&&Ne++;const ue=Fe(xe[0]);t.texStorage2D(i.TEXTURE_CUBE_MAP,Ne,gt,ue.width,ue.height)}for(let ue=0;ue<6;ue++)if(me){q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,0,0,xe[ue].width,xe[ue].height,ke,Ce,xe[ue].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,gt,xe[ue].width,xe[ue].height,0,ke,Ce,xe[ue].data);for(let Ie=0;Ie<ge.length;Ie++){const Lt=ge[Ie].image[ue].image;q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,0,0,Lt.width,Lt.height,ke,Ce,Lt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,gt,Lt.width,Lt.height,0,ke,Ce,Lt.data)}}else{q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,0,0,ke,Ce,xe[ue]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,gt,ke,Ce,xe[ue]);for(let Ie=0;Ie<ge.length;Ie++){const ze=ge[Ie];q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,0,0,ke,Ce,ze.image[ue]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,gt,ke,Ce,ze.image[ue])}}}m(M)&&f(i.TEXTURE_CUBE_MAP),ie.__version=ce.version,M.onUpdate&&M.onUpdate(M)}k.__version=M.version}function ae(k,M,Y,se,ce,ie){const Ve=r.convert(Y.format,Y.colorSpace),be=r.convert(Y.type),Ge=_(Y.internalFormat,Ve,be,Y.colorSpace),it=n.get(M),me=n.get(Y);if(me.__renderTarget=M,!it.__hasExternalTextures){const xe=Math.max(1,M.width>>ie),Le=Math.max(1,M.height>>ie);ce===i.TEXTURE_3D||ce===i.TEXTURE_2D_ARRAY?t.texImage3D(ce,ie,Ge,xe,Le,M.depth,0,Ve,be,null):t.texImage2D(ce,ie,Ge,xe,Le,0,Ve,be,null)}t.bindFramebuffer(i.FRAMEBUFFER,k),yt(M)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,se,ce,me.__webglTexture,0,U(M)):(ce===i.TEXTURE_2D||ce>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&ce<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,se,ce,me.__webglTexture,ie),t.bindFramebuffer(i.FRAMEBUFFER,null)}function Be(k,M,Y){if(i.bindRenderbuffer(i.RENDERBUFFER,k),M.depthBuffer){const se=M.depthTexture,ce=se&&se.isDepthTexture?se.type:null,ie=E(M.stencilBuffer,ce),Ve=M.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;yt(M)?o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,U(M),ie,M.width,M.height):Y?i.renderbufferStorageMultisample(i.RENDERBUFFER,U(M),ie,M.width,M.height):i.renderbufferStorage(i.RENDERBUFFER,ie,M.width,M.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ve,i.RENDERBUFFER,k)}else{const se=M.textures;for(let ce=0;ce<se.length;ce++){const ie=se[ce],Ve=r.convert(ie.format,ie.colorSpace),be=r.convert(ie.type),Ge=_(ie.internalFormat,Ve,be,ie.colorSpace);yt(M)?o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,U(M),Ge,M.width,M.height):Y?i.renderbufferStorageMultisample(i.RENDERBUFFER,U(M),Ge,M.width,M.height):i.renderbufferStorage(i.RENDERBUFFER,Ge,M.width,M.height)}}i.bindRenderbuffer(i.RENDERBUFFER,null)}function fe(k,M,Y){const se=M.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(i.FRAMEBUFFER,k),!(M.depthTexture&&M.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const ce=n.get(M.depthTexture);if(ce.__renderTarget=M,(!ce.__webglTexture||M.depthTexture.image.width!==M.width||M.depthTexture.image.height!==M.height)&&(M.depthTexture.image.width=M.width,M.depthTexture.image.height=M.height,M.depthTexture.needsUpdate=!0),se){if(ce.__webglInit===void 0&&(ce.__webglInit=!0,M.depthTexture.addEventListener("dispose",C)),ce.__webglTexture===void 0){ce.__webglTexture=i.createTexture(),t.bindTexture(i.TEXTURE_CUBE_MAP,ce.__webglTexture),he(i.TEXTURE_CUBE_MAP,M.depthTexture);const it=r.convert(M.depthTexture.format),me=r.convert(M.depthTexture.type);let xe;M.depthTexture.format===Pa?xe=i.DEPTH_COMPONENT24:M.depthTexture.format===vl&&(xe=i.DEPTH24_STENCIL8);for(let Le=0;Le<6;Le++)i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0,xe,M.width,M.height,0,it,me,null)}}else P(M.depthTexture,0);const ie=ce.__webglTexture,Ve=U(M),be=se?i.TEXTURE_CUBE_MAP_POSITIVE_X+Y:i.TEXTURE_2D,Ge=M.depthTexture.format===vl?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;if(M.depthTexture.format===Pa)yt(M)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ge,be,ie,0,Ve):i.framebufferTexture2D(i.FRAMEBUFFER,Ge,be,ie,0);else if(M.depthTexture.format===vl)yt(M)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ge,be,ie,0,Ve):i.framebufferTexture2D(i.FRAMEBUFFER,Ge,be,ie,0);else throw new Error("Unknown depthTexture format")}function De(k){const M=n.get(k),Y=k.isWebGLCubeRenderTarget===!0;if(M.__boundDepthTexture!==k.depthTexture){const se=k.depthTexture;if(M.__depthDisposeCallback&&M.__depthDisposeCallback(),se){const ce=()=>{delete M.__boundDepthTexture,delete M.__depthDisposeCallback,se.removeEventListener("dispose",ce)};se.addEventListener("dispose",ce),M.__depthDisposeCallback=ce}M.__boundDepthTexture=se}if(k.depthTexture&&!M.__autoAllocateDepthBuffer)if(Y)for(let se=0;se<6;se++)fe(M.__webglFramebuffer[se],k,se);else{const se=k.texture.mipmaps;se&&se.length>0?fe(M.__webglFramebuffer[0],k,0):fe(M.__webglFramebuffer,k,0)}else if(Y){M.__webglDepthbuffer=[];for(let se=0;se<6;se++)if(t.bindFramebuffer(i.FRAMEBUFFER,M.__webglFramebuffer[se]),M.__webglDepthbuffer[se]===void 0)M.__webglDepthbuffer[se]=i.createRenderbuffer(),Be(M.__webglDepthbuffer[se],k,!1);else{const ce=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,ie=M.__webglDepthbuffer[se];i.bindRenderbuffer(i.RENDERBUFFER,ie),i.framebufferRenderbuffer(i.FRAMEBUFFER,ce,i.RENDERBUFFER,ie)}}else{const se=k.texture.mipmaps;if(se&&se.length>0?t.bindFramebuffer(i.FRAMEBUFFER,M.__webglFramebuffer[0]):t.bindFramebuffer(i.FRAMEBUFFER,M.__webglFramebuffer),M.__webglDepthbuffer===void 0)M.__webglDepthbuffer=i.createRenderbuffer(),Be(M.__webglDepthbuffer,k,!1);else{const ce=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,ie=M.__webglDepthbuffer;i.bindRenderbuffer(i.RENDERBUFFER,ie),i.framebufferRenderbuffer(i.FRAMEBUFFER,ce,i.RENDERBUFFER,ie)}}t.bindFramebuffer(i.FRAMEBUFFER,null)}function ut(k,M,Y){const se=n.get(k);M!==void 0&&ae(se.__webglFramebuffer,k,k.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),Y!==void 0&&De(k)}function Qe(k){const M=k.texture,Y=n.get(k),se=n.get(M);k.addEventListener("dispose",x);const ce=k.textures,ie=k.isWebGLCubeRenderTarget===!0,Ve=ce.length>1;if(Ve||(se.__webglTexture===void 0&&(se.__webglTexture=i.createTexture()),se.__version=M.version,a.memory.textures++),ie){Y.__webglFramebuffer=[];for(let be=0;be<6;be++)if(M.mipmaps&&M.mipmaps.length>0){Y.__webglFramebuffer[be]=[];for(let Ge=0;Ge<M.mipmaps.length;Ge++)Y.__webglFramebuffer[be][Ge]=i.createFramebuffer()}else Y.__webglFramebuffer[be]=i.createFramebuffer()}else{if(M.mipmaps&&M.mipmaps.length>0){Y.__webglFramebuffer=[];for(let be=0;be<M.mipmaps.length;be++)Y.__webglFramebuffer[be]=i.createFramebuffer()}else Y.__webglFramebuffer=i.createFramebuffer();if(Ve)for(let be=0,Ge=ce.length;be<Ge;be++){const it=n.get(ce[be]);it.__webglTexture===void 0&&(it.__webglTexture=i.createTexture(),a.memory.textures++)}if(k.samples>0&&yt(k)===!1){Y.__webglMultisampledFramebuffer=i.createFramebuffer(),Y.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,Y.__webglMultisampledFramebuffer);for(let be=0;be<ce.length;be++){const Ge=ce[be];Y.__webglColorRenderbuffer[be]=i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,Y.__webglColorRenderbuffer[be]);const it=r.convert(Ge.format,Ge.colorSpace),me=r.convert(Ge.type),xe=_(Ge.internalFormat,it,me,Ge.colorSpace,k.isXRRenderTarget===!0),Le=U(k);i.renderbufferStorageMultisample(i.RENDERBUFFER,Le,xe,k.width,k.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+be,i.RENDERBUFFER,Y.__webglColorRenderbuffer[be])}i.bindRenderbuffer(i.RENDERBUFFER,null),k.depthBuffer&&(Y.__webglDepthRenderbuffer=i.createRenderbuffer(),Be(Y.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(i.FRAMEBUFFER,null)}}if(ie){t.bindTexture(i.TEXTURE_CUBE_MAP,se.__webglTexture),he(i.TEXTURE_CUBE_MAP,M);for(let be=0;be<6;be++)if(M.mipmaps&&M.mipmaps.length>0)for(let Ge=0;Ge<M.mipmaps.length;Ge++)ae(Y.__webglFramebuffer[be][Ge],k,M,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+be,Ge);else ae(Y.__webglFramebuffer[be],k,M,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+be,0);m(M)&&f(i.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ve){for(let be=0,Ge=ce.length;be<Ge;be++){const it=ce[be],me=n.get(it);let xe=i.TEXTURE_2D;(k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(xe=k.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(xe,me.__webglTexture),he(xe,it),ae(Y.__webglFramebuffer,k,it,i.COLOR_ATTACHMENT0+be,xe,0),m(it)&&f(xe)}t.unbindTexture()}else{let be=i.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(be=k.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(be,se.__webglTexture),he(be,M),M.mipmaps&&M.mipmaps.length>0)for(let Ge=0;Ge<M.mipmaps.length;Ge++)ae(Y.__webglFramebuffer[Ge],k,M,i.COLOR_ATTACHMENT0,be,Ge);else ae(Y.__webglFramebuffer,k,M,i.COLOR_ATTACHMENT0,be,0);m(M)&&f(be),t.unbindTexture()}k.depthBuffer&&De(k)}function Ye(k){const M=k.textures;for(let Y=0,se=M.length;Y<se;Y++){const ce=M[Y];if(m(ce)){const ie=y(k),Ve=n.get(ce).__webglTexture;t.bindTexture(ie,Ve),f(ie),t.unbindTexture()}}}const ot=[],Ke=[];function Ct(k){if(k.samples>0){if(yt(k)===!1){const M=k.textures,Y=k.width,se=k.height;let ce=i.COLOR_BUFFER_BIT;const ie=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ve=n.get(k),be=M.length>1;if(be)for(let it=0;it<M.length;it++)t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.RENDERBUFFER,null),t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.TEXTURE_2D,null,0);t.bindFramebuffer(i.READ_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer);const Ge=k.texture.mipmaps;Ge&&Ge.length>0?t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer[0]):t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer);for(let it=0;it<M.length;it++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(ce|=i.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(ce|=i.STENCIL_BUFFER_BIT)),be){i.framebufferRenderbuffer(i.READ_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,Ve.__webglColorRenderbuffer[it]);const me=n.get(M[it]).__webglTexture;i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,me,0)}i.blitFramebuffer(0,0,Y,se,0,0,Y,se,ce,i.NEAREST),l===!0&&(ot.length=0,Ke.length=0,ot.push(i.COLOR_ATTACHMENT0+it),k.depthBuffer&&k.resolveDepthBuffer===!1&&(ot.push(ie),Ke.push(ie),i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,Ke)),i.invalidateFramebuffer(i.READ_FRAMEBUFFER,ot))}if(t.bindFramebuffer(i.READ_FRAMEBUFFER,null),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),be)for(let it=0;it<M.length;it++){t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.RENDERBUFFER,Ve.__webglColorRenderbuffer[it]);const me=n.get(M[it]).__webglTexture;t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.TEXTURE_2D,me,0)}t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const M=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,[M])}}}function U(k){return Math.min(s.maxSamples,k.samples)}function yt(k){const M=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&M.__useRenderToTexture!==!1}function je(k){const M=a.render.frame;u.get(k)!==M&&(u.set(k,M),k.update())}function Dt(k,M){const Y=k.colorSpace,se=k.format,ce=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||Y!==pn&&Y!==As&&(Bt.getTransfer(Y)===Kt?(se!==Gt||ce!==Ze)&&qe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):rt("WebGLTextures: Unsupported texture color space:",Y)),M}function Fe(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(c.width=k.naturalWidth||k.width,c.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(c.width=k.displayWidth,c.height=k.displayHeight):(c.width=k.width,c.height=k.height),c}this.allocateTextureUnit=T,this.resetTextureUnits=B,this.setTexture2D=P,this.setTexture2DArray=R,this.setTexture3D=L,this.setTextureCube=F,this.rebindTextures=ut,this.setupRenderTarget=Qe,this.updateRenderTargetMipmap=Ye,this.updateMultisampleRenderTarget=Ct,this.setupDepthRenderbuffer=De,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=yt,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function lG(i,e){function t(n,s=As){let r;const a=Bt.getTransfer(s);if(n===Ze)return i.UNSIGNED_BYTE;if(n===Jv)return i.UNSIGNED_SHORT_4_4_4_4;if(n===Kv)return i.UNSIGNED_SHORT_5_5_5_1;if(n===rm)return i.UNSIGNED_INT_5_9_9_9_REV;if(n===am)return i.UNSIGNED_INT_10F_11F_11F_REV;if(n===jv)return i.BYTE;if(n===Xv)return i.SHORT;if(n===pA)return i.UNSIGNED_SHORT;if(n===sm)return i.INT;if(n===ci)return i.UNSIGNED_INT;if(n===Cn)return i.FLOAT;if(n===sn)return i.HALF_FLOAT;if(n===vM)return i.ALPHA;if(n===gA)return i.RGB;if(n===Gt)return i.RGBA;if(n===Pa)return i.DEPTH_COMPONENT;if(n===vl)return i.DEPTH_STENCIL;if(n===go)return i.RED;if(n===Zv)return i.RED_INTEGER;if(n===sr)return i.RG;if(n===om)return i.RG_INTEGER;if(n===Ra)return i.RGBA_INTEGER;if(n===Ah||n===Ml||n===ph||n===Vd)if(a===Kt)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===Ah)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Ml)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===ph)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Vd)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===Ah)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ml)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ph)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Vd)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===hg||n===oE||n===Rh||n===mA)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===hg)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===oE)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Rh)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===mA)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===ug||n===yA||n===_A||n===dg||n===Ag||n===pg||n===fg)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===ug||n===yA)return a===Kt?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===_A)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC;if(n===dg)return r.COMPRESSED_R11_EAC;if(n===Ag)return r.COMPRESSED_SIGNED_R11_EAC;if(n===pg)return r.COMPRESSED_RG11_EAC;if(n===fg)return r.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===Rl||n===lE||n===cE||n===hE||n===fh||n===uE||n===dE||n===AE||n===pE||n===fE||n===gE||n===mE||n===yE||n===_E)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===Rl)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===lE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===cE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===hE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===fh)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===uE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===dE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===AE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===pE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===fE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===gE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===mE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===yE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===_E)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Dh||n===EE||n===gg)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===Dh)return a===Kt?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===EE)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===gg)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===mg||n===yg||n===_g||n===Eg)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===mg)return r.COMPRESSED_RED_RGTC1_EXT;if(n===yg)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===_g)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Eg)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===fA?i.UNSIGNED_INT_24_8:i[n]!==void 0?i[n]:null}return{convert:t}}const cG=`
|
|
4058
|
+
}`,nG=[new Q(1,0,0),new Q(-1,0,0),new Q(0,1,0),new Q(0,-1,0),new Q(0,0,1),new Q(0,0,-1)],iG=[new Q(0,-1,0),new Q(0,-1,0),new Q(0,0,1),new Q(0,0,-1),new Q(0,-1,0),new Q(0,-1,0)],HC=new We,Gu=new Q,My=new Q;function sG(i,e,t){let n=new cb;const s=new pe,r=new pe,a=new Mt,o=new gb,l=new $P,c={},u=t.maxTextureSize,h={[or]:_i,[_i]:or,[On]:On},d=new kn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:eG,fragmentShader:tG}),A=d.clone();A.defines.HORIZONTAL_PASS=1;const p=new fn;p.setAttribute("position",new rn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new Je(p,d),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ff;let f=this.type;this.render=function(C,x,I){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||C.length===0)return;C.type===RL&&(qe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),C.type=Ff);const b=i.getRenderTarget(),w=i.getActiveCubeFace(),S=i.getActiveMipmapLevel(),B=i.state;B.setBlending(Os),B.buffers.depth.getReversed()===!0?B.buffers.color.setClear(0,0,0,0):B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const T=f!==this.type;T&&x.traverse(function(D){D.material&&(Array.isArray(D.material)?D.material.forEach(P=>P.needsUpdate=!0):D.material.needsUpdate=!0)});for(let D=0,P=C.length;D<P;D++){const R=C[D],L=R.shadow;if(L===void 0){qe("WebGLShadowMap:",R,"has no shadow.");continue}if(L.autoUpdate===!1&&L.needsUpdate===!1)continue;s.copy(L.mapSize);const F=L.getFrameExtents();if(s.multiply(F),r.copy(L.mapSize),(s.x>u||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/F.x),s.x=r.x*F.x,L.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/F.y),s.y=r.y*F.y,L.mapSize.y=r.y)),L.map===null||T===!0){if(L.map!==null&&(L.map.depthTexture!==null&&(L.map.depthTexture.dispose(),L.map.depthTexture=null),L.map.dispose()),this.type===vd){if(R.isPointLight){qe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}L.map=new Sn(s.x,s.y,{format:sr,type:sn,minFilter:ft,magFilter:ft,generateMipmaps:!1}),L.map.texture.name=R.name+".shadowMap",L.map.depthTexture=new bA(s.x,s.y,Cn),L.map.depthTexture.name=R.name+".shadowMapDepth",L.map.depthTexture.format=Pa,L.map.depthTexture.compareFunction=null,L.map.depthTexture.minFilter=jt,L.map.depthTexture.magFilter=jt}else{R.isPointLight?(L.map=new HA(s.x),L.map.depthTexture=new hP(s.x,ci)):(L.map=new Sn(s.x,s.y),L.map.depthTexture=new bA(s.x,s.y,ci)),L.map.depthTexture.name=R.name+".shadowMap",L.map.depthTexture.format=Pa;const J=i.state.buffers.depth.getReversed();this.type===Ff?(L.map.depthTexture.compareFunction=J?ib:nb,L.map.depthTexture.minFilter=ft,L.map.depthTexture.magFilter=ft):(L.map.depthTexture.compareFunction=null,L.map.depthTexture.minFilter=jt,L.map.depthTexture.magFilter=jt)}L.camera.updateProjectionMatrix()}const $=L.map.isWebGLCubeRenderTarget?6:1;for(let J=0;J<$;J++){if(L.map.isWebGLCubeRenderTarget)i.setRenderTarget(L.map,J),i.clear();else{J===0&&(i.setRenderTarget(L.map),i.clear());const W=L.getViewport(J);a.set(r.x*W.x,r.y*W.y,r.x*W.z,r.y*W.w),B.viewport(a)}if(R.isPointLight){const W=L.camera,he=L.matrix,le=R.distance||W.far;le!==W.far&&(W.far=le,W.updateProjectionMatrix()),Gu.setFromMatrixPosition(R.matrixWorld),W.position.copy(Gu),My.copy(W.position),My.add(nG[J]),W.up.copy(iG[J]),W.lookAt(My),W.updateMatrixWorld(),he.makeTranslation(-Gu.x,-Gu.y,-Gu.z),HC.multiplyMatrices(W.projectionMatrix,W.matrixWorldInverse),L._frustum.setFromProjectionMatrix(HC,W.coordinateSystem,W.reversedDepth)}else L.updateMatrices(R);n=L.getFrustum(),E(x,I,L.camera,R,this.type)}L.isPointLightShadow!==!0&&this.type===vd&&y(L,I),L.needsUpdate=!1}f=this.type,m.needsUpdate=!1,i.setRenderTarget(b,w,S)};function y(C,x){const I=e.update(g);d.defines.VSM_SAMPLES!==C.blurSamples&&(d.defines.VSM_SAMPLES=C.blurSamples,A.defines.VSM_SAMPLES=C.blurSamples,d.needsUpdate=!0,A.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new Sn(s.x,s.y,{format:sr,type:sn})),d.uniforms.shadow_pass.value=C.map.depthTexture,d.uniforms.resolution.value=C.mapSize,d.uniforms.radius.value=C.radius,i.setRenderTarget(C.mapPass),i.clear(),i.renderBufferDirect(x,null,I,d,g,null),A.uniforms.shadow_pass.value=C.mapPass.texture,A.uniforms.resolution.value=C.mapSize,A.uniforms.radius.value=C.radius,i.setRenderTarget(C.map),i.clear(),i.renderBufferDirect(x,null,I,A,g,null)}function _(C,x,I,b){let w=null;const S=I.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(S!==void 0)w=S;else if(w=I.isPointLight===!0?l:o,i.localClippingEnabled&&x.clipShadows===!0&&Array.isArray(x.clippingPlanes)&&x.clippingPlanes.length!==0||x.displacementMap&&x.displacementScale!==0||x.alphaMap&&x.alphaTest>0||x.map&&x.alphaTest>0||x.alphaToCoverage===!0){const B=w.uuid,T=x.uuid;let D=c[B];D===void 0&&(D={},c[B]=D);let P=D[T];P===void 0&&(P=w.clone(),D[T]=P,x.addEventListener("dispose",v)),w=P}if(w.visible=x.visible,w.wireframe=x.wireframe,b===vd?w.side=x.shadowSide!==null?x.shadowSide:x.side:w.side=x.shadowSide!==null?x.shadowSide:h[x.side],w.alphaMap=x.alphaMap,w.alphaTest=x.alphaToCoverage===!0?.5:x.alphaTest,w.map=x.map,w.clipShadows=x.clipShadows,w.clippingPlanes=x.clippingPlanes,w.clipIntersection=x.clipIntersection,w.displacementMap=x.displacementMap,w.displacementScale=x.displacementScale,w.displacementBias=x.displacementBias,w.wireframeLinewidth=x.wireframeLinewidth,w.linewidth=x.linewidth,I.isPointLight===!0&&w.isMeshDistanceMaterial===!0){const B=i.properties.get(w);B.light=I}return w}function E(C,x,I,b,w){if(C.visible===!1)return;if(C.layers.test(x.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&w===vd)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,C.matrixWorld);const T=e.update(C),D=C.material;if(Array.isArray(D)){const P=T.groups;for(let R=0,L=P.length;R<L;R++){const F=P[R],$=D[F.materialIndex];if($&&$.visible){const J=_(C,$,b,w);C.onBeforeShadow(i,C,x,I,T,J,F),i.renderBufferDirect(I,null,T,J,C,F),C.onAfterShadow(i,C,x,I,T,J,F)}}}else if(D.visible){const P=_(C,D,b,w);C.onBeforeShadow(i,C,x,I,T,P,null),i.renderBufferDirect(I,null,T,P,C,null),C.onAfterShadow(i,C,x,I,T,P,null)}}const B=C.children;for(let T=0,D=B.length;T<D;T++)E(B[T],x,I,b,w)}function v(C){C.target.removeEventListener("dispose",v);for(const I in c){const b=c[I],w=C.target.uuid;w in b&&(b[w].dispose(),delete b[w])}}}const rG={[K_]:Z_,[eE]:iE,[tE]:sE,[Sh]:nE,[Z_]:K_,[iE]:eE,[sE]:tE,[nE]:Sh};function aG(i,e){function t(){let q=!1;const Te=new Mt;let Ee=null;const Ne=new Mt(0,0,0,0);return{setMask:function(ge){Ee!==ge&&!q&&(i.colorMask(ge,ge,ge,ge),Ee=ge)},setLocked:function(ge){q=ge},setClear:function(ge,ue,Ie,ze,Lt){Lt===!0&&(ge*=ze,ue*=ze,Ie*=ze),Te.set(ge,ue,Ie,ze),Ne.equals(Te)===!1&&(i.clearColor(ge,ue,Ie,ze),Ne.copy(Te))},reset:function(){q=!1,Ee=null,Ne.set(-1,0,0,0)}}}function n(){let q=!1,Te=!1,Ee=null,Ne=null,ge=null;return{setReversed:function(ue){if(Te!==ue){const Ie=e.get("EXT_clip_control");ue?Ie.clipControlEXT(Ie.LOWER_LEFT_EXT,Ie.ZERO_TO_ONE_EXT):Ie.clipControlEXT(Ie.LOWER_LEFT_EXT,Ie.NEGATIVE_ONE_TO_ONE_EXT),Te=ue;const ze=ge;ge=null,this.setClear(ze)}},getReversed:function(){return Te},setTest:function(ue){ue?z(i.DEPTH_TEST):ae(i.DEPTH_TEST)},setMask:function(ue){Ee!==ue&&!q&&(i.depthMask(ue),Ee=ue)},setFunc:function(ue){if(Te&&(ue=rG[ue]),Ne!==ue){switch(ue){case K_:i.depthFunc(i.NEVER);break;case Z_:i.depthFunc(i.ALWAYS);break;case eE:i.depthFunc(i.LESS);break;case Sh:i.depthFunc(i.LEQUAL);break;case tE:i.depthFunc(i.EQUAL);break;case nE:i.depthFunc(i.GEQUAL);break;case iE:i.depthFunc(i.GREATER);break;case sE:i.depthFunc(i.NOTEQUAL);break;default:i.depthFunc(i.LEQUAL)}Ne=ue}},setLocked:function(ue){q=ue},setClear:function(ue){ge!==ue&&(Te&&(ue=1-ue),i.clearDepth(ue),ge=ue)},reset:function(){q=!1,Ee=null,Ne=null,ge=null,Te=!1}}}function s(){let q=!1,Te=null,Ee=null,Ne=null,ge=null,ue=null,Ie=null,ze=null,Lt=null;return{setTest:function(Ht){q||(Ht?z(i.STENCIL_TEST):ae(i.STENCIL_TEST))},setMask:function(Ht){Te!==Ht&&!q&&(i.stencilMask(Ht),Te=Ht)},setFunc:function(Ht,ns,is){(Ee!==Ht||Ne!==ns||ge!==is)&&(i.stencilFunc(Ht,ns,is),Ee=Ht,Ne=ns,ge=is)},setOp:function(Ht,ns,is){(ue!==Ht||Ie!==ns||ze!==is)&&(i.stencilOp(Ht,ns,is),ue=Ht,Ie=ns,ze=is)},setLocked:function(Ht){q=Ht},setClear:function(Ht){Lt!==Ht&&(i.clearStencil(Ht),Lt=Ht)},reset:function(){q=!1,Te=null,Ee=null,Ne=null,ge=null,ue=null,Ie=null,ze=null,Lt=null}}}const r=new t,a=new n,o=new s,l=new WeakMap,c=new WeakMap;let u={},h={},d=new WeakMap,A=[],p=null,g=!1,m=null,f=null,y=null,_=null,E=null,v=null,C=null,x=new we(0,0,0),I=0,b=!1,w=null,S=null,B=null,T=null,D=null;const P=i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let R=!1,L=0;const F=i.getParameter(i.VERSION);F.indexOf("WebGL")!==-1?(L=parseFloat(/^WebGL (\d)/.exec(F)[1]),R=L>=1):F.indexOf("OpenGL ES")!==-1&&(L=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),R=L>=2);let $=null,J={};const W=i.getParameter(i.SCISSOR_BOX),he=i.getParameter(i.VIEWPORT),le=new Mt().fromArray(W),Z=new Mt().fromArray(he);function ne(q,Te,Ee,Ne){const ge=new Uint8Array(4),ue=i.createTexture();i.bindTexture(q,ue),i.texParameteri(q,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(q,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Ie=0;Ie<Ee;Ie++)q===i.TEXTURE_3D||q===i.TEXTURE_2D_ARRAY?i.texImage3D(Te,0,i.RGBA,1,1,Ne,0,i.RGBA,i.UNSIGNED_BYTE,ge):i.texImage2D(Te+Ie,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,ge);return ue}const G={};G[i.TEXTURE_2D]=ne(i.TEXTURE_2D,i.TEXTURE_2D,1),G[i.TEXTURE_CUBE_MAP]=ne(i.TEXTURE_CUBE_MAP,i.TEXTURE_CUBE_MAP_POSITIVE_X,6),G[i.TEXTURE_2D_ARRAY]=ne(i.TEXTURE_2D_ARRAY,i.TEXTURE_2D_ARRAY,1,1),G[i.TEXTURE_3D]=ne(i.TEXTURE_3D,i.TEXTURE_3D,1,1),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),z(i.DEPTH_TEST),a.setFunc(Sh),Ke(!1),Ct(wx),z(i.CULL_FACE),Ye(Os);function z(q){u[q]!==!0&&(i.enable(q),u[q]=!0)}function ae(q){u[q]!==!1&&(i.disable(q),u[q]=!1)}function Be(q,Te){return h[q]!==Te?(i.bindFramebuffer(q,Te),h[q]=Te,q===i.DRAW_FRAMEBUFFER&&(h[i.FRAMEBUFFER]=Te),q===i.FRAMEBUFFER&&(h[i.DRAW_FRAMEBUFFER]=Te),!0):!1}function fe(q,Te){let Ee=A,Ne=!1;if(q){Ee=d.get(Te),Ee===void 0&&(Ee=[],d.set(Te,Ee));const ge=q.textures;if(Ee.length!==ge.length||Ee[0]!==i.COLOR_ATTACHMENT0){for(let ue=0,Ie=ge.length;ue<Ie;ue++)Ee[ue]=i.COLOR_ATTACHMENT0+ue;Ee.length=ge.length,Ne=!0}}else Ee[0]!==i.BACK&&(Ee[0]=i.BACK,Ne=!0);Ne&&i.drawBuffers(Ee)}function De(q){return p!==q?(i.useProgram(q),p=q,!0):!1}const ut={[fl]:i.FUNC_ADD,[QL]:i.FUNC_SUBTRACT,[LL]:i.FUNC_REVERSE_SUBTRACT};ut[NL]=i.MIN,ut[PL]=i.MAX;const Qe={[FL]:i.ZERO,[kL]:i.ONE,[UL]:i.SRC_COLOR,[X_]:i.SRC_ALPHA,[VL]:i.SRC_ALPHA_SATURATE,[HL]:i.DST_COLOR,[GL]:i.DST_ALPHA,[OL]:i.ONE_MINUS_SRC_COLOR,[J_]:i.ONE_MINUS_SRC_ALPHA,[$L]:i.ONE_MINUS_DST_COLOR,[zL]:i.ONE_MINUS_DST_ALPHA,[YL]:i.CONSTANT_COLOR,[qL]:i.ONE_MINUS_CONSTANT_COLOR,[WL]:i.CONSTANT_ALPHA,[jL]:i.ONE_MINUS_CONSTANT_ALPHA};function Ye(q,Te,Ee,Ne,ge,ue,Ie,ze,Lt,Ht){if(q===Os){g===!0&&(ae(i.BLEND),g=!1);return}if(g===!1&&(z(i.BLEND),g=!0),q!==DL){if(q!==m||Ht!==b){if((f!==fl||E!==fl)&&(i.blendEquation(i.FUNC_ADD),f=fl,E=fl),Ht)switch(q){case Bl:i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case j_:i.blendFunc(i.ONE,i.ONE);break;case Sx:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Bx:i.blendFuncSeparate(i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ZERO,i.ONE);break;default:rt("WebGLState: Invalid blending: ",q);break}else switch(q){case Bl:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case j_:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE,i.ONE,i.ONE);break;case Sx:rt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case Bx:rt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:rt("WebGLState: Invalid blending: ",q);break}y=null,_=null,v=null,C=null,x.set(0,0,0),I=0,m=q,b=Ht}return}ge=ge||Te,ue=ue||Ee,Ie=Ie||Ne,(Te!==f||ge!==E)&&(i.blendEquationSeparate(ut[Te],ut[ge]),f=Te,E=ge),(Ee!==y||Ne!==_||ue!==v||Ie!==C)&&(i.blendFuncSeparate(Qe[Ee],Qe[Ne],Qe[ue],Qe[Ie]),y=Ee,_=Ne,v=ue,C=Ie),(ze.equals(x)===!1||Lt!==I)&&(i.blendColor(ze.r,ze.g,ze.b,Lt),x.copy(ze),I=Lt),m=q,b=!1}function ot(q,Te){q.side===On?ae(i.CULL_FACE):z(i.CULL_FACE);let Ee=q.side===_i;Te&&(Ee=!Ee),Ke(Ee),q.blending===Bl&&q.transparent===!1?Ye(Os):Ye(q.blending,q.blendEquation,q.blendSrc,q.blendDst,q.blendEquationAlpha,q.blendSrcAlpha,q.blendDstAlpha,q.blendColor,q.blendAlpha,q.premultipliedAlpha),a.setFunc(q.depthFunc),a.setTest(q.depthTest),a.setMask(q.depthWrite),r.setMask(q.colorWrite);const Ne=q.stencilWrite;o.setTest(Ne),Ne&&(o.setMask(q.stencilWriteMask),o.setFunc(q.stencilFunc,q.stencilRef,q.stencilFuncMask),o.setOp(q.stencilFail,q.stencilZFail,q.stencilZPass)),yt(q.polygonOffset,q.polygonOffsetFactor,q.polygonOffsetUnits),q.alphaToCoverage===!0?z(i.SAMPLE_ALPHA_TO_COVERAGE):ae(i.SAMPLE_ALPHA_TO_COVERAGE)}function Ke(q){w!==q&&(q?i.frontFace(i.CW):i.frontFace(i.CCW),w=q)}function Ct(q){q!==TL?(z(i.CULL_FACE),q!==S&&(q===wx?i.cullFace(i.BACK):q===ML?i.cullFace(i.FRONT):i.cullFace(i.FRONT_AND_BACK))):ae(i.CULL_FACE),S=q}function U(q){q!==B&&(R&&i.lineWidth(q),B=q)}function yt(q,Te,Ee){q?(z(i.POLYGON_OFFSET_FILL),(T!==Te||D!==Ee)&&(i.polygonOffset(Te,Ee),T=Te,D=Ee)):ae(i.POLYGON_OFFSET_FILL)}function je(q){q?z(i.SCISSOR_TEST):ae(i.SCISSOR_TEST)}function Dt(q){q===void 0&&(q=i.TEXTURE0+P-1),$!==q&&(i.activeTexture(q),$=q)}function Fe(q,Te,Ee){Ee===void 0&&($===null?Ee=i.TEXTURE0+P-1:Ee=$);let Ne=J[Ee];Ne===void 0&&(Ne={type:void 0,texture:void 0},J[Ee]=Ne),(Ne.type!==q||Ne.texture!==Te)&&($!==Ee&&(i.activeTexture(Ee),$=Ee),i.bindTexture(q,Te||G[q]),Ne.type=q,Ne.texture=Te)}function k(){const q=J[$];q!==void 0&&q.type!==void 0&&(i.bindTexture(q.type,null),q.type=void 0,q.texture=void 0)}function M(){try{i.compressedTexImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function Y(){try{i.compressedTexImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function se(){try{i.texSubImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function ce(){try{i.texSubImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function ie(){try{i.compressedTexSubImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function Ve(){try{i.compressedTexSubImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function be(){try{i.texStorage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function Ge(){try{i.texStorage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function it(){try{i.texImage2D(...arguments)}catch(q){rt("WebGLState:",q)}}function me(){try{i.texImage3D(...arguments)}catch(q){rt("WebGLState:",q)}}function xe(q){le.equals(q)===!1&&(i.scissor(q.x,q.y,q.z,q.w),le.copy(q))}function Le(q){Z.equals(q)===!1&&(i.viewport(q.x,q.y,q.z,q.w),Z.copy(q))}function ke(q,Te){let Ee=c.get(Te);Ee===void 0&&(Ee=new WeakMap,c.set(Te,Ee));let Ne=Ee.get(q);Ne===void 0&&(Ne=i.getUniformBlockIndex(Te,q.name),Ee.set(q,Ne))}function Ce(q,Te){const Ne=c.get(Te).get(q);l.get(Te)!==Ne&&(i.uniformBlockBinding(Te,Ne,q.__bindingPointIndex),l.set(Te,Ne))}function gt(){i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.DEPTH_TEST),i.disable(i.POLYGON_OFFSET_FILL),i.disable(i.SCISSOR_TEST),i.disable(i.STENCIL_TEST),i.disable(i.SAMPLE_ALPHA_TO_COVERAGE),i.blendEquation(i.FUNC_ADD),i.blendFunc(i.ONE,i.ZERO),i.blendFuncSeparate(i.ONE,i.ZERO,i.ONE,i.ZERO),i.blendColor(0,0,0,0),i.colorMask(!0,!0,!0,!0),i.clearColor(0,0,0,0),i.depthMask(!0),i.depthFunc(i.LESS),a.setReversed(!1),i.clearDepth(1),i.stencilMask(4294967295),i.stencilFunc(i.ALWAYS,0,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),i.clearStencil(0),i.cullFace(i.BACK),i.frontFace(i.CCW),i.polygonOffset(0,0),i.activeTexture(i.TEXTURE0),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.useProgram(null),i.lineWidth(1),i.scissor(0,0,i.canvas.width,i.canvas.height),i.viewport(0,0,i.canvas.width,i.canvas.height),u={},$=null,J={},h={},d=new WeakMap,A=[],p=null,g=!1,m=null,f=null,y=null,_=null,E=null,v=null,C=null,x=new we(0,0,0),I=0,b=!1,w=null,S=null,B=null,T=null,D=null,le.set(0,0,i.canvas.width,i.canvas.height),Z.set(0,0,i.canvas.width,i.canvas.height),r.reset(),a.reset(),o.reset()}return{buffers:{color:r,depth:a,stencil:o},enable:z,disable:ae,bindFramebuffer:Be,drawBuffers:fe,useProgram:De,setBlending:Ye,setMaterial:ot,setFlipSided:Ke,setCullFace:Ct,setLineWidth:U,setPolygonOffset:yt,setScissorTest:je,activeTexture:Dt,bindTexture:Fe,unbindTexture:k,compressedTexImage2D:M,compressedTexImage3D:Y,texImage2D:it,texImage3D:me,updateUBOMapping:ke,uniformBlockBinding:Ce,texStorage2D:be,texStorage3D:Ge,texSubImage2D:se,texSubImage3D:ce,compressedTexSubImage2D:ie,compressedTexSubImage3D:Ve,scissor:xe,viewport:Le,reset:gt}}function oG(i,e,t,n,s,r,a){const o=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new pe,u=new WeakMap;let h;const d=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(k,M){return A?new OffscreenCanvas(k,M):EA("canvas")}function g(k,M,Y){let se=1;const ce=Fe(k);if((ce.width>Y||ce.height>Y)&&(se=Y/Math.max(ce.width,ce.height)),se<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const ie=Math.floor(se*ce.width),Ve=Math.floor(se*ce.height);h===void 0&&(h=p(ie,Ve));const be=M?p(ie,Ve):h;return be.width=ie,be.height=Ve,be.getContext("2d").drawImage(k,0,0,ie,Ve),qe("WebGLRenderer: Texture has been resized from ("+ce.width+"x"+ce.height+") to ("+ie+"x"+Ve+")."),be}else return"data"in k&&qe("WebGLRenderer: Image in DataTexture is too big ("+ce.width+"x"+ce.height+")."),k;return k}function m(k){return k.generateMipmaps}function f(k){i.generateMipmap(k)}function y(k){return k.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?i.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?i.TEXTURE_2D_ARRAY:i.TEXTURE_2D}function _(k,M,Y,se,ce=!1){if(k!==null){if(i[k]!==void 0)return i[k];qe("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let ie=M;if(M===i.RED&&(Y===i.FLOAT&&(ie=i.R32F),Y===i.HALF_FLOAT&&(ie=i.R16F),Y===i.UNSIGNED_BYTE&&(ie=i.R8)),M===i.RED_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.R8UI),Y===i.UNSIGNED_SHORT&&(ie=i.R16UI),Y===i.UNSIGNED_INT&&(ie=i.R32UI),Y===i.BYTE&&(ie=i.R8I),Y===i.SHORT&&(ie=i.R16I),Y===i.INT&&(ie=i.R32I)),M===i.RG&&(Y===i.FLOAT&&(ie=i.RG32F),Y===i.HALF_FLOAT&&(ie=i.RG16F),Y===i.UNSIGNED_BYTE&&(ie=i.RG8)),M===i.RG_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.RG8UI),Y===i.UNSIGNED_SHORT&&(ie=i.RG16UI),Y===i.UNSIGNED_INT&&(ie=i.RG32UI),Y===i.BYTE&&(ie=i.RG8I),Y===i.SHORT&&(ie=i.RG16I),Y===i.INT&&(ie=i.RG32I)),M===i.RGB_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.RGB8UI),Y===i.UNSIGNED_SHORT&&(ie=i.RGB16UI),Y===i.UNSIGNED_INT&&(ie=i.RGB32UI),Y===i.BYTE&&(ie=i.RGB8I),Y===i.SHORT&&(ie=i.RGB16I),Y===i.INT&&(ie=i.RGB32I)),M===i.RGBA_INTEGER&&(Y===i.UNSIGNED_BYTE&&(ie=i.RGBA8UI),Y===i.UNSIGNED_SHORT&&(ie=i.RGBA16UI),Y===i.UNSIGNED_INT&&(ie=i.RGBA32UI),Y===i.BYTE&&(ie=i.RGBA8I),Y===i.SHORT&&(ie=i.RGBA16I),Y===i.INT&&(ie=i.RGBA32I)),M===i.RGB&&(Y===i.UNSIGNED_INT_5_9_9_9_REV&&(ie=i.RGB9_E5),Y===i.UNSIGNED_INT_10F_11F_11F_REV&&(ie=i.R11F_G11F_B10F)),M===i.RGBA){const Ve=ce?xg:Bt.getTransfer(se);Y===i.FLOAT&&(ie=i.RGBA32F),Y===i.HALF_FLOAT&&(ie=i.RGBA16F),Y===i.UNSIGNED_BYTE&&(ie=Ve===Kt?i.SRGB8_ALPHA8:i.RGBA8),Y===i.UNSIGNED_SHORT_4_4_4_4&&(ie=i.RGBA4),Y===i.UNSIGNED_SHORT_5_5_5_1&&(ie=i.RGB5_A1)}return(ie===i.R16F||ie===i.R32F||ie===i.RG16F||ie===i.RG32F||ie===i.RGBA16F||ie===i.RGBA32F)&&e.get("EXT_color_buffer_float"),ie}function E(k,M){let Y;return k?M===null||M===ci||M===fA?Y=i.DEPTH24_STENCIL8:M===Cn?Y=i.DEPTH32F_STENCIL8:M===pA&&(Y=i.DEPTH24_STENCIL8,qe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):M===null||M===ci||M===fA?Y=i.DEPTH_COMPONENT24:M===Cn?Y=i.DEPTH_COMPONENT32F:M===pA&&(Y=i.DEPTH_COMPONENT16),Y}function v(k,M){return m(k)===!0||k.isFramebufferTexture&&k.minFilter!==jt&&k.minFilter!==ft?Math.log2(Math.max(M.width,M.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?M.mipmaps.length:1}function C(k){const M=k.target;M.removeEventListener("dispose",C),I(M),M.isVideoTexture&&u.delete(M)}function x(k){const M=k.target;M.removeEventListener("dispose",x),w(M)}function I(k){const M=n.get(k);if(M.__webglInit===void 0)return;const Y=k.source,se=d.get(Y);if(se){const ce=se[M.__cacheKey];ce.usedTimes--,ce.usedTimes===0&&b(k),Object.keys(se).length===0&&d.delete(Y)}n.remove(k)}function b(k){const M=n.get(k);i.deleteTexture(M.__webglTexture);const Y=k.source,se=d.get(Y);delete se[M.__cacheKey],a.memory.textures--}function w(k){const M=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let se=0;se<6;se++){if(Array.isArray(M.__webglFramebuffer[se]))for(let ce=0;ce<M.__webglFramebuffer[se].length;ce++)i.deleteFramebuffer(M.__webglFramebuffer[se][ce]);else i.deleteFramebuffer(M.__webglFramebuffer[se]);M.__webglDepthbuffer&&i.deleteRenderbuffer(M.__webglDepthbuffer[se])}else{if(Array.isArray(M.__webglFramebuffer))for(let se=0;se<M.__webglFramebuffer.length;se++)i.deleteFramebuffer(M.__webglFramebuffer[se]);else i.deleteFramebuffer(M.__webglFramebuffer);if(M.__webglDepthbuffer&&i.deleteRenderbuffer(M.__webglDepthbuffer),M.__webglMultisampledFramebuffer&&i.deleteFramebuffer(M.__webglMultisampledFramebuffer),M.__webglColorRenderbuffer)for(let se=0;se<M.__webglColorRenderbuffer.length;se++)M.__webglColorRenderbuffer[se]&&i.deleteRenderbuffer(M.__webglColorRenderbuffer[se]);M.__webglDepthRenderbuffer&&i.deleteRenderbuffer(M.__webglDepthRenderbuffer)}const Y=k.textures;for(let se=0,ce=Y.length;se<ce;se++){const ie=n.get(Y[se]);ie.__webglTexture&&(i.deleteTexture(ie.__webglTexture),a.memory.textures--),n.remove(Y[se])}n.remove(k)}let S=0;function B(){S=0}function T(){const k=S;return k>=s.maxTextures&&qe("WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+s.maxTextures),S+=1,k}function D(k){const M=[];return M.push(k.wrapS),M.push(k.wrapT),M.push(k.wrapR||0),M.push(k.magFilter),M.push(k.minFilter),M.push(k.anisotropy),M.push(k.internalFormat),M.push(k.format),M.push(k.type),M.push(k.generateMipmaps),M.push(k.premultiplyAlpha),M.push(k.flipY),M.push(k.unpackAlignment),M.push(k.colorSpace),M.join()}function P(k,M){const Y=n.get(k);if(k.isVideoTexture&&je(k),k.isRenderTargetTexture===!1&&k.isExternalTexture!==!0&&k.version>0&&Y.__version!==k.version){const se=k.image;if(se===null)qe("WebGLRenderer: Texture marked for update but no image data found.");else if(se.complete===!1)qe("WebGLRenderer: Texture marked for update but image is incomplete");else{G(Y,k,M);return}}else k.isExternalTexture&&(Y.__webglTexture=k.sourceTexture?k.sourceTexture:null);t.bindTexture(i.TEXTURE_2D,Y.__webglTexture,i.TEXTURE0+M)}function R(k,M){const Y=n.get(k);if(k.isRenderTargetTexture===!1&&k.version>0&&Y.__version!==k.version){G(Y,k,M);return}else k.isExternalTexture&&(Y.__webglTexture=k.sourceTexture?k.sourceTexture:null);t.bindTexture(i.TEXTURE_2D_ARRAY,Y.__webglTexture,i.TEXTURE0+M)}function L(k,M){const Y=n.get(k);if(k.isRenderTargetTexture===!1&&k.version>0&&Y.__version!==k.version){G(Y,k,M);return}t.bindTexture(i.TEXTURE_3D,Y.__webglTexture,i.TEXTURE0+M)}function F(k,M){const Y=n.get(k);if(k.isCubeDepthTexture!==!0&&k.version>0&&Y.__version!==k.version){z(Y,k,M);return}t.bindTexture(i.TEXTURE_CUBE_MAP,Y.__webglTexture,i.TEXTURE0+M)}const $={[lr]:i.REPEAT,[xn]:i.CLAMP_TO_EDGE,[Ol]:i.MIRRORED_REPEAT},J={[jt]:i.NEAREST,[ru]:i.NEAREST_MIPMAP_NEAREST,[fo]:i.NEAREST_MIPMAP_LINEAR,[ft]:i.LINEAR,[Tl]:i.LINEAR_MIPMAP_NEAREST,[Hi]:i.LINEAR_MIPMAP_LINEAR},W={[iN]:i.NEVER,[lN]:i.ALWAYS,[sN]:i.LESS,[nb]:i.LEQUAL,[rN]:i.EQUAL,[ib]:i.GEQUAL,[aN]:i.GREATER,[oN]:i.NOTEQUAL};function he(k,M){if(M.type===Cn&&e.has("OES_texture_float_linear")===!1&&(M.magFilter===ft||M.magFilter===Tl||M.magFilter===fo||M.magFilter===Hi||M.minFilter===ft||M.minFilter===Tl||M.minFilter===fo||M.minFilter===Hi)&&qe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(k,i.TEXTURE_WRAP_S,$[M.wrapS]),i.texParameteri(k,i.TEXTURE_WRAP_T,$[M.wrapT]),(k===i.TEXTURE_3D||k===i.TEXTURE_2D_ARRAY)&&i.texParameteri(k,i.TEXTURE_WRAP_R,$[M.wrapR]),i.texParameteri(k,i.TEXTURE_MAG_FILTER,J[M.magFilter]),i.texParameteri(k,i.TEXTURE_MIN_FILTER,J[M.minFilter]),M.compareFunction&&(i.texParameteri(k,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(k,i.TEXTURE_COMPARE_FUNC,W[M.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(M.magFilter===jt||M.minFilter!==fo&&M.minFilter!==Hi||M.type===Cn&&e.has("OES_texture_float_linear")===!1)return;if(M.anisotropy>1||n.get(M).__currentAnisotropy){const Y=e.get("EXT_texture_filter_anisotropic");i.texParameterf(k,Y.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(M.anisotropy,s.getMaxAnisotropy())),n.get(M).__currentAnisotropy=M.anisotropy}}}function le(k,M){let Y=!1;k.__webglInit===void 0&&(k.__webglInit=!0,M.addEventListener("dispose",C));const se=M.source;let ce=d.get(se);ce===void 0&&(ce={},d.set(se,ce));const ie=D(M);if(ie!==k.__cacheKey){ce[ie]===void 0&&(ce[ie]={texture:i.createTexture(),usedTimes:0},a.memory.textures++,Y=!0),ce[ie].usedTimes++;const Ve=ce[k.__cacheKey];Ve!==void 0&&(ce[k.__cacheKey].usedTimes--,Ve.usedTimes===0&&b(M)),k.__cacheKey=ie,k.__webglTexture=ce[ie].texture}return Y}function Z(k,M,Y){return Math.floor(Math.floor(k/Y)/M)}function ne(k,M,Y,se){const ie=k.updateRanges;if(ie.length===0)t.texSubImage2D(i.TEXTURE_2D,0,0,0,M.width,M.height,Y,se,M.data);else{ie.sort((me,xe)=>me.start-xe.start);let Ve=0;for(let me=1;me<ie.length;me++){const xe=ie[Ve],Le=ie[me],ke=xe.start+xe.count,Ce=Z(Le.start,M.width,4),gt=Z(xe.start,M.width,4);Le.start<=ke+1&&Ce===gt&&Z(Le.start+Le.count-1,M.width,4)===Ce?xe.count=Math.max(xe.count,Le.start+Le.count-xe.start):(++Ve,ie[Ve]=Le)}ie.length=Ve+1;const be=i.getParameter(i.UNPACK_ROW_LENGTH),Ge=i.getParameter(i.UNPACK_SKIP_PIXELS),it=i.getParameter(i.UNPACK_SKIP_ROWS);i.pixelStorei(i.UNPACK_ROW_LENGTH,M.width);for(let me=0,xe=ie.length;me<xe;me++){const Le=ie[me],ke=Math.floor(Le.start/4),Ce=Math.ceil(Le.count/4),gt=ke%M.width,q=Math.floor(ke/M.width),Te=Ce,Ee=1;i.pixelStorei(i.UNPACK_SKIP_PIXELS,gt),i.pixelStorei(i.UNPACK_SKIP_ROWS,q),t.texSubImage2D(i.TEXTURE_2D,0,gt,q,Te,Ee,Y,se,M.data)}k.clearUpdateRanges(),i.pixelStorei(i.UNPACK_ROW_LENGTH,be),i.pixelStorei(i.UNPACK_SKIP_PIXELS,Ge),i.pixelStorei(i.UNPACK_SKIP_ROWS,it)}}function G(k,M,Y){let se=i.TEXTURE_2D;(M.isDataArrayTexture||M.isCompressedArrayTexture)&&(se=i.TEXTURE_2D_ARRAY),M.isData3DTexture&&(se=i.TEXTURE_3D);const ce=le(k,M),ie=M.source;t.bindTexture(se,k.__webglTexture,i.TEXTURE0+Y);const Ve=n.get(ie);if(ie.version!==Ve.__version||ce===!0){t.activeTexture(i.TEXTURE0+Y);const be=Bt.getPrimaries(Bt.workingColorSpace),Ge=M.colorSpace===As?null:Bt.getPrimaries(M.colorSpace),it=M.colorSpace===As||be===Ge?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,M.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,M.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,M.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,it);let me=g(M.image,!1,s.maxTextureSize);me=Dt(M,me);const xe=r.convert(M.format,M.colorSpace),Le=r.convert(M.type);let ke=_(M.internalFormat,xe,Le,M.colorSpace,M.isVideoTexture);he(se,M);let Ce;const gt=M.mipmaps,q=M.isVideoTexture!==!0,Te=Ve.__version===void 0||ce===!0,Ee=ie.dataReady,Ne=v(M,me);if(M.isDepthTexture)ke=E(M.format===vl,M.type),Te&&(q?t.texStorage2D(i.TEXTURE_2D,1,ke,me.width,me.height):t.texImage2D(i.TEXTURE_2D,0,ke,me.width,me.height,0,xe,Le,null));else if(M.isDataTexture)if(gt.length>0){q&&Te&&t.texStorage2D(i.TEXTURE_2D,Ne,ke,gt[0].width,gt[0].height);for(let ge=0,ue=gt.length;ge<ue;ge++)Ce=gt[ge],q?Ee&&t.texSubImage2D(i.TEXTURE_2D,ge,0,0,Ce.width,Ce.height,xe,Le,Ce.data):t.texImage2D(i.TEXTURE_2D,ge,ke,Ce.width,Ce.height,0,xe,Le,Ce.data);M.generateMipmaps=!1}else q?(Te&&t.texStorage2D(i.TEXTURE_2D,Ne,ke,me.width,me.height),Ee&&ne(M,me,xe,Le)):t.texImage2D(i.TEXTURE_2D,0,ke,me.width,me.height,0,xe,Le,me.data);else if(M.isCompressedTexture)if(M.isCompressedArrayTexture){q&&Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Ne,ke,gt[0].width,gt[0].height,me.depth);for(let ge=0,ue=gt.length;ge<ue;ge++)if(Ce=gt[ge],M.format!==Gt)if(xe!==null)if(q){if(Ee)if(M.layerUpdates.size>0){const Ie=vC(Ce.width,Ce.height,M.format,M.type);for(const ze of M.layerUpdates){const Lt=Ce.data.subarray(ze*Ie/Ce.data.BYTES_PER_ELEMENT,(ze+1)*Ie/Ce.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,ge,0,0,ze,Ce.width,Ce.height,1,xe,Lt)}M.clearLayerUpdates()}else t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,ge,0,0,0,Ce.width,Ce.height,me.depth,xe,Ce.data)}else t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,ge,ke,Ce.width,Ce.height,me.depth,0,Ce.data,0,0);else qe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?Ee&&t.texSubImage3D(i.TEXTURE_2D_ARRAY,ge,0,0,0,Ce.width,Ce.height,me.depth,xe,Le,Ce.data):t.texImage3D(i.TEXTURE_2D_ARRAY,ge,ke,Ce.width,Ce.height,me.depth,0,xe,Le,Ce.data)}else{q&&Te&&t.texStorage2D(i.TEXTURE_2D,Ne,ke,gt[0].width,gt[0].height);for(let ge=0,ue=gt.length;ge<ue;ge++)Ce=gt[ge],M.format!==Gt?xe!==null?q?Ee&&t.compressedTexSubImage2D(i.TEXTURE_2D,ge,0,0,Ce.width,Ce.height,xe,Ce.data):t.compressedTexImage2D(i.TEXTURE_2D,ge,ke,Ce.width,Ce.height,0,Ce.data):qe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):q?Ee&&t.texSubImage2D(i.TEXTURE_2D,ge,0,0,Ce.width,Ce.height,xe,Le,Ce.data):t.texImage2D(i.TEXTURE_2D,ge,ke,Ce.width,Ce.height,0,xe,Le,Ce.data)}else if(M.isDataArrayTexture)if(q){if(Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Ne,ke,me.width,me.height,me.depth),Ee)if(M.layerUpdates.size>0){const ge=vC(me.width,me.height,M.format,M.type);for(const ue of M.layerUpdates){const Ie=me.data.subarray(ue*ge/me.data.BYTES_PER_ELEMENT,(ue+1)*ge/me.data.BYTES_PER_ELEMENT);t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,ue,me.width,me.height,1,xe,Le,Ie)}M.clearLayerUpdates()}else t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,me.width,me.height,me.depth,xe,Le,me.data)}else t.texImage3D(i.TEXTURE_2D_ARRAY,0,ke,me.width,me.height,me.depth,0,xe,Le,me.data);else if(M.isData3DTexture)q?(Te&&t.texStorage3D(i.TEXTURE_3D,Ne,ke,me.width,me.height,me.depth),Ee&&t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,me.width,me.height,me.depth,xe,Le,me.data)):t.texImage3D(i.TEXTURE_3D,0,ke,me.width,me.height,me.depth,0,xe,Le,me.data);else if(M.isFramebufferTexture){if(Te)if(q)t.texStorage2D(i.TEXTURE_2D,Ne,ke,me.width,me.height);else{let ge=me.width,ue=me.height;for(let Ie=0;Ie<Ne;Ie++)t.texImage2D(i.TEXTURE_2D,Ie,ke,ge,ue,0,xe,Le,null),ge>>=1,ue>>=1}}else if(gt.length>0){if(q&&Te){const ge=Fe(gt[0]);t.texStorage2D(i.TEXTURE_2D,Ne,ke,ge.width,ge.height)}for(let ge=0,ue=gt.length;ge<ue;ge++)Ce=gt[ge],q?Ee&&t.texSubImage2D(i.TEXTURE_2D,ge,0,0,xe,Le,Ce):t.texImage2D(i.TEXTURE_2D,ge,ke,xe,Le,Ce);M.generateMipmaps=!1}else if(q){if(Te){const ge=Fe(me);t.texStorage2D(i.TEXTURE_2D,Ne,ke,ge.width,ge.height)}Ee&&t.texSubImage2D(i.TEXTURE_2D,0,0,0,xe,Le,me)}else t.texImage2D(i.TEXTURE_2D,0,ke,xe,Le,me);m(M)&&f(se),Ve.__version=ie.version,M.onUpdate&&M.onUpdate(M)}k.__version=M.version}function z(k,M,Y){if(M.image.length!==6)return;const se=le(k,M),ce=M.source;t.bindTexture(i.TEXTURE_CUBE_MAP,k.__webglTexture,i.TEXTURE0+Y);const ie=n.get(ce);if(ce.version!==ie.__version||se===!0){t.activeTexture(i.TEXTURE0+Y);const Ve=Bt.getPrimaries(Bt.workingColorSpace),be=M.colorSpace===As?null:Bt.getPrimaries(M.colorSpace),Ge=M.colorSpace===As||Ve===be?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,M.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,M.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,M.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ge);const it=M.isCompressedTexture||M.image[0].isCompressedTexture,me=M.image[0]&&M.image[0].isDataTexture,xe=[];for(let ue=0;ue<6;ue++)!it&&!me?xe[ue]=g(M.image[ue],!0,s.maxCubemapSize):xe[ue]=me?M.image[ue].image:M.image[ue],xe[ue]=Dt(M,xe[ue]);const Le=xe[0],ke=r.convert(M.format,M.colorSpace),Ce=r.convert(M.type),gt=_(M.internalFormat,ke,Ce,M.colorSpace),q=M.isVideoTexture!==!0,Te=ie.__version===void 0||se===!0,Ee=ce.dataReady;let Ne=v(M,Le);he(i.TEXTURE_CUBE_MAP,M);let ge;if(it){q&&Te&&t.texStorage2D(i.TEXTURE_CUBE_MAP,Ne,gt,Le.width,Le.height);for(let ue=0;ue<6;ue++){ge=xe[ue].mipmaps;for(let Ie=0;Ie<ge.length;Ie++){const ze=ge[Ie];M.format!==Gt?ke!==null?q?Ee&&t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,0,0,ze.width,ze.height,ke,ze.data):t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,gt,ze.width,ze.height,0,ze.data):qe("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,0,0,ze.width,ze.height,ke,Ce,ze.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie,gt,ze.width,ze.height,0,ke,Ce,ze.data)}}}else{if(ge=M.mipmaps,q&&Te){ge.length>0&&Ne++;const ue=Fe(xe[0]);t.texStorage2D(i.TEXTURE_CUBE_MAP,Ne,gt,ue.width,ue.height)}for(let ue=0;ue<6;ue++)if(me){q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,0,0,xe[ue].width,xe[ue].height,ke,Ce,xe[ue].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,gt,xe[ue].width,xe[ue].height,0,ke,Ce,xe[ue].data);for(let Ie=0;Ie<ge.length;Ie++){const Lt=ge[Ie].image[ue].image;q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,0,0,Lt.width,Lt.height,ke,Ce,Lt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,gt,Lt.width,Lt.height,0,ke,Ce,Lt.data)}}else{q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,0,0,ke,Ce,xe[ue]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,0,gt,ke,Ce,xe[ue]);for(let Ie=0;Ie<ge.length;Ie++){const ze=ge[Ie];q?Ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,0,0,ke,Ce,ze.image[ue]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+ue,Ie+1,gt,ke,Ce,ze.image[ue])}}}m(M)&&f(i.TEXTURE_CUBE_MAP),ie.__version=ce.version,M.onUpdate&&M.onUpdate(M)}k.__version=M.version}function ae(k,M,Y,se,ce,ie){const Ve=r.convert(Y.format,Y.colorSpace),be=r.convert(Y.type),Ge=_(Y.internalFormat,Ve,be,Y.colorSpace),it=n.get(M),me=n.get(Y);if(me.__renderTarget=M,!it.__hasExternalTextures){const xe=Math.max(1,M.width>>ie),Le=Math.max(1,M.height>>ie);ce===i.TEXTURE_3D||ce===i.TEXTURE_2D_ARRAY?t.texImage3D(ce,ie,Ge,xe,Le,M.depth,0,Ve,be,null):t.texImage2D(ce,ie,Ge,xe,Le,0,Ve,be,null)}t.bindFramebuffer(i.FRAMEBUFFER,k),yt(M)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,se,ce,me.__webglTexture,0,U(M)):(ce===i.TEXTURE_2D||ce>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&ce<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,se,ce,me.__webglTexture,ie),t.bindFramebuffer(i.FRAMEBUFFER,null)}function Be(k,M,Y){if(i.bindRenderbuffer(i.RENDERBUFFER,k),M.depthBuffer){const se=M.depthTexture,ce=se&&se.isDepthTexture?se.type:null,ie=E(M.stencilBuffer,ce),Ve=M.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;yt(M)?o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,U(M),ie,M.width,M.height):Y?i.renderbufferStorageMultisample(i.RENDERBUFFER,U(M),ie,M.width,M.height):i.renderbufferStorage(i.RENDERBUFFER,ie,M.width,M.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,Ve,i.RENDERBUFFER,k)}else{const se=M.textures;for(let ce=0;ce<se.length;ce++){const ie=se[ce],Ve=r.convert(ie.format,ie.colorSpace),be=r.convert(ie.type),Ge=_(ie.internalFormat,Ve,be,ie.colorSpace);yt(M)?o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,U(M),Ge,M.width,M.height):Y?i.renderbufferStorageMultisample(i.RENDERBUFFER,U(M),Ge,M.width,M.height):i.renderbufferStorage(i.RENDERBUFFER,Ge,M.width,M.height)}}i.bindRenderbuffer(i.RENDERBUFFER,null)}function fe(k,M,Y){const se=M.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(i.FRAMEBUFFER,k),!(M.depthTexture&&M.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const ce=n.get(M.depthTexture);if(ce.__renderTarget=M,(!ce.__webglTexture||M.depthTexture.image.width!==M.width||M.depthTexture.image.height!==M.height)&&(M.depthTexture.image.width=M.width,M.depthTexture.image.height=M.height,M.depthTexture.needsUpdate=!0),se){if(ce.__webglInit===void 0&&(ce.__webglInit=!0,M.depthTexture.addEventListener("dispose",C)),ce.__webglTexture===void 0){ce.__webglTexture=i.createTexture(),t.bindTexture(i.TEXTURE_CUBE_MAP,ce.__webglTexture),he(i.TEXTURE_CUBE_MAP,M.depthTexture);const it=r.convert(M.depthTexture.format),me=r.convert(M.depthTexture.type);let xe;M.depthTexture.format===Pa?xe=i.DEPTH_COMPONENT24:M.depthTexture.format===vl&&(xe=i.DEPTH24_STENCIL8);for(let Le=0;Le<6;Le++)i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0,xe,M.width,M.height,0,it,me,null)}}else P(M.depthTexture,0);const ie=ce.__webglTexture,Ve=U(M),be=se?i.TEXTURE_CUBE_MAP_POSITIVE_X+Y:i.TEXTURE_2D,Ge=M.depthTexture.format===vl?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;if(M.depthTexture.format===Pa)yt(M)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ge,be,ie,0,Ve):i.framebufferTexture2D(i.FRAMEBUFFER,Ge,be,ie,0);else if(M.depthTexture.format===vl)yt(M)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ge,be,ie,0,Ve):i.framebufferTexture2D(i.FRAMEBUFFER,Ge,be,ie,0);else throw new Error("Unknown depthTexture format")}function De(k){const M=n.get(k),Y=k.isWebGLCubeRenderTarget===!0;if(M.__boundDepthTexture!==k.depthTexture){const se=k.depthTexture;if(M.__depthDisposeCallback&&M.__depthDisposeCallback(),se){const ce=()=>{delete M.__boundDepthTexture,delete M.__depthDisposeCallback,se.removeEventListener("dispose",ce)};se.addEventListener("dispose",ce),M.__depthDisposeCallback=ce}M.__boundDepthTexture=se}if(k.depthTexture&&!M.__autoAllocateDepthBuffer)if(Y)for(let se=0;se<6;se++)fe(M.__webglFramebuffer[se],k,se);else{const se=k.texture.mipmaps;se&&se.length>0?fe(M.__webglFramebuffer[0],k,0):fe(M.__webglFramebuffer,k,0)}else if(Y){M.__webglDepthbuffer=[];for(let se=0;se<6;se++)if(t.bindFramebuffer(i.FRAMEBUFFER,M.__webglFramebuffer[se]),M.__webglDepthbuffer[se]===void 0)M.__webglDepthbuffer[se]=i.createRenderbuffer(),Be(M.__webglDepthbuffer[se],k,!1);else{const ce=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,ie=M.__webglDepthbuffer[se];i.bindRenderbuffer(i.RENDERBUFFER,ie),i.framebufferRenderbuffer(i.FRAMEBUFFER,ce,i.RENDERBUFFER,ie)}}else{const se=k.texture.mipmaps;if(se&&se.length>0?t.bindFramebuffer(i.FRAMEBUFFER,M.__webglFramebuffer[0]):t.bindFramebuffer(i.FRAMEBUFFER,M.__webglFramebuffer),M.__webglDepthbuffer===void 0)M.__webglDepthbuffer=i.createRenderbuffer(),Be(M.__webglDepthbuffer,k,!1);else{const ce=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,ie=M.__webglDepthbuffer;i.bindRenderbuffer(i.RENDERBUFFER,ie),i.framebufferRenderbuffer(i.FRAMEBUFFER,ce,i.RENDERBUFFER,ie)}}t.bindFramebuffer(i.FRAMEBUFFER,null)}function ut(k,M,Y){const se=n.get(k);M!==void 0&&ae(se.__webglFramebuffer,k,k.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),Y!==void 0&&De(k)}function Qe(k){const M=k.texture,Y=n.get(k),se=n.get(M);k.addEventListener("dispose",x);const ce=k.textures,ie=k.isWebGLCubeRenderTarget===!0,Ve=ce.length>1;if(Ve||(se.__webglTexture===void 0&&(se.__webglTexture=i.createTexture()),se.__version=M.version,a.memory.textures++),ie){Y.__webglFramebuffer=[];for(let be=0;be<6;be++)if(M.mipmaps&&M.mipmaps.length>0){Y.__webglFramebuffer[be]=[];for(let Ge=0;Ge<M.mipmaps.length;Ge++)Y.__webglFramebuffer[be][Ge]=i.createFramebuffer()}else Y.__webglFramebuffer[be]=i.createFramebuffer()}else{if(M.mipmaps&&M.mipmaps.length>0){Y.__webglFramebuffer=[];for(let be=0;be<M.mipmaps.length;be++)Y.__webglFramebuffer[be]=i.createFramebuffer()}else Y.__webglFramebuffer=i.createFramebuffer();if(Ve)for(let be=0,Ge=ce.length;be<Ge;be++){const it=n.get(ce[be]);it.__webglTexture===void 0&&(it.__webglTexture=i.createTexture(),a.memory.textures++)}if(k.samples>0&&yt(k)===!1){Y.__webglMultisampledFramebuffer=i.createFramebuffer(),Y.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,Y.__webglMultisampledFramebuffer);for(let be=0;be<ce.length;be++){const Ge=ce[be];Y.__webglColorRenderbuffer[be]=i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,Y.__webglColorRenderbuffer[be]);const it=r.convert(Ge.format,Ge.colorSpace),me=r.convert(Ge.type),xe=_(Ge.internalFormat,it,me,Ge.colorSpace,k.isXRRenderTarget===!0),Le=U(k);i.renderbufferStorageMultisample(i.RENDERBUFFER,Le,xe,k.width,k.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+be,i.RENDERBUFFER,Y.__webglColorRenderbuffer[be])}i.bindRenderbuffer(i.RENDERBUFFER,null),k.depthBuffer&&(Y.__webglDepthRenderbuffer=i.createRenderbuffer(),Be(Y.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(i.FRAMEBUFFER,null)}}if(ie){t.bindTexture(i.TEXTURE_CUBE_MAP,se.__webglTexture),he(i.TEXTURE_CUBE_MAP,M);for(let be=0;be<6;be++)if(M.mipmaps&&M.mipmaps.length>0)for(let Ge=0;Ge<M.mipmaps.length;Ge++)ae(Y.__webglFramebuffer[be][Ge],k,M,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+be,Ge);else ae(Y.__webglFramebuffer[be],k,M,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+be,0);m(M)&&f(i.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ve){for(let be=0,Ge=ce.length;be<Ge;be++){const it=ce[be],me=n.get(it);let xe=i.TEXTURE_2D;(k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(xe=k.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(xe,me.__webglTexture),he(xe,it),ae(Y.__webglFramebuffer,k,it,i.COLOR_ATTACHMENT0+be,xe,0),m(it)&&f(xe)}t.unbindTexture()}else{let be=i.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(be=k.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(be,se.__webglTexture),he(be,M),M.mipmaps&&M.mipmaps.length>0)for(let Ge=0;Ge<M.mipmaps.length;Ge++)ae(Y.__webglFramebuffer[Ge],k,M,i.COLOR_ATTACHMENT0,be,Ge);else ae(Y.__webglFramebuffer,k,M,i.COLOR_ATTACHMENT0,be,0);m(M)&&f(be),t.unbindTexture()}k.depthBuffer&&De(k)}function Ye(k){const M=k.textures;for(let Y=0,se=M.length;Y<se;Y++){const ce=M[Y];if(m(ce)){const ie=y(k),Ve=n.get(ce).__webglTexture;t.bindTexture(ie,Ve),f(ie),t.unbindTexture()}}}const ot=[],Ke=[];function Ct(k){if(k.samples>0){if(yt(k)===!1){const M=k.textures,Y=k.width,se=k.height;let ce=i.COLOR_BUFFER_BIT;const ie=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Ve=n.get(k),be=M.length>1;if(be)for(let it=0;it<M.length;it++)t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.RENDERBUFFER,null),t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.TEXTURE_2D,null,0);t.bindFramebuffer(i.READ_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer);const Ge=k.texture.mipmaps;Ge&&Ge.length>0?t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer[0]):t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer);for(let it=0;it<M.length;it++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(ce|=i.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(ce|=i.STENCIL_BUFFER_BIT)),be){i.framebufferRenderbuffer(i.READ_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,Ve.__webglColorRenderbuffer[it]);const me=n.get(M[it]).__webglTexture;i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,me,0)}i.blitFramebuffer(0,0,Y,se,0,0,Y,se,ce,i.NEAREST),l===!0&&(ot.length=0,Ke.length=0,ot.push(i.COLOR_ATTACHMENT0+it),k.depthBuffer&&k.resolveDepthBuffer===!1&&(ot.push(ie),Ke.push(ie),i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,Ke)),i.invalidateFramebuffer(i.READ_FRAMEBUFFER,ot))}if(t.bindFramebuffer(i.READ_FRAMEBUFFER,null),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),be)for(let it=0;it<M.length;it++){t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.RENDERBUFFER,Ve.__webglColorRenderbuffer[it]);const me=n.get(M[it]).__webglTexture;t.bindFramebuffer(i.FRAMEBUFFER,Ve.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+it,i.TEXTURE_2D,me,0)}t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const M=k.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,[M])}}}function U(k){return Math.min(s.maxSamples,k.samples)}function yt(k){const M=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&M.__useRenderToTexture!==!1}function je(k){const M=a.render.frame;u.get(k)!==M&&(u.set(k,M),k.update())}function Dt(k,M){const Y=k.colorSpace,se=k.format,ce=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||Y!==pn&&Y!==As&&(Bt.getTransfer(Y)===Kt?(se!==Gt||ce!==Ze)&&qe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):rt("WebGLTextures: Unsupported texture color space:",Y)),M}function Fe(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(c.width=k.naturalWidth||k.width,c.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(c.width=k.displayWidth,c.height=k.displayHeight):(c.width=k.width,c.height=k.height),c}this.allocateTextureUnit=T,this.resetTextureUnits=B,this.setTexture2D=P,this.setTexture2DArray=R,this.setTexture3D=L,this.setTextureCube=F,this.rebindTextures=ut,this.setupRenderTarget=Qe,this.updateRenderTargetMipmap=Ye,this.updateMultisampleRenderTarget=Ct,this.setupDepthRenderbuffer=De,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=yt,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function lG(i,e){function t(n,s=As){let r;const a=Bt.getTransfer(s);if(n===Ze)return i.UNSIGNED_BYTE;if(n===Jv)return i.UNSIGNED_SHORT_4_4_4_4;if(n===Kv)return i.UNSIGNED_SHORT_5_5_5_1;if(n===rm)return i.UNSIGNED_INT_5_9_9_9_REV;if(n===am)return i.UNSIGNED_INT_10F_11F_11F_REV;if(n===jv)return i.BYTE;if(n===Xv)return i.SHORT;if(n===pA)return i.UNSIGNED_SHORT;if(n===sm)return i.INT;if(n===ci)return i.UNSIGNED_INT;if(n===Cn)return i.FLOAT;if(n===sn)return i.HALF_FLOAT;if(n===vM)return i.ALPHA;if(n===gA)return i.RGB;if(n===Gt)return i.RGBA;if(n===Pa)return i.DEPTH_COMPONENT;if(n===vl)return i.DEPTH_STENCIL;if(n===go)return i.RED;if(n===Zv)return i.RED_INTEGER;if(n===sr)return i.RG;if(n===om)return i.RG_INTEGER;if(n===Ra)return i.RGBA_INTEGER;if(n===Ah||n===Ml||n===ph||n===Vd)if(a===Kt)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===Ah)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Ml)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===ph)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Vd)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===Ah)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ml)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ph)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Vd)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===hg||n===oE||n===Rh||n===mA)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===hg)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===oE)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Rh)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===mA)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===ug||n===yA||n===_A||n===dg||n===Ag||n===pg||n===fg)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===ug||n===yA)return a===Kt?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===_A)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC;if(n===dg)return r.COMPRESSED_R11_EAC;if(n===Ag)return r.COMPRESSED_SIGNED_R11_EAC;if(n===pg)return r.COMPRESSED_RG11_EAC;if(n===fg)return r.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===Rl||n===lE||n===cE||n===hE||n===fh||n===uE||n===dE||n===AE||n===pE||n===fE||n===gE||n===mE||n===yE||n===_E)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===Rl)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===lE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===cE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===hE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===fh)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===uE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===dE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===AE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===pE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===fE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===gE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===mE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===yE)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===_E)return a===Kt?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Dh||n===EE||n===gg)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===Dh)return a===Kt?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===EE)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===gg)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===mg||n===yg||n===_g||n===Eg)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===mg)return r.COMPRESSED_RED_RGTC1_EXT;if(n===yg)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===_g)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Eg)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===fA?i.UNSIGNED_INT_24_8:i[n]!==void 0?i[n]:null}return{convert:t}}const cG=`
|
|
4059
4059
|
void main() {
|
|
4060
4060
|
|
|
4061
4061
|
gl_Position = vec4( position, 1.0 );
|
|
@@ -4142,8 +4142,8 @@ ${t}}`}}let B$=class{constructor(){this.textureUtils=null}setTextureUtils(e){thi
|
|
|
4142
4142
|
`))&&D<b&&B<I.byteLength;)P+=R,D+=R.length,B+=128,R+=String.fromCharCode.apply(null,new Uint16Array(I.subarray(B,B+128)));return-1<T?(I.pos+=D+T+1,P+R.slice(0,T)):!1},d=function(I){const b=/^#\?(\S+)/,w=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,S=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,B=/^\s*FORMAT=(\S+)\s*$/,T=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,D={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let P,R;for((I.pos>=I.byteLength||!(P=h(I)))&&a(1,"no header found"),(R=P.match(b))||a(3,"bad initial token"),D.valid|=1,D.programtype=R[1],D.string+=P+`
|
|
4143
4143
|
`;P=h(I),P!==!1;){if(D.string+=P+`
|
|
4144
4144
|
`,P.charAt(0)==="#"){D.comments+=P+`
|
|
4145
|
-
`;continue}if((R=P.match(w))&&(D.gamma=parseFloat(R[1])),(R=P.match(S))&&(D.exposure=parseFloat(R[1])),(R=P.match(B))&&(D.valid|=2,D.format=R[1]),(R=P.match(T))&&(D.valid|=4,D.height=parseInt(R[1],10),D.width=parseInt(R[2],10)),D.valid&2&&D.valid&4)break}return D.valid&2||a(3,"missing format specifier"),D.valid&4||a(3,"missing image size specifier"),D},A=function(I,b,w){const S=b;if(S<8||S>32767||I[0]!==2||I[1]!==2||I[2]&128)return new Uint8Array(I);S!==(I[2]<<8|I[3])&&a(3,"wrong scanline width");const B=new Uint8Array(4*b*w);B.length||a(4,"unable to allocate buffer space");let T=0,D=0;const P=4*S,R=new Uint8Array(4),L=new Uint8Array(P);let F=w;for(;F>0&&D<I.byteLength;){D+4>I.byteLength&&a(1),R[0]=I[D++],R[1]=I[D++],R[2]=I[D++],R[3]=I[D++],(R[0]!=2||R[1]!=2||(R[2]<<8|R[3])!=S)&&a(3,"bad rgbe scanline format");let $=0,J;for(;$<P&&D<I.byteLength;){J=I[D++];const he=J>128;if(he&&(J-=128),(J===0||$+J>P)&&a(3,"bad scanline data"),he){const le=I[D++];for(let Z=0;Z<J;Z++)L[$++]=le}else L.set(I.subarray(D,D+J),$),$+=J,D+=J}const W=S;for(let he=0;he<W;he++){let le=0;B[T]=L[he+le],le+=S,B[T+1]=L[he+le],le+=S,B[T+2]=L[he+le],le+=S,B[T+3]=L[he+le],T+=4}F--}return B},p=function(I,b,w,S){const B=I[b+3],T=Math.pow(2,B-128)/255;w[S+0]=I[b+0]*T,w[S+1]=I[b+1]*T,w[S+2]=I[b+2]*T,w[S+3]=1},g=function(I,b,w,S){const B=I[b+3],T=Math.pow(2,B-128)/255;w[S+0]=gp.toHalfFloat(Math.min(I[b+0]*T,65504)),w[S+1]=gp.toHalfFloat(Math.min(I[b+1]*T,65504)),w[S+2]=gp.toHalfFloat(Math.min(I[b+2]*T,65504)),w[S+3]=gp.toHalfFloat(1)},m=new Uint8Array(e);m.pos=0;const f=d(m),y=f.width,_=f.height,E=A(m.subarray(m.pos),y,_);let v,C,x;switch(this.type){case Cn:x=E.length/4;const I=new Float32Array(x*4);for(let w=0;w<x;w++)p(E,w*4,I,w*4);v=I,C=Cn;break;case sn:x=E.length/4;const b=new Uint16Array(x*4);for(let w=0;w<x;w++)g(E,w*4,b,w*4);v=b,C=sn;break;default:throw new Error("THREE.HDRLoader: Unsupported type: "+this.type)}return{width:y,height:_,data:v,header:f.string,gamma:f.gamma,exposure:f.exposure,type:C}}setDataType(e){return this.type=e,this}load(e,t,n,s){function r(a,o){switch(a.type){case Cn:case sn:a.colorSpace=pn,a.minFilter=ft,a.magFilter=ft,a.generateMipmaps=!1,a.flipY=!0;break}t&&t(a,o)}return super.load(e,r,n,s)}}class v5{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:s,msg:r,transfer:a}=this.queue.shift();this.workersResolve[e]=s,this.workers[e].postMessage(r,a)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(n=>{const s=this._getIdleWorker();s!==-1?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=n,this.workers[s].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let Ky,sa,ZE;const Zy={env:{emscripten_notify_memory_growth:function(i){ZE=new Uint8Array(sa.exports.memory.buffer)}}};class b5{init(){return Ky||(Ky=typeof fetch<"u"?fetch("data:application/wasm;base64,"+KI).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,Zy)).then(this._init):WebAssembly.instantiate(Buffer.from(KI,"base64"),Zy).then(this._init),Ky)}_init(e){sa=e.instance,Zy.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!sa)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,s=sa.exports.malloc(n);ZE.set(e,s),t=t||Number(sa.exports.ZSTD_findDecompressedSize(s,n));const r=sa.exports.malloc(t),a=sa.exports.ZSTD_decompress(r,t,s,n),o=ZE.slice(r,r+a);return sa.exports.free(s),sa.exports.free(r),o}}const KI="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38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MNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBB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EEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJ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ADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiEC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AAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",x5="display-p3",C5="display-p3-linear";({...Bt.spaces[Ot]});const e_=new WeakMap;let t_=0,n_;class Ns extends dr{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new v5,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await e.init(),this.detectSupport(e)}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-s3tc"),bptcSupported:e.hasFeature("texture-compression-bc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:e.extensions.has("WEBGL_compressed_texture_astc")&&e.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},typeof navigator<"u"&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const e=new Mr(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new Mr(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const s=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,s]).then(([r,a])=>{const o=Ns.BasisWorker.toString(),l=["/* constants */","let _EngineFormat = "+JSON.stringify(Ns.EngineFormat),"let _EngineType = "+JSON.stringify(Ns.EngineType),"let _TranscoderFormat = "+JSON.stringify(Ns.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Ns.BasisFormat),"/* basis_transcoder.js */",r,"/* worker */",o.substring(o.indexOf("{")+1,o.lastIndexOf("}"))].join(`
|
|
4146
|
-
`);this.workerSourceURL=URL.createObjectURL(new Blob([l])),this.transcoderBinary=a,this.workerPool.setWorkerCreator(()=>{const c=new Worker(this.workerSourceURL),u=this.transcoderBinary.slice(0);return c.postMessage({type:"init",config:this.workerConfig,transcoderBinary:u},[u]),c})}),t_>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),t_++}return this.transcoderPending}load(e,t,n,s){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const r=new Mr(this.manager);r.setPath(this.path),r.setCrossOrigin(this.crossOrigin),r.setWithCredentials(this.withCredentials),r.setRequestHeader(this.requestHeader),r.setResponseType("arraybuffer"),r.load(e,a=>{this.parse(a,t,s)},n,s)}parse(e,t,n){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(e_.has(e))return e_.get(e).promise.then(t).catch(n);this._createTexture(e).then(s=>t?t(s):null).catch(n)}_createTextureFrom(e,t){const{type:n,error:s,data:{faces:r,width:a,height:o,format:l,type:c,dfdFlags:u}}=e;if(n==="error")return Promise.reject(s);let h;if(t.faceCount===6)h=new cP(r,l,c);else{const d=r[0].mipmaps;h=t.layerCount>1?new lP(d,a,o,t.layerCount,l,c):new Ql(d,a,o,l,c)}return h.minFilter=r[0].mipmaps.length===1?ft:Hi,h.magFilter=ft,h.generateMipmaps=!1,h.needsUpdate=!0,h.colorSpace=l2(t),h.premultiplyAlpha=!!(u&E$),h}async _createTexture(e,t={}){const n=S$(new Uint8Array(e)),s=n.vkFormat===Lb&&n.dataFormatDescriptor[0].colorModel===167;if(!(n.vkFormat===C$||s&&!this.workerConfig.astcHDRSupported))return w5(n);const a=t,o=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:a},[e])).then(l=>this._createTextureFrom(l.data,n));return e_.set(e,{promise:o}),o}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),t_--}}Ns.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2};Ns.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25};Ns.EngineFormat={RGBAFormat:Gt,RGBA_ASTC_4x4_Format:Rl,RGB_BPTC_UNSIGNED_Format:gg,RGBA_BPTC_Format:Dh,RGBA_ETC2_EAC_Format:_A,RGBA_PVRTC_4BPPV1_Format:Rh,RGBA_S3TC_DXT5_Format:Vd,RGB_ETC1_Format:ug,RGB_ETC2_Format:yA,RGB_PVRTC_4BPPV1_Format:hg,RGBA_S3TC_DXT1_Format:Ml};Ns.EngineType={UnsignedByteType:Ze,HalfFloatType:sn,FloatType:Cn};Ns.BasisWorker=function(){let i,e,t;const n=_EngineFormat,s=_EngineType,r=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",function(p){const g=p.data;switch(g.type){case"init":i=g.config,o(g.transcoderBinary);break;case"transcode":e.then(()=>{try{const{faces:m,buffers:f,width:y,height:_,hasAlpha:E,format:v,type:C,dfdFlags:x}=l(g.buffer);self.postMessage({type:"transcode",id:g.id,data:{faces:m,width:y,height:_,hasAlpha:E,format:v,type:C,dfdFlags:x}},f)}catch(m){console.error(m),self.postMessage({type:"error",id:g.id,error:m.message})}});break}});function o(p){e=new Promise(g=>{t={wasmBinary:p,onRuntimeInitialized:g},BASIS(t)}).then(()=>{t.initializeBasis(),t.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function l(p){const g=new t.KTX2File(new Uint8Array(p));function m(){g.close(),g.delete()}if(!g.isValid())throw m(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let f;if(g.isUASTC())f=a.UASTC;else if(g.isETC1S())f=a.ETC1S;else if(g.isHDR())f=a.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const y=g.getWidth(),_=g.getHeight(),E=g.getLayers()||1,v=g.getLevels(),C=g.getFaces(),x=g.getHasAlpha(),I=g.getDFDFlags(),{transcoderFormat:b,engineFormat:w,engineType:S}=h(f,y,_,x);if(!y||!_||!v)throw m(),new Error("THREE.KTX2Loader: Invalid texture");if(!g.startTranscoding())throw m(),new Error("THREE.KTX2Loader: .startTranscoding failed");const B=[],T=[];for(let D=0;D<C;D++){const P=[];for(let R=0;R<v;R++){const L=[];let F,$;for(let W=0;W<E;W++){const he=g.getImageLevelInfo(R,W,D);D===0&&R===0&&W===0&&(he.origWidth%4!==0||he.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),v>1?(F=he.origWidth,$=he.origHeight):(F=he.width,$=he.height);let le=new Uint8Array(g.getImageTranscodedSizeInBytes(R,W,0,b));const Z=g.transcodeImage(le,R,W,D,b,0,-1,-1);if(S===s.HalfFloatType&&(le=new Uint16Array(le.buffer,le.byteOffset,le.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!Z)throw m(),new Error("THREE.KTX2Loader: .transcodeImage failed.");L.push(le)}const J=A(L);P.push({data:J,width:F,height:$}),T.push(J.buffer)}B.push({mipmaps:P,width:y,height:_,format:w,type:S})}return m(),{faces:B,buffers:T,width:y,height:_,hasAlpha:x,dfdFlags:I,format:w,type:S}}const c=[{if:"astcSupported",basisFormat:[a.UASTC],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],engineType:[s.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],engineType:[s.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.BC1,r.BC3],engineFormat:[n.RGBA_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],engineType:[s.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],engineType:[s.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.ETC1],engineFormat:[n.RGB_ETC1_Format],engineType:[s.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],engineType:[s.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[a.UASTC_HDR],transcoderFormat:[r.BC6H],engineFormat:[n.RGB_BPTC_UNSIGNED_Format],engineType:[s.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.RGBA32,r.RGBA32],engineFormat:[n.RGBAFormat,n.RGBAFormat],engineType:[s.UnsignedByteType,s.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[a.UASTC_HDR],transcoderFormat:[r.RGBA_HALF],engineFormat:[n.RGBAFormat],engineType:[s.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],u={[a.ETC1S]:c.filter(p=>p.basisFormat.includes(a.ETC1S)).sort((p,g)=>p.priorityETC1S-g.priorityETC1S),[a.UASTC]:c.filter(p=>p.basisFormat.includes(a.UASTC)).sort((p,g)=>p.priorityUASTC-g.priorityUASTC),[a.UASTC_HDR]:c.filter(p=>p.basisFormat.includes(a.UASTC_HDR)).sort((p,g)=>p.priorityHDR-g.priorityHDR)};function h(p,g,m,f){const y=u[p];for(let _=0;_<y.length;_++){const E=y[_];if(E.if&&!i[E.if]||!E.basisFormat.includes(p)||f&&E.transcoderFormat.length<2||E.needsPowerOfTwo&&!(d(g)&&d(m)))continue;const v=E.transcoderFormat[f?1:0],C=E.engineFormat[f?1:0],x=E.engineType[0];return{transcoderFormat:v,engineFormat:C,engineType:x}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function d(p){return p<=2?!0:(p&p-1)===0&&p!==0}function A(p){if(p.length===1)return p[0];let g=0;for(let y=0;y<p.length;y++){const _=p[y];g+=_.byteLength}const m=new Uint8Array(g);let f=0;for(let y=0;y<p.length;y++){const _=p[y];m.set(_,f),f+=_.byteLength}return m}};const I5=new Set([Gt,gA,sr,go]),i_={[wR]:Gt,[IR]:sr,[CR]:go,[xR]:Gt,[bR]:sr,[vR]:go,[ER]:Gt,[_R]:Gt,[yR]:sr,[mR]:sr,[gR]:go,[fR]:go,[BR]:gA,[SR]:gA,[zR]:_A,[GR]:yA,[jE]:dg,[I$]:Ag,[XE]:pg,[w$]:fg,[Lb]:Rl,[$R]:Rl,[HR]:Rl,[JR]:fh,[YR]:fh,[VR]:fh,[DR]:Ml,[RR]:Ml,[MR]:Ah,[TR]:Ah,[LR]:ph,[QR]:ph,[PR]:yg,[NR]:mg,[kR]:Eg,[FR]:_g,[OR]:Dh,[UR]:Dh,[XR]:Rh,[WR]:Rh,[jR]:mA,[qR]:mA},wc={[wR]:Cn,[IR]:Cn,[CR]:Cn,[xR]:sn,[bR]:sn,[vR]:sn,[ER]:Ze,[_R]:Ze,[yR]:Ze,[mR]:Ze,[gR]:Ze,[fR]:Ze,[BR]:rm,[SR]:am,[zR]:Ze,[GR]:Ze,[jE]:Ze,[jE]:Ze,[XE]:Ze,[XE]:Ze,[Lb]:sn,[$R]:Ze,[HR]:Ze,[JR]:sn,[YR]:Ze,[VR]:Ze,[DR]:Ze,[RR]:Ze,[MR]:Ze,[TR]:Ze,[LR]:Ze,[QR]:Ze,[PR]:Ze,[NR]:Ze,[kR]:Ze,[FR]:Ze,[OR]:Ze,[UR]:Ze,[XR]:Ze,[WR]:Ze,[jR]:Ze,[qR]:Ze};async function w5(i){const{vkFormat:e}=i;if(i_[e]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+e);wc[e]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+e);let t;i.supercompressionScheme===zI&&(n_||(n_=new Promise(async a=>{const o=new b5;await o.init(),a(o)})),t=await n_);const n=[];for(let a=0;a<i.levels.length;a++){const o=Math.max(1,i.pixelWidth>>a),l=Math.max(1,i.pixelHeight>>a),c=i.pixelDepth?Math.max(1,i.pixelDepth>>a):0,u=i.levels[a];let h;if(i.supercompressionScheme===_$)h=u.levelData;else if(i.supercompressionScheme===zI)h=t.decode(u.levelData,u.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let d;wc[e]===Cn?d=new Float32Array(h.buffer,h.byteOffset,h.byteLength/Float32Array.BYTES_PER_ELEMENT):wc[e]===sn?d=new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT):wc[e]===rm||wc[e]===am?d=new Uint32Array(h.buffer,h.byteOffset,h.byteLength/Uint32Array.BYTES_PER_ELEMENT):d=h,n.push({data:d,width:o,height:l,depth:c})}const s=i.levelCount===0||n.length>1;let r;if(I5.has(i_[e]))r=i.pixelDepth===0?new jl(n[0].data,i.pixelWidth,i.pixelHeight):new rb(n[0].data,i.pixelWidth,i.pixelHeight,i.pixelDepth),r.minFilter=s?ru:jt,r.magFilter=jt,r.generateMipmaps=i.levelCount===0;else{if(i.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");r=new Ql(n,i.pixelWidth,i.pixelHeight),r.minFilter=s?Hi:ft,r.magFilter=ft}return r.mipmaps=n,r.type=wc[e],r.format=i_[e],r.colorSpace=l2(i),r.needsUpdate=!0,Promise.resolve(r)}function l2(i){const e=i.dataFormatDescriptor[0];return e.colorPrimaries===b$?e.transferFunction===HI?Ot:pn:e.colorPrimaries===x$?e.transferFunction===HI?x5:C5:(e.colorPrimaries===v$||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),As)}class S5 extends o2{constructor(e){console.warn("RGBELoader has been deprecated. Please use HDRLoader instead."),super(e)}}const B5={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
|
|
4145
|
+
`;continue}if((R=P.match(w))&&(D.gamma=parseFloat(R[1])),(R=P.match(S))&&(D.exposure=parseFloat(R[1])),(R=P.match(B))&&(D.valid|=2,D.format=R[1]),(R=P.match(T))&&(D.valid|=4,D.height=parseInt(R[1],10),D.width=parseInt(R[2],10)),D.valid&2&&D.valid&4)break}return D.valid&2||a(3,"missing format specifier"),D.valid&4||a(3,"missing image size specifier"),D},A=function(I,b,w){const S=b;if(S<8||S>32767||I[0]!==2||I[1]!==2||I[2]&128)return new Uint8Array(I);S!==(I[2]<<8|I[3])&&a(3,"wrong scanline width");const B=new Uint8Array(4*b*w);B.length||a(4,"unable to allocate buffer space");let T=0,D=0;const P=4*S,R=new Uint8Array(4),L=new Uint8Array(P);let F=w;for(;F>0&&D<I.byteLength;){D+4>I.byteLength&&a(1),R[0]=I[D++],R[1]=I[D++],R[2]=I[D++],R[3]=I[D++],(R[0]!=2||R[1]!=2||(R[2]<<8|R[3])!=S)&&a(3,"bad rgbe scanline format");let $=0,J;for(;$<P&&D<I.byteLength;){J=I[D++];const he=J>128;if(he&&(J-=128),(J===0||$+J>P)&&a(3,"bad scanline data"),he){const le=I[D++];for(let Z=0;Z<J;Z++)L[$++]=le}else L.set(I.subarray(D,D+J),$),$+=J,D+=J}const W=S;for(let he=0;he<W;he++){let le=0;B[T]=L[he+le],le+=S,B[T+1]=L[he+le],le+=S,B[T+2]=L[he+le],le+=S,B[T+3]=L[he+le],T+=4}F--}return B},p=function(I,b,w,S){const B=I[b+3],T=Math.pow(2,B-128)/255;w[S+0]=I[b+0]*T,w[S+1]=I[b+1]*T,w[S+2]=I[b+2]*T,w[S+3]=1},g=function(I,b,w,S){const B=I[b+3],T=Math.pow(2,B-128)/255;w[S+0]=gp.toHalfFloat(Math.min(I[b+0]*T,65504)),w[S+1]=gp.toHalfFloat(Math.min(I[b+1]*T,65504)),w[S+2]=gp.toHalfFloat(Math.min(I[b+2]*T,65504)),w[S+3]=gp.toHalfFloat(1)},m=new Uint8Array(e);m.pos=0;const f=d(m),y=f.width,_=f.height,E=A(m.subarray(m.pos),y,_);let v,C,x;switch(this.type){case Cn:x=E.length/4;const I=new Float32Array(x*4);for(let w=0;w<x;w++)p(E,w*4,I,w*4);v=I,C=Cn;break;case sn:x=E.length/4;const b=new Uint16Array(x*4);for(let w=0;w<x;w++)g(E,w*4,b,w*4);v=b,C=sn;break;default:throw new Error("THREE.HDRLoader: Unsupported type: "+this.type)}return{width:y,height:_,data:v,header:f.string,gamma:f.gamma,exposure:f.exposure,type:C}}setDataType(e){return this.type=e,this}load(e,t,n,s){function r(a,o){switch(a.type){case Cn:case sn:a.colorSpace=pn,a.minFilter=ft,a.magFilter=ft,a.generateMipmaps=!1,a.flipY=!0;break}t&&t(a,o)}return super.load(e,r,n,s)}}class v5{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:s,msg:r,transfer:a}=this.queue.shift();this.workersResolve[e]=s,this.workers[e].postMessage(r,a)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(n=>{const s=this._getIdleWorker();s!==-1?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=n,this.workers[s].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let Ky,sa,ZE;const Zy={env:{emscripten_notify_memory_growth:function(i){ZE=new Uint8Array(sa.exports.memory.buffer)}}};class b5{init(){return Ky||(Ky=typeof fetch<"u"?fetch("data:application/wasm;base64,"+KI).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,Zy)).then(this._init):WebAssembly.instantiate(Buffer.from(KI,"base64"),Zy).then(this._init),Ky)}_init(e){sa=e.instance,Zy.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!sa)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,s=sa.exports.malloc(n);ZE.set(e,s),t=t||Number(sa.exports.ZSTD_findDecompressedSize(s,n));const r=sa.exports.malloc(t),a=sa.exports.ZSTD_decompress(r,t,s,n),o=ZE.slice(r,r+a);return sa.exports.free(s),sa.exports.free(r),o}}const KI="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgA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EIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCAC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DQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsg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AhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALE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BSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQ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G4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn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wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",x5="display-p3",C5="display-p3-linear";({...Bt.spaces[Ot]});const e0=new WeakMap;let t0=0,n0;class Ns extends dr{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new v5,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await e.init(),this.detectSupport(e)}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-s3tc"),bptcSupported:e.hasFeature("texture-compression-bc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:e.extensions.has("WEBGL_compressed_texture_astc")&&e.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},typeof navigator<"u"&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const e=new Mr(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new Mr(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const s=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,s]).then(([r,a])=>{const o=Ns.BasisWorker.toString(),l=["/* constants */","let _EngineFormat = "+JSON.stringify(Ns.EngineFormat),"let _EngineType = "+JSON.stringify(Ns.EngineType),"let _TranscoderFormat = "+JSON.stringify(Ns.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Ns.BasisFormat),"/* basis_transcoder.js */",r,"/* worker */",o.substring(o.indexOf("{")+1,o.lastIndexOf("}"))].join(`
|
|
4146
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([l])),this.transcoderBinary=a,this.workerPool.setWorkerCreator(()=>{const c=new Worker(this.workerSourceURL),u=this.transcoderBinary.slice(0);return c.postMessage({type:"init",config:this.workerConfig,transcoderBinary:u},[u]),c})}),t0>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),t0++}return this.transcoderPending}load(e,t,n,s){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const r=new Mr(this.manager);r.setPath(this.path),r.setCrossOrigin(this.crossOrigin),r.setWithCredentials(this.withCredentials),r.setRequestHeader(this.requestHeader),r.setResponseType("arraybuffer"),r.load(e,a=>{this.parse(a,t,s)},n,s)}parse(e,t,n){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(e0.has(e))return e0.get(e).promise.then(t).catch(n);this._createTexture(e).then(s=>t?t(s):null).catch(n)}_createTextureFrom(e,t){const{type:n,error:s,data:{faces:r,width:a,height:o,format:l,type:c,dfdFlags:u}}=e;if(n==="error")return Promise.reject(s);let h;if(t.faceCount===6)h=new cP(r,l,c);else{const d=r[0].mipmaps;h=t.layerCount>1?new lP(d,a,o,t.layerCount,l,c):new Ql(d,a,o,l,c)}return h.minFilter=r[0].mipmaps.length===1?ft:Hi,h.magFilter=ft,h.generateMipmaps=!1,h.needsUpdate=!0,h.colorSpace=l2(t),h.premultiplyAlpha=!!(u&E$),h}async _createTexture(e,t={}){const n=S$(new Uint8Array(e)),s=n.vkFormat===Lb&&n.dataFormatDescriptor[0].colorModel===167;if(!(n.vkFormat===C$||s&&!this.workerConfig.astcHDRSupported))return w5(n);const a=t,o=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:a},[e])).then(l=>this._createTextureFrom(l.data,n));return e0.set(e,{promise:o}),o}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),t0--}}Ns.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2};Ns.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25};Ns.EngineFormat={RGBAFormat:Gt,RGBA_ASTC_4x4_Format:Rl,RGB_BPTC_UNSIGNED_Format:gg,RGBA_BPTC_Format:Dh,RGBA_ETC2_EAC_Format:_A,RGBA_PVRTC_4BPPV1_Format:Rh,RGBA_S3TC_DXT5_Format:Vd,RGB_ETC1_Format:ug,RGB_ETC2_Format:yA,RGB_PVRTC_4BPPV1_Format:hg,RGBA_S3TC_DXT1_Format:Ml};Ns.EngineType={UnsignedByteType:Ze,HalfFloatType:sn,FloatType:Cn};Ns.BasisWorker=function(){let i,e,t;const n=_EngineFormat,s=_EngineType,r=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",function(p){const g=p.data;switch(g.type){case"init":i=g.config,o(g.transcoderBinary);break;case"transcode":e.then(()=>{try{const{faces:m,buffers:f,width:y,height:_,hasAlpha:E,format:v,type:C,dfdFlags:x}=l(g.buffer);self.postMessage({type:"transcode",id:g.id,data:{faces:m,width:y,height:_,hasAlpha:E,format:v,type:C,dfdFlags:x}},f)}catch(m){console.error(m),self.postMessage({type:"error",id:g.id,error:m.message})}});break}});function o(p){e=new Promise(g=>{t={wasmBinary:p,onRuntimeInitialized:g},BASIS(t)}).then(()=>{t.initializeBasis(),t.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function l(p){const g=new t.KTX2File(new Uint8Array(p));function m(){g.close(),g.delete()}if(!g.isValid())throw m(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let f;if(g.isUASTC())f=a.UASTC;else if(g.isETC1S())f=a.ETC1S;else if(g.isHDR())f=a.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const y=g.getWidth(),_=g.getHeight(),E=g.getLayers()||1,v=g.getLevels(),C=g.getFaces(),x=g.getHasAlpha(),I=g.getDFDFlags(),{transcoderFormat:b,engineFormat:w,engineType:S}=h(f,y,_,x);if(!y||!_||!v)throw m(),new Error("THREE.KTX2Loader: Invalid texture");if(!g.startTranscoding())throw m(),new Error("THREE.KTX2Loader: .startTranscoding failed");const B=[],T=[];for(let D=0;D<C;D++){const P=[];for(let R=0;R<v;R++){const L=[];let F,$;for(let W=0;W<E;W++){const he=g.getImageLevelInfo(R,W,D);D===0&&R===0&&W===0&&(he.origWidth%4!==0||he.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),v>1?(F=he.origWidth,$=he.origHeight):(F=he.width,$=he.height);let le=new Uint8Array(g.getImageTranscodedSizeInBytes(R,W,0,b));const Z=g.transcodeImage(le,R,W,D,b,0,-1,-1);if(S===s.HalfFloatType&&(le=new Uint16Array(le.buffer,le.byteOffset,le.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!Z)throw m(),new Error("THREE.KTX2Loader: .transcodeImage failed.");L.push(le)}const J=A(L);P.push({data:J,width:F,height:$}),T.push(J.buffer)}B.push({mipmaps:P,width:y,height:_,format:w,type:S})}return m(),{faces:B,buffers:T,width:y,height:_,hasAlpha:x,dfdFlags:I,format:w,type:S}}const c=[{if:"astcSupported",basisFormat:[a.UASTC],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],engineType:[s.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],engineType:[s.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.BC1,r.BC3],engineFormat:[n.RGBA_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],engineType:[s.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],engineType:[s.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.ETC1],engineFormat:[n.RGB_ETC1_Format],engineType:[s.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],engineType:[s.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[a.UASTC_HDR],transcoderFormat:[r.BC6H],engineFormat:[n.RGB_BPTC_UNSIGNED_Format],engineType:[s.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.RGBA32,r.RGBA32],engineFormat:[n.RGBAFormat,n.RGBAFormat],engineType:[s.UnsignedByteType,s.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[a.UASTC_HDR],transcoderFormat:[r.RGBA_HALF],engineFormat:[n.RGBAFormat],engineType:[s.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],u={[a.ETC1S]:c.filter(p=>p.basisFormat.includes(a.ETC1S)).sort((p,g)=>p.priorityETC1S-g.priorityETC1S),[a.UASTC]:c.filter(p=>p.basisFormat.includes(a.UASTC)).sort((p,g)=>p.priorityUASTC-g.priorityUASTC),[a.UASTC_HDR]:c.filter(p=>p.basisFormat.includes(a.UASTC_HDR)).sort((p,g)=>p.priorityHDR-g.priorityHDR)};function h(p,g,m,f){const y=u[p];for(let _=0;_<y.length;_++){const E=y[_];if(E.if&&!i[E.if]||!E.basisFormat.includes(p)||f&&E.transcoderFormat.length<2||E.needsPowerOfTwo&&!(d(g)&&d(m)))continue;const v=E.transcoderFormat[f?1:0],C=E.engineFormat[f?1:0],x=E.engineType[0];return{transcoderFormat:v,engineFormat:C,engineType:x}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function d(p){return p<=2?!0:(p&p-1)===0&&p!==0}function A(p){if(p.length===1)return p[0];let g=0;for(let y=0;y<p.length;y++){const _=p[y];g+=_.byteLength}const m=new Uint8Array(g);let f=0;for(let y=0;y<p.length;y++){const _=p[y];m.set(_,f),f+=_.byteLength}return m}};const I5=new Set([Gt,gA,sr,go]),i0={[wR]:Gt,[IR]:sr,[CR]:go,[xR]:Gt,[bR]:sr,[vR]:go,[ER]:Gt,[_R]:Gt,[yR]:sr,[mR]:sr,[gR]:go,[fR]:go,[BR]:gA,[SR]:gA,[zR]:_A,[GR]:yA,[jE]:dg,[I$]:Ag,[XE]:pg,[w$]:fg,[Lb]:Rl,[$R]:Rl,[HR]:Rl,[JR]:fh,[YR]:fh,[VR]:fh,[DR]:Ml,[RR]:Ml,[MR]:Ah,[TR]:Ah,[LR]:ph,[QR]:ph,[PR]:yg,[NR]:mg,[kR]:Eg,[FR]:_g,[OR]:Dh,[UR]:Dh,[XR]:Rh,[WR]:Rh,[jR]:mA,[qR]:mA},wc={[wR]:Cn,[IR]:Cn,[CR]:Cn,[xR]:sn,[bR]:sn,[vR]:sn,[ER]:Ze,[_R]:Ze,[yR]:Ze,[mR]:Ze,[gR]:Ze,[fR]:Ze,[BR]:rm,[SR]:am,[zR]:Ze,[GR]:Ze,[jE]:Ze,[jE]:Ze,[XE]:Ze,[XE]:Ze,[Lb]:sn,[$R]:Ze,[HR]:Ze,[JR]:sn,[YR]:Ze,[VR]:Ze,[DR]:Ze,[RR]:Ze,[MR]:Ze,[TR]:Ze,[LR]:Ze,[QR]:Ze,[PR]:Ze,[NR]:Ze,[kR]:Ze,[FR]:Ze,[OR]:Ze,[UR]:Ze,[XR]:Ze,[WR]:Ze,[jR]:Ze,[qR]:Ze};async function w5(i){const{vkFormat:e}=i;if(i0[e]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+e);wc[e]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+e);let t;i.supercompressionScheme===zI&&(n0||(n0=new Promise(async a=>{const o=new b5;await o.init(),a(o)})),t=await n0);const n=[];for(let a=0;a<i.levels.length;a++){const o=Math.max(1,i.pixelWidth>>a),l=Math.max(1,i.pixelHeight>>a),c=i.pixelDepth?Math.max(1,i.pixelDepth>>a):0,u=i.levels[a];let h;if(i.supercompressionScheme===_$)h=u.levelData;else if(i.supercompressionScheme===zI)h=t.decode(u.levelData,u.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let d;wc[e]===Cn?d=new Float32Array(h.buffer,h.byteOffset,h.byteLength/Float32Array.BYTES_PER_ELEMENT):wc[e]===sn?d=new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT):wc[e]===rm||wc[e]===am?d=new Uint32Array(h.buffer,h.byteOffset,h.byteLength/Uint32Array.BYTES_PER_ELEMENT):d=h,n.push({data:d,width:o,height:l,depth:c})}const s=i.levelCount===0||n.length>1;let r;if(I5.has(i0[e]))r=i.pixelDepth===0?new jl(n[0].data,i.pixelWidth,i.pixelHeight):new rb(n[0].data,i.pixelWidth,i.pixelHeight,i.pixelDepth),r.minFilter=s?ru:jt,r.magFilter=jt,r.generateMipmaps=i.levelCount===0;else{if(i.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");r=new Ql(n,i.pixelWidth,i.pixelHeight),r.minFilter=s?Hi:ft,r.magFilter=ft}return r.mipmaps=n,r.type=wc[e],r.format=i0[e],r.colorSpace=l2(i),r.needsUpdate=!0,Promise.resolve(r)}function l2(i){const e=i.dataFormatDescriptor[0];return e.colorPrimaries===b$?e.transferFunction===HI?Ot:pn:e.colorPrimaries===x$?e.transferFunction===HI?x5:C5:(e.colorPrimaries===v$||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),As)}class S5 extends o2{constructor(e){console.warn("RGBELoader has been deprecated. Please use HDRLoader instead."),super(e)}}const B5={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
|
|
4147
4147
|
|
|
4148
4148
|
varying vec2 vUv;
|
|
4149
4149
|
|
|
@@ -4230,9 +4230,9 @@ ${t}}`}}let B$=class{constructor(){this.textureUtils=null}setTextureUtils(e){thi
|
|
|
4230
4230
|
|
|
4231
4231
|
gl_FragColor = sum;
|
|
4232
4232
|
|
|
4233
|
-
}`};function $p(i,e,t){let n=t;const s=new Q;return i.updateWorldMatrix(!0,!0),i.traverseVisible(r=>{const{geometry:a}=r;if(a!==void 0){const{position:o}=a.attributes;if(o!==void 0)for(let l=0,c=o.count;l<c;l++)r.isMesh?r.getVertexPosition(l,s):s.fromBufferAttribute(o,l),r.isSkinnedMesh||s.applyMatrix4(r.matrixWorld),n=e(n,s)}}),n}function D5(i){const e=new Map,t=new Map,n=i.clone();return d2(i,n,function(s,r){e.set(r,s),t.set(s,r)}),n.traverse(function(s){if(!s.isSkinnedMesh)return;const r=s,a=e.get(s),o=a.skeleton.bones;r.skeleton=a.skeleton.clone(),r.bindMatrix.copy(a.bindMatrix),r.skeleton.bones=o.map(function(l){return t.get(l)}),r.bind(r.skeleton,r.bindMatrix)}),n}function d2(i,e,t){t(i,e);for(let n=0;n<i.children.length;n++)d2(i.children[n],e.children[n],t)}class Q5{constructor(e,t,n,s,r){this.xrLight=e,this.renderer=t,this.lightProbe=n,this.xrWebGLBinding=null,this.estimationStartCallback=r,this.frameCallback=this.onXRFrame.bind(this);const a=t.xr.getSession();if(s&&"XRWebGLBinding"in window){const o=new HA(16);e.environment=o.texture;const l=t.getContext();switch(a.preferredReflectionFormat){case"srgba8":l.getExtension("EXT_sRGB");break;case"rgba16f":l.getExtension("OES_texture_half_float");break}this.xrWebGLBinding=new XRWebGLBinding(a,l),this.lightProbe.addEventListener("reflectionchange",()=>{this.updateReflection()})}a.requestAnimationFrame(this.frameCallback)}updateReflection(){const e=this.renderer.properties.get(this.xrLight.environment);if(e){const t=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);t&&(e.__webglTexture=t,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(e,t){if(!this.xrLight)return;t.session.requestAnimationFrame(this.frameCallback);const s=t.getLightEstimate(this.lightProbe);if(s){this.xrLight.lightProbe.sh.fromArray(s.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const r=Math.max(1,Math.max(s.primaryLightIntensity.x,Math.max(s.primaryLightIntensity.y,s.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(s.primaryLightIntensity.x/r,s.primaryLightIntensity.y/r,s.primaryLightIntensity.z/r),this.xrLight.directionalLight.intensity=r,this.xrLight.directionalLight.position.copy(s.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class L5 extends In{constructor(e,t=!0){super(),this.lightProbe=new aF,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new _b,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let n=null,s=!1;e.xr.addEventListener("sessionstart",()=>{const r=e.xr.getSession();"requestLightProbe"in r&&r.requestLightProbe({reflectionFormat:r.preferredReflectionFormat}).then(a=>{n=new Q5(this,e,a,t,()=>{s=!0,this.dispatchEvent({type:"estimationstart"})})})}),e.xr.addEventListener("sessionend",()=>{n&&(n.dispose(),n=null),s&&this.dispatchEvent({type:"estimationend"})}),this.dispose=()=>{n&&(n.dispose(),n=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}}class eA{constructor(e){this._success=e}get success(){return this._success}set success(e){this._success=e}get failed(){return!this._success}}class N5 extends eA{constructor(e=!1,t=void 0){super(e),this.__payload=t}get payload(){return this.__payload}set payload(e){this.__payload=e}}var A2=(i=>(i.Empty="entity-empty",i.Gltf="entity-mesh",i.Render="entity-render",i.Proxy="entity-proxy",i.Collider="entity-collider",i.Asset="entity-asset",i))(A2||{});class P5 extends In{constructor(){super(),this._entityType=A2.Empty}get entityType(){return this._entityType}dispose(){let e;const t=new N5(!1,e);return e=void 0,t.success=!0,t.payload=e,t}}var La=(i=>(i.GEO="geo",i.SPLAT="splat",i))(La||{});class Vp{constructor(e){this.__name=e}getName(){return this.__name}}var nr=(i=>(i.declared="declared",i.Loading="loading",i.Loaded="loaded",i.Unloaded="unloaded",i.Failed="failed",i))(nr||{}),Io=(i=>(i.None="epg-resource-none",i.Gltf="epg-resource-gltf",i.Proxy="epg-resource-gltf-proxy",i.Render="epg-resource-gltf-render",i.Splat="epg-resource-splat",i))(Io||{});class p2{constructor({id:e,uri:t,appWcRef:n}){this._loggerContext="EPG RESOURCE",this._type="epg-resource-none",this._id=crypto.randomUUID(),this._loadingProgress=0,this._state="declared",this._resource=null,e&&(this._id=e),this._appWcRef=n,this._uri=t}get id(){return this._id}get uri(){return this._uri}get loadingProgress(){return this._loadingProgress}get state(){return this._state}get isLoaded(){return this._state==="loaded"}get type(){return this._type}get resource(){return this._resource}highlight(){}updateLoadingProgress(e){this._loadingProgress=e,this._appWcRef.eventsManager.assetLoadProgress.fire({progress:e})}async load(){return window.epigraph.logger.info({title:"Loading EPG Resource. Override to define how a resource should be loaded.",contextOverride:this._loggerContext}),Promise.resolve(!0)}unload(){return this._resource={},Promise.resolve(!0)}}const F5=new Ur(-1,1,1,-1,0,1);class k5 extends fn{constructor(){super(),this.setAttribute("position",new en([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new en([0,2,0,0,2,0],2))}}const U5=new k5;class f2{constructor(e){this._mesh=new Je(U5,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,F5)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}var oi=Uint8Array,tA=Uint16Array,O5=Int32Array,g2=new oi([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),m2=new oi([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),G5=new oi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),y2=function(i,e){for(var t=new tA(31),n=0;n<31;++n)t[n]=e+=1<<i[n-1];for(var s=new O5(t[30]),n=1;n<30;++n)for(var r=t[n];r<t[n+1];++r)s[r]=r-t[n]<<5|n;return{b:t,r:s}},_2=y2(g2,2),E2=_2.b,z5=_2.r;E2[28]=258,z5[258]=28;var H5=y2(m2,0),$5=H5.b,v2=new tA(32768);for(var En=0;En<32768;++En){var Za=(En&43690)>>1|(En&21845)<<1;Za=(Za&52428)>>2|(Za&13107)<<2,Za=(Za&61680)>>4|(Za&3855)<<4,v2[En]=((Za&65280)>>8|(Za&255)<<8)>>1}var nA=function(i,e,t){for(var n=i.length,s=0,r=new tA(e);s<n;++s)i[s]&&++r[i[s]-1];var a=new tA(e);for(s=1;s<e;++s)a[s]=a[s-1]+r[s-1]<<1;var o;{o=new tA(1<<e);var l=15-e;for(s=0;s<n;++s)if(i[s])for(var c=s<<4|i[s],u=e-i[s],h=a[i[s]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)o[v2[h]>>l]=c}return o},qA=new oi(288);for(var En=0;En<144;++En)qA[En]=8;for(var En=144;En<256;++En)qA[En]=9;for(var En=256;En<280;++En)qA[En]=7;for(var En=280;En<288;++En)qA[En]=8;var b2=new oi(32);for(var En=0;En<32;++En)b2[En]=5;var V5=nA(qA,9),Y5=nA(b2,5),s_=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Js=function(i,e,t){var n=e/8|0;return(i[n]|i[n+1]<<8)>>(e&7)&t},r_=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},x2=function(i){return(i+7)/8|0},Eh=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new oi(i.subarray(e,t))},q5=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Oi=function(i,e,t){var n=new Error(e||q5[i]);if(n.code=i,Error.captureStackTrace&&Error.captureStackTrace(n,Oi),!t)throw n;return n},C2=function(i,e,t,n){var s=i.length,r=n?n.length:0;if(!s||e.f&&!e.l)return t||new oi(0);var a=!t,o=a||e.i!=2,l=e.i;a&&(t=new oi(s*3));var c=function(De){var ut=t.length;if(De>ut){var Qe=new oi(Math.max(ut*2,De));Qe.set(t),t=Qe}},u=e.f||0,h=e.p||0,d=e.b||0,A=e.l,p=e.d,g=e.m,m=e.n,f=s*8;do{if(!A){u=Js(i,h,1);var y=Js(i,h+1,3);if(h+=3,y)if(y==1)A=V5,p=Y5,g=9,m=5;else if(y==2){var C=Js(i,h,31)+257,x=Js(i,h+10,15)+4,I=C+Js(i,h+5,31)+1;h+=14;for(var b=new oi(I),w=new oi(19),S=0;S<x;++S)w[G5[S]]=Js(i,h+S*3,7);h+=x*3;for(var B=s_(w),T=(1<<B)-1,D=nA(w,B),S=0;S<I;){var P=D[Js(i,h,T)];h+=P&15;var _=P>>4;if(_<16)b[S++]=_;else{var R=0,L=0;for(_==16?(L=3+Js(i,h,3),h+=2,R=b[S-1]):_==17?(L=3+Js(i,h,7),h+=3):_==18&&(L=11+Js(i,h,127),h+=7);L--;)b[S++]=R}}var F=b.subarray(0,C),$=b.subarray(C);g=s_(F),m=s_($),A=nA(F,g),p=nA($,m)}else Oi(1);else{var _=x2(h)+4,E=i[_-4]|i[_-3]<<8,v=_+E;if(v>s){l&&Oi(0);break}o&&c(d+E),t.set(i.subarray(_,v),d),e.b=d+=E,e.p=h=v*8,e.f=u;continue}if(h>f){l&&Oi(0);break}}o&&c(d+131072);for(var J=(1<<g)-1,W=(1<<m)-1,he=h;;he=h){var R=A[r_(i,h)&J],le=R>>4;if(h+=R&15,h>f){l&&Oi(0);break}if(R||Oi(2),le<256)t[d++]=le;else if(le==256){he=h,A=null;break}else{var Z=le-254;if(le>264){var S=le-257,ne=g2[S];Z=Js(i,h,(1<<ne)-1)+E2[S],h+=ne}var G=p[r_(i,h)&W],z=G>>4;G||Oi(3),h+=G&15;var $=$5[z];if(z>3){var ne=m2[z];$+=r_(i,h)&(1<<ne)-1,h+=ne}if(h>f){l&&Oi(0);break}o&&c(d+131072);var ae=d+Z;if(d<$){var Be=r-$,fe=Math.min($,ae);for(Be+d<0&&Oi(3);d<fe;++d)t[d]=n[Be+d]}for(;d<ae;++d)t[d]=t[d-$]}}e.l=A,e.p=he,e.b=d,e.f=u,A&&(u=1,e.m=g,e.d=p,e.n=m)}while(!u);return d!=t.length&&a?Eh(t,0,d):t.subarray(0,d)},W5=new oi(0),Cr=function(i,e){return i[e]|i[e+1]<<8},er=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},a_=function(i,e){return er(i,e)+er(i,e+4)*4294967296},j5=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&Oi(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!i[t++]);return t+(e&2)},o_=(function(){function i(e,t){typeof e=="function"&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new oi(32768),this.p=new oi(0),n&&this.o.set(n)}return i.prototype.e=function(e){if(this.ondata||Oi(5),this.d&&Oi(4),!this.p.length)this.p=e;else if(e.length){var t=new oi(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},i.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=C2(this.p,this.s,this.o);this.ondata(Eh(n,t,this.s.b),this.d),this.o=Eh(n,this.s.b-32768),this.s.b=this.o.length,this.p=Eh(this.p,this.s.p/8|0),this.s.p&=7},i.prototype.push=function(e,t){this.e(e),this.c(t)},i})();function X5(i,e){return C2(i,{i:2},e&&e.out,e&&e.dictionary)}var J5=(function(){function i(e,t){this.v=1,this.r=0,o_.call(this,e,t)}return i.prototype.push=function(e,t){if(o_.prototype.e.call(this,e),this.r+=e.length,this.v){var n=this.p.subarray(this.v-1),s=n.length>3?j5(n):4;if(s>n.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-n.length);this.p=n.subarray(s),this.v=0}o_.prototype.c.call(this,t),this.s.f&&!this.s.l&&!t&&(this.v=x2(this.s.p)+9,this.s={i:0},this.o=new oi(0),this.push(new oi(0),t))},i})(),ev=typeof TextDecoder<"u"&&new TextDecoder,K5=0;try{ev.decode(W5,{stream:!0}),K5=1}catch{}var Z5=function(i){for(var e="",t=0;;){var n=i[t++],s=(n>127)+(n>223)+(n>239);if(t+s>i.length)return{s:e,r:Eh(i,t-1)};s?s==3?(n=((n&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):s&1?e+=String.fromCharCode((n&31)<<6|i[t++]&63):e+=String.fromCharCode((n&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(n)}};function eV(i,e){if(e){for(var t="",n=0;n<i.length;n+=16384)t+=String.fromCharCode.apply(null,i.subarray(n,n+16384));return t}else{if(ev)return ev.decode(i);var s=Z5(i),r=s.s,t=s.r;return t.length&&Oi(8),r}}var tV=function(i,e){return e+30+Cr(i,e+26)+Cr(i,e+28)},nV=function(i,e,t){var n=Cr(i,e+28),s=eV(i.subarray(e+46,e+46+n),!(Cr(i,e+8)&2048)),r=e+46+n,a=er(i,e+20),o=t&&a==4294967295?iV(i,r):[a,er(i,e+24),er(i,e+42)],l=o[0],c=o[1],u=o[2];return[Cr(i,e+10),l,c,s,r+Cr(i,e+30)+Cr(i,e+32),u]},iV=function(i,e){for(;Cr(i,e)!=1;e+=4+Cr(i,e+2));return[a_(i,e+12),a_(i,e+4),a_(i,e+20)]};function sV(i,e){for(var t={},n=i.length-22;er(i,n)!=101010256;--n)(!n||i.length-n>65558)&&Oi(13);var s=Cr(i,n+8);if(!s)return{};var r=er(i,n+16),a=r==4294967295||s==65535;if(a){var o=er(i,n-12);a=er(i,o)==101075792,a&&(s=er(i,o+32),r=er(i,o+48))}for(var l=e&&e.filter,c=0;c<s;++c){var u=nV(i,r,a),h=u[0],d=u[1],A=u[2],p=u[3],g=u[4],m=u[5],f=tV(i,m);r=g,(!l||l({name:p,size:d,originalSize:A,compression:h}))&&(h?h==8?t[p]=X5(i.subarray(f,f+d),{out:new oi(A)}):Oi(14,"unknown compression type "+h):t[p]=Eh(i,f,f+d))}return t}let Na;const I2=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&I2.decode();let Bd=null;function rV(){return(Bd===null||Bd.byteLength===0)&&(Bd=new Uint8Array(Na.memory.buffer)),Bd}function aV(i,e){return i=i>>>0,I2.decode(rV().subarray(i,i+e))}function oV(i,e,t,n,s,r,a,o,l,c,u,h,d){return Na.raycast_splats(i,e,t,n,s,r,a,o,l,c,u,h,d)}async function lV(i,e){if(typeof Response=="function"&&i instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(i,e)}catch(n){if(i.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const t=await i.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{const t=await WebAssembly.instantiate(i,e);return t instanceof WebAssembly.Instance?{instance:t,module:i}:t}}function cV(){const i={};return i.wbg={},i.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},i.wbg.__wbg_length_3b4f022188ae8db6=function(e){return e.length},i.wbg.__wbg_length_6ca527665d89694d=function(e){return e.length},i.wbg.__wbg_length_8cfd2c6409af88ad=function(e){return e.length},i.wbg.__wbg_new_9fee97a409b32b68=function(e){return new Uint16Array(e)},i.wbg.__wbg_new_e3b321dcfef89fc7=function(e){return new Uint32Array(e)},i.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354=function(e,t,n){return new Float32Array(e,t>>>0,n>>>0)},i.wbg.__wbg_newwithbyteoffsetandlength_f1dead44d1fc7212=function(e,t,n){return new Uint32Array(e,t>>>0,n>>>0)},i.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(e){return new Float32Array(e>>>0)},i.wbg.__wbg_set_10bad9bee0e9c58b=function(e,t,n){e.set(t,n>>>0)},i.wbg.__wbg_set_d23661d19148b229=function(e,t,n){e.set(t,n>>>0)},i.wbg.__wbg_set_f4f1f0daa30696fc=function(e,t,n){e.set(t,n>>>0)},i.wbg.__wbg_subarray_3aaeec89bb2544f0=function(e,t,n){return e.subarray(t>>>0,n>>>0)},i.wbg.__wbg_subarray_769e1e0f81bb259b=function(e,t,n){return e.subarray(t>>>0,n>>>0)},i.wbg.__wbindgen_init_externref_table=function(){const e=Na.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},i.wbg.__wbindgen_memory=function(){return Na.memory},i.wbg.__wbindgen_throw=function(e,t){throw new Error(aV(e,t))},i}function hV(i,e){return Na=i.exports,w2.__wbindgen_wasm_module=e,Bd=null,Na.__wbindgen_start(),Na}async function w2(i){if(Na!==void 0)return Na;typeof i<"u"&&(Object.getPrototypeOf(i)===Object.prototype?{module_or_path:i}=i:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof i>"u"&&(i=new URL("data:application/wasm;base64,AGFzbQEAAAABzAEeYAJ/fwF/YAJ/fwBgA39/fwF/YAF/AX9gA39/fwBgAX8AYAV/f39/fwBgA29/fwFvYAV/f39/fwF/YAFvAW9gA29vfwBgAW8Bf2AAAX9gBH9/f38AYAAAYAR/f39/AX9gA39vbwF/YAF/AW9gAAFvYAF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AJCgICAgBA3AhwgAkEwaiADKAIAIgNBCGopAgA3AwAgAkE4aiADQRBqKQIANwMAIAIgAykCADcDKCACQRxqQcCIwAAgAkEoahAYGiACQRhqIAQoAgAiAzYCACACIAIpAhwiBTcDECABQQhqIAM2AgAgASAFNwIACyABKQIAIQUgAUKAgICAEDcCACACQQhqIgMgAUEIaiIBKAIANgIAIAFBADYCAEGxk8AALQAAGiACIAU3AwBBDEEEEF0iAUUEQEEEQQwQbQALIAEgAikDADcCACABQQhqIAMoAgA2AgAgAEHgisAANgIEIAAgATYCACACQUBrJAAL0gECBH8BfiMAQSBrIgMkACABIAEgAmoiAksEQEEAQQAQUgALQQggACgCACIEQQF0IgEgAiABIAJLGyICIAJBCEkbIgKtIgdCIIhQRQRAQQBBABBSAAsCQCAHpyIFQf////8HTQRAIAMgBAR/IAMgBDYCHCADIAAoAgQ2AhRBAQVBAAs2AhggA0EIakEBIAUgA0EUahAwIAMoAghBAUcNASADKAIMIQYgAygCECEBCyAGIAEQUgALIAMoAgwhASAAIAI2AgAgACABNgIEIANBIGokAAvrAQIEfwF+IwBBIGsiBSQAIAEgASACaiICSwRAQQBBABBSAAtBACEBIAMgBGpBAWtBACADa3GtQQQgACgCACIHQQF0IgYgAiACIAZJGyICIAJBBE0bIgKtfiIJQiCIUEUEQEEAQQAQUgALAkAgCaciBkGAgICAeCADa00EfyAFIAcEfyAFIAQgB2w2AhwgBSAAKAIENgIUIAMFQQALNgIYIAVBCGogAyAGIAVBFGoQMCAFKAIIQQFHDQEgBSgCECEIIAUoAgwFIAELIAgQUgALIAUoAgwhASAAIAI2AgAgACABNgIEIAVBIGokAAvTAQEFfyMAQSBrIgEkACAAKAIAIgJBf0YEQEEAQQAQUgALIAJBAXQiAyACQQFqIgUgAyAFSxsiA0H/////A0sEQEEAQQAQUgALAkBBBCADIANBBE0bIgNBAnQiBUH8////B00EfyABIAIEfyABIAJBAnQ2AhwgASAAKAIENgIUQQQFQQALNgIYIAFBCGpBBCAFIAFBFG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IGlzICBidXQgdGhlIGluZGV4IGlzIAAAyAYQACAAAADoBhAAEgAAAD09IT1tYXRjaGVzYXNzZXJ0aW9uIGBsZWZ0ICByaWdodGAgZmFpbGVkCiAgbGVmdDogCiByaWdodDogABcHEAAQAAAAJwcQABcAAAA+BxAACQAAACByaWdodGAgZmFpbGVkOiAKICBsZWZ0OiAAAAAXBxAAEAAAAGAHEAAQAAAAcAcQAAkAAAA+BxAACQAAADogAAABAAAAAAAAAJwHEAACAAAAfSB9Y29yZS9zcmMvZm10L251bS5ycwAAswcQABMAAABmAAAAFwAAADB4MDAwMTAyMDMwNDA1MDYwNzA4MDkxMDExMTIxMzE0MTUxNjE3MTgxOTIwMjEyMjIzMjQyNTI2MjcyODI5MzAzMTMyMzMzNDM1MzYzNzM4Mzk0MDQxNDI0MzQ0NDU0NjQ3NDg0OTUwNTE1MjUzNTQ1NTU2NTc1ODU5NjA2MTYyNjM2NDY1NjY2NzY4Njk3MDcxNzI3Mzc0NzU3Njc3Nzg3OTgwODE4MjgzODQ4NTg2ODc4ODg5OTA5MTkyOTM5NDk1OTY5Nzk4OTlyYW5nZSBzdGFydCBpbmRleCAgb3V0IG9mIHJhbmdlIGZvciBzbGljZSBvZiBsZW5ndGggAACiCBAAEgAAALQIEAAiAAAAcmFuZ2UgZW5kIGluZGV4IOgIEAAQAAAAtAgQACIAAAAAAAA/AAAAvwBBqJLAAAsBFABwCXByb2R1Y2VycwIIbGFuZ3VhZ2UBBFJ1c3QADHByb2Nlc3NlZC1ieQMFcnVzdGMdMS44My4wICg5MGIzNWE2MjMgMjAyNC0xMS0yNikGd2FscnVzBjAuMjMuMwx3YXNtLWJpbmRnZW4HMC4yLjEwMABJD3RhcmdldF9mZWF0dXJlcwQrD211dGFibGUtZ2xvYmFscysIc2lnbi1leHQrD3JlZmVyZW5jZS10eXBlcysKbXVsdGl2YWx1ZQ==",import.meta.url));const e=cV();(typeof i=="string"||typeof Request=="function"&&i instanceof Request||typeof URL=="function"&&i instanceof URL)&&(i=fetch(i));const{instance:t,module:n}=await lV(await i,e);return hV(t,n)}const Fa=-12,ka=9,uV=-30,l_=Math.exp(uV),dV=11,AV=11,on=1<<dV,Cl=1<<AV,pV=1;function fV(i){return i==="bool"||i==="bvec2"||i==="bvec3"||i==="bvec4"}function Il(i){return i==="int"||i==="ivec2"||i==="ivec3"||i==="ivec4"}function wl(i){return i==="uint"||i==="uvec2"||i==="uvec3"||i==="uvec4"}function gV(i){return i==="float"||i==="vec2"||i==="vec3"||i==="vec4"}function mV(i){return i==="mat2"||i==="mat2x2"||i==="mat2x3"||i==="mat2x4"||i==="mat3"||i==="mat3x2"||i==="mat3x3"||i==="mat3x4"||i==="mat4"||i==="mat4x2"||i==="mat4x3"||i==="mat4x4"}function QA(i){return gV(i)||mV(i)}function Bc(i){return i==="mat2"||i==="mat2x2"}function Tc(i){return i==="mat3"||i==="mat3x3"}function Mc(i){return i==="mat4"||i==="mat4x4"}function yV(i){switch(i){case"vec2":return"float";case"vec3":return"float";case"vec4":return"float";case"ivec2":return"int";case"ivec3":return"int";case"ivec4":return"int";case"uvec2":return"uint";case"uvec3":return"uint";case"uvec4":return"uint";default:throw new Error(`Invalid vector type: ${i}`)}}function _V(i){switch(i){case"vec2":case"ivec2":case"uvec2":return 2;case"vec3":case"ivec3":case"uvec3":return 3;case"vec4":case"ivec4":case"uvec4":return 4;default:throw new Error(`Invalid vector type: ${i}`)}}function qn(i){return Math.trunc(i).toString()}function Wn(i){return`${Math.max(0,Math.trunc(i)).toString()}u`}function Pt(i){return i===Number.POSITIVE_INFINITY?"INFINITY":i===Number.NEGATIVE_INFINITY?"-INFINITY":Number.isInteger(i)?i.toFixed(1):i.toString()}function Ba(i){return i instanceof Sl?i.type:i.dynoOut().type}class Sl{constructor(e){this.__isDynoValue=!0,this.type=e}}class Ki extends Sl{constructor(e,t){super(e.outTypes[t]),this.dyno=e,this.key=t}}class Gf extends Sl{constructor(e,t){super(e),this.literal=t}getLiteral(){return this.literal}}class EV extends Gf{constructor(e,t){super(e,""),this.value=t}getLiteral(){const{type:e,value:t}=this;switch(e){case"bool":return t?"true":"false";case"uint":return Wn(t);case"int":return qn(t);case"float":return Pt(t);case"bvec2":{const n=t;return`bvec2(${n[0]}, ${n[1]})`}case"uvec2":{if(t instanceof pe)return`uvec2(${Wn(t.x)}, ${Wn(t.y)})`;const n=t;return`uvec2(${Wn(n[0])}, ${Wn(n[1])})`}case"ivec2":{if(t instanceof pe)return`ivec2(${qn(t.x)}, ${qn(t.y)})`;const n=t;return`ivec2(${qn(n[0])}, ${qn(n[1])})`}case"vec2":{if(t instanceof pe)return`vec2(${Pt(t.x)}, ${Pt(t.y)})`;const n=t;return`vec2(${Pt(n[0])}, ${Pt(n[1])})`}case"bvec3":{const n=t;return`bvec3(${n[0]}, ${n[1]}, ${n[2]})`}case"uvec3":{if(t instanceof Q)return`uvec3(${Wn(t.x)}, ${Wn(t.y)}, ${Wn(t.z)})`;const n=t;return`uvec3(${Wn(n[0])}, ${Wn(n[1])}, ${Wn(n[2])})`}case"ivec3":{if(t instanceof Q)return`ivec3(${qn(t.x)}, ${qn(t.y)}, ${qn(t.z)})`;const n=t;return`ivec3(${qn(n[0])}, ${qn(n[1])}, ${qn(n[2])})`}case"vec3":{if(t instanceof Q)return`vec3(${Pt(t.x)}, ${Pt(t.y)}, ${Pt(t.z)})`;const n=t;return`vec3(${Pt(n[0])}, ${Pt(n[1])}, ${Pt(n[2])})`}case"bvec4":{const n=t;return`bvec4(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]})`}case"uvec4":{if(t instanceof Mt)return`uvec4(${Wn(t.x)}, ${Wn(t.y)}, ${Wn(t.z)}, ${Wn(t.w)})`;const n=t;return`uvec4(${Wn(n[0])}, ${Wn(n[1])}, ${Wn(n[2])}, ${Wn(n[3])})`}case"ivec4":{if(t instanceof Mt)return`ivec4(${qn(t.x)}, ${qn(t.y)}, ${qn(t.z)}, ${qn(t.w)})`;const n=t;return`ivec4(${qn(n[0])}, ${qn(n[1])}, ${qn(n[2])}, ${qn(n[3])})`}case"vec4":{if(t instanceof Mt)return`vec4(${Pt(t.x)}, ${Pt(t.y)}, ${Pt(t.z)}, ${Pt(t.w)})`;if(t instanceof Yt)return`vec4(${Pt(t.x)}, ${Pt(t.y)}, ${Pt(t.z)}, ${Pt(t.w)})`;const n=t;return`vec4(${Pt(n[0])}, ${Pt(n[1])}, ${Pt(n[2])}, ${Pt(n[3])})`}case"mat2":case"mat2x2":{const n=t,s=n instanceof Am?n.elements:t,r=new Array(4).fill(0).map((a,o)=>Pt(s[o]));return`${e}(${r.join(", ")})`}case"mat2x3":{const n=t,s=new Array(6).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat2x4":{const n=t,s=new Array(8).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat3":case"mat3x3":{const n=t,s=n instanceof pt?n.elements:t,r=new Array(9).fill(0).map((a,o)=>Pt(s[o]));return`${e}(${r.join(", ")})`}case"mat3x2":{const n=t,s=new Array(6).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat3x4":{const n=t,s=new Array(12).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat4":case"mat4x4":{const n=t,s=n instanceof We?n.elements:t,r=new Array(16).fill(0).map((a,o)=>Pt(s[o]));return`${e}(${r.join(", ")})`}case"mat4x2":{const n=t,s=new Array(8).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat4x3":{const n=t,s=new Array(12).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}default:throw new Error(`Type not implemented: ${String(e)}`)}}}function iA(i,e){return new EV(i,e)}function Yp(i){const e=String(i);if(fV(i))return`${e}(false)`;if(QA(i))return`${e}(0.0)`;if(Il(i))return`${e}(0)`;if(wl(i))return`${e}(0u)`;throw new Error(`Type not implemented: ${e}`)}const sw=" ";class vV{constructor({indent:e}={}){this.globals=new Set,this.statements=[],this.uniforms={},this.declares=new Set,this.updaters=[],this.sequence=0,this.indent=sw,this.indent=e??sw}nextSequence(){return this.sequence++}}class ui{constructor({inTypes:e,outTypes:t,inputs:n,update:s,globals:r,statements:a,generate:o}){this.inTypes=e??{},this.outTypes=t??{},this.inputs=n??{},this.update=s,this.globals=r,this.statements=a,this.generate=o??(({inputs:l,outputs:c,compile:u})=>{var h,d;return{globals:(h=this.globals)==null?void 0:h.call(this,{inputs:l,outputs:c,compile:u}),statements:(d=this.statements)==null?void 0:d.call(this,{inputs:l,outputs:c,compile:u})}})}get outputs(){const e={};for(const t in this.outTypes)e[t]=new Ki(this,t);return e}apply(e){return Object.assign(this.inputs,e),this.outputs}compile({inputs:e,outputs:t,compile:n}){const s=[`// ${this.constructor.name}(${Object.values(e).join(", ")}) => (${Object.values(t).join(", ")})`],r=[];for(const c in t){const u=t[c];u&&!n.declares.has(u)&&(n.declares.add(u),r.push(c))}const{globals:a,statements:o,uniforms:l}=this.generate({inputs:e,outputs:t,compile:n});for(const c of a??[])n.globals.add(c);for(const c in l)n.uniforms[c]=l[c];this.update&&n.updaters.push(this.update);for(const c of r){const u=t[c];u&&(n.uniforms[u]||s.push(`${S2(u,this.outTypes[c])};`))}return o?.length&&(s.push("{"),s.push(...o.map(c=>n.indent+c)),s.push("}")),s}}class bV extends ui{constructor({inTypes:e,outTypes:t,inputs:n,update:s,globals:r,construct:a}){super({inTypes:e,outTypes:t,inputs:n,update:s,globals:r,generate:o=>this.generateBlock(o)}),this.construct=a}generateBlock({inputs:e,outputs:t,compile:n}){var s,r;const a={},o={};for(const m in e)e[m]!=null&&(a[m]=new Gf(this.inTypes[m],e[m]));for(const m in t)t[m]!=null&&(o[m]=new Sl(this.outTypes[m]));const l={roots:[]},c=this.construct(a,o,l);for(const m of((s=this.globals)==null?void 0:s.call(this,{inputs:e,outputs:t,compile:n}))??[])n.globals.add(m);const u=[],h=new Map;function d(m,f,y){let _=h.get(m);if(!_){_={sequence:n.nextSequence(),outNames:new Map,newOuts:new Set},h.set(m,_);for(const E in m.inputs){let v=m.inputs[E];for(;v;){if(v instanceof Sl){v instanceof Ki&&d(v.dyno,v.key);break}v=v.dynoOut()}}u.push(m)}f&&(y||_.newOuts.add(f),_.outNames.set(f,y??`${f}_${_.sequence}`))}for(const m of l.roots)d(m);for(const m in o){let f=c?.[m]??o[m];for(;f;){if(f instanceof Sl){f instanceof Ki&&d(f.dyno,f.key,t[m]);break}f=f.dynoOut()}o[m]=f}const A=[];for(const m of u){const f={},y={};for(const v in m.inputs){let C=m.inputs[v];for(;C;){if(C instanceof Sl){if(C instanceof Gf)f[v]=C.getLiteral();else if(C instanceof Ki){const x=(r=h.get(C.dyno))==null?void 0:r.outNames.get(C.key);if(!x)throw new Error(`Source not found for ${C.dyno.constructor.name}.${C.key}`);f[v]=x}break}C=C.dynoOut()}}const _=h.get(m)??{outNames:new Map};for(const[v,C]of _.outNames.entries())y[v]=C;const E=m.compile({inputs:f,outputs:y,compile:n});A.push(E)}const p=[];for(const m in t)o[m]instanceof Gf&&p.push(`${t[m]} = ${o[m].getLiteral()};`);return p.length>0&&A.push(p),{statements:A.flatMap((m,f)=>f===0?m:["",...m])}}}function Ua(i,e,t,{update:n,globals:s}={}){return new bV({inTypes:i,outTypes:e,construct:t,update:n,globals:s})}function Em({inTypes:i,outTypes:e,inputs:t,update:n,globals:s,statements:r,generate:a}){return new ui({inTypes:i,outTypes:e,inputs:t,update:n,globals:s,statements:r,generate:a})}function S2(i,e,t){const n=typeof e=="string"?e:e.type;if(!n)throw new Error(`Invalid DynoType: ${String(e)}`);return`${n} ${i}${t!=null?`[${t}]`:""}`}function Or(i){var e;let t=!1;const n=i.split(`
|
|
4233
|
+
}`};function $p(i,e,t){let n=t;const s=new Q;return i.updateWorldMatrix(!0,!0),i.traverseVisible(r=>{const{geometry:a}=r;if(a!==void 0){const{position:o}=a.attributes;if(o!==void 0)for(let l=0,c=o.count;l<c;l++)r.isMesh?r.getVertexPosition(l,s):s.fromBufferAttribute(o,l),r.isSkinnedMesh||s.applyMatrix4(r.matrixWorld),n=e(n,s)}}),n}function D5(i){const e=new Map,t=new Map,n=i.clone();return d2(i,n,function(s,r){e.set(r,s),t.set(s,r)}),n.traverse(function(s){if(!s.isSkinnedMesh)return;const r=s,a=e.get(s),o=a.skeleton.bones;r.skeleton=a.skeleton.clone(),r.bindMatrix.copy(a.bindMatrix),r.skeleton.bones=o.map(function(l){return t.get(l)}),r.bind(r.skeleton,r.bindMatrix)}),n}function d2(i,e,t){t(i,e);for(let n=0;n<i.children.length;n++)d2(i.children[n],e.children[n],t)}class Q5{constructor(e,t,n,s,r){this.xrLight=e,this.renderer=t,this.lightProbe=n,this.xrWebGLBinding=null,this.estimationStartCallback=r,this.frameCallback=this.onXRFrame.bind(this);const a=t.xr.getSession();if(s&&"XRWebGLBinding"in window){const o=new HA(16);e.environment=o.texture;const l=t.getContext();switch(a.preferredReflectionFormat){case"srgba8":l.getExtension("EXT_sRGB");break;case"rgba16f":l.getExtension("OES_texture_half_float");break}this.xrWebGLBinding=new XRWebGLBinding(a,l),this.lightProbe.addEventListener("reflectionchange",()=>{this.updateReflection()})}a.requestAnimationFrame(this.frameCallback)}updateReflection(){const e=this.renderer.properties.get(this.xrLight.environment);if(e){const t=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);t&&(e.__webglTexture=t,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(e,t){if(!this.xrLight)return;t.session.requestAnimationFrame(this.frameCallback);const s=t.getLightEstimate(this.lightProbe);if(s){this.xrLight.lightProbe.sh.fromArray(s.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const r=Math.max(1,Math.max(s.primaryLightIntensity.x,Math.max(s.primaryLightIntensity.y,s.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(s.primaryLightIntensity.x/r,s.primaryLightIntensity.y/r,s.primaryLightIntensity.z/r),this.xrLight.directionalLight.intensity=r,this.xrLight.directionalLight.position.copy(s.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class L5 extends In{constructor(e,t=!0){super(),this.lightProbe=new aF,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new _b,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let n=null,s=!1;e.xr.addEventListener("sessionstart",()=>{const r=e.xr.getSession();"requestLightProbe"in r&&r.requestLightProbe({reflectionFormat:r.preferredReflectionFormat}).then(a=>{n=new Q5(this,e,a,t,()=>{s=!0,this.dispatchEvent({type:"estimationstart"})})})}),e.xr.addEventListener("sessionend",()=>{n&&(n.dispose(),n=null),s&&this.dispatchEvent({type:"estimationend"})}),this.dispose=()=>{n&&(n.dispose(),n=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}}class eA{constructor(e){this._success=e}get success(){return this._success}set success(e){this._success=e}get failed(){return!this._success}}class N5 extends eA{constructor(e=!1,t=void 0){super(e),this.__payload=t}get payload(){return this.__payload}set payload(e){this.__payload=e}}var A2=(i=>(i.Empty="entity-empty",i.Gltf="entity-mesh",i.Render="entity-render",i.Proxy="entity-proxy",i.Collider="entity-collider",i.Asset="entity-asset",i))(A2||{});class P5 extends In{constructor(){super(),this._entityType=A2.Empty}get entityType(){return this._entityType}dispose(){let e;const t=new N5(!1,e);return e=void 0,t.success=!0,t.payload=e,t}}var La=(i=>(i.GEO="geo",i.SPLAT="splat",i))(La||{});class Vp{constructor(e){this.__name=e}getName(){return this.__name}}var nr=(i=>(i.declared="declared",i.Loading="loading",i.Loaded="loaded",i.Unloaded="unloaded",i.Failed="failed",i))(nr||{}),Io=(i=>(i.None="epg-resource-none",i.Gltf="epg-resource-gltf",i.Proxy="epg-resource-gltf-proxy",i.Render="epg-resource-gltf-render",i.Splat="epg-resource-splat",i))(Io||{});class p2{constructor({id:e,uri:t,appWcRef:n}){this._loggerContext="EPG RESOURCE",this._type="epg-resource-none",this._id=crypto.randomUUID(),this._loadingProgress=0,this._state="declared",this._resource=null,e&&(this._id=e),this._appWcRef=n,this._uri=t}get id(){return this._id}get uri(){return this._uri}get loadingProgress(){return this._loadingProgress}get state(){return this._state}get isLoaded(){return this._state==="loaded"}get type(){return this._type}get resource(){return this._resource}highlight(){}updateLoadingProgress(e){this._loadingProgress=e,this._appWcRef.eventsManager.assetLoadProgress.fire({progress:e})}async load(){return window.epigraph.logger.info({title:"Loading EPG Resource. Override to define how a resource should be loaded.",contextOverride:this._loggerContext}),Promise.resolve(!0)}unload(){return this._resource={},Promise.resolve(!0)}}const F5=new Ur(-1,1,1,-1,0,1);class k5 extends fn{constructor(){super(),this.setAttribute("position",new en([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new en([0,2,0,0,2,0],2))}}const U5=new k5;class f2{constructor(e){this._mesh=new Je(U5,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,F5)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}var oi=Uint8Array,tA=Uint16Array,O5=Int32Array,g2=new oi([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),m2=new oi([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),G5=new oi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),y2=function(i,e){for(var t=new tA(31),n=0;n<31;++n)t[n]=e+=1<<i[n-1];for(var s=new O5(t[30]),n=1;n<30;++n)for(var r=t[n];r<t[n+1];++r)s[r]=r-t[n]<<5|n;return{b:t,r:s}},_2=y2(g2,2),E2=_2.b,z5=_2.r;E2[28]=258,z5[258]=28;var H5=y2(m2,0),$5=H5.b,v2=new tA(32768);for(var En=0;En<32768;++En){var Za=(En&43690)>>1|(En&21845)<<1;Za=(Za&52428)>>2|(Za&13107)<<2,Za=(Za&61680)>>4|(Za&3855)<<4,v2[En]=((Za&65280)>>8|(Za&255)<<8)>>1}var nA=function(i,e,t){for(var n=i.length,s=0,r=new tA(e);s<n;++s)i[s]&&++r[i[s]-1];var a=new tA(e);for(s=1;s<e;++s)a[s]=a[s-1]+r[s-1]<<1;var o;{o=new tA(1<<e);var l=15-e;for(s=0;s<n;++s)if(i[s])for(var c=s<<4|i[s],u=e-i[s],h=a[i[s]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)o[v2[h]>>l]=c}return o},qA=new oi(288);for(var En=0;En<144;++En)qA[En]=8;for(var En=144;En<256;++En)qA[En]=9;for(var En=256;En<280;++En)qA[En]=7;for(var En=280;En<288;++En)qA[En]=8;var b2=new oi(32);for(var En=0;En<32;++En)b2[En]=5;var V5=nA(qA,9),Y5=nA(b2,5),s0=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Js=function(i,e,t){var n=e/8|0;return(i[n]|i[n+1]<<8)>>(e&7)&t},r0=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},x2=function(i){return(i+7)/8|0},Eh=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new oi(i.subarray(e,t))},q5=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Oi=function(i,e,t){var n=new Error(e||q5[i]);if(n.code=i,Error.captureStackTrace&&Error.captureStackTrace(n,Oi),!t)throw n;return n},C2=function(i,e,t,n){var s=i.length,r=n?n.length:0;if(!s||e.f&&!e.l)return t||new oi(0);var a=!t,o=a||e.i!=2,l=e.i;a&&(t=new oi(s*3));var c=function(De){var ut=t.length;if(De>ut){var Qe=new oi(Math.max(ut*2,De));Qe.set(t),t=Qe}},u=e.f||0,h=e.p||0,d=e.b||0,A=e.l,p=e.d,g=e.m,m=e.n,f=s*8;do{if(!A){u=Js(i,h,1);var y=Js(i,h+1,3);if(h+=3,y)if(y==1)A=V5,p=Y5,g=9,m=5;else if(y==2){var C=Js(i,h,31)+257,x=Js(i,h+10,15)+4,I=C+Js(i,h+5,31)+1;h+=14;for(var b=new oi(I),w=new oi(19),S=0;S<x;++S)w[G5[S]]=Js(i,h+S*3,7);h+=x*3;for(var B=s0(w),T=(1<<B)-1,D=nA(w,B),S=0;S<I;){var P=D[Js(i,h,T)];h+=P&15;var _=P>>4;if(_<16)b[S++]=_;else{var R=0,L=0;for(_==16?(L=3+Js(i,h,3),h+=2,R=b[S-1]):_==17?(L=3+Js(i,h,7),h+=3):_==18&&(L=11+Js(i,h,127),h+=7);L--;)b[S++]=R}}var F=b.subarray(0,C),$=b.subarray(C);g=s0(F),m=s0($),A=nA(F,g),p=nA($,m)}else Oi(1);else{var _=x2(h)+4,E=i[_-4]|i[_-3]<<8,v=_+E;if(v>s){l&&Oi(0);break}o&&c(d+E),t.set(i.subarray(_,v),d),e.b=d+=E,e.p=h=v*8,e.f=u;continue}if(h>f){l&&Oi(0);break}}o&&c(d+131072);for(var J=(1<<g)-1,W=(1<<m)-1,he=h;;he=h){var R=A[r0(i,h)&J],le=R>>4;if(h+=R&15,h>f){l&&Oi(0);break}if(R||Oi(2),le<256)t[d++]=le;else if(le==256){he=h,A=null;break}else{var Z=le-254;if(le>264){var S=le-257,ne=g2[S];Z=Js(i,h,(1<<ne)-1)+E2[S],h+=ne}var G=p[r0(i,h)&W],z=G>>4;G||Oi(3),h+=G&15;var $=$5[z];if(z>3){var ne=m2[z];$+=r0(i,h)&(1<<ne)-1,h+=ne}if(h>f){l&&Oi(0);break}o&&c(d+131072);var ae=d+Z;if(d<$){var Be=r-$,fe=Math.min($,ae);for(Be+d<0&&Oi(3);d<fe;++d)t[d]=n[Be+d]}for(;d<ae;++d)t[d]=t[d-$]}}e.l=A,e.p=he,e.b=d,e.f=u,A&&(u=1,e.m=g,e.d=p,e.n=m)}while(!u);return d!=t.length&&a?Eh(t,0,d):t.subarray(0,d)},W5=new oi(0),Cr=function(i,e){return i[e]|i[e+1]<<8},er=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},a0=function(i,e){return er(i,e)+er(i,e+4)*4294967296},j5=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&Oi(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!i[t++]);return t+(e&2)},o0=(function(){function i(e,t){typeof e=="function"&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new oi(32768),this.p=new oi(0),n&&this.o.set(n)}return i.prototype.e=function(e){if(this.ondata||Oi(5),this.d&&Oi(4),!this.p.length)this.p=e;else if(e.length){var t=new oi(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},i.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=C2(this.p,this.s,this.o);this.ondata(Eh(n,t,this.s.b),this.d),this.o=Eh(n,this.s.b-32768),this.s.b=this.o.length,this.p=Eh(this.p,this.s.p/8|0),this.s.p&=7},i.prototype.push=function(e,t){this.e(e),this.c(t)},i})();function X5(i,e){return C2(i,{i:2},e&&e.out,e&&e.dictionary)}var J5=(function(){function i(e,t){this.v=1,this.r=0,o0.call(this,e,t)}return i.prototype.push=function(e,t){if(o0.prototype.e.call(this,e),this.r+=e.length,this.v){var n=this.p.subarray(this.v-1),s=n.length>3?j5(n):4;if(s>n.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-n.length);this.p=n.subarray(s),this.v=0}o0.prototype.c.call(this,t),this.s.f&&!this.s.l&&!t&&(this.v=x2(this.s.p)+9,this.s={i:0},this.o=new oi(0),this.push(new oi(0),t))},i})(),ev=typeof TextDecoder<"u"&&new TextDecoder,K5=0;try{ev.decode(W5,{stream:!0}),K5=1}catch{}var Z5=function(i){for(var e="",t=0;;){var n=i[t++],s=(n>127)+(n>223)+(n>239);if(t+s>i.length)return{s:e,r:Eh(i,t-1)};s?s==3?(n=((n&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):s&1?e+=String.fromCharCode((n&31)<<6|i[t++]&63):e+=String.fromCharCode((n&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(n)}};function eV(i,e){if(e){for(var t="",n=0;n<i.length;n+=16384)t+=String.fromCharCode.apply(null,i.subarray(n,n+16384));return t}else{if(ev)return ev.decode(i);var s=Z5(i),r=s.s,t=s.r;return t.length&&Oi(8),r}}var tV=function(i,e){return e+30+Cr(i,e+26)+Cr(i,e+28)},nV=function(i,e,t){var n=Cr(i,e+28),s=eV(i.subarray(e+46,e+46+n),!(Cr(i,e+8)&2048)),r=e+46+n,a=er(i,e+20),o=t&&a==4294967295?iV(i,r):[a,er(i,e+24),er(i,e+42)],l=o[0],c=o[1],u=o[2];return[Cr(i,e+10),l,c,s,r+Cr(i,e+30)+Cr(i,e+32),u]},iV=function(i,e){for(;Cr(i,e)!=1;e+=4+Cr(i,e+2));return[a0(i,e+12),a0(i,e+4),a0(i,e+20)]};function sV(i,e){for(var t={},n=i.length-22;er(i,n)!=101010256;--n)(!n||i.length-n>65558)&&Oi(13);var s=Cr(i,n+8);if(!s)return{};var r=er(i,n+16),a=r==4294967295||s==65535;if(a){var o=er(i,n-12);a=er(i,o)==101075792,a&&(s=er(i,o+32),r=er(i,o+48))}for(var l=e&&e.filter,c=0;c<s;++c){var u=nV(i,r,a),h=u[0],d=u[1],A=u[2],p=u[3],g=u[4],m=u[5],f=tV(i,m);r=g,(!l||l({name:p,size:d,originalSize:A,compression:h}))&&(h?h==8?t[p]=X5(i.subarray(f,f+d),{out:new oi(A)}):Oi(14,"unknown compression type "+h):t[p]=Eh(i,f,f+d))}return t}let Na;const I2=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&I2.decode();let Bd=null;function rV(){return(Bd===null||Bd.byteLength===0)&&(Bd=new Uint8Array(Na.memory.buffer)),Bd}function aV(i,e){return i=i>>>0,I2.decode(rV().subarray(i,i+e))}function oV(i,e,t,n,s,r,a,o,l,c,u,h,d){return Na.raycast_splats(i,e,t,n,s,r,a,o,l,c,u,h,d)}async function lV(i,e){if(typeof Response=="function"&&i instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(i,e)}catch(n){if(i.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const t=await i.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{const t=await WebAssembly.instantiate(i,e);return t instanceof WebAssembly.Instance?{instance:t,module:i}:t}}function cV(){const i={};return i.wbg={},i.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},i.wbg.__wbg_length_3b4f022188ae8db6=function(e){return e.length},i.wbg.__wbg_length_6ca527665d89694d=function(e){return e.length},i.wbg.__wbg_length_8cfd2c6409af88ad=function(e){return e.length},i.wbg.__wbg_new_9fee97a409b32b68=function(e){return new Uint16Array(e)},i.wbg.__wbg_new_e3b321dcfef89fc7=function(e){return new Uint32Array(e)},i.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354=function(e,t,n){return new Float32Array(e,t>>>0,n>>>0)},i.wbg.__wbg_newwithbyteoffsetandlength_f1dead44d1fc7212=function(e,t,n){return new Uint32Array(e,t>>>0,n>>>0)},i.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(e){return new Float32Array(e>>>0)},i.wbg.__wbg_set_10bad9bee0e9c58b=function(e,t,n){e.set(t,n>>>0)},i.wbg.__wbg_set_d23661d19148b229=function(e,t,n){e.set(t,n>>>0)},i.wbg.__wbg_set_f4f1f0daa30696fc=function(e,t,n){e.set(t,n>>>0)},i.wbg.__wbg_subarray_3aaeec89bb2544f0=function(e,t,n){return e.subarray(t>>>0,n>>>0)},i.wbg.__wbg_subarray_769e1e0f81bb259b=function(e,t,n){return e.subarray(t>>>0,n>>>0)},i.wbg.__wbindgen_init_externref_table=function(){const e=Na.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},i.wbg.__wbindgen_memory=function(){return Na.memory},i.wbg.__wbindgen_throw=function(e,t){throw new Error(aV(e,t))},i}function hV(i,e){return Na=i.exports,w2.__wbindgen_wasm_module=e,Bd=null,Na.__wbindgen_start(),Na}async function w2(i){if(Na!==void 0)return Na;typeof i<"u"&&(Object.getPrototypeOf(i)===Object.prototype?{module_or_path:i}=i:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof i>"u"&&(i=new URL("data:application/wasm;base64,AGFzbQEAAAABzAEeYAJ/fwF/YAJ/fwBgA39/fwF/YAF/AX9gA39/fwBgAX8AYAV/f39/fwBgA29/fwFvYAV/f39/fwF/YAFvAW9gA29vfwBgAW8Bf2AAAX9gBH9/f38AYAAAYAR/f39/AX9gA39vbwF/YAF/AW9gAAFvYAF9AX1gBn9/f39/fwBgDX19fX19fX19f29/fX0Bb2AGf39/f39/AX9gBX9/fH9/AGAEf3x/fwBgBX9/fX9/AGAEf31/fwBgBX9/fn9/AGAEf35/fwBgAn19AX0C8gQRA3diZx1fX3diZ19idWZmZXJfNjA5Y2MzZWVlNTFlZDE1OAAJA3diZxpfX3diZ19uZXdfOWZlZTk3YTQwOWIzMmI2OAAJA3diZxpfX3diZ19zZXRfZjRmMWYwZGFhMzA2OTZmYwAKA3diZx1fX3diZ19sZW5ndGhfOGNmZDJjNjQwOWFmODhhZAALA3diZzFfX3diZ19uZXd3aXRoYnl0ZW9mZnNldGFuZGx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wBCyABQRkgAkEBdmtBACACQR9HG3QhBQNAIAMgBUEddkEEcWpBEGoiBCgCACICRQ0CIAVBAXQhBSACIQMgAigCBEF4cSABRw0ACwsgAigCCCIBIAA2AgwgAiAANgIIIABBADYCGCAAIAI2AgwgACABNgIIDwsgBCAANgIAIAAgAzYCGCAAIAA2AgwgACAANgIIC/MCAQR/IwBBMGsiACQAAkACQEGQksAAKAIARQRAQaiSwAAoAgAhAUGoksAAQQA2AgAgAUUNASAAQRhqIAERBQAgAEEQaiICIABBJGopAgA3AwAgACAAKQIcNwMIIAAoAhghAUGQksAAKAIAIgMNAgJAIANFDQBBlJLAACgCACICRQ0AQZiSwAAoAgAgAkECdBBlC0GUksAAIAE2AgBBkJLAAEEBNgIAQZiSwAAgACkDCDcCAEGgksAAIABBEGopAwA3AgALIABBMGokAEGUksAADwsgAEEANgIoIABBATYCHCAAQaCHwAA2AhggAEIENwIgIABBGGpBiIjAABBDAAsgAEEoaiACKQMANwIAIAAgACkDCDcCICAAIAE2AhwgAEEBNgIYAkAgAEEYaiIBKAIARQ0AIAEoAgQiAkUNACABKAIIIAJBAnQQZQsgAEEANgIoIABBATYCHCAAQaiIwAA2AhggAEIENwIgIAFBsIjAABBDAAuoAgIDfwF+IwBBQGoiAiQAIAEoAgBBgICAgHhGBEAgASgCDCEDIAJBJGoiBEEANgIAIAJCgICAgBA3AhwgAkEwaiADKAIAIgNBCGopAgA3AwAgAkE4aiADQRBqKQIANwMAIAIgAykCADcDKCACQRxqQcCIwAAgAkEoahAYGiACQRhqIAQoAgAiAzYCACACIAIpAhwiBTcDECABQQhqIAM2AgAgASAFNwIACyABKQIAIQUgAUKAgICAEDcCACACQQhqIgMgAUEIaiIBKAIANgIAIAFBADYCAEGxk8AALQAAGiACIAU3AwBBDEEEEF0iAUUEQEEEQQwQbQALIAEgAikDADcCACABQQhqIAMoAgA2AgAgAEHgisAANgIEIAAgATYCACACQUBrJAAL0gECBH8BfiMAQSBrIgMkACABIAEgAmoiAksEQE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fyACIAAoAgAgACgCCCIDa0sEQCAAIAMgAhAlIAAoAgghAwsgACgCBCADaiABIAIQHxogACACIANqNgIIQQALTQECf0Gxk8AALQAAGiABKAIEIQIgASgCACEDQQhBBBBdIgFFBEBBBEEIEG0ACyABIAI2AgQgASADNgIAIABB8IrAADYCBCAAIAE2AgALQQEBfyACIAAoAgAgACgCCCIDa0sEQCAAIAMgAhApIAAoAgghAwsgACgCBCADaiABIAIQHxogACACIANqNgIIQQALQQEBfyMAQSBrIgIkACACQQA2AhAgAkEBNgIEIAJCBDcCCCACQS42AhwgAiAANgIYIAIgAkEYajYCACACIAEQQwALswIBA38gACgCACECIAEoAhwiAEEQcUUEQCAAQSBxRQRAIAIgARBnDwtBACEAIwBBgAFrIgQkACACKAIAIQIDQCAAIARqQf8AaiACQQ9xIgNBMHIgA0E3aiADQQpJGzoAACAAQQFrIQAgAkEQSSACQQR2IQJFDQALIABBgAFqIgJBgQFPBEAgAhA0AAsgAUHYj8AAQQIgACAEakGAAWpBACAAaxAVIARBgAFqJAAPC0EAIQAjAEGAAWsiBCQAIAIoAgAhAgNAIAAgBGpB/wBqIAJBD3EiA0EwciADQdcAaiADQQpJGzoAACAAQQFrIQAgAkEQSSACQQR2IQJFDQALIABBgAFqIgJBgQFPBEAgAhA0AAsgAUHYj8AAQQIgACAEakGAAWpBACAAaxAVIARBgAFqJAALOAACQCACQYCAxABGDQAgACACIAEoAhARAABFDQBBAQ8LIANFBEBBAA8LIAAgAyAEIAEoAgwRAgAL0AIBAX8jAEEQayIDJAAgAyABNgIMIAMgADYCCCMAQfAAayIAJAAgAEG0hsAANgIMIAAgA0EIajYCCCAAQbSGwAA2AhQgACADQQxqNgIQIABBjI7AADYCGCAAQQI2AhwCQCACKAIARQRAIABBAzYCXCAAQciOwAA2AlggAEIDNwJkIAAgAEEQaq1CgICAgLAFhDcDSCAAIABBCGqtQoCAgICwBYQ3A0AMAQsgAEEwaiACQRBqKQIANwMAIABBKGogAkEIaikCADcDACAAIAIp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MTIxMzE0MTUxNjE3MTgxOTIwMjEyMjIzMjQyNTI2MjcyODI5MzAzMTMyMzMzNDM1MzYzNzM4Mzk0MDQxNDI0MzQ0NDU0NjQ3NDg0OTUwNTE1MjUzNTQ1NTU2NTc1ODU5NjA2MTYyNjM2NDY1NjY2NzY4Njk3MDcxNzI3Mzc0NzU3Njc3Nzg3OTgwODE4MjgzODQ4NTg2ODc4ODg5OTA5MTkyOTM5NDk1OTY5Nzk4OTlyYW5nZSBzdGFydCBpbmRleCAgb3V0IG9mIHJhbmdlIGZvciBzbGljZSBvZiBsZW5ndGggAACiCBAAEgAAALQIEAAiAAAAcmFuZ2UgZW5kIGluZGV4IOgIEAAQAAAAtAgQACIAAAAAAAA/AAAAvwBBqJLAAAsBFABwCXByb2R1Y2VycwIIbGFuZ3VhZ2UBBFJ1c3QADHByb2Nlc3NlZC1ieQMFcnVzdGMdMS44My4wICg5MGIzNWE2MjMgMjAyNC0xMS0yNikGd2FscnVzBjAuMjMuMwx3YXNtLWJpbmRnZW4HMC4yLjEwMABJD3RhcmdldF9mZWF0dXJlcwQrD211dGFibGUtZ2xvYmFscysIc2lnbi1leHQrD3JlZmVyZW5jZS10eXBlcysKbXVsdGl2YWx1ZQ==",import.meta.url));const e=cV();(typeof i=="string"||typeof Request=="function"&&i instanceof Request||typeof URL=="function"&&i instanceof URL)&&(i=fetch(i));const{instance:t,module:n}=await lV(await i,e);return hV(t,n)}const Fa=-12,ka=9,uV=-30,l0=Math.exp(uV),dV=11,AV=11,on=1<<dV,Cl=1<<AV,pV=1;function fV(i){return i==="bool"||i==="bvec2"||i==="bvec3"||i==="bvec4"}function Il(i){return i==="int"||i==="ivec2"||i==="ivec3"||i==="ivec4"}function wl(i){return i==="uint"||i==="uvec2"||i==="uvec3"||i==="uvec4"}function gV(i){return i==="float"||i==="vec2"||i==="vec3"||i==="vec4"}function mV(i){return i==="mat2"||i==="mat2x2"||i==="mat2x3"||i==="mat2x4"||i==="mat3"||i==="mat3x2"||i==="mat3x3"||i==="mat3x4"||i==="mat4"||i==="mat4x2"||i==="mat4x3"||i==="mat4x4"}function QA(i){return gV(i)||mV(i)}function Bc(i){return i==="mat2"||i==="mat2x2"}function Tc(i){return i==="mat3"||i==="mat3x3"}function Mc(i){return i==="mat4"||i==="mat4x4"}function yV(i){switch(i){case"vec2":return"float";case"vec3":return"float";case"vec4":return"float";case"ivec2":return"int";case"ivec3":return"int";case"ivec4":return"int";case"uvec2":return"uint";case"uvec3":return"uint";case"uvec4":return"uint";default:throw new Error(`Invalid vector type: ${i}`)}}function _V(i){switch(i){case"vec2":case"ivec2":case"uvec2":return 2;case"vec3":case"ivec3":case"uvec3":return 3;case"vec4":case"ivec4":case"uvec4":return 4;default:throw new Error(`Invalid vector type: ${i}`)}}function qn(i){return Math.trunc(i).toString()}function Wn(i){return`${Math.max(0,Math.trunc(i)).toString()}u`}function Pt(i){return i===Number.POSITIVE_INFINITY?"INFINITY":i===Number.NEGATIVE_INFINITY?"-INFINITY":Number.isInteger(i)?i.toFixed(1):i.toString()}function Ba(i){return i instanceof Sl?i.type:i.dynoOut().type}class Sl{constructor(e){this.__isDynoValue=!0,this.type=e}}class Ki extends Sl{constructor(e,t){super(e.outTypes[t]),this.dyno=e,this.key=t}}class Gf extends Sl{constructor(e,t){super(e),this.literal=t}getLiteral(){return this.literal}}class EV extends Gf{constructor(e,t){super(e,""),this.value=t}getLiteral(){const{type:e,value:t}=this;switch(e){case"bool":return t?"true":"false";case"uint":return Wn(t);case"int":return qn(t);case"float":return Pt(t);case"bvec2":{const n=t;return`bvec2(${n[0]}, ${n[1]})`}case"uvec2":{if(t instanceof pe)return`uvec2(${Wn(t.x)}, ${Wn(t.y)})`;const n=t;return`uvec2(${Wn(n[0])}, ${Wn(n[1])})`}case"ivec2":{if(t instanceof pe)return`ivec2(${qn(t.x)}, ${qn(t.y)})`;const n=t;return`ivec2(${qn(n[0])}, ${qn(n[1])})`}case"vec2":{if(t instanceof pe)return`vec2(${Pt(t.x)}, ${Pt(t.y)})`;const n=t;return`vec2(${Pt(n[0])}, ${Pt(n[1])})`}case"bvec3":{const n=t;return`bvec3(${n[0]}, ${n[1]}, ${n[2]})`}case"uvec3":{if(t instanceof Q)return`uvec3(${Wn(t.x)}, ${Wn(t.y)}, ${Wn(t.z)})`;const n=t;return`uvec3(${Wn(n[0])}, ${Wn(n[1])}, ${Wn(n[2])})`}case"ivec3":{if(t instanceof Q)return`ivec3(${qn(t.x)}, ${qn(t.y)}, ${qn(t.z)})`;const n=t;return`ivec3(${qn(n[0])}, ${qn(n[1])}, ${qn(n[2])})`}case"vec3":{if(t instanceof Q)return`vec3(${Pt(t.x)}, ${Pt(t.y)}, ${Pt(t.z)})`;const n=t;return`vec3(${Pt(n[0])}, ${Pt(n[1])}, ${Pt(n[2])})`}case"bvec4":{const n=t;return`bvec4(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]})`}case"uvec4":{if(t instanceof Mt)return`uvec4(${Wn(t.x)}, ${Wn(t.y)}, ${Wn(t.z)}, ${Wn(t.w)})`;const n=t;return`uvec4(${Wn(n[0])}, ${Wn(n[1])}, ${Wn(n[2])}, ${Wn(n[3])})`}case"ivec4":{if(t instanceof Mt)return`ivec4(${qn(t.x)}, ${qn(t.y)}, ${qn(t.z)}, ${qn(t.w)})`;const n=t;return`ivec4(${qn(n[0])}, ${qn(n[1])}, ${qn(n[2])}, ${qn(n[3])})`}case"vec4":{if(t instanceof Mt)return`vec4(${Pt(t.x)}, ${Pt(t.y)}, ${Pt(t.z)}, ${Pt(t.w)})`;if(t instanceof Yt)return`vec4(${Pt(t.x)}, ${Pt(t.y)}, ${Pt(t.z)}, ${Pt(t.w)})`;const n=t;return`vec4(${Pt(n[0])}, ${Pt(n[1])}, ${Pt(n[2])}, ${Pt(n[3])})`}case"mat2":case"mat2x2":{const n=t,s=n instanceof Am?n.elements:t,r=new Array(4).fill(0).map((a,o)=>Pt(s[o]));return`${e}(${r.join(", ")})`}case"mat2x3":{const n=t,s=new Array(6).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat2x4":{const n=t,s=new Array(8).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat3":case"mat3x3":{const n=t,s=n instanceof pt?n.elements:t,r=new Array(9).fill(0).map((a,o)=>Pt(s[o]));return`${e}(${r.join(", ")})`}case"mat3x2":{const n=t,s=new Array(6).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat3x4":{const n=t,s=new Array(12).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat4":case"mat4x4":{const n=t,s=n instanceof We?n.elements:t,r=new Array(16).fill(0).map((a,o)=>Pt(s[o]));return`${e}(${r.join(", ")})`}case"mat4x2":{const n=t,s=new Array(8).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}case"mat4x3":{const n=t,s=new Array(12).fill(0).map((r,a)=>Pt(n[a]));return`${e}(${s.join(", ")})`}default:throw new Error(`Type not implemented: ${String(e)}`)}}}function iA(i,e){return new EV(i,e)}function Yp(i){const e=String(i);if(fV(i))return`${e}(false)`;if(QA(i))return`${e}(0.0)`;if(Il(i))return`${e}(0)`;if(wl(i))return`${e}(0u)`;throw new Error(`Type not implemented: ${e}`)}const sw=" ";class vV{constructor({indent:e}={}){this.globals=new Set,this.statements=[],this.uniforms={},this.declares=new Set,this.updaters=[],this.sequence=0,this.indent=sw,this.indent=e??sw}nextSequence(){return this.sequence++}}class ui{constructor({inTypes:e,outTypes:t,inputs:n,update:s,globals:r,statements:a,generate:o}){this.inTypes=e??{},this.outTypes=t??{},this.inputs=n??{},this.update=s,this.globals=r,this.statements=a,this.generate=o??(({inputs:l,outputs:c,compile:u})=>{var h,d;return{globals:(h=this.globals)==null?void 0:h.call(this,{inputs:l,outputs:c,compile:u}),statements:(d=this.statements)==null?void 0:d.call(this,{inputs:l,outputs:c,compile:u})}})}get outputs(){const e={};for(const t in this.outTypes)e[t]=new Ki(this,t);return e}apply(e){return Object.assign(this.inputs,e),this.outputs}compile({inputs:e,outputs:t,compile:n}){const s=[`// ${this.constructor.name}(${Object.values(e).join(", ")}) => (${Object.values(t).join(", ")})`],r=[];for(const c in t){const u=t[c];u&&!n.declares.has(u)&&(n.declares.add(u),r.push(c))}const{globals:a,statements:o,uniforms:l}=this.generate({inputs:e,outputs:t,compile:n});for(const c of a??[])n.globals.add(c);for(const c in l)n.uniforms[c]=l[c];this.update&&n.updaters.push(this.update);for(const c of r){const u=t[c];u&&(n.uniforms[u]||s.push(`${S2(u,this.outTypes[c])};`))}return o?.length&&(s.push("{"),s.push(...o.map(c=>n.indent+c)),s.push("}")),s}}class bV extends ui{constructor({inTypes:e,outTypes:t,inputs:n,update:s,globals:r,construct:a}){super({inTypes:e,outTypes:t,inputs:n,update:s,globals:r,generate:o=>this.generateBlock(o)}),this.construct=a}generateBlock({inputs:e,outputs:t,compile:n}){var s,r;const a={},o={};for(const m in e)e[m]!=null&&(a[m]=new Gf(this.inTypes[m],e[m]));for(const m in t)t[m]!=null&&(o[m]=new Sl(this.outTypes[m]));const l={roots:[]},c=this.construct(a,o,l);for(const m of((s=this.globals)==null?void 0:s.call(this,{inputs:e,outputs:t,compile:n}))??[])n.globals.add(m);const u=[],h=new Map;function d(m,f,y){let _=h.get(m);if(!_){_={sequence:n.nextSequence(),outNames:new Map,newOuts:new Set},h.set(m,_);for(const E in m.inputs){let v=m.inputs[E];for(;v;){if(v instanceof Sl){v instanceof Ki&&d(v.dyno,v.key);break}v=v.dynoOut()}}u.push(m)}f&&(y||_.newOuts.add(f),_.outNames.set(f,y??`${f}_${_.sequence}`))}for(const m of l.roots)d(m);for(const m in o){let f=c?.[m]??o[m];for(;f;){if(f instanceof Sl){f instanceof Ki&&d(f.dyno,f.key,t[m]);break}f=f.dynoOut()}o[m]=f}const A=[];for(const m of u){const f={},y={};for(const v in m.inputs){let C=m.inputs[v];for(;C;){if(C instanceof Sl){if(C instanceof Gf)f[v]=C.getLiteral();else if(C instanceof Ki){const x=(r=h.get(C.dyno))==null?void 0:r.outNames.get(C.key);if(!x)throw new Error(`Source not found for ${C.dyno.constructor.name}.${C.key}`);f[v]=x}break}C=C.dynoOut()}}const _=h.get(m)??{outNames:new Map};for(const[v,C]of _.outNames.entries())y[v]=C;const E=m.compile({inputs:f,outputs:y,compile:n});A.push(E)}const p=[];for(const m in t)o[m]instanceof Gf&&p.push(`${t[m]} = ${o[m].getLiteral()};`);return p.length>0&&A.push(p),{statements:A.flatMap((m,f)=>f===0?m:["",...m])}}}function Ua(i,e,t,{update:n,globals:s}={}){return new bV({inTypes:i,outTypes:e,construct:t,update:n,globals:s})}function Em({inTypes:i,outTypes:e,inputs:t,update:n,globals:s,statements:r,generate:a}){return new ui({inTypes:i,outTypes:e,inputs:t,update:n,globals:s,statements:r,generate:a})}function S2(i,e,t){const n=typeof e=="string"?e:e.type;if(!n)throw new Error(`Invalid DynoType: ${String(e)}`);return`${n} ${i}${t!=null?`[${t}]`:""}`}function Or(i){var e;let t=!1;const n=i.split(`
|
|
4234
4234
|
`).map(a=>{const o=a.trimEnd();return t?o:o.length>0?(t=!0,o):null}).filter(a=>a!=null);for(;n.length>0&&n[n.length-1].length===0;)n.pop();if(n.length===0)return[];const s=(e=n[0].match(/^\s*/))==null?void 0:e[0];if(!s)return n;const r=new RegExp(`^${s}`);return n.map(a=>a.replace(r,""))}function ts(i){return Or(i).join(`
|
|
4235
|
-
`)}class vm extends ui{constructor({a:e,outKey:t,outTypeFunc:n}){const s={a:Ba(e)},r=n(Ba(e)),a={[t]:r};super({inTypes:s,outTypes:a,inputs:{a:e}}),this.outKey=t}dynoOut(){return new Ki(this,this.outKey)}}class bm extends ui{constructor({a:e,b:t,outKey:n,outTypeFunc:s}){const r={a:Ba(e),b:Ba(t)},a=s(Ba(e),Ba(t)),o={[n]:a};super({inTypes:r,outTypes:o,inputs:{a:e,b:t}}),this.outKey=n}dynoOut(){return new Ki(this,this.outKey)}}const Zn={type:"Gsplat"},xm={type:"PackedSplats"},sA=(i,e)=>new CV({packedSplats:i,index:e}),xV=(i,e,t,n)=>new IV({packedSplats:i,index:e,base:t,count:n}),zf=i=>new wV({gsplat:i}),
|
|
4235
|
+
`)}class vm extends ui{constructor({a:e,outKey:t,outTypeFunc:n}){const s={a:Ba(e)},r=n(Ba(e)),a={[t]:r};super({inTypes:s,outTypes:a,inputs:{a:e}}),this.outKey=t}dynoOut(){return new Ki(this,this.outKey)}}class bm extends ui{constructor({a:e,b:t,outKey:n,outTypeFunc:s}){const r={a:Ba(e),b:Ba(t)},a=s(Ba(e),Ba(t)),o={[n]:a};super({inTypes:r,outTypes:o,inputs:{a:e,b:t}}),this.outKey=n}dynoOut(){return new Ki(this,this.outKey)}}const Zn={type:"Gsplat"},xm={type:"PackedSplats"},sA=(i,e)=>new CV({packedSplats:i,index:e}),xV=(i,e,t,n)=>new IV({packedSplats:i,index:e,base:t,count:n}),zf=i=>new wV({gsplat:i}),c0=({gsplat:i,flags:e,index:t,center:n,scales:s,quaternion:r,rgba:a,rgb:o,opacity:l,x:c,y:u,z:h,r:d,g:A,b:p})=>new SV({gsplat:i,flags:e,index:t,center:n,scales:s,quaternion:r,rgba:a,rgb:o,opacity:l,x:c,y:u,z:h,r:d,g:A,b:p}),B2=(i,{scale:e,rotate:t,translate:n,recolor:s})=>new BV({gsplat:i,scale:e,rotate:t,translate:n,recolor:s}),Gr=ts(`
|
|
4236
4236
|
struct Gsplat {
|
|
4237
4237
|
vec3 center;
|
|
4238
4238
|
uint flags;
|
|
@@ -4296,7 +4296,7 @@ ${t}}`}}let B$=class{constructor(){this.textureUtils=null}setTextureUtils(e){thi
|
|
|
4296
4296
|
} else {
|
|
4297
4297
|
${r} = uvec4(0u, 0u, 0u, 0u);
|
|
4298
4298
|
}
|
|
4299
|
-
`):[`${r} = uvec4(0u, 0u, 0u, 0u);`]}})}dynoOut(){return new Ki(this,"output")}}class RV extends ui{constructor({rgba8:e}){super({inTypes:{rgba8:"vec4"},inputs:{rgba8:e},statements:({inputs:t,outputs:n})=>[`target = ${t.rgba8??"vec4(0.0, 0.0, 0.0, 0.0)"};`]})}dynoOut(){return new Ki(this,"rgba8")}}class cr extends ui{constructor({key:e,type:t,count:n,value:s,update:r,globals:a}){e=e??"value",super({outTypes:{[e]:t},update:()=>{if(r){const o=r(this.value);o!==void 0&&(this.value=o)}this.uniform.value=this.value},generate:({inputs:o,outputs:l})=>{const c=a?.({inputs:o,outputs:l})??[],u={},h=l[e];return h&&(c.push(`uniform ${S2(h,t,n)};`),u[h]=this.uniform),{globals:c,uniforms:u}}}),this.type=t,this.count=n,this.value=s,this.uniform={value:s},this.outKey=e}dynoOut(){return new Ki(this,this.outKey)}}class rw extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"bool",value:t,update:n})}}class tv extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"int",value:t,update:n})}}class LA extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"float",value:t,update:n})}}class
|
|
4299
|
+
`):[`${r} = uvec4(0u, 0u, 0u, 0u);`]}})}dynoOut(){return new Ki(this,"output")}}class RV extends ui{constructor({rgba8:e}){super({inTypes:{rgba8:"vec4"},inputs:{rgba8:e},statements:({inputs:t,outputs:n})=>[`target = ${t.rgba8??"vec4(0.0, 0.0, 0.0, 0.0)"};`]})}dynoOut(){return new Ki(this,"rgba8")}}class cr extends ui{constructor({key:e,type:t,count:n,value:s,update:r,globals:a}){e=e??"value",super({outTypes:{[e]:t},update:()=>{if(r){const o=r(this.value);o!==void 0&&(this.value=o)}this.uniform.value=this.value},generate:({inputs:o,outputs:l})=>{const c=a?.({inputs:o,outputs:l})??[],u={},h=l[e];return h&&(c.push(`uniform ${S2(h,t,n)};`),u[h]=this.uniform),{globals:c,uniforms:u}}}),this.type=t,this.count=n,this.value=s,this.uniform={value:s},this.outKey=e}dynoOut(){return new Ki(this,this.outKey)}}class rw extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"bool",value:t,update:n})}}class tv extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"int",value:t,update:n})}}class LA extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"float",value:t,update:n})}}class h0 extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"vec2",value:t,update:n})}}class kg extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"vec3",value:t,update:n})}}class Cm extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"vec4",value:t,update:n})}}class u0 extends cr{constructor({key:e,value:t,update:n}){super({key:e,type:"usampler2DArray",value:t,update:n})}}const Fb=new Float32Array(1),M2=new Uint32Array(Fb.buffer),kb="Float16Array"in globalThis,Ug=kb?new globalThis.Float16Array(1):null,R2=new Uint16Array(Ug?.buffer),d0=kb?DV:QV,A0=kb?LV:NV;function DV(i){return Ug[0]=i,R2[0]}function QV(i){Fb[0]=i;const e=M2[0],t=e>>31&1,n=e>>23&255,s=e&8388607,r=t<<15;if(n===255)return s!==0?r|32767:r|31744;const a=n-127+15;if(a>=31)return r|31744;if(a<=0){if(a<-10)return r;const l=(s|8388608)>>1-a+13;return r|l}const o=s>>13;return r|a<<10|o}function LV(i){return R2[0]=i,Ug[0]}function NV(i){const e=i>>15&1,t=i>>10&31,n=i&1023;let s;if(t===0)if(n===0)s=e<<31;else{let r=n,a=-14;for(;(r&1024)===0;)r<<=1,a--;r&=1023;const o=a+127,l=r<<13;s=e<<31|o<<23|l}else if(t===31)n===0?s=e<<31|2139095040:s=e<<31|2143289344;else{const r=t-15+127,a=n<<13;s=e<<31|r<<23|a}return M2[0]=s,Fb[0]}function qp(i){return Math.max(0,Math.min(255,Math.round(i*255)))}function PV(i){const e=[],t=new Set;function n(s){s&&typeof s=="object"&&!t.has(s)&&(t.add(s),s instanceof ArrayBuffer?e.push(s):ArrayBuffer.isView(s)?e.push(s.buffer):Array.isArray(s)?s.forEach(n):Object.values(s).forEach(n))}return n(i),e}class FV{constructor({allocate:e,dispose:t,valid:n}){this.items=[],this.allocate=e,this.dispose=t,this.valid=n}alloc(e){for(;;){const t=this.items.pop();if(!t)break;if(this.valid(t,e))return t;this.dispose&&this.dispose(t)}return this.allocate(e)}free(e){this.items.push(e)}disposeAll(){let e;for(e=this.items.pop();e;)this.dispose&&this.dispose(e),e=this.items.pop()}}function aw(i,e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m){const f=m?.rgbMin??0,_=(m?.rgbMax??1)-f,E=qp((A-f)/_),v=qp((p-f)/_),C=qp((g-f)/_),x=qp(d),I=XV(kV.set(l,c,u,h)),b=I&255,w=I>>>8&255,S=I>>>16&255,B=m?.lnScaleMin??Fa,D=254/((m?.lnScaleMax??ka)-B),P=r<l0?0:Math.min(255,Math.max(1,Math.round((Math.log(r)-B)*D)+1)),R=a<l0?0:Math.min(255,Math.max(1,Math.round((Math.log(a)-B)*D)+1)),L=o<l0?0:Math.min(255,Math.max(1,Math.round((Math.log(o)-B)*D)+1)),F=d0(t),$=d0(n),J=d0(s),W=e*4;i[W]=E|v<<8|C<<16|x<<24,i[W+1]=F|$<<16,i[W+2]=J|b<<16|w<<24,i[W+3]=P|R<<8|L<<16|S<<24}const kV=new Yt,UV=new Q,OV=new Q,GV=new Yt,zV=new we,HV={center:UV,scales:OV,quaternion:GV,color:zV,opacity:0};function ow(i,e,t){const n=HV,s=e*4,r=i[s],a=i[s+1],o=i[s+2],l=i[s+3],c=t?.rgbMin??0,h=(t?.rgbMax??1)-c;n.color.set(c+(r&255)/255*h,c+(r>>>8&255)/255*h,c+(r>>>16&255)/255*h),n.opacity=(r>>>24&255)/255,n.center.set(A0(a&65535),A0(a>>>16&65535),A0(o&65535));const d=t?.lnScaleMin??Fa,p=((t?.lnScaleMax??ka)-d)/254,g=l&255;n.scales.x=g===0?0:Math.exp(d+(g-1)*p);const m=l>>>8&255;n.scales.y=m===0?0:Math.exp(d+(m-1)*p);const f=l>>>16&255;n.scales.z=f===0?0:Math.exp(d+(f-1)*p);const y=o>>>16&65535|l>>>8&16711680;return JV(y,n.quaternion),n}function Ps(i){const e=on,t=Math.max(pV,Math.min(Cl,Math.ceil(i/e))),n=Math.ceil(i/(e*t)),s=e*t*n;return{width:e,height:t,depth:n,maxSplats:s}}function $V(i){const e=new dm(i.autoStart);return e.startTime=i.startTime,e.oldTime=i.oldTime,e.elapsedTime=i.elapsedTime,e.running=i.running,e}const VV=ts(`
|
|
4300
4300
|
precision highp float;
|
|
4301
4301
|
|
|
4302
4302
|
in vec3 position;
|
|
@@ -4586,7 +4586,7 @@ void main() {
|
|
|
4586
4586
|
);
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
|
-
`)}}).outputs.gsplat}const Rc=new Float32Array(1);class D8{constructor(e){this.modifier=e,this.cache=new Map}apply(e){let t=this.cache.get(e);return t||(t=Ua({index:"int"},{gsplat:Zn},({index:n})=>{const{gsplat:s}=e.apply({index:n});return this.modifier.apply({gsplat:s})}),this.cache.set(e,t)),t}}class Wp{constructor(){this.scale=new LA({value:Number.NEGATIVE_INFINITY}),this.rotate=new Cm({value:new Yt(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}),this.translate=new kg({value:new Q(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)})}apply(e){return E8(e,{scale:this.scale,rotate:this.rotate,translate:this.translate})}applyDir(e){return v8(e,{rotate:this.rotate})}applyGsplat(e){return B2(e,{scale:this.scale,rotate:this.rotate,translate:this.translate})}updateFromMatrix(e){const t=new Q,n=new Yt,s=new Q;e.decompose(s,n,t);const r=(t.x+t.y+t.z)/3;let a=!1;return r!==this.scale.value&&(this.scale.value=r,a=!0),s.equals(this.translate.value)||(this.translate.value.copy(s),a=!0),n.equals(this.rotate.value)||(this.rotate.value.copy(n),a=!0),a}update(e){return e.updateMatrixWorld(),this.updateFromMatrix(e.matrixWorld)}}class sv extends Rt{constructor({numSplats:e,generator:t,construct:n,update:s}){if(super(),this.numSplats=e??0,this.generator=t,this.frameUpdate=s,this.version=0,n){const r=n(this);Object.assign(this,r)}}updateVersion(){this.version+=1}set needsUpdate(e){e&&this.updateVersion()}}const NA=class rv extends sv{constructor(e={}){const t=new Wp,n=new Wp,s=new Wp,r=new Wp,a=new Cm({value:new Mt(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)}),o=new LA({value:0}),l=new LA({value:0}),c={transform:t,viewToWorld:n,worldToView:s,viewToObject:r,recolor:a,time:o,deltaTime:l};if(super({update:({time:u,deltaTime:h,viewToWorld:d,globalEdits:A})=>this.update({time:u,deltaTime:h,viewToWorld:d,globalEdits:A})}),this.isInitialized=!1,this.recolor=new we(1,1,1),this.opacity=1,this.enableViewToObject=!1,this.enableViewToWorld=!1,this.enableWorldToView=!1,this.skinning=null,this.edits=null,this.rgbaDisplaceEdits=null,this.splatRgba=null,this.maxSh=3,this.packedSplats=e.packedSplats??new Yl,this.packedSplats.splatEncoding=e.splatEncoding??{...wm},this.numSplats=this.packedSplats.numSplats,this.editable=e.editable??!0,this.onFrame=e.onFrame,this.context=c,this.objectModifier=e.objectModifier,this.worldModifier=e.worldModifier,this.updateGenerator(),e.url||e.fileBytes||e.constructSplats||e.packedSplats&&!e.packedSplats.isInitialized)this.initialized=this.asyncInitialize(e).then(async()=>{if(this.updateGenerator(),this.isInitialized=!0,e.onLoad){const u=e.onLoad(this);u instanceof Promise&&await u}return this});else if(this.isInitialized=!0,this.initialized=Promise.resolve(this),e.onLoad){const u=e.onLoad(this);u instanceof Promise&&(this.initialized=u.then(()=>this))}this.add(G8())}async asyncInitialize(e){const{url:t,fileBytes:n,fileType:s,fileName:r,maxSplats:a,constructSplats:o,splatEncoding:l}=e;if(t||n||o){const c={url:t,fileBytes:n,fileType:s,fileName:r,maxSplats:a,construct:o,splatEncoding:l};this.packedSplats.reinitialize(c)}this.packedSplats&&(await this.packedSplats.initialized,this.numSplats=this.packedSplats.numSplats,this.updateGenerator())}static async staticInitialize(){await w2(),rv.isStaticInitialized=!0}pushSplat(e,t,n,s,r){this.packedSplats.pushSplat(e,t,n,s,r)}forEachSplat(e){this.packedSplats.forEachSplat(e)}dispose(){this.packedSplats.dispose()}getBoundingBox(e=!0){if(!this.initialized)throw new Error("Cannot get bounding box before SplatMesh is initialized");const t=new Q(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),n=new Q(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),s=new Q,r=[-1,1];return this.packedSplats.forEachSplat((o,l,c,u,h,d)=>{if(e)t.min(l),n.max(l);else for(const A of r)for(const p of r)for(const g of r)s.set(A*c.x,p*c.y,g*c.z),s.applyQuaternion(u),s.add(l),t.min(s),n.max(s)}),new Rn(t,n)}constructGenerator(e){const{transform:t,viewToObject:n,recolor:s}=e,r=Ua({index:"int"},{gsplat:Zn},({index:a})=>{if(!a)throw new Error("index is undefined");let o=sA(this.packedSplats.dyno,a);if(this.maxSh>=1){const{sh1Texture:c,sh2Texture:u,sh3Texture:h}=this.ensureShTextures();if(c){let d=function(_,E){const{x:v,y:C}=u8(E).outputs,x=Td(yl(v,C),iA("float",.5)),I=Td(cw(C,v),iA("float",.5));return yl(x,Td(_,I))};const A=n.translate,{center:p}=zf(o).outputs,g=h8(cw(p,A)),m=P8(o,c,g);let f=d(m,this.packedSplats.dynoSh1MinMax);if(this.maxSh>=2&&u){const _=F8(o,u,g);f=yl(f,d(_,this.packedSplats.dynoSh2MinMax))}if(this.maxSh>=3&&h){const _=k8(o,h,g);f=yl(f,d(_,this.packedSplats.dynoSh3MinMax))}let{rgba:y}=zf(o).outputs;y=yl(y,A8(f,iA("float",0))),o=
|
|
4589
|
+
`)}}).outputs.gsplat}const Rc=new Float32Array(1);class D8{constructor(e){this.modifier=e,this.cache=new Map}apply(e){let t=this.cache.get(e);return t||(t=Ua({index:"int"},{gsplat:Zn},({index:n})=>{const{gsplat:s}=e.apply({index:n});return this.modifier.apply({gsplat:s})}),this.cache.set(e,t)),t}}class Wp{constructor(){this.scale=new LA({value:Number.NEGATIVE_INFINITY}),this.rotate=new Cm({value:new Yt(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}),this.translate=new kg({value:new Q(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)})}apply(e){return E8(e,{scale:this.scale,rotate:this.rotate,translate:this.translate})}applyDir(e){return v8(e,{rotate:this.rotate})}applyGsplat(e){return B2(e,{scale:this.scale,rotate:this.rotate,translate:this.translate})}updateFromMatrix(e){const t=new Q,n=new Yt,s=new Q;e.decompose(s,n,t);const r=(t.x+t.y+t.z)/3;let a=!1;return r!==this.scale.value&&(this.scale.value=r,a=!0),s.equals(this.translate.value)||(this.translate.value.copy(s),a=!0),n.equals(this.rotate.value)||(this.rotate.value.copy(n),a=!0),a}update(e){return e.updateMatrixWorld(),this.updateFromMatrix(e.matrixWorld)}}class sv extends Rt{constructor({numSplats:e,generator:t,construct:n,update:s}){if(super(),this.numSplats=e??0,this.generator=t,this.frameUpdate=s,this.version=0,n){const r=n(this);Object.assign(this,r)}}updateVersion(){this.version+=1}set needsUpdate(e){e&&this.updateVersion()}}const NA=class rv extends sv{constructor(e={}){const t=new Wp,n=new Wp,s=new Wp,r=new Wp,a=new Cm({value:new Mt(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)}),o=new LA({value:0}),l=new LA({value:0}),c={transform:t,viewToWorld:n,worldToView:s,viewToObject:r,recolor:a,time:o,deltaTime:l};if(super({update:({time:u,deltaTime:h,viewToWorld:d,globalEdits:A})=>this.update({time:u,deltaTime:h,viewToWorld:d,globalEdits:A})}),this.isInitialized=!1,this.recolor=new we(1,1,1),this.opacity=1,this.enableViewToObject=!1,this.enableViewToWorld=!1,this.enableWorldToView=!1,this.skinning=null,this.edits=null,this.rgbaDisplaceEdits=null,this.splatRgba=null,this.maxSh=3,this.packedSplats=e.packedSplats??new Yl,this.packedSplats.splatEncoding=e.splatEncoding??{...wm},this.numSplats=this.packedSplats.numSplats,this.editable=e.editable??!0,this.onFrame=e.onFrame,this.context=c,this.objectModifier=e.objectModifier,this.worldModifier=e.worldModifier,this.updateGenerator(),e.url||e.fileBytes||e.constructSplats||e.packedSplats&&!e.packedSplats.isInitialized)this.initialized=this.asyncInitialize(e).then(async()=>{if(this.updateGenerator(),this.isInitialized=!0,e.onLoad){const u=e.onLoad(this);u instanceof Promise&&await u}return this});else if(this.isInitialized=!0,this.initialized=Promise.resolve(this),e.onLoad){const u=e.onLoad(this);u instanceof Promise&&(this.initialized=u.then(()=>this))}this.add(G8())}async asyncInitialize(e){const{url:t,fileBytes:n,fileType:s,fileName:r,maxSplats:a,constructSplats:o,splatEncoding:l}=e;if(t||n||o){const c={url:t,fileBytes:n,fileType:s,fileName:r,maxSplats:a,construct:o,splatEncoding:l};this.packedSplats.reinitialize(c)}this.packedSplats&&(await this.packedSplats.initialized,this.numSplats=this.packedSplats.numSplats,this.updateGenerator())}static async staticInitialize(){await w2(),rv.isStaticInitialized=!0}pushSplat(e,t,n,s,r){this.packedSplats.pushSplat(e,t,n,s,r)}forEachSplat(e){this.packedSplats.forEachSplat(e)}dispose(){this.packedSplats.dispose()}getBoundingBox(e=!0){if(!this.initialized)throw new Error("Cannot get bounding box before SplatMesh is initialized");const t=new Q(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),n=new Q(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),s=new Q,r=[-1,1];return this.packedSplats.forEachSplat((o,l,c,u,h,d)=>{if(e)t.min(l),n.max(l);else for(const A of r)for(const p of r)for(const g of r)s.set(A*c.x,p*c.y,g*c.z),s.applyQuaternion(u),s.add(l),t.min(s),n.max(s)}),new Rn(t,n)}constructGenerator(e){const{transform:t,viewToObject:n,recolor:s}=e,r=Ua({index:"int"},{gsplat:Zn},({index:a})=>{if(!a)throw new Error("index is undefined");let o=sA(this.packedSplats.dyno,a);if(this.maxSh>=1){const{sh1Texture:c,sh2Texture:u,sh3Texture:h}=this.ensureShTextures();if(c){let d=function(_,E){const{x:v,y:C}=u8(E).outputs,x=Td(yl(v,C),iA("float",.5)),I=Td(cw(C,v),iA("float",.5));return yl(x,Td(_,I))};const A=n.translate,{center:p}=zf(o).outputs,g=h8(cw(p,A)),m=P8(o,c,g);let f=d(m,this.packedSplats.dynoSh1MinMax);if(this.maxSh>=2&&u){const _=F8(o,u,g);f=yl(f,d(_,this.packedSplats.dynoSh2MinMax))}if(this.maxSh>=3&&h){const _=k8(o,h,g);f=yl(f,d(_,this.packedSplats.dynoSh3MinMax))}let{rgba:y}=zf(o).outputs;y=yl(y,A8(f,iA("float",0))),o=c0({gsplat:o,rgba:y})}}if(this.splatRgba){const c=w8(this.splatRgba.dyno,a);o=c0({gsplat:o,rgba:c})}this.skinning&&(o=this.skinning.modify(o)),this.objectModifier&&(o=this.objectModifier.apply({gsplat:o}).gsplat),o=t.applyGsplat(o);const l=Td(s,zf(o).outputs.rgba);return o=c0({gsplat:o,rgba:l}),this.rgbaDisplaceEdits&&(o=this.rgbaDisplaceEdits.modify(o)),this.worldModifier&&(o=this.worldModifier.apply({gsplat:o}).gsplat),{gsplat:o}});this.generator=r}updateGenerator(){this.constructGenerator(this.context)}update({time:e,viewToWorld:t,deltaTime:n,globalEdits:s}){var r;this.numSplats=this.packedSplats.numSplats,this.context.time.value=e,this.context.deltaTime.value=n,rv.dynoTime.value=e;const{transform:a,viewToObject:o,recolor:l}=this.context;let c=a.update(this);this.context.viewToWorld.updateFromMatrix(t)&&this.enableViewToWorld&&(c=!0);const u=t.clone().invert();this.context.worldToView.updateFromMatrix(u)&&this.enableWorldToView&&(c=!0);const A=new We().compose(a.translate.value,a.rotate.value,new Q().setScalar(a.scale.value)).invert().multiply(t);o.updateFromMatrix(A)&&(this.enableViewToObject||this.packedSplats.extra.sh1)&&(c=!0);const p=new Mt(this.recolor.r,this.recolor.g,this.recolor.b,this.opacity);p.equals(l.value)||(l.value.copy(p),c=!0);const g=this.editable?(this.edits??[]).concat(s):[];this.editable&&!this.edits&&this.traverseVisible(f=>{f instanceof O2&&g.push(f)}),g.sort((f,y)=>f.ordering-y.ordering);const m=g.map(f=>{if(f.sdfs!=null)return{edit:f,sdfs:f.sdfs};const y=[];return f.traverseVisible(_=>{_ instanceof T8&&y.push(_)}),{edit:f,sdfs:y}});if(m.length>0&&!this.rgbaDisplaceEdits){const f=m.length,y=m.reduce((_,E)=>_+E.sdfs.length,0);this.rgbaDisplaceEdits=new M8({maxEdits:f,maxSdfs:y}),this.updateGenerator()}if(this.rgbaDisplaceEdits){const f=this.rgbaDisplaceEdits.update(m);c||(c=f.updated),f.dynoUpdated&&this.updateGenerator()}c&&this.updateVersion(),(r=this.onFrame)==null||r.call(this,{mesh:this,time:e,deltaTime:n})}raycast(e,t){var n,s;if(!this.packedSplats.packedArray||!this.packedSplats.numSplats)return;const{near:r,far:a,ray:o}=e,l=this.matrixWorld.clone().invert(),c=new pt().setFromMatrix4(l),u=o.origin.clone().applyMatrix4(l),h=o.direction.clone().applyMatrix3(c),d=new Q;l.decompose(new Q,new Yt,d),(d.x*d.y*d.z)**(1/3);const p=oV(u.x,u.y,u.z,h.x,h.y,h.z,r,a,this.packedSplats.numSplats,this.packedSplats.packedArray,!0,((n=this.packedSplats.splatEncoding)==null?void 0:n.lnScaleMin)??Fa,((s=this.packedSplats.splatEncoding)==null?void 0:s.lnScaleMax)??ka);for(const g of p){const m=o.direction.clone().multiplyScalar(g).add(o.origin);t.push({distance:g,point:m,object:this})}}ensureShTextures(){if(!this.packedSplats.extra.sh1)return{};let e=this.packedSplats.extra.sh1Texture;if(!e){let s=this.packedSplats.extra.sh1;const{width:r,height:a,depth:o,maxSplats:l}=Ps(s.length/2);if(s.length<l*2){const u=new Uint32Array(l*2);u.set(s),this.packedSplats.extra.sh1=u,s=u}const c=new Tr(s,r,a,o);c.format=om,c.type=ci,c.internalFormat="RG32UI",c.needsUpdate=!0,e=new u0({value:c,key:"sh1"}),this.packedSplats.extra.sh1Texture=e}if(!this.packedSplats.extra.sh2)return{sh1Texture:e};let t=this.packedSplats.extra.sh2Texture;if(!t){let s=this.packedSplats.extra.sh2;const{width:r,height:a,depth:o,maxSplats:l}=Ps(s.length/4);if(s.length<l*4){const u=new Uint32Array(l*4);u.set(s),this.packedSplats.extra.sh2=u,s=u}const c=new Tr(s,r,a,o);c.format=Ra,c.type=ci,c.internalFormat="RGBA32UI",c.needsUpdate=!0,t=new u0({value:c,key:"sh2"}),this.packedSplats.extra.sh2Texture=t}if(!this.packedSplats.extra.sh3)return{sh1Texture:e,sh2Texture:t};let n=this.packedSplats.extra.sh3Texture;if(!n){let s=this.packedSplats.extra.sh3;const{width:r,height:a,depth:o,maxSplats:l}=Ps(s.length/4);if(s.length<l*4){const u=new Uint32Array(l*4);u.set(s),this.packedSplats.extra.sh3=u,s=u}const c=new Tr(s,r,a,o);c.format=Ra,c.type=ci,c.internalFormat="RGBA32UI",c.needsUpdate=!0,n=new u0({value:c,key:"sh3"}),this.packedSplats.extra.sh3Texture=n}return{sh1Texture:e,sh2Texture:t,sh3Texture:n}}};NA.staticInitialized=NA.staticInitialize();NA.isStaticInitialized=!1;NA.dynoTime=new LA({value:0});let Wh=NA;const Q8=ts(`
|
|
4590
4590
|
vec3 evaluateSH1(Gsplat gsplat, usampler2DArray sh1, vec3 viewDir) {
|
|
4591
4591
|
// Extract sint7 values packed into 2 x uint32
|
|
4592
4592
|
uvec2 packed = texelFetch(sh1, splatTexCoord(gsplat.index), 0).rg;
|
|
@@ -12331,7 +12331,7 @@ void main() {
|
|
|
12331
12331
|
} else {
|
|
12332
12332
|
target = uvec4(0u, 0u, 0u, 0u);
|
|
12333
12333
|
}
|
|
12334
|
-
}`;const wm={rgbMin:0,rgbMax:1,lnScaleMin:Fa,lnScaleMax:ka,sh1Min:-1,sh1Max:1,sh2Min:-1,sh2Max:1,sh3Min:-1,sh3Max:1},WA=class Ci{constructor(e={}){this.maxSplats=0,this.numSplats=0,this.packedArray=null,this.isInitialized=!1,this.target=null,this.source=null,this.needsUpdate=!0,this.extra={},this.dyno=new Gb({packedSplats:this}),this.dynoRgbMinMaxLnScaleMinMax=new Cm({key:"rgbMinMaxLnScaleMinMax",value:new Mt(0,1,Fa,ka),update:t=>{var n,s,r,a;return t.set(((n=this.splatEncoding)==null?void 0:n.rgbMin)??0,((s=this.splatEncoding)==null?void 0:s.rgbMax)??1,((r=this.splatEncoding)==null?void 0:r.lnScaleMin)??Fa,((a=this.splatEncoding)==null?void 0:a.lnScaleMax)??ka),t}}),this.dynoSh1MinMax=new h_({key:"sh1MinMax",value:new pe(-1,1),update:t=>{var n,s;return t.set(((n=this.splatEncoding)==null?void 0:n.sh1Min)??-1,((s=this.splatEncoding)==null?void 0:s.sh1Max)??1),t}}),this.dynoSh2MinMax=new h_({key:"sh2MinMax",value:new pe(-1,1),update:t=>{var n,s;return t.set(((n=this.splatEncoding)==null?void 0:n.sh2Min)??-1,((s=this.splatEncoding)==null?void 0:s.sh2Max)??1),t}}),this.dynoSh3MinMax=new h_({key:"sh3MinMax",value:new pe(-1,1),update:t=>{var n,s;return t.set(((n=this.splatEncoding)==null?void 0:n.sh3Min)??-1,((s=this.splatEncoding)==null?void 0:s.sh3Max)??1),t}}),this.initialized=Promise.resolve(this),this.reinitialize(e)}reinitialize(e){this.isInitialized=!1,this.extra={},this.splatEncoding=e.splatEncoding,e.url||e.fileBytes||e.construct?this.initialized=this.asyncInitialize(e).then(()=>(this.isInitialized=!0,this)):(this.initialize(e),this.isInitialized=!0,this.initialized=Promise.resolve(this))}initialize(e){e.packedArray?(this.packedArray=e.packedArray,this.maxSplats=Math.floor(this.packedArray.length/4),this.maxSplats=Math.floor(this.maxSplats/on)*on,this.numSplats=Math.min(this.maxSplats,e.numSplats??Number.POSITIVE_INFINITY)):(this.maxSplats=e.maxSplats??0,this.numSplats=0),this.extra=e.extra??{}}async asyncInitialize(e){const{url:t,fileBytes:n,construct:s}=e;if(t){const r=new j2;r.packedSplats=this,await r.loadAsync(t)}else if(n){const r=await J2({input:n,fileType:e.fileType,pathOrUrl:e.fileName??t,splatEncoding:e.splatEncoding??wm});this.initialize(r)}if(s){const r=s(this);r instanceof Promise&&await r}}dispose(){this.target&&(this.target.dispose(),this.target=null),this.source&&(this.source.dispose(),this.source=null)}ensureSplats(e){const t=e<=this.maxSplats?this.maxSplats:Math.max(e,2*this.maxSplats),n=this.packedArray?this.packedArray.length/4:0;if(!this.packedArray||t>n){this.maxSplats=Ps(t).maxSplats;const s=new Uint32Array(this.maxSplats*4);this.packedArray&&s.set(this.packedArray),this.packedArray=s}return this.packedArray}ensureSplatsSh(e,t){let n,s;if(e===0)return this.ensureSplats(t);if(e===1)n=2,s="sh1";else if(e===2)n=4,s="sh2";else if(e===3)n=4,s="sh3";else throw new Error(`Invalid level: ${e}`);let r=this.extra[s]?this.extra[s].length/n:0;const a=t<=r?r:Math.max(t,2*r);if(!this.extra[s]||a>r){r=Ps(a).maxSplats;const o=new Uint32Array(r*n);this.extra[s]&&o.set(this.extra[s]),this.extra[s]=o}return this.extra[s]}getSplat(e){if(!this.packedArray||e>=this.numSplats)throw new Error("Invalid index");return ow(this.packedArray,e,this.splatEncoding)}setSplat(e,t,n,s,r,a){const o=this.ensureSplats(e+1);aw(o,e,t.x,t.y,t.z,n.x,n.y,n.z,s.x,s.y,s.z,s.w,r,a.r,a.g,a.b),this.numSplats=Math.max(this.numSplats,e+1)}pushSplat(e,t,n,s,r){const a=this.ensureSplats(this.numSplats+1);aw(a,this.numSplats,e.x,e.y,e.z,t.x,t.y,t.z,n.x,n.y,n.z,n.w,s,r.r,r.g,r.b),++this.numSplats}forEachSplat(e){if(!(!this.packedArray||!this.numSplats))for(let t=0;t<this.numSplats;++t){const n=ow(this.packedArray,t,this.splatEncoding);e(t,n.center,n.scales,n.quaternion,n.opacity,n.color)}}ensureGenerate(e){if(this.target&&(e??1)<=this.maxSplats)return!1;this.dispose();const t=Ps(e??1),{width:n,height:s,depth:r}=t;return this.maxSplats=t.maxSplats,this.target=new IM(n,s,r,{depthBuffer:!1,stencilBuffer:!1,generateMipmaps:!1,magFilter:jt,minFilter:jt}),this.target.texture.format=Ra,this.target.texture.type=ci,this.target.texture.internalFormat="RGBA32UI",this.target.scissorTest=!0,!0}generateMapping(e){let t=0;const n=e.map(s=>{const r=t,a=Math.ceil(s/on)*on;return t+=a,{base:r,count:s}});return{maxSplats:t,mapping:n}}getTexture(){return this.target?this.target.texture:this.source||this.packedArray?this.maybeUpdateSource():Ci.getEmpty()}maybeUpdateSource(){if(!this.packedArray)throw new Error("No packed splats");if(this.needsUpdate||!this.source){if(this.needsUpdate=!1,this.source){const{width:e,height:t,depth:n}=this.source.image;this.maxSplats!==e*t*n&&(this.source.dispose(),this.source=null)}if(this.source)this.packedArray.buffer!==this.source.image.data.buffer&&(this.source.image.data=new Uint8Array(this.packedArray.buffer));else{const{width:e,height:t,depth:n}=Ps(this.maxSplats);this.source=new Tr(this.packedArray,e,t,n),this.source.format=Ra,this.source.type=ci,this.source.internalFormat="RGBA32UI",this.source.needsUpdate=!0}this.source.needsUpdate=!0}return this.source}static getEmpty(){if(!Ci.emptySource){const{width:e,height:t,depth:n,maxSplats:s}=Ps(1),r=new Uint32Array(s*4);Ci.emptySource=new Tr(r,e,t,n),Ci.emptySource.format=Ra,Ci.emptySource.type=ci,Ci.emptySource.internalFormat="RGBA32UI",Ci.emptySource.needsUpdate=!0}return Ci.emptySource}prepareProgramMaterial(e){let t=Ci.generatorProgram.get(e);if(!t){const s=Ua({index:"int"},{output:"uvec4"},({index:r})=>{e.inputs.index=r;const a=e.outputs.gsplat;return{output:TV(a,this.dynoRgbMinMaxLnScaleMinMax)}});Ci.programTemplate||(Ci.programTemplate=new Q2(a6)),t=new D2({graph:s,inputs:{index:"index"},outputs:{output:"target"},template:Ci.programTemplate}),Object.assign(t.uniforms,{targetLayer:{value:0},targetBase:{value:0},targetCount:{value:0}}),Ci.generatorProgram.set(e,t)}const n=t.prepareMaterial();return Ci.fullScreenQuad.material=n,{program:t,material:n}}saveRenderState(e){return{xrEnabled:e.xr.enabled,autoClear:e.autoClear}}resetRenderState(e,t){e.setRenderTarget(null),e.xr.enabled=t.xrEnabled,e.autoClear=t.autoClear}generate({generator:e,base:t,count:n,renderer:s}){if(!this.target)throw new Error("Target must be initialized with ensureSplats");if(t+n>this.maxSplats)throw new Error("Base + count exceeds maxSplats");const{program:r,material:a}=this.prepareProgramMaterial(e);r.update();const o=this.saveRenderState(s),l=Math.ceil((t+n)/on)*on,c=on*Cl;for(a.uniforms.targetBase.value=t,a.uniforms.targetCount.value=n;t<l;){const u=Math.floor(t/c);a.uniforms.targetLayer.value=u;const h=u*c,d=Math.floor((t-h)/on),A=Math.min(Cl,Math.ceil((l-h)/on));this.target.scissor.set(0,d,on,A-d),s.setRenderTarget(this.target,u),s.xr.enabled=!1,s.autoClear=!1,Ci.fullScreenQuad.render(s),t+=on*(A-d)}return this.resetRenderState(s,o),{nextBase:l}}};WA.emptySource=null;WA.programTemplate=null;WA.generatorProgram=new Map;WA.fullScreenQuad=new f2(new hm({visible:!1}));let Yl=WA;class Gb extends cr{constructor({packedSplats:e}={}){super({key:"packedSplats",type:xm,globals:()=>[Pb],value:{texture:Yl.getEmpty(),numSplats:0,rgbMinMaxLnScaleMinMax:new Mt(0,1,Fa,ka)},update:t=>{var n,s,r,a,o,l,c,u,h,d;return t.texture=((n=this.packedSplats)==null?void 0:n.getTexture())??Yl.getEmpty(),t.numSplats=((s=this.packedSplats)==null?void 0:s.numSplats)??0,t.rgbMinMaxLnScaleMinMax.set(((a=(r=this.packedSplats)==null?void 0:r.splatEncoding)==null?void 0:a.rgbMin)??0,((l=(o=this.packedSplats)==null?void 0:o.splatEncoding)==null?void 0:l.rgbMax)??1,((u=(c=this.packedSplats)==null?void 0:c.splatEncoding)==null?void 0:u.lnScaleMin)??Fa,((d=(h=this.packedSplats)==null?void 0:h.splatEncoding)==null?void 0:d.lnScaleMax)??ka),t}}),this.packedSplats=e}}class ov extends oF{constructor(e,t){super(),this.ordering=e,this.setAttribute("position",new rn(o6,3)),this.setIndex(new rn(l6,1)),this._maxInstanceCount=e.length,this.instanceCount=t,this.attribute=new Bg(e,1,!1,1),this.attribute.setUsage(cN),this.setAttribute("splatIndex",this.attribute)}update(e,t){this.ordering=e,this.attribute.array=e,this.instanceCount=t,this.attribute.addUpdateRange(0,t),this.attribute.needsUpdate=!0}}const o6=new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0]),l6=new Uint16Array([0,1,2,0,2,3]),zb=class Md{constructor(e){if(this.lastTime=null,this.encodeLinear=!1,this.superXY=1,this.display=null,this.sorting=null,this.pending=null,this.sortingCheck=!1,this.readback16=new Uint16Array(0),this.readback32=new Uint32Array(0),this.spark=e.spark,this.camera=e.camera,this.viewToWorld=e.viewToWorld??new We,e.target){const{width:t,height:n,doubleBuffer:s}=e.target,r=Math.max(1,Math.min(4,e.target.superXY??1));if(this.superXY=r,t*r>8192||n*r>8192)throw new Error("Target size too large");this.target=new Sn(t*r,n*r,{format:Gt,type:Ze,colorSpace:Ot}),s&&(this.back=new Sn(t*r,n*r,{format:Gt,type:Ze,colorSpace:Ot})),this.encodeLinear=!0}this.onTextureUpdated=e.onTextureUpdated,this.sortRadial=e.sortRadial??!0,this.sortDistance=e.sortDistance,this.sortCoorient=e.sortCoorient,this.depthBias=e.depthBias,this.sort360=e.sort360,this.sort32=e.sort32,this.stochastic=e.stochastic??!1,this.orderingFreelist=new FV({allocate:t=>new Uint32Array(t),valid:(t,n)=>t.length===n}),this.autoUpdate=!1,this.setAutoUpdate(e.autoUpdate??!1)}dispose(){var e;this.setAutoUpdate(!1),this.target&&(this.target.dispose(),this.target=void 0),this.back&&(this.back.dispose(),this.back=void 0),this.display&&(this.spark.releaseAccumulator(this.display.accumulator),this.display.geometry.dispose(),this.display=null),(e=this.pending)!=null&&e.accumulator&&(this.spark.releaseAccumulator(this.pending.accumulator),this.pending=null)}setAutoUpdate(e){!this.autoUpdate&&e?this.spark.autoViewpoints.push(this):this.autoUpdate&&!e&&(this.spark.autoViewpoints=this.spark.autoViewpoints.filter(t=>t!==this)),this.autoUpdate=e}async prepare({scene:e,camera:t,viewToWorld:n,update:s,forceOrigin:r}){var a;for(n?this.viewToWorld=n:(this.camera=t??this.camera,this.camera&&(this.camera.updateMatrixWorld(),this.viewToWorld=this.camera.matrixWorld.clone()));s??!0;){const l=r?this.viewToWorld:void 0;if(this.spark.updateInternal({scene:e,originToWorld:l}))break;await new Promise(u=>setTimeout(u,10))}const o=this.spark.active;o!==((a=this.display)==null?void 0:a.accumulator)&&(this.spark.active.refCount+=1),await this.sortUpdate({accumulator:o,viewToWorld:this.viewToWorld})}renderTarget({scene:e,camera:t}){var n;const s=this.back??this.target;if(!s)throw new Error("Must initialize SparkViewpoint with target");if(t=t??this.camera,!t)throw new Error("Must provide camera");if(t instanceof $n){const r=new $n().copy(t,!1);r.aspect=s.width/s.height,r.updateProjectionMatrix(),t=r}this.viewToWorld=t.matrixWorld.clone();try{this.spark.renderer.setRenderTarget(s),this.spark.prepareViewpoint(this),this.spark.renderer.render(e,t)}finally{this.spark.prepareViewpoint(this.spark.defaultView),this.spark.renderer.setRenderTarget(null)}s!==this.target&&([this.target,this.back]=[this.back,this.target]),(n=this.onTextureUpdated)==null||n.call(this,s.texture)}async readTarget(){if(!this.target)throw new Error("Must initialize SparkViewpoint with target");const{width:e,height:t}=this.target,n=e*t*4;(!this.superPixels||this.superPixels.length<n)&&(this.superPixels=new Uint8Array(n)),await this.spark.renderer.readRenderTargetPixelsAsync(this.target,0,0,e,t,this.superPixels);const{superXY:s}=this;if(s===1)return this.superPixels;const r=e/s,a=t/s,o=r*a*4;(!this.pixels||this.pixels.length<o)&&(this.pixels=new Uint8Array(o));const{superPixels:l,pixels:c}=this,u=s*s;for(let h=0;h<a;h++){const d=h*r;for(let A=0;A<r;A++){const p=A*s;let g=0,m=0,f=0,y=0;for(let E=0;E<s;E++){const v=(h*s+E)*this.target.width;for(let C=0;C<s;C++){const x=(v+p+C)*4;g+=l[x],m+=l[x+1],f+=l[x+2],y+=l[x+3]}}const _=(d+A)*4;c[_]=g/u,c[_+1]=m/u,c[_+2]=f/u,c[_+3]=y/u}}return c}async prepareRenderPixels({scene:e,camera:t,viewToWorld:n,update:s,forceOrigin:r}){return await this.prepare({scene:e,camera:t,viewToWorld:n,update:s,forceOrigin:r}),this.renderTarget({scene:e,camera:t}),this.readTarget()}autoPoll({accumulator:e}){var t,n,s;this.camera&&(this.camera.updateMatrixWorld(),this.viewToWorld=this.camera.matrixWorld.clone());let r=!1,a=!1;if(!this.display)r=!0;else if(e){r=!0;const{mappingVersion:l}=this.display.accumulator;e.mappingVersion===l&&(e.refCount+=1,this.spark.releaseAccumulator(this.display.accumulator),this.display.accumulator=e,this.display.viewToWorld.copy(this.viewToWorld),a=!0,this.spark.viewpoint===this&&this.spark.prepareViewpoint(this))}const o=((t=this.sorting)==null?void 0:t.viewToWorld)??((n=this.display)==null?void 0:n.viewToWorld);o&&!nv({matrix1:this.viewToWorld,matrix2:o,maxDistance:this.sortDistance??.01,minCoorient:this.sortCoorient??this.sortRadial?.99:.999})&&(r=!0),r&&(e&&(e.refCount+=1),(s=this.pending)!=null&&s.accumulator&&this.spark.releaseAccumulator(this.pending.accumulator),this.pending={accumulator:e,viewToWorld:this.viewToWorld,displayed:a},this.driveSort())}async driveSort(){for(var e;;){if(this.sorting||!this.pending)return;const{viewToWorld:t,displayed:n}=this.pending;let s=this.pending.accumulator;if(s||(s=((e=this.display)==null?void 0:e.accumulator)??this.spark.active,s.refCount+=1),this.pending=null,!s)throw new Error("No accumulator to sort");this.sorting={viewToWorld:t},await this.sortUpdate({accumulator:s,viewToWorld:t,displayed:n}),this.sorting=null,this.spark.releaseAccumulator(s)}}async sortUpdate({accumulator:e,viewToWorld:t,displayed:n=!1}){if(this.sortingCheck)throw new Error("Only one sort at a time");this.sortingCheck=!0,e=e??this.spark.active;const{numSplats:s,maxSplats:r}=e.splats;let a=0,o=this.orderingFreelist.alloc(r);if(this.stochastic){a=s;for(let l=0;l<s;++l)o[l]=l}else if(s>0){const{reader:l,doubleSortReader:c,sort32Reader:u,dynoSortRadial:h,dynoOrigin:d,dynoDirection:A,dynoDepthBias:p,dynoSort360:g,dynoSplats:m}=Md.makeSorter(),f=this.sort32??!1;let y;if(f)this.readback32=l.ensureBuffer(r,this.readback32),y=this.readback32;else{const I=Math.ceil(r/2);this.readback16=l.ensureBuffer(I,this.readback16),y=this.readback16}const _=e.toWorld.clone().invert(),E=t.clone().premultiply(_);h.value=this.sort360?!0:this.sortRadial,d.value.set(0,0,0).applyMatrix4(E),A.value.set(0,0,-1).applyMatrix4(E).sub(d.value).normalize(),p.value=this.depthBias??1,g.value=this.sort360??!1,m.packedSplats=e.splats;const v=f?u:c,C=f?s:Math.ceil(s/2);await l.renderReadback({renderer:this.spark.renderer,reader:v,count:C,readback:y});const x=await rl(async I=>{const b=f?"sort32Splats":"sortDoubleSplats";return I.call(b,{maxSplats:r,numSplats:s,readback:y,ordering:o})});f?this.readback32=x.readback:this.readback16=x.readback,o=x.ordering,a=x.activeSplats}this.updateDisplay({accumulator:e,viewToWorld:t,ordering:o,activeSplats:a,displayed:n}),this.sortingCheck=!1}updateDisplay({accumulator:e,viewToWorld:t,ordering:n,activeSplats:s,displayed:r=!1}){if(!this.display)e.refCount+=1,this.display={accumulator:e,viewToWorld:t,geometry:new ov(n,s)};else{!r&&e!==this.display.accumulator&&(e.refCount+=1,this.spark.releaseAccumulator(this.display.accumulator),this.display.accumulator=e),this.display.viewToWorld=t;const a=this.display.geometry.ordering;a.length===n.length?this.display.geometry.update(n,s):(this.display.geometry.dispose(),this.display.geometry=new ov(n,s)),this.orderingFreelist.free(a)}this.spark.viewpoint===this&&this.spark.prepareViewpoint(this)}static makeSorter(){if(!Md.dynos){const e=new rw({value:!0}),t=new kg({value:new Q}),n=new kg({value:new Q}),s=new LA({value:1}),r=new rw({value:!1}),a=new Gb,o=new N2,l=Ua({index:"int"},{rgba8:"vec4"},({index:u})=>{if(!u)throw new Error("No index");const h={sortRadial:e,sortOrigin:t,sortDirection:n,sortDepthBias:s,sort360:r},d=Td(u,iA("int",2)),A=sA(a,d),p=p_({gsplat:A,...h}),g=sA(a,yl(d,iA("int",1))),m=p_({gsplat:g,...h}),f=d8({vectorType:"vec2",x:p,y:m});return{rgba8:hw(a8(f))}}),c=Ua({index:"int"},{rgba8:"vec4"},({index:u})=>{if(!u)throw new Error("No index");const h={sortRadial:e,sortOrigin:t,sortDirection:n,sortDepthBias:s,sort360:r},d=sA(a,u),A=p_({gsplat:d,...h});return{rgba8:hw(r8(A))}});Md.dynos={dynoSortRadial:e,dynoOrigin:t,dynoDirection:n,dynoDepthBias:s,dynoSort360:r,dynoSplats:a,reader:o,doubleSortReader:l,sort32Reader:c}}return Md.dynos}};zb.EMPTY_TEXTURE=new ln;zb.dynos=null;let fw=zb;const c6=ts(`
|
|
12334
|
+
}`;const wm={rgbMin:0,rgbMax:1,lnScaleMin:Fa,lnScaleMax:ka,sh1Min:-1,sh1Max:1,sh2Min:-1,sh2Max:1,sh3Min:-1,sh3Max:1},WA=class Ci{constructor(e={}){this.maxSplats=0,this.numSplats=0,this.packedArray=null,this.isInitialized=!1,this.target=null,this.source=null,this.needsUpdate=!0,this.extra={},this.dyno=new Gb({packedSplats:this}),this.dynoRgbMinMaxLnScaleMinMax=new Cm({key:"rgbMinMaxLnScaleMinMax",value:new Mt(0,1,Fa,ka),update:t=>{var n,s,r,a;return t.set(((n=this.splatEncoding)==null?void 0:n.rgbMin)??0,((s=this.splatEncoding)==null?void 0:s.rgbMax)??1,((r=this.splatEncoding)==null?void 0:r.lnScaleMin)??Fa,((a=this.splatEncoding)==null?void 0:a.lnScaleMax)??ka),t}}),this.dynoSh1MinMax=new h0({key:"sh1MinMax",value:new pe(-1,1),update:t=>{var n,s;return t.set(((n=this.splatEncoding)==null?void 0:n.sh1Min)??-1,((s=this.splatEncoding)==null?void 0:s.sh1Max)??1),t}}),this.dynoSh2MinMax=new h0({key:"sh2MinMax",value:new pe(-1,1),update:t=>{var n,s;return t.set(((n=this.splatEncoding)==null?void 0:n.sh2Min)??-1,((s=this.splatEncoding)==null?void 0:s.sh2Max)??1),t}}),this.dynoSh3MinMax=new h0({key:"sh3MinMax",value:new pe(-1,1),update:t=>{var n,s;return t.set(((n=this.splatEncoding)==null?void 0:n.sh3Min)??-1,((s=this.splatEncoding)==null?void 0:s.sh3Max)??1),t}}),this.initialized=Promise.resolve(this),this.reinitialize(e)}reinitialize(e){this.isInitialized=!1,this.extra={},this.splatEncoding=e.splatEncoding,e.url||e.fileBytes||e.construct?this.initialized=this.asyncInitialize(e).then(()=>(this.isInitialized=!0,this)):(this.initialize(e),this.isInitialized=!0,this.initialized=Promise.resolve(this))}initialize(e){e.packedArray?(this.packedArray=e.packedArray,this.maxSplats=Math.floor(this.packedArray.length/4),this.maxSplats=Math.floor(this.maxSplats/on)*on,this.numSplats=Math.min(this.maxSplats,e.numSplats??Number.POSITIVE_INFINITY)):(this.maxSplats=e.maxSplats??0,this.numSplats=0),this.extra=e.extra??{}}async asyncInitialize(e){const{url:t,fileBytes:n,construct:s}=e;if(t){const r=new j2;r.packedSplats=this,await r.loadAsync(t)}else if(n){const r=await J2({input:n,fileType:e.fileType,pathOrUrl:e.fileName??t,splatEncoding:e.splatEncoding??wm});this.initialize(r)}if(s){const r=s(this);r instanceof Promise&&await r}}dispose(){this.target&&(this.target.dispose(),this.target=null),this.source&&(this.source.dispose(),this.source=null)}ensureSplats(e){const t=e<=this.maxSplats?this.maxSplats:Math.max(e,2*this.maxSplats),n=this.packedArray?this.packedArray.length/4:0;if(!this.packedArray||t>n){this.maxSplats=Ps(t).maxSplats;const s=new Uint32Array(this.maxSplats*4);this.packedArray&&s.set(this.packedArray),this.packedArray=s}return this.packedArray}ensureSplatsSh(e,t){let n,s;if(e===0)return this.ensureSplats(t);if(e===1)n=2,s="sh1";else if(e===2)n=4,s="sh2";else if(e===3)n=4,s="sh3";else throw new Error(`Invalid level: ${e}`);let r=this.extra[s]?this.extra[s].length/n:0;const a=t<=r?r:Math.max(t,2*r);if(!this.extra[s]||a>r){r=Ps(a).maxSplats;const o=new Uint32Array(r*n);this.extra[s]&&o.set(this.extra[s]),this.extra[s]=o}return this.extra[s]}getSplat(e){if(!this.packedArray||e>=this.numSplats)throw new Error("Invalid index");return ow(this.packedArray,e,this.splatEncoding)}setSplat(e,t,n,s,r,a){const o=this.ensureSplats(e+1);aw(o,e,t.x,t.y,t.z,n.x,n.y,n.z,s.x,s.y,s.z,s.w,r,a.r,a.g,a.b),this.numSplats=Math.max(this.numSplats,e+1)}pushSplat(e,t,n,s,r){const a=this.ensureSplats(this.numSplats+1);aw(a,this.numSplats,e.x,e.y,e.z,t.x,t.y,t.z,n.x,n.y,n.z,n.w,s,r.r,r.g,r.b),++this.numSplats}forEachSplat(e){if(!(!this.packedArray||!this.numSplats))for(let t=0;t<this.numSplats;++t){const n=ow(this.packedArray,t,this.splatEncoding);e(t,n.center,n.scales,n.quaternion,n.opacity,n.color)}}ensureGenerate(e){if(this.target&&(e??1)<=this.maxSplats)return!1;this.dispose();const t=Ps(e??1),{width:n,height:s,depth:r}=t;return this.maxSplats=t.maxSplats,this.target=new IM(n,s,r,{depthBuffer:!1,stencilBuffer:!1,generateMipmaps:!1,magFilter:jt,minFilter:jt}),this.target.texture.format=Ra,this.target.texture.type=ci,this.target.texture.internalFormat="RGBA32UI",this.target.scissorTest=!0,!0}generateMapping(e){let t=0;const n=e.map(s=>{const r=t,a=Math.ceil(s/on)*on;return t+=a,{base:r,count:s}});return{maxSplats:t,mapping:n}}getTexture(){return this.target?this.target.texture:this.source||this.packedArray?this.maybeUpdateSource():Ci.getEmpty()}maybeUpdateSource(){if(!this.packedArray)throw new Error("No packed splats");if(this.needsUpdate||!this.source){if(this.needsUpdate=!1,this.source){const{width:e,height:t,depth:n}=this.source.image;this.maxSplats!==e*t*n&&(this.source.dispose(),this.source=null)}if(this.source)this.packedArray.buffer!==this.source.image.data.buffer&&(this.source.image.data=new Uint8Array(this.packedArray.buffer));else{const{width:e,height:t,depth:n}=Ps(this.maxSplats);this.source=new Tr(this.packedArray,e,t,n),this.source.format=Ra,this.source.type=ci,this.source.internalFormat="RGBA32UI",this.source.needsUpdate=!0}this.source.needsUpdate=!0}return this.source}static getEmpty(){if(!Ci.emptySource){const{width:e,height:t,depth:n,maxSplats:s}=Ps(1),r=new Uint32Array(s*4);Ci.emptySource=new Tr(r,e,t,n),Ci.emptySource.format=Ra,Ci.emptySource.type=ci,Ci.emptySource.internalFormat="RGBA32UI",Ci.emptySource.needsUpdate=!0}return Ci.emptySource}prepareProgramMaterial(e){let t=Ci.generatorProgram.get(e);if(!t){const s=Ua({index:"int"},{output:"uvec4"},({index:r})=>{e.inputs.index=r;const a=e.outputs.gsplat;return{output:TV(a,this.dynoRgbMinMaxLnScaleMinMax)}});Ci.programTemplate||(Ci.programTemplate=new Q2(a6)),t=new D2({graph:s,inputs:{index:"index"},outputs:{output:"target"},template:Ci.programTemplate}),Object.assign(t.uniforms,{targetLayer:{value:0},targetBase:{value:0},targetCount:{value:0}}),Ci.generatorProgram.set(e,t)}const n=t.prepareMaterial();return Ci.fullScreenQuad.material=n,{program:t,material:n}}saveRenderState(e){return{xrEnabled:e.xr.enabled,autoClear:e.autoClear}}resetRenderState(e,t){e.setRenderTarget(null),e.xr.enabled=t.xrEnabled,e.autoClear=t.autoClear}generate({generator:e,base:t,count:n,renderer:s}){if(!this.target)throw new Error("Target must be initialized with ensureSplats");if(t+n>this.maxSplats)throw new Error("Base + count exceeds maxSplats");const{program:r,material:a}=this.prepareProgramMaterial(e);r.update();const o=this.saveRenderState(s),l=Math.ceil((t+n)/on)*on,c=on*Cl;for(a.uniforms.targetBase.value=t,a.uniforms.targetCount.value=n;t<l;){const u=Math.floor(t/c);a.uniforms.targetLayer.value=u;const h=u*c,d=Math.floor((t-h)/on),A=Math.min(Cl,Math.ceil((l-h)/on));this.target.scissor.set(0,d,on,A-d),s.setRenderTarget(this.target,u),s.xr.enabled=!1,s.autoClear=!1,Ci.fullScreenQuad.render(s),t+=on*(A-d)}return this.resetRenderState(s,o),{nextBase:l}}};WA.emptySource=null;WA.programTemplate=null;WA.generatorProgram=new Map;WA.fullScreenQuad=new f2(new hm({visible:!1}));let Yl=WA;class Gb extends cr{constructor({packedSplats:e}={}){super({key:"packedSplats",type:xm,globals:()=>[Pb],value:{texture:Yl.getEmpty(),numSplats:0,rgbMinMaxLnScaleMinMax:new Mt(0,1,Fa,ka)},update:t=>{var n,s,r,a,o,l,c,u,h,d;return t.texture=((n=this.packedSplats)==null?void 0:n.getTexture())??Yl.getEmpty(),t.numSplats=((s=this.packedSplats)==null?void 0:s.numSplats)??0,t.rgbMinMaxLnScaleMinMax.set(((a=(r=this.packedSplats)==null?void 0:r.splatEncoding)==null?void 0:a.rgbMin)??0,((l=(o=this.packedSplats)==null?void 0:o.splatEncoding)==null?void 0:l.rgbMax)??1,((u=(c=this.packedSplats)==null?void 0:c.splatEncoding)==null?void 0:u.lnScaleMin)??Fa,((d=(h=this.packedSplats)==null?void 0:h.splatEncoding)==null?void 0:d.lnScaleMax)??ka),t}}),this.packedSplats=e}}class ov extends oF{constructor(e,t){super(),this.ordering=e,this.setAttribute("position",new rn(o6,3)),this.setIndex(new rn(l6,1)),this._maxInstanceCount=e.length,this.instanceCount=t,this.attribute=new Bg(e,1,!1,1),this.attribute.setUsage(cN),this.setAttribute("splatIndex",this.attribute)}update(e,t){this.ordering=e,this.attribute.array=e,this.instanceCount=t,this.attribute.addUpdateRange(0,t),this.attribute.needsUpdate=!0}}const o6=new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0]),l6=new Uint16Array([0,1,2,0,2,3]),zb=class Md{constructor(e){if(this.lastTime=null,this.encodeLinear=!1,this.superXY=1,this.display=null,this.sorting=null,this.pending=null,this.sortingCheck=!1,this.readback16=new Uint16Array(0),this.readback32=new Uint32Array(0),this.spark=e.spark,this.camera=e.camera,this.viewToWorld=e.viewToWorld??new We,e.target){const{width:t,height:n,doubleBuffer:s}=e.target,r=Math.max(1,Math.min(4,e.target.superXY??1));if(this.superXY=r,t*r>8192||n*r>8192)throw new Error("Target size too large");this.target=new Sn(t*r,n*r,{format:Gt,type:Ze,colorSpace:Ot}),s&&(this.back=new Sn(t*r,n*r,{format:Gt,type:Ze,colorSpace:Ot})),this.encodeLinear=!0}this.onTextureUpdated=e.onTextureUpdated,this.sortRadial=e.sortRadial??!0,this.sortDistance=e.sortDistance,this.sortCoorient=e.sortCoorient,this.depthBias=e.depthBias,this.sort360=e.sort360,this.sort32=e.sort32,this.stochastic=e.stochastic??!1,this.orderingFreelist=new FV({allocate:t=>new Uint32Array(t),valid:(t,n)=>t.length===n}),this.autoUpdate=!1,this.setAutoUpdate(e.autoUpdate??!1)}dispose(){var e;this.setAutoUpdate(!1),this.target&&(this.target.dispose(),this.target=void 0),this.back&&(this.back.dispose(),this.back=void 0),this.display&&(this.spark.releaseAccumulator(this.display.accumulator),this.display.geometry.dispose(),this.display=null),(e=this.pending)!=null&&e.accumulator&&(this.spark.releaseAccumulator(this.pending.accumulator),this.pending=null)}setAutoUpdate(e){!this.autoUpdate&&e?this.spark.autoViewpoints.push(this):this.autoUpdate&&!e&&(this.spark.autoViewpoints=this.spark.autoViewpoints.filter(t=>t!==this)),this.autoUpdate=e}async prepare({scene:e,camera:t,viewToWorld:n,update:s,forceOrigin:r}){var a;for(n?this.viewToWorld=n:(this.camera=t??this.camera,this.camera&&(this.camera.updateMatrixWorld(),this.viewToWorld=this.camera.matrixWorld.clone()));s??!0;){const l=r?this.viewToWorld:void 0;if(this.spark.updateInternal({scene:e,originToWorld:l}))break;await new Promise(u=>setTimeout(u,10))}const o=this.spark.active;o!==((a=this.display)==null?void 0:a.accumulator)&&(this.spark.active.refCount+=1),await this.sortUpdate({accumulator:o,viewToWorld:this.viewToWorld})}renderTarget({scene:e,camera:t}){var n;const s=this.back??this.target;if(!s)throw new Error("Must initialize SparkViewpoint with target");if(t=t??this.camera,!t)throw new Error("Must provide camera");if(t instanceof $n){const r=new $n().copy(t,!1);r.aspect=s.width/s.height,r.updateProjectionMatrix(),t=r}this.viewToWorld=t.matrixWorld.clone();try{this.spark.renderer.setRenderTarget(s),this.spark.prepareViewpoint(this),this.spark.renderer.render(e,t)}finally{this.spark.prepareViewpoint(this.spark.defaultView),this.spark.renderer.setRenderTarget(null)}s!==this.target&&([this.target,this.back]=[this.back,this.target]),(n=this.onTextureUpdated)==null||n.call(this,s.texture)}async readTarget(){if(!this.target)throw new Error("Must initialize SparkViewpoint with target");const{width:e,height:t}=this.target,n=e*t*4;(!this.superPixels||this.superPixels.length<n)&&(this.superPixels=new Uint8Array(n)),await this.spark.renderer.readRenderTargetPixelsAsync(this.target,0,0,e,t,this.superPixels);const{superXY:s}=this;if(s===1)return this.superPixels;const r=e/s,a=t/s,o=r*a*4;(!this.pixels||this.pixels.length<o)&&(this.pixels=new Uint8Array(o));const{superPixels:l,pixels:c}=this,u=s*s;for(let h=0;h<a;h++){const d=h*r;for(let A=0;A<r;A++){const p=A*s;let g=0,m=0,f=0,y=0;for(let E=0;E<s;E++){const v=(h*s+E)*this.target.width;for(let C=0;C<s;C++){const x=(v+p+C)*4;g+=l[x],m+=l[x+1],f+=l[x+2],y+=l[x+3]}}const _=(d+A)*4;c[_]=g/u,c[_+1]=m/u,c[_+2]=f/u,c[_+3]=y/u}}return c}async prepareRenderPixels({scene:e,camera:t,viewToWorld:n,update:s,forceOrigin:r}){return await this.prepare({scene:e,camera:t,viewToWorld:n,update:s,forceOrigin:r}),this.renderTarget({scene:e,camera:t}),this.readTarget()}autoPoll({accumulator:e}){var t,n,s;this.camera&&(this.camera.updateMatrixWorld(),this.viewToWorld=this.camera.matrixWorld.clone());let r=!1,a=!1;if(!this.display)r=!0;else if(e){r=!0;const{mappingVersion:l}=this.display.accumulator;e.mappingVersion===l&&(e.refCount+=1,this.spark.releaseAccumulator(this.display.accumulator),this.display.accumulator=e,this.display.viewToWorld.copy(this.viewToWorld),a=!0,this.spark.viewpoint===this&&this.spark.prepareViewpoint(this))}const o=((t=this.sorting)==null?void 0:t.viewToWorld)??((n=this.display)==null?void 0:n.viewToWorld);o&&!nv({matrix1:this.viewToWorld,matrix2:o,maxDistance:this.sortDistance??.01,minCoorient:this.sortCoorient??this.sortRadial?.99:.999})&&(r=!0),r&&(e&&(e.refCount+=1),(s=this.pending)!=null&&s.accumulator&&this.spark.releaseAccumulator(this.pending.accumulator),this.pending={accumulator:e,viewToWorld:this.viewToWorld,displayed:a},this.driveSort())}async driveSort(){for(var e;;){if(this.sorting||!this.pending)return;const{viewToWorld:t,displayed:n}=this.pending;let s=this.pending.accumulator;if(s||(s=((e=this.display)==null?void 0:e.accumulator)??this.spark.active,s.refCount+=1),this.pending=null,!s)throw new Error("No accumulator to sort");this.sorting={viewToWorld:t},await this.sortUpdate({accumulator:s,viewToWorld:t,displayed:n}),this.sorting=null,this.spark.releaseAccumulator(s)}}async sortUpdate({accumulator:e,viewToWorld:t,displayed:n=!1}){if(this.sortingCheck)throw new Error("Only one sort at a time");this.sortingCheck=!0,e=e??this.spark.active;const{numSplats:s,maxSplats:r}=e.splats;let a=0,o=this.orderingFreelist.alloc(r);if(this.stochastic){a=s;for(let l=0;l<s;++l)o[l]=l}else if(s>0){const{reader:l,doubleSortReader:c,sort32Reader:u,dynoSortRadial:h,dynoOrigin:d,dynoDirection:A,dynoDepthBias:p,dynoSort360:g,dynoSplats:m}=Md.makeSorter(),f=this.sort32??!1;let y;if(f)this.readback32=l.ensureBuffer(r,this.readback32),y=this.readback32;else{const I=Math.ceil(r/2);this.readback16=l.ensureBuffer(I,this.readback16),y=this.readback16}const _=e.toWorld.clone().invert(),E=t.clone().premultiply(_);h.value=this.sort360?!0:this.sortRadial,d.value.set(0,0,0).applyMatrix4(E),A.value.set(0,0,-1).applyMatrix4(E).sub(d.value).normalize(),p.value=this.depthBias??1,g.value=this.sort360??!1,m.packedSplats=e.splats;const v=f?u:c,C=f?s:Math.ceil(s/2);await l.renderReadback({renderer:this.spark.renderer,reader:v,count:C,readback:y});const x=await rl(async I=>{const b=f?"sort32Splats":"sortDoubleSplats";return I.call(b,{maxSplats:r,numSplats:s,readback:y,ordering:o})});f?this.readback32=x.readback:this.readback16=x.readback,o=x.ordering,a=x.activeSplats}this.updateDisplay({accumulator:e,viewToWorld:t,ordering:o,activeSplats:a,displayed:n}),this.sortingCheck=!1}updateDisplay({accumulator:e,viewToWorld:t,ordering:n,activeSplats:s,displayed:r=!1}){if(!this.display)e.refCount+=1,this.display={accumulator:e,viewToWorld:t,geometry:new ov(n,s)};else{!r&&e!==this.display.accumulator&&(e.refCount+=1,this.spark.releaseAccumulator(this.display.accumulator),this.display.accumulator=e),this.display.viewToWorld=t;const a=this.display.geometry.ordering;a.length===n.length?this.display.geometry.update(n,s):(this.display.geometry.dispose(),this.display.geometry=new ov(n,s)),this.orderingFreelist.free(a)}this.spark.viewpoint===this&&this.spark.prepareViewpoint(this)}static makeSorter(){if(!Md.dynos){const e=new rw({value:!0}),t=new kg({value:new Q}),n=new kg({value:new Q}),s=new LA({value:1}),r=new rw({value:!1}),a=new Gb,o=new N2,l=Ua({index:"int"},{rgba8:"vec4"},({index:u})=>{if(!u)throw new Error("No index");const h={sortRadial:e,sortOrigin:t,sortDirection:n,sortDepthBias:s,sort360:r},d=Td(u,iA("int",2)),A=sA(a,d),p=p0({gsplat:A,...h}),g=sA(a,yl(d,iA("int",1))),m=p0({gsplat:g,...h}),f=d8({vectorType:"vec2",x:p,y:m});return{rgba8:hw(a8(f))}}),c=Ua({index:"int"},{rgba8:"vec4"},({index:u})=>{if(!u)throw new Error("No index");const h={sortRadial:e,sortOrigin:t,sortDirection:n,sortDepthBias:s,sort360:r},d=sA(a,u),A=p0({gsplat:d,...h});return{rgba8:hw(r8(A))}});Md.dynos={dynoSortRadial:e,dynoOrigin:t,dynoDirection:n,dynoDepthBias:s,dynoSort360:r,dynoSplats:a,reader:o,doubleSortReader:l,sort32Reader:c}}return Md.dynos}};zb.EMPTY_TEXTURE=new ln;zb.dynos=null;let fw=zb;const c6=ts(`
|
|
12335
12335
|
float computeSort(Gsplat gsplat, bool sortRadial, vec3 sortOrigin, vec3 sortDirection, float sortDepthBias, bool sort360) {
|
|
12336
12336
|
if (!isGsplatActive(gsplat.flags)) {
|
|
12337
12337
|
return INFINITY;
|
|
@@ -12345,9 +12345,9 @@ void main() {
|
|
|
12345
12345
|
|
|
12346
12346
|
return sortRadial ? length(center) : biasedDepth;
|
|
12347
12347
|
}
|
|
12348
|
-
`);function
|
|
12348
|
+
`);function p0({gsplat:i,sortRadial:e,sortOrigin:t,sortDirection:n,sortDepthBias:s,sort360:r}){return Em({inTypes:{gsplat:Zn,sortRadial:"bool",sortOrigin:"vec3",sortDirection:"vec3",sortDepthBias:"float",sort360:"bool"},outTypes:{metric:"float"},globals:()=>[Gr,c6],inputs:{gsplat:i,sortRadial:e,sortOrigin:t,sortDirection:n,sortDepthBias:s,sort360:r},statements:({inputs:a,outputs:o})=>{const{gsplat:l,sortRadial:c,sortOrigin:u,sortDirection:h,sortDepthBias:d,sort360:A}=a;return Or(`
|
|
12349
12349
|
${o.metric} = computeSort(${l}, ${c}, ${u}, ${h}, ${d}, ${A});
|
|
12350
|
-
`)}}).outputs.metric}class
|
|
12350
|
+
`)}}).outputs.metric}class f0{constructor(){this.splats=new Yl,this.toWorld=new We,this.mapping=[],this.refCount=0,this.splatsVersion=-1,this.mappingVersion=-1}ensureGenerate(e){this.splats.ensureGenerate(e)&&(this.mapping=[])}generateSplats({renderer:e,modifier:t,generators:n,forceUpdate:s,originToWorld:r}){const a=this.mapping.reduce((c,u)=>(c.set(u.node,u),c),new Map);let o=0,l=0;for(const{node:c,generator:u,version:h,base:d,count:A}of n){const p=a.get(c);if((s||u!==p?.generator||h!==p?.version||d!==p?.base||A!==p?.count)&&u&&A>0){const g=t.apply(u);try{this.splats.generate({generator:g,base:d,count:A,renderer:e})}catch(m){c.generator=void 0,c.generatorError=m}o+=1}l=Math.max(l,d+A)}return this.splats.numSplats=l,this.toWorld.copy(r),this.mapping=n,o!==0}hasCorrespondence(e){return this.mapping.length!==e.mapping.length?!1:this.mapping.every(({node:t,base:n,count:s},r)=>{const{node:a,base:o,count:l}=e.mapping[r];return t===a&&n===o&&s===l})}}var h6=`const float LN_SCALE_MIN = -12.0;
|
|
12351
12351
|
const float LN_SCALE_MAX = 9.0;
|
|
12352
12352
|
|
|
12353
12353
|
const uint SPLAT_TEX_WIDTH_BITS = 11u;
|
|
@@ -12926,7 +12926,7 @@ void main() {
|
|
|
12926
12926
|
vNdc = ndc;
|
|
12927
12927
|
gl_Position = vec4(ndc.xy * clipCenter.w, clipCenter.zw);
|
|
12928
12928
|
#include <logdepthbuf_vertex>
|
|
12929
|
-
}`;let g_=null;function A6(){return g_||(vt.splatDefines=h6,g_={splatVertex:d6,splatFragment:u6}),g_}const gw=5,Sm=class Ii extends Je{constructor(e){const t=Ii.makeUniforms(),n=A6(),s=e.premultipliedAlpha??!0,r=new kn({glslVersion:Cg,vertexShader:n.splatVertex,fragmentShader:n.splatFragment,uniforms:t,premultipliedAlpha:s,transparent:!0,depthTest:!0,depthWrite:!1,side:On});super(mw,r),this.splatTexture=null,this.autoViewpoints=[],this.rotateToAccumulator=new Cm({value:new Yt}),this.translateToAccumulator=new kg({value:new Q}),this.lastFrame=-1,this.lastUpdateTime=null,this.defaultCameras=[],this.lastStochastic=null,this.pendingUpdate={scene:null,originToWorld:new We,timeoutId:-1},this.envViewpoint=null,this.frustumCulled=!1,this.renderer=e.renderer,this.material=r,this.uniforms=t;const a=Ua({gsplat:Zn},{gsplat:Zn},({gsplat:o})=>{if(!o)throw new Error("gsplat not defined");return o=B2(o,{rotate:this.rotateToAccumulator,translate:this.translateToAccumulator}),{gsplat:o}});this.modifier=new D8(a),this.premultipliedAlpha=s,this.autoUpdate=e.autoUpdate??!0,this.preUpdate=e.preUpdate??!1,this.needsUpdate=!1,this.originDistance=e.originDistance??1,this.maxStdDev=e.maxStdDev??Math.sqrt(8),this.minPixelRadius=e.minPixelRadius??0,this.maxPixelRadius=e.maxPixelRadius??512,this.minAlpha=e.minAlpha??.5*(1/255),this.enable2DGS=e.enable2DGS??!1,this.preBlurAmount=e.preBlurAmount??0,this.blurAmount=e.blurAmount??.3,this.focalDistance=e.focalDistance??0,this.apertureAngle=e.apertureAngle??0,this.falloff=e.falloff??1,this.clipXY=e.clipXY??1.4,this.focalAdjustment=e.focalAdjustment??1,this.splatEncoding=e.splatEncoding??{...wm},this.active=new f_,this.active.refCount=1,this.accumulatorCount=1,this.freeAccumulators=[];for(let o=0;o<1;++o)this.freeAccumulators.push(new f_),this.accumulatorCount+=1;this.defaultView=new fw({...e.view,autoUpdate:!0,spark:this}),this.viewpoint=this.defaultView,this.prepareViewpoint(this.viewpoint),this.clock=e.clock?$V(e.clock):new dm}static makeUniforms(){return{renderSize:{value:new pe},near:{value:.1},far:{value:1e3},numSplats:{value:0},renderToViewQuat:{value:new Yt},renderToViewPos:{value:new Q},maxStdDev:{value:1},minPixelRadius:{value:0},maxPixelRadius:{value:512},minAlpha:{value:.00196078431372549},stochastic:{value:!1},enable2DGS:{value:!1},preBlurAmount:{value:0},blurAmount:{value:.3},focalDistance:{value:0},apertureAngle:{value:0},falloff:{value:1},clipXY:{value:1.4},focalAdjustment:{value:1},splatTexEnable:{value:!1},splatTexture:{type:"t",value:Ii.EMPTY_SPLAT_TEXTURE},splatTexMul:{value:new Am},splatTexAdd:{value:new pe},splatTexNear:{value:.1},splatTexFar:{value:1e3},splatTexMid:{value:0},packedSplats:{type:"t",value:Yl.getEmpty()},rgbMinMaxLnScaleMinMax:{value:new Mt},time:{value:0},deltaTime:{value:0},encodeLinear:{value:!1},debugFlag:{value:!1}}}canAllocAccumulator(){return this.freeAccumulators.length>0||this.accumulatorCount<gw}maybeAllocAccumulator(){let e=this.freeAccumulators.pop();if(e===void 0){if(this.accumulatorCount>=gw)return null;e=new f_,this.accumulatorCount+=1}return e.refCount=1,e}releaseAccumulator(e){e.refCount-=1,e.refCount===0&&this.freeAccumulators.push(e)}newViewpoint(e){return new fw({...e,spark:this})}onBeforeRender(e,t,n){var s,r;const a=this.time??this.clock.getElapsedTime(),o=a-(this.viewpoint.lastTime??a);this.viewpoint.lastTime=a;const l=e.info.render.frame,c=l!==this.lastFrame;this.lastFrame=l;const u=this.viewpoint;if(u===this.defaultView){if(c)if(!e.xr.isPresenting)this.defaultView.viewToWorld=n.matrixWorld.clone(),this.defaultCameras=[this.defaultView.viewToWorld];else{const g=e.xr.getCamera().cameras;this.defaultCameras=g.map(m=>m.matrixWorld),this.defaultView.viewToWorld=p6(this.defaultCameras)??new We}this.autoUpdate&&this.update({scene:t,viewToWorld:this.defaultView.viewToWorld})}if(c&&(this.material.premultipliedAlpha!==this.premultipliedAlpha&&(this.material.premultipliedAlpha=this.premultipliedAlpha,this.material.needsUpdate=!0),this.uniforms.time.value=a,this.uniforms.deltaTime.value=o,this.uniforms.debugFlag.value=performance.now()/1e3%2<1,u.display&&u.stochastic&&(this.geometry.instanceCount=this.uniforms.numSplats.value)),u.target)this.uniforms.renderSize.value.set(u.target.width,u.target.height);else{const g=e.getDrawingBufferSize(this.uniforms.renderSize.value);if(g.x===1&&g.y===1){const m=(s=e.xr.getSession())==null?void 0:s.renderState.baseLayer;m&&(g.x=m.framebufferWidth,g.y=m.framebufferHeight)}}const h=n;if(this.uniforms.near.value=h.near,this.uniforms.far.value=h.far,this.uniforms.encodeLinear.value=u.encodeLinear,this.uniforms.maxStdDev.value=this.maxStdDev,this.uniforms.minPixelRadius.value=this.minPixelRadius,this.uniforms.maxPixelRadius.value=this.maxPixelRadius,this.uniforms.minAlpha.value=this.minAlpha,this.uniforms.stochastic.value=u.stochastic,this.uniforms.enable2DGS.value=this.enable2DGS,this.uniforms.preBlurAmount.value=this.preBlurAmount,this.uniforms.blurAmount.value=this.blurAmount,this.uniforms.focalDistance.value=this.focalDistance,this.uniforms.apertureAngle.value=this.apertureAngle,this.uniforms.falloff.value=this.falloff,this.uniforms.clipXY.value=this.clipXY,this.uniforms.focalAdjustment.value=this.focalAdjustment,this.lastStochastic!==!u.stochastic&&(this.lastStochastic=!u.stochastic,this.material.transparent=!u.stochastic,this.material.depthWrite=u.stochastic,this.material.needsUpdate=!0),this.splatTexture){const{enable:g,texture:m,multiply:f,add:y,near:_,far:E,mid:v}=this.splatTexture;g&&m?(this.uniforms.splatTexEnable.value=!0,this.uniforms.splatTexture.value=m,f?this.uniforms.splatTexMul.value.fromArray(f.elements):this.uniforms.splatTexMul.value.set(.5/this.maxStdDev,0,0,.5/this.maxStdDev),this.uniforms.splatTexAdd.value.set(y?.x??.5,y?.y??.5),this.uniforms.splatTexNear.value=_??this.uniforms.near.value,this.uniforms.splatTexFar.value=E??this.uniforms.far.value,this.uniforms.splatTexMid.value=v??0):(this.uniforms.splatTexEnable.value=!1,this.uniforms.splatTexture.value=Ii.EMPTY_SPLAT_TEXTURE)}else this.uniforms.splatTexEnable.value=!1,this.uniforms.splatTexture.value=Ii.EMPTY_SPLAT_TEXTURE;const d=((r=u.display)==null?void 0:r.accumulator.toWorld)??new We,A=n.matrixWorld.clone().invert();d.clone().premultiply(A).decompose(this.uniforms.renderToViewPos.value,this.uniforms.renderToViewQuat.value,new Q)}prepareViewpoint(e){var t,n,s,r;if(this.viewpoint=e??this.viewpoint,this.viewpoint.display){const{accumulator:a,geometry:o}=this.viewpoint.display;this.uniforms.numSplats.value=a.splats.numSplats,this.uniforms.packedSplats.value=a.splats.getTexture(),this.uniforms.rgbMinMaxLnScaleMinMax.value.set(((t=a.splats.splatEncoding)==null?void 0:t.rgbMin)??0,((n=a.splats.splatEncoding)==null?void 0:n.rgbMax)??1,((s=a.splats.splatEncoding)==null?void 0:s.lnScaleMin)??Fa,((r=a.splats.splatEncoding)==null?void 0:r.lnScaleMax)??ka),this.geometry=o,this.material.transparent=!this.viewpoint.stochastic,this.material.depthWrite=this.viewpoint.stochastic,this.material.needsUpdate=!0}else this.uniforms.numSplats.value=0,this.uniforms.packedSplats.value=Yl.getEmpty(),this.geometry=mw}update({scene:e,viewToWorld:t}){const n=this.matrixWorld;this.preUpdate?this.updateInternal({scene:e,originToWorld:n.clone(),viewToWorld:t}):(this.pendingUpdate.scene=e,this.pendingUpdate.originToWorld.copy(n),this.pendingUpdate.timeoutId===-1&&(this.pendingUpdate.timeoutId=setTimeout(()=>{const{scene:s,originToWorld:r}=this.pendingUpdate;this.pendingUpdate.scene=null,this.pendingUpdate.timeoutId=-1,this.updateInternal({scene:s,originToWorld:r,viewToWorld:t})&&this.renderer.getContext().flush()},1)))}updateInternal({scene:e,originToWorld:t,viewToWorld:n}){var s;if(!this.canAllocAccumulator())return!1;t||(t=this.active.toWorld),n=n??t.clone();const r=this.time??this.clock.getElapsedTime(),a=r-(this.lastUpdateTime??r);this.lastUpdateTime=r;const o=this.active.mapping.reduce((g,m)=>(g.set(m.node,m),g),new Map),{generators:l,visibleGenerators:c,globalEdits:u}=this.compileScene(e);for(const g of l)(s=g.frameUpdate)==null||s.call(g,{object:g,time:r,deltaTime:a,viewToWorld:n,globalEdits:u});const h=new Set(c.map(g=>g.uuid));for(const g of l){const m=o.get(g),y=g.generator&&h.has(g.uuid)?g.numSplats:0;(this.needsUpdate||g.generator!==m?.generator||y!==m?.count)&&g.updateVersion()}const d=!nv({matrix1:t,matrix2:this.active.toWorld,maxDistance:this.originDistance}),A=this.needsUpdate||d||l.length!==o.size||l.some(g=>{var m;return g.version!==((m=o.get(g))==null?void 0:m.version)});this.needsUpdate=!1;let p=null;if(A){if(p=this.maybeAllocAccumulator(),!p)throw new Error("Unreachable");const g=!nv({matrix1:t,matrix2:p.toWorld,maxDistance:1e-5,minCoorient:.99999}),f=c.map((x,I)=>{const b=o.get(x);return b?[x.version-b.version,b.base,x]:[Number.POSITIVE_INFINITY,x.version,x]}).sort((x,I)=>x[0]!==I[0]?x[0]-I[0]:x[1]-I[1]).map(([x,I,b])=>b),y=f.map(x=>x.numSplats),{maxSplats:_,mapping:E}=p.splats.generateMapping(y),v=f.map((x,I)=>{const{base:b,count:w}=E[I];return{node:x,generator:x.generator,version:x.version,base:b,count:w}});t.clone().invert().decompose(this.translateToAccumulator.value,this.rotateToAccumulator.value,new Q),p.ensureGenerate(_),p.splats.splatEncoding={...this.splatEncoding},p.generateSplats({renderer:this.renderer,modifier:this.modifier,generators:v,forceUpdate:g,originToWorld:t}),p.splatsVersion=this.active.splatsVersion+1;const C=p.hasCorrespondence(this.active);p.mappingVersion=this.active.mappingVersion+(C?0:1),this.releaseAccumulator(this.active),this.active=p,this.prepareViewpoint()}return setTimeout(()=>{for(const g of this.autoViewpoints)g.autoPoll({accumulator:p??void 0})},1),!0}compileScene(e){const t=[];e.traverse(r=>{r instanceof sv&&t.push(r)});const n=[];e.traverseVisible(r=>{r instanceof sv&&n.push(r)});const s=new Set;return e.traverseVisible(r=>{if(r instanceof O2){let a=r.parent;for(;a!=null&&!(a instanceof Wh);)a=a.parent;a==null&&s.add(r)}}),{generators:t,visibleGenerators:n,globalEdits:Array.from(s)}}async renderEnvMap({renderer:e,scene:t,worldCenter:n,size:s=256,near:r=.1,far:a=1e3,hideObjects:o=[],update:l=!1}){var c,u;if(this.envViewpoint||(this.envViewpoint=this.newViewpoint({sort360:!0})),!Ii.cubeRender||Ii.cubeRender.target.width!==s||Ii.cubeRender.near!==r||Ii.cubeRender.far!==a){Ii.cubeRender&&Ii.cubeRender.target.dispose();const g=new HA(s,{format:Gt,generateMipmaps:!0,minFilter:aE}),m=new Sg(r,a,g);Ii.cubeRender={target:g,camera:m,near:r,far:a}}Ii.pmrem||(Ii.pmrem=new TE(e??this.renderer));const h=new We().setPosition(n);await((c=this.envViewpoint)==null?void 0:c.prepare({scene:t,viewToWorld:h,update:l}));const{target:d,camera:A}=Ii.cubeRender;A.position.copy(n);const p=new Map;for(const g of o)p.set(g,g.visible),g.visible=!1;this.prepareViewpoint(this.envViewpoint),A.update(e??this.renderer,t),this.prepareViewpoint(this.defaultView);for(const[g,m]of p.entries())g.visible=m;return(u=Ii.pmrem)==null?void 0:u.fromCubemap(d.texture).texture}recurseSetEnvMap(e,t){e.traverse(n=>{if(n instanceof Je)if(Array.isArray(n.material))for(const s of n.material)s instanceof $s&&(s.envMap=t);else n.material instanceof $s&&(n.material.envMap=t)})}getRgba({generator:e,rgba:t}){const n=this.active.mapping.find(({node:s})=>s===e);if(!n)throw new Error("Generator not found");return t=t??new I8,t.fromPackedSplats({packedSplats:this.active.splats,base:n.base,count:n.count,renderer:this.renderer}),t}async readRgba({generator:e,rgba:t}){return t=this.getRgba({generator:e,rgba:t}),t.read()}};Sm.cubeRender=null;Sm.pmrem=null;Sm.EMPTY_SPLAT_TEXTURE=new rb;let lv=Sm;const mw=new ov(new Uint32Array(1),0);Ua({packedSplats:xm,index:"int"},{gsplat:Zn},({packedSplats:i,index:e})=>{if(!i||!e)throw new Error("Invalid input");return{gsplat:sA(i,e)}});function p6(i){if(i.length===0)return null;const e=new Q,t=new Yt,n=new Q,s=[],r=[];for(const a of i)a.decompose(e,t,n),s.push(e),r.push(t);return new We().compose(YV(s),qV(r),new Q(1,1,1))}ts(`
|
|
12929
|
+
}`;let g0=null;function A6(){return g0||(vt.splatDefines=h6,g0={splatVertex:d6,splatFragment:u6}),g0}const gw=5,Sm=class Ii extends Je{constructor(e){const t=Ii.makeUniforms(),n=A6(),s=e.premultipliedAlpha??!0,r=new kn({glslVersion:Cg,vertexShader:n.splatVertex,fragmentShader:n.splatFragment,uniforms:t,premultipliedAlpha:s,transparent:!0,depthTest:!0,depthWrite:!1,side:On});super(mw,r),this.splatTexture=null,this.autoViewpoints=[],this.rotateToAccumulator=new Cm({value:new Yt}),this.translateToAccumulator=new kg({value:new Q}),this.lastFrame=-1,this.lastUpdateTime=null,this.defaultCameras=[],this.lastStochastic=null,this.pendingUpdate={scene:null,originToWorld:new We,timeoutId:-1},this.envViewpoint=null,this.frustumCulled=!1,this.renderer=e.renderer,this.material=r,this.uniforms=t;const a=Ua({gsplat:Zn},{gsplat:Zn},({gsplat:o})=>{if(!o)throw new Error("gsplat not defined");return o=B2(o,{rotate:this.rotateToAccumulator,translate:this.translateToAccumulator}),{gsplat:o}});this.modifier=new D8(a),this.premultipliedAlpha=s,this.autoUpdate=e.autoUpdate??!0,this.preUpdate=e.preUpdate??!1,this.needsUpdate=!1,this.originDistance=e.originDistance??1,this.maxStdDev=e.maxStdDev??Math.sqrt(8),this.minPixelRadius=e.minPixelRadius??0,this.maxPixelRadius=e.maxPixelRadius??512,this.minAlpha=e.minAlpha??.5*(1/255),this.enable2DGS=e.enable2DGS??!1,this.preBlurAmount=e.preBlurAmount??0,this.blurAmount=e.blurAmount??.3,this.focalDistance=e.focalDistance??0,this.apertureAngle=e.apertureAngle??0,this.falloff=e.falloff??1,this.clipXY=e.clipXY??1.4,this.focalAdjustment=e.focalAdjustment??1,this.splatEncoding=e.splatEncoding??{...wm},this.active=new f0,this.active.refCount=1,this.accumulatorCount=1,this.freeAccumulators=[];for(let o=0;o<1;++o)this.freeAccumulators.push(new f0),this.accumulatorCount+=1;this.defaultView=new fw({...e.view,autoUpdate:!0,spark:this}),this.viewpoint=this.defaultView,this.prepareViewpoint(this.viewpoint),this.clock=e.clock?$V(e.clock):new dm}static makeUniforms(){return{renderSize:{value:new pe},near:{value:.1},far:{value:1e3},numSplats:{value:0},renderToViewQuat:{value:new Yt},renderToViewPos:{value:new Q},maxStdDev:{value:1},minPixelRadius:{value:0},maxPixelRadius:{value:512},minAlpha:{value:.00196078431372549},stochastic:{value:!1},enable2DGS:{value:!1},preBlurAmount:{value:0},blurAmount:{value:.3},focalDistance:{value:0},apertureAngle:{value:0},falloff:{value:1},clipXY:{value:1.4},focalAdjustment:{value:1},splatTexEnable:{value:!1},splatTexture:{type:"t",value:Ii.EMPTY_SPLAT_TEXTURE},splatTexMul:{value:new Am},splatTexAdd:{value:new pe},splatTexNear:{value:.1},splatTexFar:{value:1e3},splatTexMid:{value:0},packedSplats:{type:"t",value:Yl.getEmpty()},rgbMinMaxLnScaleMinMax:{value:new Mt},time:{value:0},deltaTime:{value:0},encodeLinear:{value:!1},debugFlag:{value:!1}}}canAllocAccumulator(){return this.freeAccumulators.length>0||this.accumulatorCount<gw}maybeAllocAccumulator(){let e=this.freeAccumulators.pop();if(e===void 0){if(this.accumulatorCount>=gw)return null;e=new f0,this.accumulatorCount+=1}return e.refCount=1,e}releaseAccumulator(e){e.refCount-=1,e.refCount===0&&this.freeAccumulators.push(e)}newViewpoint(e){return new fw({...e,spark:this})}onBeforeRender(e,t,n){var s,r;const a=this.time??this.clock.getElapsedTime(),o=a-(this.viewpoint.lastTime??a);this.viewpoint.lastTime=a;const l=e.info.render.frame,c=l!==this.lastFrame;this.lastFrame=l;const u=this.viewpoint;if(u===this.defaultView){if(c)if(!e.xr.isPresenting)this.defaultView.viewToWorld=n.matrixWorld.clone(),this.defaultCameras=[this.defaultView.viewToWorld];else{const g=e.xr.getCamera().cameras;this.defaultCameras=g.map(m=>m.matrixWorld),this.defaultView.viewToWorld=p6(this.defaultCameras)??new We}this.autoUpdate&&this.update({scene:t,viewToWorld:this.defaultView.viewToWorld})}if(c&&(this.material.premultipliedAlpha!==this.premultipliedAlpha&&(this.material.premultipliedAlpha=this.premultipliedAlpha,this.material.needsUpdate=!0),this.uniforms.time.value=a,this.uniforms.deltaTime.value=o,this.uniforms.debugFlag.value=performance.now()/1e3%2<1,u.display&&u.stochastic&&(this.geometry.instanceCount=this.uniforms.numSplats.value)),u.target)this.uniforms.renderSize.value.set(u.target.width,u.target.height);else{const g=e.getDrawingBufferSize(this.uniforms.renderSize.value);if(g.x===1&&g.y===1){const m=(s=e.xr.getSession())==null?void 0:s.renderState.baseLayer;m&&(g.x=m.framebufferWidth,g.y=m.framebufferHeight)}}const h=n;if(this.uniforms.near.value=h.near,this.uniforms.far.value=h.far,this.uniforms.encodeLinear.value=u.encodeLinear,this.uniforms.maxStdDev.value=this.maxStdDev,this.uniforms.minPixelRadius.value=this.minPixelRadius,this.uniforms.maxPixelRadius.value=this.maxPixelRadius,this.uniforms.minAlpha.value=this.minAlpha,this.uniforms.stochastic.value=u.stochastic,this.uniforms.enable2DGS.value=this.enable2DGS,this.uniforms.preBlurAmount.value=this.preBlurAmount,this.uniforms.blurAmount.value=this.blurAmount,this.uniforms.focalDistance.value=this.focalDistance,this.uniforms.apertureAngle.value=this.apertureAngle,this.uniforms.falloff.value=this.falloff,this.uniforms.clipXY.value=this.clipXY,this.uniforms.focalAdjustment.value=this.focalAdjustment,this.lastStochastic!==!u.stochastic&&(this.lastStochastic=!u.stochastic,this.material.transparent=!u.stochastic,this.material.depthWrite=u.stochastic,this.material.needsUpdate=!0),this.splatTexture){const{enable:g,texture:m,multiply:f,add:y,near:_,far:E,mid:v}=this.splatTexture;g&&m?(this.uniforms.splatTexEnable.value=!0,this.uniforms.splatTexture.value=m,f?this.uniforms.splatTexMul.value.fromArray(f.elements):this.uniforms.splatTexMul.value.set(.5/this.maxStdDev,0,0,.5/this.maxStdDev),this.uniforms.splatTexAdd.value.set(y?.x??.5,y?.y??.5),this.uniforms.splatTexNear.value=_??this.uniforms.near.value,this.uniforms.splatTexFar.value=E??this.uniforms.far.value,this.uniforms.splatTexMid.value=v??0):(this.uniforms.splatTexEnable.value=!1,this.uniforms.splatTexture.value=Ii.EMPTY_SPLAT_TEXTURE)}else this.uniforms.splatTexEnable.value=!1,this.uniforms.splatTexture.value=Ii.EMPTY_SPLAT_TEXTURE;const d=((r=u.display)==null?void 0:r.accumulator.toWorld)??new We,A=n.matrixWorld.clone().invert();d.clone().premultiply(A).decompose(this.uniforms.renderToViewPos.value,this.uniforms.renderToViewQuat.value,new Q)}prepareViewpoint(e){var t,n,s,r;if(this.viewpoint=e??this.viewpoint,this.viewpoint.display){const{accumulator:a,geometry:o}=this.viewpoint.display;this.uniforms.numSplats.value=a.splats.numSplats,this.uniforms.packedSplats.value=a.splats.getTexture(),this.uniforms.rgbMinMaxLnScaleMinMax.value.set(((t=a.splats.splatEncoding)==null?void 0:t.rgbMin)??0,((n=a.splats.splatEncoding)==null?void 0:n.rgbMax)??1,((s=a.splats.splatEncoding)==null?void 0:s.lnScaleMin)??Fa,((r=a.splats.splatEncoding)==null?void 0:r.lnScaleMax)??ka),this.geometry=o,this.material.transparent=!this.viewpoint.stochastic,this.material.depthWrite=this.viewpoint.stochastic,this.material.needsUpdate=!0}else this.uniforms.numSplats.value=0,this.uniforms.packedSplats.value=Yl.getEmpty(),this.geometry=mw}update({scene:e,viewToWorld:t}){const n=this.matrixWorld;this.preUpdate?this.updateInternal({scene:e,originToWorld:n.clone(),viewToWorld:t}):(this.pendingUpdate.scene=e,this.pendingUpdate.originToWorld.copy(n),this.pendingUpdate.timeoutId===-1&&(this.pendingUpdate.timeoutId=setTimeout(()=>{const{scene:s,originToWorld:r}=this.pendingUpdate;this.pendingUpdate.scene=null,this.pendingUpdate.timeoutId=-1,this.updateInternal({scene:s,originToWorld:r,viewToWorld:t})&&this.renderer.getContext().flush()},1)))}updateInternal({scene:e,originToWorld:t,viewToWorld:n}){var s;if(!this.canAllocAccumulator())return!1;t||(t=this.active.toWorld),n=n??t.clone();const r=this.time??this.clock.getElapsedTime(),a=r-(this.lastUpdateTime??r);this.lastUpdateTime=r;const o=this.active.mapping.reduce((g,m)=>(g.set(m.node,m),g),new Map),{generators:l,visibleGenerators:c,globalEdits:u}=this.compileScene(e);for(const g of l)(s=g.frameUpdate)==null||s.call(g,{object:g,time:r,deltaTime:a,viewToWorld:n,globalEdits:u});const h=new Set(c.map(g=>g.uuid));for(const g of l){const m=o.get(g),y=g.generator&&h.has(g.uuid)?g.numSplats:0;(this.needsUpdate||g.generator!==m?.generator||y!==m?.count)&&g.updateVersion()}const d=!nv({matrix1:t,matrix2:this.active.toWorld,maxDistance:this.originDistance}),A=this.needsUpdate||d||l.length!==o.size||l.some(g=>{var m;return g.version!==((m=o.get(g))==null?void 0:m.version)});this.needsUpdate=!1;let p=null;if(A){if(p=this.maybeAllocAccumulator(),!p)throw new Error("Unreachable");const g=!nv({matrix1:t,matrix2:p.toWorld,maxDistance:1e-5,minCoorient:.99999}),f=c.map((x,I)=>{const b=o.get(x);return b?[x.version-b.version,b.base,x]:[Number.POSITIVE_INFINITY,x.version,x]}).sort((x,I)=>x[0]!==I[0]?x[0]-I[0]:x[1]-I[1]).map(([x,I,b])=>b),y=f.map(x=>x.numSplats),{maxSplats:_,mapping:E}=p.splats.generateMapping(y),v=f.map((x,I)=>{const{base:b,count:w}=E[I];return{node:x,generator:x.generator,version:x.version,base:b,count:w}});t.clone().invert().decompose(this.translateToAccumulator.value,this.rotateToAccumulator.value,new Q),p.ensureGenerate(_),p.splats.splatEncoding={...this.splatEncoding},p.generateSplats({renderer:this.renderer,modifier:this.modifier,generators:v,forceUpdate:g,originToWorld:t}),p.splatsVersion=this.active.splatsVersion+1;const C=p.hasCorrespondence(this.active);p.mappingVersion=this.active.mappingVersion+(C?0:1),this.releaseAccumulator(this.active),this.active=p,this.prepareViewpoint()}return setTimeout(()=>{for(const g of this.autoViewpoints)g.autoPoll({accumulator:p??void 0})},1),!0}compileScene(e){const t=[];e.traverse(r=>{r instanceof sv&&t.push(r)});const n=[];e.traverseVisible(r=>{r instanceof sv&&n.push(r)});const s=new Set;return e.traverseVisible(r=>{if(r instanceof O2){let a=r.parent;for(;a!=null&&!(a instanceof Wh);)a=a.parent;a==null&&s.add(r)}}),{generators:t,visibleGenerators:n,globalEdits:Array.from(s)}}async renderEnvMap({renderer:e,scene:t,worldCenter:n,size:s=256,near:r=.1,far:a=1e3,hideObjects:o=[],update:l=!1}){var c,u;if(this.envViewpoint||(this.envViewpoint=this.newViewpoint({sort360:!0})),!Ii.cubeRender||Ii.cubeRender.target.width!==s||Ii.cubeRender.near!==r||Ii.cubeRender.far!==a){Ii.cubeRender&&Ii.cubeRender.target.dispose();const g=new HA(s,{format:Gt,generateMipmaps:!0,minFilter:aE}),m=new Sg(r,a,g);Ii.cubeRender={target:g,camera:m,near:r,far:a}}Ii.pmrem||(Ii.pmrem=new TE(e??this.renderer));const h=new We().setPosition(n);await((c=this.envViewpoint)==null?void 0:c.prepare({scene:t,viewToWorld:h,update:l}));const{target:d,camera:A}=Ii.cubeRender;A.position.copy(n);const p=new Map;for(const g of o)p.set(g,g.visible),g.visible=!1;this.prepareViewpoint(this.envViewpoint),A.update(e??this.renderer,t),this.prepareViewpoint(this.defaultView);for(const[g,m]of p.entries())g.visible=m;return(u=Ii.pmrem)==null?void 0:u.fromCubemap(d.texture).texture}recurseSetEnvMap(e,t){e.traverse(n=>{if(n instanceof Je)if(Array.isArray(n.material))for(const s of n.material)s instanceof $s&&(s.envMap=t);else n.material instanceof $s&&(n.material.envMap=t)})}getRgba({generator:e,rgba:t}){const n=this.active.mapping.find(({node:s})=>s===e);if(!n)throw new Error("Generator not found");return t=t??new I8,t.fromPackedSplats({packedSplats:this.active.splats,base:n.base,count:n.count,renderer:this.renderer}),t}async readRgba({generator:e,rgba:t}){return t=this.getRgba({generator:e,rgba:t}),t.read()}};Sm.cubeRender=null;Sm.pmrem=null;Sm.EMPTY_SPLAT_TEXTURE=new rb;let lv=Sm;const mw=new ov(new Uint32Array(1),0);Ua({packedSplats:xm,index:"int"},{gsplat:Zn},({packedSplats:i,index:e})=>{if(!i||!e)throw new Error("Invalid input");return{gsplat:sA(i,e)}});function p6(i){if(i.length===0)return null;const e=new Q,t=new Yt,n=new Q,s=[],r=[];for(const a of i)a.decompose(e,t,n),s.push(e),r.push(t);return new We().compose(YV(s),qV(r),new Q(1,1,1))}ts(`
|
|
12930
12930
|
struct GsplatSkinning {
|
|
12931
12931
|
int numSplats;
|
|
12932
12932
|
int numBones;
|
|
@@ -12992,7 +12992,7 @@ void main() {
|
|
|
12992
12992
|
center = quatVec(quat, center) + translate;
|
|
12993
12993
|
quaternion = quatQuat(quat, quaternion);
|
|
12994
12994
|
}
|
|
12995
|
-
`);new Rn(new Q(-1,-1,-1),new Q(1,1,1)),new Q(-1,-3,1).normalize(),new we(1,1,1),new we(.5,.5,1),new Q(1,1,1);new Rn(new Q(-2,-1,-2),new Q(2,5,2)),new Q(0,-1,0),new we(1,1,1),new we(.25,.25,.5),new Q(.1,1,.1);const K2=class cv{static createButton(e,t={}){const n=navigator.xr;if(!n)return null;const s=n,r=document.createElement("button");e.xr.enabled=!0,e.xr.setReferenceSpaceType("local");function a(){let h=null;async function d(g){console.log("onSessionStarted"),g.addEventListener("end",A),await e.xr.setSession(g),r.textContent="EXIT VR",h=g}function A(){console.log("onSessionEnded"),h?.removeEventListener("end",A),r.textContent="ENTER VR",h=null}r.style.display="",r.style.cursor="pointer",r.style.left="calc(50% - 100px)",r.style.width="200px",r.style.height="100px",r.textContent="ENTER VR";const p={...t,optionalFeatures:[...t.optionalFeatures||[]]};r.onmouseenter=()=>{r.style.opacity="1.0"},r.onmouseleave=()=>{r.style.opacity="0.5"},r.onclick=()=>{h===null?(console.log("requesting session"),s.requestSession("immersive-vr",p).then(d)):(console.log("ending session"),h.end())}}function o(){r.style.display="none",r.style.cursor="auto",r.style.left="calc(50% - 75px)",r.style.width="150px",r.onmouseenter=null,r.onmouseleave=null,r.onclick=null}function l(){o(),r.textContent="VR NOT SUPPORTED"}function c(h){o(),console.warn("Exception when trying to call xr.isSessionSupported",h),r.textContent="VR NOT ALLOWED"}function u(h){h.style.position="absolute",h.style.bottom="20px",h.style.padding="12px 6px",h.style.border="1px solid #fff",h.style.borderRadius="4px",h.style.background="rgba(0,0,0,0.1)",h.style.color="#fff",h.style.font="normal 13px sans-serif",h.style.textAlign="center",h.style.opacity="0.5",h.style.outline="none",h.style.zIndex="999"}return r.id="VRButton",r.style.display="none",u(r),s.isSessionSupported("immersive-vr").then(h=>{h?a():l(),h&&cv.xrSessionIsGranted&&r.click()}).catch(c),r}static registerSessionGrantedListener(){const e=navigator.xr;if(!e)return null;const t=e;/WebXRViewer\//i.test(navigator.userAgent)||t.addEventListener("sessiongranted",()=>{cv.xrSessionIsGranted=!0})}};K2.xrSessionIsGranted=!1;let f6=K2;f6.registerSessionGrantedListener();var Z2=(i=>(i.w="wrist",i.t0="thumb-metacarpal",i.t1="thumb-phalanx-proximal",i.t2="thumb-phalanx-distal",i.t3="thumb-tip",i.i0="index-finger-metacarpal",i.i1="index-finger-phalanx-proximal",i.i2="index-finger-phalanx-intermediate",i.i3="index-finger-phalanx-distal",i.i4="index-finger-tip",i.m0="middle-finger-metacarpal",i.m1="middle-finger-phalanx-proximal",i.m2="middle-finger-phalanx-intermediate",i.m3="middle-finger-phalanx-distal",i.m4="middle-finger-tip",i.r0="ring-finger-metacarpal",i.r1="ring-finger-phalanx-proximal",i.r2="ring-finger-phalanx-intermediate",i.r3="ring-finger-phalanx-distal",i.r4="ring-finger-tip",i.p0="pinky-finger-metacarpal",i.p1="pinky-finger-phalanx-proximal",i.p2="pinky-finger-phalanx-intermediate",i.p3="pinky-finger-phalanx-distal",i.p4="pinky-finger-tip",i))(Z2||{});const g6=Object.keys(Z2);g6.length;new Q(0,0,-1),new Q(0,0,1),new Q(-1,0,0),new Q(1,0,0),new Q(0,1,0),new Q(0,-1,0);new Q(0,0,-1),new Q(0,0,1),new Q(-1,0,0),new Q(1,0,0),new Q(0,1,0),new Q(0,-1,0);new Q(0,0,1),new Q(0,0,-1);new Q(0,-1,0),new Q(0,1,0),new Q(-1,0,0),new Q(1,0,0);class Vn{static{this.__textureProperties=["map","normalMap","roughnessMap","metalnessMap","aoMap","emissiveMap","alphaMap","lightMap","bumpMap","displacementMap","envMap"]}static getPointInBetweenByPercentage(e,t,n){let s=t.clone().sub(e);const r=s.length();return s=s.normalize().multiplyScalar(r*n),e.clone().add(s)}static disposeMaterialTextures(e){for(const t of Vn.__textureProperties){const n=e[t];n instanceof ln&&n.dispose()}}static _dispose3(e){if(e instanceof Je&&e.geometry.dispose(),e instanceof Je){const t=Array.isArray(e.material)?e.material:[e.material];for(const n of t)Vn.disposeMaterialTextures(n),n.dispose()}}static dispose3(e){e.traverse(t=>{(t instanceof Je||t instanceof Wh)&&Vn._dispose3(t)}),(e instanceof Je||e instanceof Wh||e instanceof _s)&&Vn._dispose3(e)}}class Ro extends Rt{constructor(e){super(),this.epgType="PLUG",this.__connectionId="",this.__isPrimary=!1,this.__receiver=null,this.__debugGeo=null,this.__config=e,this.name=e.name,this.__connectionId=e.connectionId,this.__isPrimary=e.isPrimary;const t=e.position;this.position.set(t.x,t.y,t.z);const n=e.rotation;this.rotation.set(n.x,n.y,n.z)}get config(){return this.__config}get connectionId(){return this.__connectionId}get isPrimary(){return this.__isPrimary}get isOpen(){return this.__receiver===null}get receiver(){return this.__receiver}connect(e){this.__receiver=e.receiver}disconnect(){this.__receiver=null}clone(e){return new Ro(this.__config).copy(this,e)}showDebug(){const e=new Q().setFromEuler(this.rotation).normalize(),t=this.position,n=.2,s=16711680;this.__debugGeo=new KM(e,t,n,s,.06,.06);const r=document.createElement("div");r.textContent=this.name;const a=new Nb(r);r.style.pointerEvents="none";const o=new Q;this.getWorldDirection(o),o.normalize();const l=this.position.clone().addScaledVector(o,Math.random());a.position.set(l.x,l.y,l.z),this.__debugGeo.add(a),this.add(this.__debugGeo)}hideDebug(){this.__debugGeo&&(this.__debugGeo.clear(),this.__debugGeo?.removeFromParent(),Vn.dispose3(this.__debugGeo))}}class Oa extends Rt{constructor(e){super(),this.epgType="RECEIVER",this.__connectionId="",this.__plug=null,this.__debugGeo=null,this.__config=e,this.name=e.name,this.__connectionId=e.connectionId;const t=e.position;this.position.set(t.x,t.y,t.z);const n=e.rotation;this.rotation.set(n.x,n.y,n.z)}get config(){return this.__config}get connectionId(){return this.__connectionId}get isOpen(){return this.__plug===null}get plug(){return this.__plug}connect(e){this.__plug=e.plug}disconnect(){this.__plug=null}clone(e){return new Oa(this.__config).copy(this,e)}showDebug(){const e=new Q().setFromEuler(this.rotation.clone()).normalize(),t=this.position,n=.1,s=65280;this.__debugGeo=new KM(e,t,n,s,.01,.08);const r=document.createElement("div");r.textContent=this.name,r.style.color="green";const a=new Nb(r);r.style.pointerEvents="none",this.__debugGeo.add(a),this.add(this.__debugGeo)}hideDebug(){this.__debugGeo&&(this.__debugGeo.clear(),this.__debugGeo?.removeFromParent(),Vn.dispose3(this.__debugGeo))}}var hv=(i=>(i.Plug="plug",i.Receiver="receiver",i))(hv||{});class eD extends p2{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._type=Io.Gltf,this._resource=null,this._loggerContext="EPG RESOURCE GLTF"}get resource(){return this._resource}highlight(){}updateLoadingProgress(e){this._loadingProgress=e,this._appWcRef.eventsManager.assetLoadProgress.fire({progress:e})}async load(){if(this._state===nr.Loaded||this._state===nr.Loading)return Promise.resolve(!0);this._state=nr.Loading;const e=await this._appWcRef.loaders.gltfLoader.loadAsync(this._uri,t=>{this.updateLoadingProgress(t.loaded/t.total*100)}).catch(t=>(window.epigraph.logger.groupCollapsed({title:"",contextOverride:this._loggerContext}),window.epigraph.logger.error({title:"An error occurred while trying to load an asset!",details:t,contextOverride:this._loggerContext}),this._state=nr.Failed,Promise.reject()));return e===void 0?Promise.reject(!1):(this._resource=e,await this._parseLoadedGltf(),this._state=nr.Loaded,Promise.resolve(!0))}async _parseLoadedGltf(){window.epigraph.logger.info({title:"Parsing GLTF data",details:this._resource,contextOverride:this._loggerContext})}unload(){return this._resource?.scene&&Vn.dispose3(this._resource.scene),this._resource={},Promise.resolve(!0)}}class m6 extends eD{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._loggerContext="EPG RESOURCE PROXY",this._type=Io.Proxy,this.__plugs=[],this.__receivers=[]}get plugs(){return this.__plugs}get receivers(){return this.__receivers}async _parseLoadedGltf(){if(!this._resource?.scene)return;const e=[];this._resource.scene.traverse(t=>{if(t.userData.epgType===hv.Receiver){const n=new Oa({name:t.name,connectionId:t.userData.connectionId,position:t.position.clone(),rotation:t.rotation.clone()});this.__receivers.push(n),e.push(t)}else if(t.userData.epgType===hv.Plug){const n=new Ro({name:t.name,isPrimary:t.userData.isPrimary,connectionId:t.userData.connectionId,position:t.position.clone(),rotation:t.rotation.clone()});this.__plugs.push(n),e.push(t)}});for(const t of this.__receivers)this._resource.scene.add(t);for(const t of this.__plugs)this._resource.scene.add(t);for(const t of e)t.removeFromParent(),Vn.dispose3(t)}unload(){return this._resource={},this.__plugs=[],this.__receivers=[],Promise.resolve(!0)}}class tD extends eD{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._loggerContext="EPG RESOURCE RENDER",this._type=Io.Render,this.__variantsExtensionName="KHR_materials_variants",this.__finishNamesFromAsset=[]}get khrVariantsExtensionName(){return this.__variantsExtensionName}get khrVariantsExtension(){return this.__variantsExtension}get finishNamesFromAsset(){return this.__finishNamesFromAsset}async _parseLoadedGltf(){this._resource?.scene.traverse(t=>{t instanceof Je&&(t.castShadow=!0)});const e=this._resource?.userData?.gltfExtensions;if(!e){this.__variantsExtension=null,this.__finishNamesFromAsset=["default"];return}if(this.__variantsExtension=e[this.__variantsExtensionName],this.__variantsExtension?.variants)for(const t of this.__variantsExtension.variants)this.__finishNamesFromAsset.push(t.name)}unload(){return this._resource?.scene&&Vn.dispose3(this._resource.scene),this._resource={},this.__variantsExtension={},this.__finishNamesFromAsset=[],Promise.resolve(!0)}}class y6 extends p2{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._type=Io.Splat,this._resource=null,this.__splatMesh=null,this._loggerContext="EPG RESOURCE SPLAT",this._appWcRef.renderEngine.setupSparkRendererIfNotExists()}get resource(){return this._resource}get splatMesh(){return this.__splatMesh}__parseLoadedSplat(){this._resource&&(this.__splatMesh=new Wh({packedSplats:this._resource}),this.__splatMesh.quaternion.set(1,0,0,0))}async load(){if(this._state===nr.Loaded||this._state===nr.Loading)return Promise.resolve(!0);this._state=nr.Loading;const e=await this._appWcRef.loaders.splatLoader.loadAsync(this._uri,t=>{this.updateLoadingProgress(t.loaded/t.total*100)}).catch(t=>(window.epigraph.logger.groupCollapsed({title:"",contextOverride:this._loggerContext}),window.epigraph.logger.error({title:"An error occurred while trying to load a render splat resource!",details:t,contextOverride:this._loggerContext}),this._state=nr.Failed,Promise.reject()));return e===void 0?Promise.reject(!1):(this._resource=e,this.__parseLoadedSplat(),this._state=nr.Loaded,Promise.resolve(!0))}}class nD{constructor(e,t){this._loggerContext="ASSET",this.__autoGenerateProxyEntity=!1,this.__finishes=new Map,this.__brandMaterialLibraries=new Map,this.__hotspots=[],this.__assetOverrides=null,this.__id=e.id,this.__name=e.name,this.__config=e,this.__appWcRef=t,this.__proxyGltf=new m6({id:`${String(e.id)}-${Io.Proxy}`,uri:e.proxyGeo,appWcRef:this.__appWcRef}),this.__autoGenerateProxyEntity=e.autoGenerateProxyEntity,!this.isRootAsset&&this.__appWcRef.experienceData.currentAssetVersion<=0&&(this.__autoGenerateProxyEntity=!0),this.__appWcRef.productSettings.render.mode===La.SPLAT?this.__renderSplat=new y6({id:`${String(e.id)}-${Io.Splat}`,uri:e.renderSplat,appWcRef:this.__appWcRef}):this.__renderGltf=new tD({id:`${String(e.id)}-${Io.Render}`,uri:e.renderGeo,appWcRef:this.__appWcRef});for(const n in e.finishes)this.__finishes.set(n,new Vp(n));e.brandMaterialLibraries||(e.brandMaterialLibraries=[]),e.hotspots&&(this.__hotspots=e.hotspots)}get isRootAsset(){return this.__id===0}get id(){return this.__id}get name(){return this.__name}get assetRootDir(){const e=this.__appWcRef.productSettings.render.mode===La.SPLAT?this.__renderSplat?.uri:this.__renderGltf?.uri;return new URL(e+"/../../").href}get assetOverrides(){return this.__assetOverrides}get proxyGltf(){return this.__proxyGltf}get autoGenerateProxyEntity(){return this.__autoGenerateProxyEntity}get renderSplat(){return this.__renderSplat}get renderGltf(){return this.__renderGltf}get finishes(){return this.__finishes}get hotspots(){return this.__hotspots}get brandMaterialLibraries(){return this.__brandMaterialLibraries}get allFinishIds(){const e=[];for(const t of this.__finishes.keys())e.push(t);return e}async loadRenderSplat(){await this.__renderSplat?.load(),this.__finishes.set("default",new Vp("default"))}async loadProxyGltf(){return!this.__proxyGltf||this.__proxyGltf.isLoaded?Promise.resolve(!0):await this.__proxyGltf.load()}pullFinishesFromRenderGltf(){this.__finishes.clear(),this.__renderGltf&&this.__renderGltf.finishNamesFromAsset.forEach(e=>{this.__finishes.has(e)||this.__finishes.set(e,new Vp(e))})}async parseAssetOverrideJson(){if(!this.__renderGltf)return null;let e=this.__renderGltf.resource?.asset.extras?.epgOverrides;if(!e)return null;e=e.replace("./","");const t=new URL(e,this.assetRootDir),n=await fetch(t).catch(s=>{window.epigraph.logger.error({title:`Failed to load asset override file: ${t}`,details:s,contextOverride:this._loggerContext})});n&&(this.__assetOverrides=await n.json())}async loadRenderGltf(e=!1){if(this.__renderGltf===void 0||this.__renderGltf.uri==="")return Promise.resolve(!0);await this.__renderGltf.load().catch(t=>(window.epigraph.logger.error({title:`Failed to load asset: ${this.__id}`,details:t,contextOverride:this._loggerContext}),Promise.reject(!1)));for(const t of this.__config.brandMaterialLibraries){const n=this.__appWcRef.experienceData.materialLibraryCollection.materialLibraries.get(t);if(await n?.load(),!n){window.epigraph.logger.warn({title:`Material library ${t} not found in brand material libraries.`,contextOverride:this._loggerContext});continue}this.__brandMaterialLibraries.set(n.id,n);for(const s of n.finishNamesFromAsset)this.finishes.has(s)||this.__finishes.set(s,new Vp(s))}return e&&this.pullFinishesFromRenderGltf(),await this.parseAssetOverrideJson(),Promise.resolve(!0)}async load(e=!1){return Promise.all([this.loadRenderSplat(),this.loadRenderGltf(e),this.loadProxyGltf()])}}class yn{static isTouchDevice(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}static async wait(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}static generateStylesDomElem(e,t=""){const n=document.createElement("style");return n.setAttribute("id",e),n.innerHTML=t,n}static generateHtmlDivElem(e,t=""){const n=document.createElement("div");return n.setAttribute("id",e),n.innerHTML=t,n}static getRandomIntegerInRange(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}static getUrlParameterByName(e,t=window.location.search){const n=new URLSearchParams(t);return Object.fromEntries(n.entries())[e]}static getBaseUrl(){const e=yn.getUrlParameterByName("parentUrl");return e||window.location.href}static normalizeRadian(e){return Math.atan2(Math.sin(e),Math.cos(e))}static isBetweenOnCircle(e,t,n){return e=yn.normalizeRadian(e),t=yn.normalizeRadian(t),n=yn.normalizeRadian(n),t<=n?e>=t&&e<=n:e>=t||e<=n}static clampAzimuth(e,t,n){if(Math.abs(t)==1/0||n==1/0)return e;const s=yn.normalizeRadian(e),r=yn.normalizeRadian(t),a=yn.normalizeRadian(n);if(yn.isBetweenOnCircle(s,r,a))return s;const o=Math.abs(yn.normalizeRadian(s-r)),l=Math.abs(yn.normalizeRadian(s-a));return o<l?r:a}static resolveNexusEndpoint(e){let t=Ed.PRODUCTION;switch(e){case"local":t=Ed.LOCAL;break;case"staging":t=Ed.STAGING;break;case"staging-canary":t=Ed.STAGING_CANARY;break}return t}static parseUrlForEpigraphParams(e){const t=new Map,n=new V0(e);t.set(ii.epigraphSessionId,n.getParameterInUrl(ii.epigraphSessionId)),t.set(ii.identifier,n.getParameterInUrl(ii.identifier)),t.set(ii.identifierType,n.getParameterInUrl(ii.identifierType)),t.set(ii.type,n.getParameterInUrl(ii.type));const s=n.getParameterInUrl(ii.action);return s&&t.set(Od.AR,JSON.parse(s)[Od.AR]),t}static generateShareableUrl({baseUrl:e,identifier:t,identifierType:n,sharedConfig:s,arCompatible:r=!1}){const a=new Map;return a.set(ii.epigraphSessionId,window.epigraph.epigraphSessionId),a.set(ii.identifier,t),a.set(ii.identifierType,n),s&&a.set(ii.sharedConfig,s),r&&a.set(ii.action,`{"${Od.AR}":true}`),new V0(e).generateQrCodeUrl(Object.fromEntries(a.entries()),!1)}static animateValue(e,t,n,s){const r=performance.now();function a(o){const l=o-r,c=Math.min(l/n,1),u=e+(t-e)*c;s(u),c<1&&requestAnimationFrame(a)}requestAnimationFrame(a)}static getCustomStylesTemplate(){if(yn.epigraphCustomStylesTemplate===void 0){const t=document.querySelector("#epigraphCustomStyles")?.content;t&&t.children.length>0&&(yn.epigraphCustomStylesTemplate=re`
|
|
12995
|
+
`);new Rn(new Q(-1,-1,-1),new Q(1,1,1)),new Q(-1,-3,1).normalize(),new we(1,1,1),new we(.5,.5,1),new Q(1,1,1);new Rn(new Q(-2,-1,-2),new Q(2,5,2)),new Q(0,-1,0),new we(1,1,1),new we(.25,.25,.5),new Q(.1,1,.1);const K2=class cv{static createButton(e,t={}){const n=navigator.xr;if(!n)return null;const s=n,r=document.createElement("button");e.xr.enabled=!0,e.xr.setReferenceSpaceType("local");function a(){let h=null;async function d(g){console.log("onSessionStarted"),g.addEventListener("end",A),await e.xr.setSession(g),r.textContent="EXIT VR",h=g}function A(){console.log("onSessionEnded"),h?.removeEventListener("end",A),r.textContent="ENTER VR",h=null}r.style.display="",r.style.cursor="pointer",r.style.left="calc(50% - 100px)",r.style.width="200px",r.style.height="100px",r.textContent="ENTER VR";const p={...t,optionalFeatures:[...t.optionalFeatures||[]]};r.onmouseenter=()=>{r.style.opacity="1.0"},r.onmouseleave=()=>{r.style.opacity="0.5"},r.onclick=()=>{h===null?(console.log("requesting session"),s.requestSession("immersive-vr",p).then(d)):(console.log("ending session"),h.end())}}function o(){r.style.display="none",r.style.cursor="auto",r.style.left="calc(50% - 75px)",r.style.width="150px",r.onmouseenter=null,r.onmouseleave=null,r.onclick=null}function l(){o(),r.textContent="VR NOT SUPPORTED"}function c(h){o(),console.warn("Exception when trying to call xr.isSessionSupported",h),r.textContent="VR NOT ALLOWED"}function u(h){h.style.position="absolute",h.style.bottom="20px",h.style.padding="12px 6px",h.style.border="1px solid #fff",h.style.borderRadius="4px",h.style.background="rgba(0,0,0,0.1)",h.style.color="#fff",h.style.font="normal 13px sans-serif",h.style.textAlign="center",h.style.opacity="0.5",h.style.outline="none",h.style.zIndex="999"}return r.id="VRButton",r.style.display="none",u(r),s.isSessionSupported("immersive-vr").then(h=>{h?a():l(),h&&cv.xrSessionIsGranted&&r.click()}).catch(c),r}static registerSessionGrantedListener(){const e=navigator.xr;if(!e)return null;const t=e;/WebXRViewer\//i.test(navigator.userAgent)||t.addEventListener("sessiongranted",()=>{cv.xrSessionIsGranted=!0})}};K2.xrSessionIsGranted=!1;let f6=K2;f6.registerSessionGrantedListener();var Z2=(i=>(i.w="wrist",i.t0="thumb-metacarpal",i.t1="thumb-phalanx-proximal",i.t2="thumb-phalanx-distal",i.t3="thumb-tip",i.i0="index-finger-metacarpal",i.i1="index-finger-phalanx-proximal",i.i2="index-finger-phalanx-intermediate",i.i3="index-finger-phalanx-distal",i.i4="index-finger-tip",i.m0="middle-finger-metacarpal",i.m1="middle-finger-phalanx-proximal",i.m2="middle-finger-phalanx-intermediate",i.m3="middle-finger-phalanx-distal",i.m4="middle-finger-tip",i.r0="ring-finger-metacarpal",i.r1="ring-finger-phalanx-proximal",i.r2="ring-finger-phalanx-intermediate",i.r3="ring-finger-phalanx-distal",i.r4="ring-finger-tip",i.p0="pinky-finger-metacarpal",i.p1="pinky-finger-phalanx-proximal",i.p2="pinky-finger-phalanx-intermediate",i.p3="pinky-finger-phalanx-distal",i.p4="pinky-finger-tip",i))(Z2||{});const g6=Object.keys(Z2);g6.length;new Q(0,0,-1),new Q(0,0,1),new Q(-1,0,0),new Q(1,0,0),new Q(0,1,0),new Q(0,-1,0);new Q(0,0,-1),new Q(0,0,1),new Q(-1,0,0),new Q(1,0,0),new Q(0,1,0),new Q(0,-1,0);new Q(0,0,1),new Q(0,0,-1);new Q(0,-1,0),new Q(0,1,0),new Q(-1,0,0),new Q(1,0,0);class Vn{static{this.__textureProperties=["map","normalMap","roughnessMap","metalnessMap","aoMap","emissiveMap","alphaMap","lightMap","bumpMap","displacementMap","envMap"]}static getPointInBetweenByPercentage(e,t,n){let s=t.clone().sub(e);const r=s.length();return s=s.normalize().multiplyScalar(r*n),e.clone().add(s)}static disposeMaterialTextures(e){for(const t of Vn.__textureProperties){const n=e[t];n instanceof ln&&n.dispose()}}static _dispose3(e){if(e instanceof Je&&e.geometry.dispose(),e instanceof Je){const t=Array.isArray(e.material)?e.material:[e.material];for(const n of t)Vn.disposeMaterialTextures(n),n.dispose()}}static dispose3(e){e.traverse(t=>{(t instanceof Je||t instanceof Wh)&&Vn._dispose3(t)}),(e instanceof Je||e instanceof Wh||e instanceof _s)&&Vn._dispose3(e)}}class Ro extends Rt{constructor(e){super(),this.epgType="PLUG",this.__connectionId="",this.__isPrimary=!1,this.__receiver=null,this.__debugGeo=null,this.__config=e,this.name=e.name,this.__connectionId=e.connectionId,this.__isPrimary=e.isPrimary;const t=e.position;this.position.set(t.x,t.y,t.z);const n=e.rotation;this.rotation.set(n.x,n.y,n.z)}get config(){return this.__config}get connectionId(){return this.__connectionId}get isPrimary(){return this.__isPrimary}get isOpen(){return this.__receiver===null}get receiver(){return this.__receiver}connect(e){this.__receiver=e.receiver}disconnect(){this.__receiver=null}clone(e){return new Ro(this.__config).copy(this,e)}showDebug(){const e=new Q().setFromEuler(this.rotation).normalize(),t=this.position,n=.2,s=16711680;this.__debugGeo=new KM(e,t,n,s,.06,.06);const r=document.createElement("div");r.textContent=this.name;const a=new Nb(r);r.style.pointerEvents="none";const o=new Q;this.getWorldDirection(o),o.normalize();const l=this.position.clone().addScaledVector(o,Math.random());a.position.set(l.x,l.y,l.z),this.__debugGeo.add(a),this.add(this.__debugGeo)}hideDebug(){this.__debugGeo&&(this.__debugGeo.clear(),this.__debugGeo?.removeFromParent(),Vn.dispose3(this.__debugGeo))}}class Oa extends Rt{constructor(e){super(),this.epgType="RECEIVER",this.__connectionId="",this.__plug=null,this.__debugGeo=null,this.__config=e,this.name=e.name,this.__connectionId=e.connectionId;const t=e.position;this.position.set(t.x,t.y,t.z);const n=e.rotation;this.rotation.set(n.x,n.y,n.z)}get config(){return this.__config}get connectionId(){return this.__connectionId}get isOpen(){return this.__plug===null}get plug(){return this.__plug}connect(e){this.__plug=e.plug}disconnect(){this.__plug=null}clone(e){return new Oa(this.__config).copy(this,e)}showDebug(){const e=new Q().setFromEuler(this.rotation.clone()).normalize(),t=this.position,n=.1,s=65280;this.__debugGeo=new KM(e,t,n,s,.01,.08);const r=document.createElement("div");r.textContent=this.name,r.style.color="green";const a=new Nb(r);r.style.pointerEvents="none",this.__debugGeo.add(a),this.add(this.__debugGeo)}hideDebug(){this.__debugGeo&&(this.__debugGeo.clear(),this.__debugGeo?.removeFromParent(),Vn.dispose3(this.__debugGeo))}}var hv=(i=>(i.Plug="plug",i.Receiver="receiver",i))(hv||{});class eD extends p2{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._type=Io.Gltf,this._resource=null,this._loggerContext="EPG RESOURCE GLTF"}get resource(){return this._resource}highlight(){}updateLoadingProgress(e){this._loadingProgress=e,this._appWcRef.eventsManager.assetLoadProgress.fire({progress:e})}async load(){if(this._state===nr.Loaded||this._state===nr.Loading)return Promise.resolve(!0);this._state=nr.Loading;const e=await this._appWcRef.loaders.gltfLoader.loadAsync(this._uri,t=>{this.updateLoadingProgress(t.loaded/t.total*100)}).catch(t=>(window.epigraph.logger.groupCollapsed({title:"",contextOverride:this._loggerContext}),window.epigraph.logger.error({title:"An error occurred while trying to load an asset!",details:t,contextOverride:this._loggerContext}),this._state=nr.Failed,Promise.reject()));return e===void 0?Promise.reject(!1):(this._resource=e,await this._parseLoadedGltf(),this._state=nr.Loaded,Promise.resolve(!0))}async _parseLoadedGltf(){window.epigraph.logger.info({title:"Parsing GLTF data",details:this._resource,contextOverride:this._loggerContext})}unload(){return this._resource?.scene&&Vn.dispose3(this._resource.scene),this._resource={},Promise.resolve(!0)}}class m6 extends eD{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._loggerContext="EPG RESOURCE PROXY",this._type=Io.Proxy,this.__plugs=[],this.__receivers=[]}get plugs(){return this.__plugs}get receivers(){return this.__receivers}async _parseLoadedGltf(){if(!this._resource?.scene)return;const e=[];this._resource.scene.traverse(t=>{if(t.userData.epgType===hv.Receiver){const n=new Oa({name:t.name,connectionId:t.userData.connectionId,position:t.position.clone(),rotation:t.rotation.clone()});this.__receivers.push(n),e.push(t)}else if(t.userData.epgType===hv.Plug){const n=new Ro({name:t.name,isPrimary:t.userData.isPrimary,connectionId:t.userData.connectionId,position:t.position.clone(),rotation:t.rotation.clone()});this.__plugs.push(n),e.push(t)}});for(const t of this.__receivers)this._resource.scene.add(t);for(const t of this.__plugs)this._resource.scene.add(t);for(const t of e)t.removeFromParent(),Vn.dispose3(t)}unload(){return this._resource={},this.__plugs=[],this.__receivers=[],Promise.resolve(!0)}}class tD extends eD{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._loggerContext="EPG RESOURCE RENDER",this._type=Io.Render,this.__variantsExtensionName="KHR_materials_variants",this.__finishNamesFromAsset=[]}get khrVariantsExtensionName(){return this.__variantsExtensionName}get khrVariantsExtension(){return this.__variantsExtension}get finishNamesFromAsset(){return this.__finishNamesFromAsset}async _parseLoadedGltf(){this._resource?.scene.traverse(t=>{t instanceof Je&&(t.castShadow=!0)});const e=this._resource?.userData?.gltfExtensions;if(!e){this.__variantsExtension=null,this.__finishNamesFromAsset=["default"];return}if(this.__variantsExtension=e[this.__variantsExtensionName],this.__variantsExtension?.variants)for(const t of this.__variantsExtension.variants)this.__finishNamesFromAsset.push(t.name)}unload(){return this._resource?.scene&&Vn.dispose3(this._resource.scene),this._resource={},this.__variantsExtension={},this.__finishNamesFromAsset=[],Promise.resolve(!0)}}class y6 extends p2{constructor({id:e,uri:t,appWcRef:n}){super({id:e,uri:t,appWcRef:n}),this._type=Io.Splat,this._resource=null,this.__splatMesh=null,this._loggerContext="EPG RESOURCE SPLAT",this._appWcRef.renderEngine.setupSparkRendererIfNotExists()}get resource(){return this._resource}get splatMesh(){return this.__splatMesh}__parseLoadedSplat(){this._resource&&(this.__splatMesh=new Wh({packedSplats:this._resource}),this.__splatMesh.quaternion.set(1,0,0,0))}async load(){if(this._state===nr.Loaded||this._state===nr.Loading)return Promise.resolve(!0);this._state=nr.Loading;const e=await this._appWcRef.loaders.splatLoader.loadAsync(this._uri,t=>{this.updateLoadingProgress(t.loaded/t.total*100)}).catch(t=>(window.epigraph.logger.groupCollapsed({title:"",contextOverride:this._loggerContext}),window.epigraph.logger.error({title:"An error occurred while trying to load a render splat resource!",details:t,contextOverride:this._loggerContext}),this._state=nr.Failed,Promise.reject()));return e===void 0?Promise.reject(!1):(this._resource=e,this.__parseLoadedSplat(),this._state=nr.Loaded,Promise.resolve(!0))}}class nD{constructor(e,t){this._loggerContext="ASSET",this.__autoGenerateProxyEntity=!1,this.__finishes=new Map,this.__brandMaterialLibraries=new Map,this.__hotspots=[],this.__assetOverrides=null,this.__id=e.id,this.__name=e.name,this.__config=e,this.__appWcRef=t,this.__proxyGltf=new m6({id:`${String(e.id)}-${Io.Proxy}`,uri:e.proxyGeo,appWcRef:this.__appWcRef}),this.__autoGenerateProxyEntity=e.autoGenerateProxyEntity,!this.isRootAsset&&this.__appWcRef.experienceData.currentAssetVersion<=0&&(this.__autoGenerateProxyEntity=!0),this.__appWcRef.productSettings.render.mode===La.SPLAT?this.__renderSplat=new y6({id:`${String(e.id)}-${Io.Splat}`,uri:e.renderSplat,appWcRef:this.__appWcRef}):this.__renderGltf=new tD({id:`${String(e.id)}-${Io.Render}`,uri:e.renderGeo,appWcRef:this.__appWcRef});for(const n in e.finishes)this.__finishes.set(n,new Vp(n));e.brandMaterialLibraries||(e.brandMaterialLibraries=[]),e.hotspots&&(this.__hotspots=e.hotspots)}get isRootAsset(){return this.__id===0}get id(){return this.__id}get name(){return this.__name}get assetRootDir(){const e=this.__appWcRef.productSettings.render.mode===La.SPLAT?this.__renderSplat?.uri:this.__renderGltf?.uri;return new URL(e+"/../../").href}get assetOverrides(){return this.__assetOverrides}get proxyGltf(){return this.__proxyGltf}get autoGenerateProxyEntity(){return this.__autoGenerateProxyEntity}get renderSplat(){return this.__renderSplat}get renderGltf(){return this.__renderGltf}get finishes(){return this.__finishes}get hotspots(){return this.__hotspots}get brandMaterialLibraries(){return this.__brandMaterialLibraries}get allFinishIds(){const e=[];for(const t of this.__finishes.keys())e.push(t);return e}async loadRenderSplat(){await this.__renderSplat?.load(),this.__finishes.set("default",new Vp("default"))}async loadProxyGltf(){return!this.__proxyGltf||this.__proxyGltf.isLoaded?Promise.resolve(!0):await this.__proxyGltf.load()}pullFinishesFromRenderGltf(){this.__finishes.clear(),this.__renderGltf&&this.__renderGltf.finishNamesFromAsset.forEach(e=>{this.__finishes.has(e)||this.__finishes.set(e,new Vp(e))})}async parseAssetOverrideJson(){if(!this.__renderGltf)return null;let e=this.__renderGltf.resource?.asset.extras?.epgOverrides;if(!e)return null;e=e.replace("./","");const t=new URL(e,this.assetRootDir),n=await fetch(t).catch(s=>{window.epigraph.logger.error({title:`Failed to load asset override file: ${t}`,details:s,contextOverride:this._loggerContext})});n&&(this.__assetOverrides=await n.json())}async loadRenderGltf(e=!1){if(this.__renderGltf===void 0||this.__renderGltf.uri==="")return Promise.resolve(!0);await this.__renderGltf.load().catch(t=>(window.epigraph.logger.error({title:`Failed to load asset: ${this.__id}`,details:t,contextOverride:this._loggerContext}),Promise.reject(!1)));for(const t of this.__config.brandMaterialLibraries){const n=this.__appWcRef.experienceData.materialLibraryCollection.materialLibraries.get(t);if(await n?.load(),!n){window.epigraph.logger.warn({title:`Material library ${t} not found in brand material libraries.`,contextOverride:this._loggerContext});continue}this.__brandMaterialLibraries.set(n.id,n);for(const s of n.finishNamesFromAsset)this.finishes.has(s)||this.__finishes.set(s,new Vp(s))}return e&&this.pullFinishesFromRenderGltf(),await this.parseAssetOverrideJson(),Promise.resolve(!0)}async load(e=!1){return Promise.all([this.loadRenderSplat(),this.loadRenderGltf(e),this.loadProxyGltf()])}}class yn{static isTouchDevice(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}static async wait(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}static generateStylesDomElem(e,t=""){const n=document.createElement("style");return n.setAttribute("id",e),n.innerHTML=t,n}static generateHtmlDivElem(e,t=""){const n=document.createElement("div");return n.setAttribute("id",e),n.innerHTML=t,n}static getRandomIntegerInRange(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}static getUrlParameterByName(e,t=window.location.search){const n=new URLSearchParams(t);return Object.fromEntries(n.entries())[e]}static getBaseUrl(){const e=yn.getUrlParameterByName("parentUrl");return e||window.location.href}static normalizeRadian(e){return Math.atan2(Math.sin(e),Math.cos(e))}static isBetweenOnCircle(e,t,n){return e=yn.normalizeRadian(e),t=yn.normalizeRadian(t),n=yn.normalizeRadian(n),t<=n?e>=t&&e<=n:e>=t||e<=n}static clampAzimuth(e,t,n){if(Math.abs(t)==1/0||n==1/0)return e;const s=yn.normalizeRadian(e),r=yn.normalizeRadian(t),a=yn.normalizeRadian(n);if(yn.isBetweenOnCircle(s,r,a))return s;const o=Math.abs(yn.normalizeRadian(s-r)),l=Math.abs(yn.normalizeRadian(s-a));return o<l?r:a}static resolveNexusEndpoint(e){let t=Ed.PRODUCTION;switch(e){case"local":t=Ed.LOCAL;break;case"staging":t=Ed.STAGING;break;case"staging-canary":t=Ed.STAGING_CANARY;break}return t}static parseUrlForEpigraphParams(e){const t=new Map,n=new V_(e);t.set(ii.epigraphSessionId,n.getParameterInUrl(ii.epigraphSessionId)),t.set(ii.identifier,n.getParameterInUrl(ii.identifier)),t.set(ii.identifierType,n.getParameterInUrl(ii.identifierType)),t.set(ii.type,n.getParameterInUrl(ii.type));const s=n.getParameterInUrl(ii.action);return s&&t.set(Od.AR,JSON.parse(s)[Od.AR]),t}static generateShareableUrl({baseUrl:e,identifier:t,identifierType:n,sharedConfig:s,arCompatible:r=!1}){const a=new Map;return a.set(ii.epigraphSessionId,window.epigraph.epigraphSessionId),a.set(ii.identifier,t),a.set(ii.identifierType,n),s&&a.set(ii.sharedConfig,s),r&&a.set(ii.action,`{"${Od.AR}":true}`),new V_(e).generateQrCodeUrl(Object.fromEntries(a.entries()),!1)}static animateValue(e,t,n,s){const r=performance.now();function a(o){const l=o-r,c=Math.min(l/n,1),u=e+(t-e)*c;s(u),c<1&&requestAnimationFrame(a)}requestAnimationFrame(a)}static getCustomStylesTemplate(){if(yn.epigraphCustomStylesTemplate===void 0){const t=document.querySelector("#epigraphCustomStyles")?.content;t&&t.children.length>0&&(yn.epigraphCustomStylesTemplate=re`
|
|
12996
12996
|
<style>${t.children[0].textContent}</style>
|
|
12997
12997
|
`)}return yn.epigraphCustomStylesTemplate}}var _6=Object.defineProperty,iD=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=a(e,t,s)||s);return s&&_6(e,t,s),s};class Hb{constructor({appWcRef:e}){this._loggerContext="SOLUTION MANAGER",this._appWcRef=e}initialize(){window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext})}}const $b=class $f extends mh{constructor(){super(),this._loggerContext="SOLUTION MANAGER",this.enabled=!1}static{this.webComponentName="solution-manager"}connectedCallback(){super.connectedCallback(),window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext})}firstUpdated(e){super.firstUpdated(e)}static setupWebComponent(){window.customElements.get($f.webComponentName)||window.customElements.define($f.webComponentName,$f)}render(){return re`
|
|
12998
12998
|
${yn.getCustomStylesTemplate()}
|
|
@@ -13172,7 +13172,7 @@ ${r.join(`
|
|
|
13172
13172
|
* https://github.com/yomotsu/camera-controls
|
|
13173
13173
|
* (c) 2017 @yomotsu
|
|
13174
13174
|
* Released under the MIT License.
|
|
13175
|
-
*/const Bn={LEFT:1,RIGHT:2,MIDDLE:4},te=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,SCREEN_PAN:4,OFFSET:8,DOLLY:16,ZOOM:32,TOUCH_ROTATE:64,TOUCH_TRUCK:128,TOUCH_SCREEN_PAN:256,TOUCH_OFFSET:512,TOUCH_DOLLY:1024,TOUCH_ZOOM:2048,TOUCH_DOLLY_TRUCK:4096,TOUCH_DOLLY_SCREEN_PAN:8192,TOUCH_DOLLY_OFFSET:16384,TOUCH_DOLLY_ROTATE:32768,TOUCH_ZOOM_TRUCK:65536,TOUCH_ZOOM_OFFSET:131072,TOUCH_ZOOM_SCREEN_PAN:262144,TOUCH_ZOOM_ROTATE:524288}),Qc={NONE:0,IN:1,OUT:-1};function Xo(i){return i.isPerspectiveCamera}function io(i){return i.isOrthographicCamera}const eo=Math.PI*2,vw=Math.PI/2,oD=1e-5,Wu=Math.PI/180;function Zs(i,e,t){return Math.max(e,Math.min(t,i))}function un(i,e=oD){return Math.abs(i)<e}function qt(i,e,t=oD){return un(i-e,t)}function bw(i,e){return Math.round(i/e)*e}function ju(i){return isFinite(i)?i:i<0?-Number.MAX_VALUE:Number.MAX_VALUE}function Xu(i){return Math.abs(i)<Number.MAX_VALUE?i:i*(1/0)}function Kp(i,e,t,n,s=1/0,r){n=Math.max(1e-4,n);const a=2/n,o=a*r,l=1/(1+o+.48*o*o+.235*o*o*o);let c=i-e;const u=e,h=s*n;c=Zs(c,-h,h),e=i-c;const d=(t.value+a*c)*r;t.value=(t.value-a*d)*l;let A=e+(c+d)*l;return u-i>0==A>u&&(A=u,t.value=(A-u)/r),A}function xw(i,e,t,n,s=1/0,r,a){n=Math.max(1e-4,n);const o=2/n,l=o*r,c=1/(1+l+.48*l*l+.235*l*l*l);let u=e.x,h=e.y,d=e.z,A=i.x-u,p=i.y-h,g=i.z-d;const m=u,f=h,y=d,_=s*n,E=_*_,v=A*A+p*p+g*g;if(v>E){const P=Math.sqrt(v);A=A/P*_,p=p/P*_,g=g/P*_}u=i.x-A,h=i.y-p,d=i.z-g;const C=(t.x+o*A)*r,x=(t.y+o*p)*r,I=(t.z+o*g)*r;t.x=(t.x-o*C)*c,t.y=(t.y-o*x)*c,t.z=(t.z-o*I)*c,a.x=u+(A+C)*c,a.y=h+(p+x)*c,a.z=d+(g+I)*c;const b=m-i.x,w=f-i.y,S=y-i.z,B=a.x-m,T=a.y-f,D=a.z-y;return b*B+w*T+S*D>0&&(a.x=m,a.y=f,a.z=y,t.x=(a.x-m)/r,t.y=(a.y-f)/r,t.z=(a.z-y)/r),a}function m_(i,e){e.set(0,0),i.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=i.length,e.y/=i.length}function y_(i,e){return io(i)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class tY{_listeners={};addEventListener(e,t){const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const n=this._listeners[e.type];if(n!==void 0){e.target=this;const s=n.slice(0);for(let r=0,a=s.length;r<a;r++)s[r].call(this,e)}}}const nY="3.1.2",Zp=1/8,iY=/Mac/.test(globalThis?.navigator?.platform);let dt,Cw,ef,__,Wi,_t,Ft,Lc,Ju,mr,yr,Jo,Iw,ww,cs,Nc,Pc,Sw,E_,Bw,v_,b_,tf;class vh extends tY{static install(e){dt=e.THREE,Cw=Object.freeze(new dt.Vector3(0,0,0)),ef=Object.freeze(new dt.Vector3(0,1,0)),__=Object.freeze(new dt.Vector3(0,0,1)),Wi=new dt.Vector2,_t=new dt.Vector3,Ft=new dt.Vector3,Lc=new dt.Vector3,Ju=new dt.Vector3,mr=new dt.Vector3,yr=new dt.Vector3,Jo=new dt.Vector3,Iw=new dt.Vector3,ww=new dt.Vector3,cs=new dt.Spherical,Nc=new dt.Spherical,Pc=new dt.Box3,Sw=new dt.Box3,E_=new dt.Sphere,Bw=new dt.Quaternion,v_=new dt.Quaternion,b_=new dt.Matrix4,tf=new dt.Raycaster}static get ACTION(){return te}minPolarAngle=0;maxPolarAngle=Math.PI;minAzimuthAngle=-1/0;maxAzimuthAngle=1/0;minDistance=Number.EPSILON;maxDistance=1/0;infinityDolly=!1;minZoom=.01;maxZoom=1/0;smoothTime=.25;draggingSmoothTime=.125;maxSpeed=1/0;azimuthRotateSpeed=1;polarRotateSpeed=1;dollySpeed=1;dollyDragInverted=!1;truckSpeed=2;dollyToCursor=!1;dragToOffset=!1;boundaryFriction=0;restThreshold=.01;colliderMeshes=[];mouseButtons;touches;cancel=()=>{};lockPointer;unlockPointer;_enabled=!0;_camera;_yAxisUpSpace;_yAxisUpSpaceInverse;_state=te.NONE;_domElement;_viewport=null;_target;_targetEnd;_focalOffset;_focalOffsetEnd;_spherical;_sphericalEnd;_lastDistance;_zoom;_zoomEnd;_lastZoom;_cameraUp0;_target0;_position0;_zoom0;_focalOffset0;_dollyControlCoord;_changedDolly=0;_changedZoom=0;_nearPlaneCorners;_hasRested=!0;_boundary;_boundaryEnclosesCamera=!1;_needsUpdate=!0;_updatedLastTime=!1;_elementRect=new DOMRect;_isDragging=!1;_dragNeedsUpdate=!0;_activePointers=[];_lockedPointer=null;_interactiveArea=new DOMRect(0,0,1,1);_isUserControllingRotate=!1;_isUserControllingDolly=!1;_isUserControllingTruck=!1;_isUserControllingOffset=!1;_isUserControllingZoom=!1;_lastDollyDirection=Qc.NONE;_thetaVelocity={value:0};_phiVelocity={value:0};_radiusVelocity={value:0};_targetVelocity=new dt.Vector3;_focalOffsetVelocity=new dt.Vector3;_zoomVelocity={value:0};set verticalDragToForward(e){console.warn("camera-controls: `verticalDragToForward` was removed. Use `mouseButtons.left = CameraControls.ACTION.SCREEN_PAN` instead.")}constructor(e,t){super(),typeof dt>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new dt.Quaternion().setFromUnitVectors(this._camera.up,ef),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=te.NONE,this._target=new dt.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new dt.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new dt.Spherical().setFromVector3(_t.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new dt.Vector3,new dt.Vector3,new dt.Vector3,new dt.Vector3],this._updateNearPlaneCorners(),this._boundary=new dt.Box3(new dt.Vector3(-1/0,-1/0,-1/0),new dt.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new dt.Vector2,this.mouseButtons={left:te.ROTATE,middle:te.DOLLY,right:te.TRUCK,wheel:Xo(this._camera)?te.DOLLY:io(this._camera)?te.ZOOM:te.NONE},this.touches={one:te.TOUCH_ROTATE,two:Xo(this._camera)?te.TOUCH_DOLLY_TRUCK:io(this._camera)?te.TOUCH_ZOOM_TRUCK:te.NONE,three:te.TOUCH_TRUCK};const n=new dt.Vector2,s=new dt.Vector2,r=new dt.Vector2,a=f=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),v=f.clientX/E.width,C=f.clientY/E.height;if(v<this._interactiveArea.left||v>this._interactiveArea.right||C<this._interactiveArea.top||C>this._interactiveArea.bottom)return}const y=f.pointerType!=="mouse"?null:(f.buttons&Bn.LEFT)===Bn.LEFT?Bn.LEFT:(f.buttons&Bn.MIDDLE)===Bn.MIDDLE?Bn.MIDDLE:(f.buttons&Bn.RIGHT)===Bn.RIGHT?Bn.RIGHT:null;if(y!==null){const E=this._findPointerByMouseButton(y);E&&this._disposePointer(E)}if((f.buttons&Bn.LEFT)===Bn.LEFT&&this._lockedPointer)return;const _={pointerId:f.pointerId,clientX:f.clientX,clientY:f.clientY,deltaX:0,deltaY:0,mouseButton:y};this._activePointers.push(_),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",l),this._isDragging=!0,d(f)},o=f=>{f.cancelable&&f.preventDefault();const y=f.pointerId,_=this._lockedPointer||this._findPointerById(y);if(_){if(_.clientX=f.clientX,_.clientY=f.clientY,_.deltaX=f.movementX,_.deltaY=f.movementY,this._state=0,f.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(f.buttons&Bn.LEFT)===Bn.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(f.buttons&Bn.MIDDLE)===Bn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(f.buttons&Bn.RIGHT)===Bn.RIGHT&&(this._state=this._state|this.mouseButtons.right);A()}},l=f=>{const y=this._findPointerById(f.pointerId);if(!(y&&y===this._lockedPointer)){if(y&&this._disposePointer(y),f.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=te.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=te.NONE;p()}};let c=-1;const u=f=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===te.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const x=this._domElement.getBoundingClientRect(),I=f.clientX/x.width,b=f.clientY/x.height;if(I<this._interactiveArea.left||I>this._interactiveArea.right||b<this._interactiveArea.top||b>this._interactiveArea.bottom)return}if(f.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===te.ROTATE||this.mouseButtons.wheel===te.TRUCK){const x=performance.now();c-x<1e3&&this._getClientRect(this._elementRect),c=x}const y=iY?-1:-3,_=f.deltaMode===1&&!f.ctrlKey?f.deltaY/y:f.deltaY/(y*10),E=this.dollyToCursor?(f.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,v=this.dollyToCursor?(f.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(f.ctrlKey?te.ZOOM:this.mouseButtons.wheel){case te.ROTATE:{this._rotateInternal(f.deltaX,f.deltaY),this._isUserControllingRotate=!0;break}case te.TRUCK:{this._truckInternal(f.deltaX,f.deltaY,!1,!1),this._isUserControllingTruck=!0;break}case te.SCREEN_PAN:{this._truckInternal(f.deltaX,f.deltaY,!1,!0),this._isUserControllingTruck=!0;break}case te.OFFSET:{this._truckInternal(f.deltaX,f.deltaY,!0,!1),this._isUserControllingOffset=!0;break}case te.DOLLY:{this._dollyInternal(-_,E,v),this._isUserControllingDolly=!0;break}case te.ZOOM:{this._zoomInternal(-_,E,v),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},h=f=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===vh.ACTION.NONE){const y=f instanceof PointerEvent?f.pointerId:0,_=this._findPointerById(y);_&&this._disposePointer(_),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l);return}f.preventDefault()}},d=f=>{if(!this._enabled)return;if(m_(this._activePointers,Wi),this._getClientRect(this._elementRect),n.copy(Wi),s.copy(Wi),this._activePointers.length>=2){const _=Wi.x-this._activePointers[1].clientX,E=Wi.y-this._activePointers[1].clientY,v=Math.sqrt(_*_+E*E);r.set(0,v);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,x=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(C,x)}if(this._state=0,!f)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in f&&f.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(f.buttons&Bn.LEFT)===Bn.LEFT&&(this._state=this._state|this.mouseButtons.left),(f.buttons&Bn.MIDDLE)===Bn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(f.buttons&Bn.RIGHT)===Bn.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&te.ROTATE)===te.ROTATE||(this._state&te.TOUCH_ROTATE)===te.TOUCH_ROTATE||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&te.TRUCK)===te.TRUCK||(this._state&te.SCREEN_PAN)===te.SCREEN_PAN||(this._state&te.TOUCH_TRUCK)===te.TOUCH_TRUCK||(this._state&te.TOUCH_SCREEN_PAN)===te.TOUCH_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&te.DOLLY)===te.DOLLY||(this._state&te.TOUCH_DOLLY)===te.TOUCH_DOLLY||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&te.ZOOM)===te.ZOOM||(this._state&te.TOUCH_ZOOM)===te.TOUCH_ZOOM||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_ZOOM_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&te.OFFSET)===te.OFFSET||(this._state&te.TOUCH_OFFSET)===te.TOUCH_OFFSET||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},A=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,m_(this._activePointers,Wi);const y=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,_=y?-y.deltaX:s.x-Wi.x,E=y?-y.deltaY:s.y-Wi.y;if(s.copy(Wi),((this._state&te.ROTATE)===te.ROTATE||(this._state&te.TOUCH_ROTATE)===te.TOUCH_ROTATE||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(_,E),this._isUserControllingRotate=!0),(this._state&te.DOLLY)===te.DOLLY||(this._state&te.ZOOM)===te.ZOOM){const v=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,x=this.dollyDragInverted?-1:1;(this._state&te.DOLLY)===te.DOLLY?(this._dollyInternal(x*E*Zp,v,C),this._isUserControllingDolly=!0):(this._zoomInternal(x*E*Zp,v,C),this._isUserControllingZoom=!0)}if((this._state&te.TOUCH_DOLLY)===te.TOUCH_DOLLY||(this._state&te.TOUCH_ZOOM)===te.TOUCH_ZOOM||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_ZOOM_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE){const v=Wi.x-this._activePointers[1].clientX,C=Wi.y-this._activePointers[1].clientY,x=Math.sqrt(v*v+C*C),I=r.y-x;r.set(0,x);const b=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&te.TOUCH_DOLLY)===te.TOUCH_DOLLY||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET?(this._dollyInternal(I*Zp,b,w),this._isUserControllingDolly=!0):(this._zoomInternal(I*Zp,b,w),this._isUserControllingZoom=!0)}((this._state&te.TRUCK)===te.TRUCK||(this._state&te.TOUCH_TRUCK)===te.TOUCH_TRUCK||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(_,E,!1,!1),this._isUserControllingTruck=!0),((this._state&te.SCREEN_PAN)===te.SCREEN_PAN||(this._state&te.TOUCH_SCREEN_PAN)===te.TOUCH_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_ZOOM_SCREEN_PAN)&&(this._truckInternal(_,E,!1,!0),this._isUserControllingTruck=!0),((this._state&te.OFFSET)===te.OFFSET||(this._state&te.TOUCH_OFFSET)===te.TOUCH_OFFSET||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(_,E,!0,!1),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{m_(this._activePointers,Wi),s.copy(Wi),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",g),this._domElement.ownerDocument.addEventListener("pointerlockerror",m),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",l),d())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),this._domElement?.ownerDocument.exitPointerLock(),this._domElement?.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement?.ownerDocument.removeEventListener("pointerlockerror",m),this.cancel()};const g=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},m=()=>{this.unlockPointer()};this._addAllEventListeners=f=>{this._domElement=f,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",a),this._domElement.addEventListener("pointercancel",l),this._domElement.addEventListener("wheel",u,{passive:!1}),this._domElement.addEventListener("contextmenu",h)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",a),this._domElement.removeEventListener("pointercancel",l),this._domElement.removeEventListener("wheel",u,{passive:!1}),this._domElement.removeEventListener("contextmenu",h),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",m))},this.cancel=()=>{this._state!==te.NONE&&(this._state=te.NONE,this._activePointers.length=0,p())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=Zs(e.width,0,1),this._interactiveArea.height=Zs(e.height,0,1),this._interactiveArea.x=Zs(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Zs(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const s=Zs(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=Zs(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=r,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const a=!n||qt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&qt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(a)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Qc.NONE,this._changedDolly=0,this._dollyToNoClamp(Zs(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const a=this._collisionTest(),o=qt(a,this._spherical.radius);if(!(n>e)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,a)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const r=!t||qt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(Ju).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=Zs(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||qt(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),mr.setFromMatrixColumn(this._camera.matrix,0),yr.setFromMatrixColumn(this._camera.matrix,1),mr.multiplyScalar(e),yr.multiplyScalar(-t);const s=_t.copy(mr).add(yr),r=Ft.copy(this._targetEnd).add(s);return this.moveTo(r.x,r.y,r.z,n)}forward(e,t=!1){_t.setFromMatrixColumn(this._camera.matrix,0),_t.crossVectors(this._camera.up,_t),_t.multiplyScalar(e);const n=Ft.copy(this._targetEnd).add(_t);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return _t.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+_t.x,this._targetEnd.y+_t.y,this._targetEnd.z+_t.z,t)}moveTo(e,t,n,s=!1){this._isUserControllingTruck=!1;const r=_t.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const a=!s||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,s=!1){const o=_t.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(o.x,o.y,o.z,s)}fitToBox(e,t,{cover:n=!1,paddingLeft:s=0,paddingRight:r=0,paddingBottom:a=0,paddingTop:o=0}={}){const l=[],c=e.isBox3?Pc.copy(e):Pc.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=bw(this._sphericalEnd.theta,vw),h=bw(this._sphericalEnd.phi,vw);l.push(this.rotateTo(u,h,t));const d=_t.setFromSpherical(this._sphericalEnd).normalize(),A=Bw.setFromUnitVectors(d,__),p=qt(Math.abs(d.y),1);p&&A.multiply(v_.setFromAxisAngle(ef,u)),A.multiply(this._yAxisUpSpaceInverse);const g=Sw.makeEmpty();Ft.copy(c.min).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.min).setX(c.max.x).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.min).setY(c.max.y).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).setZ(c.min.z).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.min).setZ(c.max.z).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).setY(c.min.y).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).setX(c.min.x).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).applyQuaternion(A),g.expandByPoint(Ft),g.min.x-=s,g.min.y-=a,g.max.x+=r,g.max.y+=o,A.setFromUnitVectors(__,d),p&&A.premultiply(v_.invert()),A.premultiply(this._yAxisUpSpace);const m=g.getSize(_t),f=g.getCenter(Ft).applyQuaternion(A);if(Xo(this._camera)){const y=this.getDistanceToFitBox(m.x,m.y,m.z,n);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.dollyTo(y,t)),l.push(this.setFocalOffset(0,0,0,t))}else if(io(this._camera)){const y=this._camera,_=y.right-y.left,E=y.top-y.bottom,v=n?Math.max(_/m.x,E/m.y):Math.min(_/m.x,E/m.y);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.zoomTo(v,t)),l.push(this.setFocalOffset(0,0,0,t))}return Promise.all(l)}fitToSphere(e,t){const n=[],r="isObject3D"in e?vh.createBoundingSphere(e,E_):E_.copy(e);if(n.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Xo(this._camera)){const a=this.getDistanceToFitSphere(r.radius);n.push(this.dollyTo(a,t))}else if(io(this._camera)){const a=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,l=2*r.radius,c=Math.min(a/l,o/l);n.push(this.zoomTo(c,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,s,r,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Qc.NONE,this._changedDolly=0;const l=Ft.set(s,r,a),c=_t.set(e,t,n);this._targetEnd.copy(l),this._sphericalEnd.setFromVector3(c.sub(l).applyQuaternion(this._yAxisUpSpace)),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!o||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold)&&qt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&qt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&qt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerp(e,t,n,s=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Qc.NONE,this._changedDolly=0;const r=_t.set(...e.target);if("spherical"in e)cs.set(...e.spherical);else{const h=Ft.set(...e.position);cs.setFromVector3(h.sub(r).applyQuaternion(this._yAxisUpSpace))}const a=Lc.set(...t.target);if("spherical"in t)Nc.set(...t.spherical);else{const h=Ft.set(...t.position);Nc.setFromVector3(h.sub(a).applyQuaternion(this._yAxisUpSpace))}this._targetEnd.copy(r.lerp(a,n));const o=Nc.theta-cs.theta,l=Nc.phi-cs.phi,c=Nc.radius-cs.radius;this._sphericalEnd.set(cs.radius+c*n,cs.phi+l*n,cs.theta+o*n),this._needsUpdate=!0,s||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!s||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold)&&qt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&qt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&qt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,n,s,r,a,o,l,c,u,h,d,A,p=!1){return this.lerp({position:[e,t,n],target:[s,r,a]},{position:[o,l,c],target:[u,h,d]},A,p)}setPosition(e,t,n,s=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,n,s=!1){const r=this.getPosition(_t),a=this.setLookAt(r.x,r.y,r.z,e,t,n,s);return this._sphericalEnd.phi=Zs(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const r=!s||qt(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&qt(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&qt(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),mr.setFromMatrixColumn(this._camera.matrixWorldInverse,0),yr.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Jo.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=_t.set(e,t,n),r=s.distanceTo(this._camera.position),a=s.sub(this._camera.position);mr.multiplyScalar(a.x),yr.multiplyScalar(a.y),Jo.multiplyScalar(a.z),_t.copy(mr).add(yr).add(Jo),_t.z=_t.z+r,this.dollyTo(r,!1),this.setFocalOffset(-_t.x,_t.y,-_t.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,s){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new dt.Vector4,typeof e=="number"?this._viewport.set(e,t,n,s):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,s=!1){if(y_(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,a=this._camera.getEffectiveFOV()*Wu,o=this._camera.aspect;return((s?r>o:r<o)?t:e/o)*.5/Math.tan(a*.5)+n*.5}getDistanceToFitSphere(e){if(y_(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*Wu,n=Math.atan(Math.tan(t*.5)*this._camera.aspect)*2,s=1<this._camera.aspect?t:n;return e/Math.sin(s*.5)}getTarget(e,t=!0){return(e&&e.isVector3?e:new dt.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new dt.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e||new dt.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new dt.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){return this._sphericalEnd.theta=(this._sphericalEnd.theta%eo+eo)%eo,this._sphericalEnd.theta>Math.PI&&(this._sphericalEnd.theta-=eo),this._spherical.theta+=eo*Math.round((this._sphericalEnd.theta-this._spherical.theta)/eo),this}stop(){this._focalOffset.copy(this._focalOffsetEnd),this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd),this._zoom=this._zoomEnd}reset(e=!1){if(!qt(this._camera.up.x,this._cameraUp0.x)||!qt(this._camera.up.y,this._cameraUp0.y)||!qt(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const n=this.getPosition(_t);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}const t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,ef),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=_t.subVectors(this._target,this._camera.position).normalize(),t=Ft.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(_t);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){const t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,s=this._sphericalEnd.radius-this._spherical.radius,r=Iw.subVectors(this._targetEnd,this._target),a=ww.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(un(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const h=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=Kp(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,h,1/0,e),this._needsUpdate=!0}if(un(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const h=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=Kp(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,h,1/0,e),this._needsUpdate=!0}if(un(s))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const h=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=Kp(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,h,this.maxSpeed,e),this._needsUpdate=!0}if(un(r.x)&&un(r.y)&&un(r.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const h=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;xw(this._target,this._targetEnd,this._targetVelocity,h,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(un(a.x)&&un(a.y)&&un(a.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const h=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;xw(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,h,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(un(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const h=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=Kp(this._zoom,this._zoomEnd,this._zoomVelocity,h,1/0,e)}if(this.dollyToCursor){if(Xo(this._camera)&&this._changedDolly!==0){const h=this._spherical.radius-this._lastDistance,d=this._camera,A=this._getCameraDirection(Ju),p=_t.copy(A).cross(d.up).normalize();p.lengthSq()===0&&(p.x=1);const g=Ft.crossVectors(p,A),m=this._sphericalEnd.radius*Math.tan(d.getEffectiveFOV()*Wu*.5),y=(this._sphericalEnd.radius-h-this._sphericalEnd.radius)/this._sphericalEnd.radius,_=Lc.copy(this._targetEnd).add(p.multiplyScalar(this._dollyControlCoord.x*m*d.aspect)).add(g.multiplyScalar(this._dollyControlCoord.y*m)),E=_t.copy(this._targetEnd).lerp(_,y),v=this._lastDollyDirection===Qc.IN&&this._spherical.radius<=this.minDistance,C=this._lastDollyDirection===Qc.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(v||C)){this._sphericalEnd.radius-=h,this._spherical.radius-=h;const I=Ft.copy(A).multiplyScalar(-h);E.add(I)}this._boundary.clampPoint(E,E);const x=Ft.subVectors(E,this._targetEnd);this._targetEnd.copy(E),this._target.add(x),this._changedDolly-=h,un(this._changedDolly)&&(this._changedDolly=0)}else if(io(this._camera)&&this._changedZoom!==0){const h=this._zoom-this._lastZoom,d=this._camera,A=_t.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(d.near+d.far)/(d.near-d.far)).unproject(d),p=Ft.set(0,0,-1).applyQuaternion(d.quaternion),g=Lc.copy(A).add(p.multiplyScalar(-A.dot(d.up))),f=-(this._zoom-h-this._zoom)/this._zoom,y=this._getCameraDirection(Ju),_=this._targetEnd.dot(y),E=_t.copy(this._targetEnd).lerp(g,f),v=E.dot(y),C=y.multiplyScalar(v-_);E.sub(C),this._boundary.clampPoint(E,E);const x=Ft.subVectors(E,this._targetEnd);this._targetEnd.copy(E),this._target.add(x),this._changedZoom-=h,un(this._changedZoom)&&(this._changedZoom=0)}}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;const l=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,l),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target),(!un(this._focalOffset.x)||!un(this._focalOffset.y)||!un(this._focalOffset.z))&&(this._camera.matrix.compose(this._camera.position,this._camera.quaternion,this._camera.scale),mr.setFromMatrixColumn(this._camera.matrix,0),yr.setFromMatrixColumn(this._camera.matrix,1),Jo.setFromMatrixColumn(this._camera.matrix,2),mr.multiplyScalar(this._focalOffset.x),yr.multiplyScalar(-this._focalOffset.y),Jo.multiplyScalar(this._focalOffset.z),_t.copy(mr).add(yr).add(Jo),this._camera.position.add(_t),this._camera.updateMatrixWorld()),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),_t.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const u=this._needsUpdate;return u&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):u?(this.dispatchEvent({type:"update"}),un(t,this.restThreshold)&&un(n,this.restThreshold)&&un(s,this.restThreshold)&&un(r.x,this.restThreshold)&&un(r.y,this.restThreshold)&&un(r.z,this.restThreshold)&&un(a.x,this.restThreshold)&&un(a.y,this.restThreshold)&&un(a.z,this.restThreshold)&&un(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!u&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=u,this._needsUpdate=!1,u}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:ju(this.maxDistance),minZoom:this.minZoom,maxZoom:ju(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:ju(this.maxPolarAngle),minAzimuthAngle:ju(this.minAzimuthAngle),maxAzimuthAngle:ju(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,target:this._targetEnd.toArray(),position:_t.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e,t=!1){const n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=Xu(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=Xu(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=Xu(n.maxPolarAngle),this.minAzimuthAngle=Xu(n.minAzimuthAngle),this.maxAzimuthAngle=Xu(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),cs.setFromVector3(_t.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(cs.theta,cs.phi,t),this.dollyTo(cs.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){if(this._domElement){console.warn("camera-controls is already connected.");return}e.setAttribute("data-camera-controls-version",nY),this._addAllEventListeners(e),this._getClientRect(this._elementRect)}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find(t=>t.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const s=t.lengthSq();if(s===0)return e;const r=Ft.copy(t).add(e),o=this._boundary.clampPoint(r,Lc).sub(r),l=o.lengthSq();if(l===0)return e.add(t);if(l===s)return e;if(n===0)return e.add(t).add(o);{const c=1+n*l/t.dot(o);return e.add(Ft.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(Xo(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*Wu,s=Math.tan(n*.5)*t,r=s*e.aspect;this._nearPlaneCorners[0].set(-r,-s,0),this._nearPlaneCorners[1].set(r,-s,0),this._nearPlaneCorners[2].set(r,s,0),this._nearPlaneCorners[3].set(-r,s,0)}else if(io(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,s=e.right*t,r=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,r,0),this._nearPlaneCorners[1].set(s,r,0),this._nearPlaneCorners[2].set(s,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_truckInternal=(e,t,n,s)=>{let r,a;if(Xo(this._camera)){const o=_t.copy(this._camera.position).sub(this._target),l=this._camera.getEffectiveFOV()*Wu,c=o.length()*Math.tan(l*.5);r=this.truckSpeed*e*c/this._elementRect.height,a=this.truckSpeed*t*c/this._elementRect.height}else if(io(this._camera)){const o=this._camera;r=this.truckSpeed*e*(o.right-o.left)/o.zoom/this._elementRect.width,a=this.truckSpeed*t*(o.top-o.bottom)/o.zoom/this._elementRect.height}else return;s?(n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(r,0,!0),this.forward(-a,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y+a,this._focalOffsetEnd.z,!0):this.truck(r,a,!0)};_rotateInternal=(e,t)=>{const n=eo*this.azimuthRotateSpeed*e/this._elementRect.height,s=eo*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,s,!0)};_dollyInternal=(e,t,n)=>{const s=Math.pow(.95,-e*this.dollySpeed),r=this._sphericalEnd.radius,a=this._sphericalEnd.radius*s,o=Zs(a,this.minDistance,this.maxDistance),l=o-a;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(a,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(l,!0),this._dollyToNoClamp(o,!0)):this._dollyToNoClamp(o,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?a:o)-r,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)};_zoomInternal=(e,t,n)=>{const s=Math.pow(.95,e*this.dollySpeed),r=this._zoom,a=this._zoom*s;this.zoomTo(a,!0),this.dollyToCursor&&(this._changedZoom+=a-r,this._dollyControlCoord.set(t,n))};_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||y_(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(Ju);b_.lookAt(Cw,n,this._camera.up);for(let s=0;s<4;s++){const r=Ft.copy(this._nearPlaneCorners[s]);r.applyMatrix4(b_);const a=Lc.addVectors(this._target,r);tf.set(a,n),tf.far=this._spherical.radius+1;const o=tf.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance<e&&(e=o[0].distance)}return e}_getClientRect(e){if(!this._domElement)return;const t=this._domElement.getBoundingClientRect();return e.x=t.left,e.y=t.top,this._viewport?(e.x+=this._viewport.x,e.y+=t.height-this._viewport.w-this._viewport.y,e.width=this._viewport.z,e.height=this._viewport.w):(e.width=t.width,e.height=t.height),e}_createOnRestPromise(e){return e?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise(t=>{const n=()=>{this.removeEventListener("rest",n),t()};this.addEventListener("rest",n)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new dt.Sphere){const n=t,s=n.center;Pc.makeEmpty(),e.traverseVisible(a=>{a.isMesh&&Pc.expandByObject(a)}),Pc.getCenter(s);let r=0;return e.traverseVisible(a=>{if(!a.isMesh)return;const o=a;if(!o.geometry)return;const l=o.geometry.clone();l.applyMatrix4(o.matrixWorld);const u=l.attributes.position;for(let h=0,d=u.count;h<d;h++)_t.fromBufferAttribute(u,h),r=Math.max(r,s.distanceToSquared(_t))}),n.radius=Math.sqrt(r),n}}class Tw{constructor(e){this.__position=new Q,this.__target=new Q,this.setPosition(e.position.x,e.position.y,e.position.z),this.setTarget(e.target.x,e.target.y,e.target.z)}getPosition(){return this.__position}setPosition(e,t,n){this.__position.setX(e),this.__position.setY(t),this.__position.setZ(n)}getTarget(){return this.__target}setTarget(e,t,n){this.__target.setX(e),this.__target.setY(t),this.__target.setZ(n)}}class Gg extends Hb{constructor({appWcRef:e}){super({appWcRef:e}),this._loggerContext="CAMERA MANAGER",this.__cameras={},this.__mainRenderer={},this.__mainCameraControls={},this.__cameraDirection=new Q,this.__cameraSpherical=new Ll,this.__savedCameraState={position:new Q,target:new Q,focalLength:0},this.__currentCameraPosition=new Q,this.__currentTargetPosition=new Q}static{this.TAU=Math.PI*2}get cameraActions(){return vh.ACTION}getCameras(){return this.__cameras}get mainCameraControls(){return this.__mainCameraControls}getCurrentCameraTransforms(){return this.__cameras.main.getWorldPosition(this.__currentCameraPosition),this.__mainCameraControls.getTarget(this.__currentTargetPosition),{position:this.__currentCameraPosition,target:this.__currentTargetPosition,focalLength:this.__cameras.main.getFocalLength()}}getCurrentCameraRotation(){return{azimuthAngle:this.__mainCameraControls.azimuthAngle,polarAngle:this.__mainCameraControls.polarAngle,distance:this.__mainCameraControls.distance}}getCameraFocalLength(){return this.__cameras.main.getFocalLength()}setCameraFocalLength(e){this.__cameras.main.setFocalLength(e)}async fitCameraToSceneBounds(e=!0){const t=this._appWcRef.getSceneSphericalBounds().clone();if(t.isEmpty()||t.radius<=0)return;let n=this._appWcRef.productSettings.camera.cameraBoundsMultiplier;return this._appWcRef.cameraBoundsMultiplier!==0&&(n=this._appWcRef.cameraBoundsMultiplier),this._appWcRef.aspectRatio<1&&(n=1),t.radius=t.radius*n,await this.fitCameraToObject({objectToFocus:t,enableTransition:e})}__onMainCameraControlsControlStart(){const e=this.__mainCameraControls,t=e.currentAction===e.mouseButtons?.right||e.currentAction===e.touches?.two;this.__cameraSettings.canPan&&t?this._appWcRef.eventsManager.cameraControlsStart.fire({type:"pan"}):e.currentAction===e.mouseButtons?.left?this._appWcRef.eventsManager.cameraControlsStart.fire({type:"rotate"}):this._appWcRef.eventsManager.cameraControlsStart.fire({type:null})}__onMainCameraControlsControlEnd(){this._appWcRef.eventsManager.inputEnd.fire()}saveCurrentCameraTransforms(){this.__mainCameraControls.getPosition(this.__savedCameraState.position),this.__mainCameraControls.getTarget(this.__savedCameraState.target),this.__savedCameraState.focalLength=this.getCameraFocalLength()}resetCurrentCameraTransformsToLastSavedState(e=!0){this.moveCameraToLocation({newCameraTransforms:this.__savedCameraState,transition:e})}setCameraZoomLimits({minDistance:e,maxDistance:t}){this._appWcRef.productSettings.camera.canZoom===!1&&(e=null,t=null),e===null&&(e=.001),t===null&&(t=1/0);const n=this._appWcRef.getSceneSphericalBounds().radius;n<0||(this.__mainCameraControls.minDistance=Math.min(e,n),this.__mainCameraControls.maxDistance=n+t)}enableRotationControls(){this.__mainCameraControls.mouseButtons.left=this.cameraActions.ROTATE,this.__mainCameraControls.touches.one=this.cameraActions.TOUCH_ROTATE}disableRotationControls(){this.__mainCameraControls.mouseButtons.left=this.cameraActions.NONE,this.__mainCameraControls.touches.one=this.cameraActions.NONE}enablePanControls(){this.__mainCameraControls.touches.two=this.cameraActions.TOUCH_DOLLY_TRUCK,this.__mainCameraControls.mouseButtons.right=this.cameraActions.TRUCK}disablePanControls(){this.__mainCameraControls.touches.two=this.cameraActions.NONE,this.__mainCameraControls.mouseButtons.right=this.cameraActions.NONE}enableZoomControls(){if(this._appWcRef.disableZoom){this.disableZoomControls();return}this.__mainCameraControls.touches.two=this.cameraActions.TOUCH_DOLLY,this.__mainCameraControls.mouseButtons.wheel=this.cameraActions.DOLLY}disableZoomControls(){this.__mainCameraControls.mouseButtons.wheel=this.cameraActions.NONE,this.__mainCameraControls.touches.two=this.cameraActions.NONE}enableCameraZoomLimits(e){this.setCameraZoomLimits({minDistance:e.minDistance,maxDistance:e.maxDistance})}disableCameraZoomLimits(){this.setCameraZoomLimits({minDistance:null,maxDistance:null})}enableCameraRotationLimits(e){const{infinitePolarAngle:t,minPolarAngle:n,maxPolarAngle:s,infiniteAzimuthAngle:r,minAzimuthAngle:a,maxAzimuthAngle:o}=e;this.__mainCameraControls.minPolarAngle=t?-1/0:n,this.__mainCameraControls.maxPolarAngle=t?1/0:s,this.__mainCameraControls.minAzimuthAngle=r?-1/0:a,this.__mainCameraControls.maxAzimuthAngle=r?1/0:o}disableCameraRotationLimits(){this.__mainCameraControls.minPolarAngle=-1/0,this.__mainCameraControls.maxPolarAngle=1/0,this.__mainCameraControls.minAzimuthAngle=-1/0,this.__mainCameraControls.maxAzimuthAngle=1/0}updateCameraSettings(e){this.__cameraSettings=JSON.parse(JSON.stringify(e)),this.enableRotationControls();const{canPan:t,canZoom:n}=e;n?this.enableZoomControls():this.disableZoomControls(),t?this.enablePanControls():this.disablePanControls(),this.__mainCameraControls.mouseButtons.middle=this.cameraActions.NONE,this.__mainCameraControls.enabled=!0,this.__cameras.main.setFocalLength(e.focalLength),this.__cameras.main.near=e.nearClip,this.__cameras.main.far=e.farClip,this.enableCameraZoomLimits(e),this.enableCameraRotationLimits(e),this._appWcRef.transparentBackground===!1&&(this.__mainRenderer.setClearColor(e.backgroundColor),this.__mainRenderer.setClearAlpha(e.backgroundAlpha))}normalizeAngle(e){return Br.euclideanModulo(e,Gg.TAU)}absoluteAngle(e,t){const n=e-t;return Br.euclideanModulo(n+Math.PI,Gg.TAU)-Math.PI}async moveCameraToLocation({newCameraTransforms:e,freezeCamera:t=!1,transition:n=!0,targetCameraControlsRef:s=this.__mainCameraControls,ignoreCameraLimits:r=!1}){e instanceof Tw||(e=new Tw(e));const a=e.getPosition(),o=e.getTarget();if(s.enabled=!1,r===!0)s.setLookAt(a.x,a.y,a.z,o.x,o.y,o.z,n),s.normalizeRotations();else{this.__cameraDirection.set(0,0,0),this.__cameraDirection.subVectors(a,o),this.__cameraDirection.normalize();const l=a.distanceTo(o);this.__cameraSpherical.setFromVector3(this.__cameraDirection);const c=this.absoluteAngle(this.normalizeAngle(this.__cameraSpherical.theta),this.normalizeAngle(s.azimuthAngle)),u=this.absoluteAngle(this.normalizeAngle(this.__cameraSpherical.phi),this.normalizeAngle(s.polarAngle));s.rotate(c,u,n),s.moveTo(o.x,o.y,o.z,n),s.dollyTo(l,n)}t||(s.enabled=!0)}async rotateCameraToLocation({azimuthAngle:e,polarAngle:t,distance:n,transition:s=!0,targetCameraControlsRef:r=this.__mainCameraControls}){e&&r.rotateAzimuthTo(e,s),t&&r.rotatePolarTo(t,s),n&&r.dollyTo(n,s)}async fitCameraToObject({objectToFocus:e,enableTransition:t=!0}){return await this.__mainCameraControls.fitToSphere(e,t)}async wiggleCamera(){const e=this.__mainCameraControls.azimuthAngle,t=[0,.4,-.3,0];for(const n of t){if(!this._appWcRef.playInteractionPrompt)break;await this.__mainCameraControls.rotateAzimuthTo(e+n,!0)}}__onProductSettingsUpdated(){this.updateCameraSettings(this._appWcRef.productSettings.camera)}__onCameraMoveToTransform(e){e.detail.saveFirst&&this.saveCurrentCameraTransforms(),this.moveCameraToLocation({newCameraTransforms:e.detail.cameraTransforms,ignoreCameraLimits:e.detail.ignoreCameraLimits})}__onSceneBoundsChanged(){this.__mainCameraControls.setBoundary(this._appWcRef.getSceneBounds())}__setupEventListeners(){this.__mainCameraControls.addEventListener("controlstart",()=>{this.__onMainCameraControlsControlStart()}),this.__mainCameraControls.addEventListener("controlend",()=>{this.__onMainCameraControlsControlEnd()}),this._appWcRef.addEventListener(this._appWcRef.eventsManager.productSettingUpdatedEvent.name,this.__onProductSettingsUpdated.bind(this)),this._appWcRef.addEventListener(this._appWcRef.eventsManager.cameraMoveToTransform.name,this.__onCameraMoveToTransform.bind(this)),this._appWcRef.addEventListener(this._appWcRef.eventsManager.sceneBoundsChanged.name,this.__onSceneBoundsChanged.bind(this))}async setup({mainRenderer:e}){this.__mainRenderer=e;const t=new $n(75,window.innerWidth/window.innerHeight,.1,1e3);this.__cameras={main:t,screenshot:t.clone()},this.__cameras.main.name="MainCamera",this.__cameras.screenshot.name="ScreenshotCamera",this.__cameras.main.position.setZ(1);const n={Vector2:pe,Vector3:Q,Vector4:Mt,Quaternion:Yt,Matrix4:We,Spherical:Ll,Box3:Rn,Sphere:es,Raycaster:bb};vh.install({THREE:n}),this.__mainCameraControls=new vh(this.__cameras.main,e.domElement),this.__setupEventListeners()}}const sY='@font-face{font-family:Helvetica Neue;src:url(https://asset.myepigraph.com/design-assets/fonts/HelveticaNeue/HelveticaNeue-Light.otf) format("opentype");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:PPMori-Regular;src:url(https://asset.myepigraph.com/design-assets/fonts/PPMori/PPMori-Regular.woff2) format("woff2");font-display:swap}@font-face{font-family:PPMori-Bold;src:url(https://asset.myepigraph.com/design-assets/fonts/PPMori/PPMori-Bold.woff2) format("woff2");font-display:swap}@font-face{font-family:Inter;src:url(https://asset.myepigraph.com/design-assets/fonts/Inter/Inter-VariableFont_slnt_wght.ttf) format("truetype");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Inter;src:url(https://asset.myepigraph.com/design-assets/fonts/Inter/Inter_18pt-Bold.ttf) format("truetype");font-weight:700;font-style:normal;font-display:swap}',rY={Color:{Black:{25:{$type:"color",$value:"rgba(0, 0, 0, 0.0000)"},50:{$type:"color",$value:"rgba(0, 0, 0, 0.0500)"},100:{$type:"color",$value:"rgba(0, 0, 0, 0.1000)"},200:{$type:"color",$value:"rgba(0, 0, 0, 0.2000)"},300:{$type:"color",$value:"rgba(0, 0, 0, 0.3000)"},400:{$type:"color",$value:"rgba(0, 0, 0, 0.4000)"},500:{$type:"color",$value:"rgba(0, 0, 0, 0.5000)"},600:{$type:"color",$value:"rgba(0, 0, 0, 0.6000)"},700:{$type:"color",$value:"rgba(0, 0, 0, 0.7000)"},800:{$type:"color",$value:"rgba(0, 0, 0, 0.8000)"},900:{$type:"color",$value:"rgba(0, 0, 0, 0.9000)"},1e3:{$type:"color",$value:"#000000"}},White:{25:{$type:"color",$value:"rgba(255, 255, 255, 0.0250)"},50:{$type:"color",$value:"rgba(255, 255, 255, 0.0500)"},100:{$type:"color",$value:"rgba(255, 255, 255, 0.1000)"},200:{$type:"color",$value:"rgba(255, 255, 255, 0.2000)"},300:{$type:"color",$value:"rgba(255, 255, 255, 0.3000)"},400:{$type:"color",$value:"rgba(255, 255, 255, 0.4000)"},500:{$type:"color",$value:"rgba(255, 255, 255, 0.5000)"},600:{$type:"color",$value:"rgba(255, 255, 255, 0.6000)"},700:{$type:"color",$value:"rgba(255, 255, 255, 0.7000)"},800:{$type:"color",$value:"rgba(255, 255, 255, 0.8000)"},900:{$type:"color",$value:"rgba(255, 255, 255, 0.9000)"},1e3:{$type:"color",$value:"#ffffff"}},Green:{100:{$type:"color",$value:"#ebffee"},200:{$type:"color",$value:"#cff7d3"},300:{$type:"color",$value:"#aff4c6"},400:{$type:"color",$value:"#85e0a3"},500:{$type:"color",$value:"#14ae5c"},600:{$type:"color",$value:"#009951"},700:{$type:"color",$value:"#008043"},800:{$type:"color",$value:"#02542d"},900:{$type:"color",$value:"#024023"},1e3:{$type:"color",$value:"#062d1b"}},Red:{100:{$type:"color",$value:"#fee9e7"},200:{$type:"color",$value:"#fdd3d0"},300:{$type:"color",$value:"#fcb3ad"},400:{$type:"color",$value:"#f4776a"},500:{$type:"color",$value:"#ec221f"},600:{$type:"color",$value:"#c00f0c"},700:{$type:"color",$value:"#900b09"},800:{$type:"color",$value:"#690807"},900:{$type:"color",$value:"#4d0b0a"},1e3:{$type:"color",$value:"#300603"}},Yellow:{100:{$type:"color",$value:"#fffbeb"},200:{$type:"color",$value:"#fff1c2"},300:{$type:"color",$value:"#ffe8a3"},400:{$type:"color",$value:"#e8b931"},500:{$type:"color",$value:"#e5a000"},600:{$type:"color",$value:"#bf6a02"},700:{$type:"color",$value:"#975102"},800:{$type:"color",$value:"#682d03"},900:{$type:"color",$value:"#522504"},1e3:{$type:"color",$value:"#401b01"}},Blue:{100:{$type:"color",$value:"#fbfdff"},200:{$type:"color",$value:"#eaf4ff"},300:{$type:"color",$value:"#d5ebff"},400:{$type:"color",$value:"#c0e1ff"},500:{$type:"color",$value:"#91d0ff"},600:{$type:"color",$value:"#0094d5"},700:{$type:"color",$value:"#00679b"},800:{$type:"color",$value:"#003a5a"},900:{$type:"color",$value:"#003a5a"},1e3:{$type:"color",$value:"#002133"}},Slate:{100:{$type:"color",$value:"#f5f5f5"},200:{$type:"color",$value:"#e3e3e3"},300:{$type:"color",$value:"#cdcdcd"},400:{$type:"color",$value:"#b2b2b2"},500:{$type:"color",$value:"#949494"},600:{$type:"color",$value:"#767676"},700:{$type:"color",$value:"#5a5a5a"},800:{$type:"color",$value:"#434343"},900:{$type:"color",$value:"#303030"},1e3:{$type:"color",$value:"#242424"}},Grey:{25:{$type:"color",$value:"#f5f5f5"},50:{$type:"color",$value:"#f2f2f2"},100:{$type:"color",$value:"#e6e6e6"},200:{$type:"color",$value:"#cccccc"},300:{$type:"color",$value:"#b3b3b3"},400:{$type:"color",$value:"#999999"},500:{$type:"color",$value:"#7b7b7b"},600:{$type:"color",$value:"#666666"},700:{$type:"color",$value:"#4d4d4d"},800:{$type:"color",$value:"#333333"},900:{$type:"color",$value:"#1a1a1a"},1e3:{$type:"color",$value:"#0d0d0d"}},GreyAlpha:{25:{$type:"color",$value:"rgba(248, 248, 248, 0.8000)"},100:{$type:"color",$value:"rgba(242, 242, 242, 0.8000)"},500:{$type:"color",$value:"rgba(204, 204, 204, 0.2000)"},700:{$type:"color",$value:"rgba(204, 204, 204, 0.6000)"},800:{$type:"color",$value:"rgba(186, 186, 186, 0.6000)"},900:{$type:"color",$value:"rgba(50, 50, 50, 0.9000)"},"05":{$type:"color",$value:"rgba(253, 253, 253, 0.8000)"}}},Unit:{Space:{0:{$type:"number",$value:"0px"},100:{$type:"number",$value:"4px"},150:{$type:"number",$value:"6px"},200:{$type:"number",$value:"8px"},300:{$type:"number",$value:"12px"},400:{$type:"number",$value:"16px"},500:{$type:"number",$value:"20px"},600:{$type:"number",$value:"24px"},800:{$type:"number",$value:"32px"},1e3:{$type:"number",$value:"40px"},1200:{$type:"number",$value:"48px"},1600:{$type:"number",$value:"64px"},2e3:{$type:"number",$value:"80px"},2400:{$type:"number",$value:"96px"},2800:{$type:"number",$value:"112px"},3200:{$type:"number",$value:"128px"},3600:{$type:"number",$value:"144px"},4e3:{$type:"number",$value:"160px"},4400:{$type:"number",$value:"176px"},4800:{$type:"number",$value:"192px"},5200:{$type:"number",$value:"208px"},5600:{$type:"number",$value:"224px"},6e3:{$type:"number",$value:"240px"},6400:{$type:"number",$value:"256px"},7200:{$type:"number",$value:"288px"},8e3:{$type:"number",$value:"320px"},9600:{$type:"number",$value:"384px"},"0125":{$type:"number",$value:"0.5px"},"025":{$type:"number",$value:"1px"},"0325":{$type:"number",$value:"1.5px"},"050":{$type:"number",$value:"2px"}},Stack:{100:{$type:"number",$value:"-4px"},200:{$type:"number",$value:"-8px"},300:{$type:"number",$value:"-12px"},400:{$type:"number",$value:"-16px"},800:{$type:"number",$value:"-32px"},1e3:{$type:"number",$value:"-40px"},1600:{$type:"number",$value:"-64px"},2400:{$type:"number",$value:"-96px"},3200:{$type:"number",$value:"-128px"},4e3:{$type:"number",$value:"-160px"},4800:{$type:"number",$value:"-192px"},5600:{$type:"number",$value:"-224px"},7200:{$type:"number",$value:"-288px"},9600:{$type:"number",$value:"-384px"},"0125":{$type:"number",$value:"-0.5px"},"025":{$type:"number",$value:"-1px"},"0325":{$type:"number",$value:"-1.5px"},"050":{$type:"number",$value:"-2px"},"075":{$type:"number",$value:"-3px"}},Size:{4:{$type:"number",$value:"4px"},6:{$type:"number",$value:"6px"},8:{$type:"number",$value:"8px"},10:{$type:"number",$value:"10px"},12:{$type:"number",$value:"12px"},14:{$type:"number",$value:"14px"},16:{$type:"number",$value:"16px"},18:{$type:"number",$value:"18px"},20:{$type:"number",$value:"20px"},22:{$type:"number",$value:"22px"},24:{$type:"number",$value:"24px"},28:{$type:"number",$value:"28px"},30:{$type:"number",$value:"30px"},32:{$type:"number",$value:"32px"},40:{$type:"number",$value:"40px"},48:{$type:"number",$value:"48px"},64:{$type:"number",$value:"64px"},80:{$type:"number",$value:"80px"},96:{$type:"number",$value:"96px"},112:{$type:"number",$value:"112px"},128:{$type:"number",$value:"128px"},144:{$type:"number",$value:"144px"},160:{$type:"number",$value:"160px"},176:{$type:"number",$value:"176px"},224:{$type:"number",$value:"224px"}},Resolution:{XxsmallScreenMin:{$type:"number",$value:"375px"},XsmallScreenMin:{$type:"number",$value:"480px"},SmallScreenMin:{$type:"number",$value:"576px"},MediumScreenMin:{$type:"number",$value:"768px"},LargeScreenMin:{$type:"number",$value:"992px"},XlargeScreenMin:{$type:"number",$value:"1200px"},XxlargeScreenMin:{$type:"number",$value:"1400px"},XxxsmallScreenMax:{$type:"number",$value:"374px"},XxsmallScreenMax:{$type:"number",$value:"479px"},XsmallScreenMax:{$type:"number",$value:"575px"},SmallScreenMax:{$type:"number",$value:"767px"},MediumScreenMax:{$type:"number",$value:"991px"},LargeScreenMax:{$type:"number",$value:"1199px"},XlargeScreenMax:{$type:"number",$value:"1399px"},XxlargeScreenMax:{$type:"number",$value:"1920px"}}},Font:{Family:{Main:{$type:"string",$value:"PP Mori"},Body:{$type:"string",$value:"Helvetica LT Pro"},Epigraph:{$type:"string",$value:"PP Mori"}}}},lD={Color:{Brand:{Base:{$type:"color",$value:"#335166",$web:"var(--color-brand-base)"},BaseSecondary:{$type:"color",$value:"#2b4354",$web:"var(--color-brand-base-secondary)"},BaseTertiary:{$type:"color",$value:"#202f3a",$web:"var(--color-brand-base-tertiary)"},Accent:{$type:"color",$value:"#4276cf",$web:"var(--color-brand-accent)"},AccentSecondary:{$type:"color",$value:"#3761a8",$web:"var(--color-brand-accent-secondary)"},AccentTertiary:{$type:"color",$value:"#3761a8",$web:"var(--color-brand-accent-tertiary)"},Light:{$type:"color",$value:"#f8fbf6",$web:"var(--color-brand-light)"},Dark:{$type:"color",$value:"#111b22",$web:"var(--color-brand-dark)"}}},Font:{Brand:{Heading:{$type:"string",$value:"Helvetica Neue",$web:"var(--font-brand-heading)"},Paragraph:{$type:"string",$value:"Inter",$web:"var(--font-brand-body)"}}},Unit:{Brand:{Radius:{$type:"number",$value:"4px",$web:"var(--unit-brand-radius)"}}}},de={Color:{Surface:{Plain:{$value:"{Primitives.Color.White.1000}"},NeutralPrimary:{$value:"{Primitives.Color.Grey.100}"},NeutralSecondary:{$value:"{Primitives.Color.Grey.50}"},NeutralTertiary:{$value:"{Primitives.Color.Grey.25}"},ShadowSecondary:{$value:"{Primitives.Color.Black.200}"}},Fill:{Accent:{$value:"{BrandPrimitives.Color.Brand.Accent}"},AccentHover:{$value:"{BrandPrimitives.Color.Brand.AccentSecondary}"},AccentPress:{$value:"{BrandPrimitives.Color.Brand.AccentTertiary}"},Base:{$value:"{BrandPrimitives.Color.Brand.Base}"},BaseHover:{$value:"{BrandPrimitives.Color.Brand.BaseSecondary}"},BasePress:{$value:"{BrandPrimitives.Color.Brand.BaseTertiary}"},NeutralPrimary:{$value:"{Primitives.Color.Grey.700}"},NeutralSecondary:{$value:"{Primitives.Color.Grey.300}"},NeutralTertiary:{$value:"{Primitives.Color.Grey.100}"},SubtlePrimary:{$value:"{Primitives.Color.GreyAlpha.100}"},SubtleSecondary:{$value:"{Primitives.Color.GreyAlpha.25}"},DangerPrimary:{$value:"{Primitives.Color.Red.600}"},Disabled:{$value:"{Primitives.Color.Grey.200}"},HotspotSecondary:{$value:"{Primitives.Color.GreyAlpha.800}"}},Icon:{NeutralPrimary:{$value:"{Primitives.Color.Grey.800}"}},Text:{Invert:{$value:"{Primitives.Color.White.1000}"},NeutralPrimary:{$value:"{Primitives.Color.Grey.800}"},NeutralSecondary:{$value:"{Primitives.Color.Grey.700}"},Disabled:{$value:"{Primitives.Color.Grey.300}"}},Border:{AltContrast:{$value:"{BrandPrimitives.Color.Brand.Dark}"},SubtlePrimary:{$value:"{Primitives.Color.Grey.300}"},SubtleSecondary:{$value:"{Primitives.Color.GreyAlpha.700}"}}},Size:{Text:{Small:{$value:"{Primitives.Unit.Size.16}"},Medium:{$value:"{Primitives.Unit.Size.18}"},Large:{$value:"{Primitives.Unit.Size.20}"}},Icon:{Small:{$value:"{Primitives.Unit.Size.20}"},Medium:{$value:"{Primitives.Unit.Size.24}"},Large:{$value:"{Primitives.Unit.Size.28}"}},Radius:{Medium:{$value:"{Primitives.Unit.Space.150}"},Full:{$value:"{Primitives.Unit.Space.6000}"}},Stroke:{Regular:{$value:"{Primitives.Unit.Space.025}"},Thick:{$value:"{Primitives.Unit.Space.050}"}},Shadow:{None:{$value:"{Primitives.Unit.Space.0}"},Xsmall:{$value:"{Primitives.Unit.Space.025}"},Small:{$value:"{Primitives.Unit.Space.0325}"}},Blur:{Small:{$value:"{Primitives.Unit.Space.100}"}}},Space:{Padding:{Small:{$value:"{Primitives.Unit.Space.300}"},Medium:{$value:"{Primitives.Unit.Space.400}"},Regular:{$value:"{Primitives.Unit.Space.600}"}},Gap:{Small:{$value:"{Primitives.Unit.Space.200}"},Regular:{$value:"{Primitives.Unit.Space.400}"},Xxlarge:{$value:"{Primitives.Unit.Space.800}"}}},Font:{Family:{CustomH:{$value:"{BrandPrimitives.Font.Brand.Heading}"},CustomP:{$value:"{BrandPrimitives.Font.Brand.Paragraph}"},Main:{$value:"Helvetica Neue"}},Tracking:{Normal:{$value:"{Primitives.Unit.Space.0}"}}}};function oe(i){const e=/\{Primitives\.(.*?)}/,t=String(i).match(e),n=/\{BrandPrimitives\.(.*?)}/,s=String(i).match(n);let r=i;if(t){const a=t[1].split(".");r=rY[a[0]][a[1]][a[2]].$value}else if(s){const a=s[1].split("."),o=lD[a[0]][a[1]][a[2]],l=o.$web;r=`${l.substring(0,l.length-1)}, ${o.$value})`}return zi(r)}const Vb={poweredByEpigraphFooterText:"https://asset.myepigraph.com/design-assets/icons/powered-by-epigraph.svg",splashScreenLogo:"https://asset.myepigraph.com/design-assets/icons/default-splash-screen-image.svg",sampleQrCode:"https://asset.myepigraph.com/design-assets/icons/sample-qr-code.png"};function aY(){const i={};for(const[e,t]of Object.entries(lD))for(const[n,s]of Object.entries(t))for(const[r,a]of Object.entries(s)){const o=`${e}${n}${r}`;i[o]={name:zi(a.$web),defaultValue:a.$value,argType:{control:a.$type}}}return i}const oY=aY(),jh={size:{name:"size",defaultValue:"small",argType:{options:["small","medium","large"],control:"select"}},theme:{name:"theme",defaultValue:"light",argType:{options:["light","dark"],control:"select"}},disabled:{name:"disabled",defaultValue:!1,argType:{control:"boolean"}}};var lY=Object.defineProperty,du=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=a(e,t,s)||s);return s&&lY(e,t,s),s};const Jl=class cD extends mh{constructor(){super(),this.epgOnClickEventName="epgonclick",this.disabled=!1,this.theme=jh.theme.defaultValue.toString(),this.size=jh.size.defaultValue.toString(),cD.ensureFontsAreLoaded(),this.addEventListener("click",this.doClick),this.addEventListener("pointerover",this.doHoverStart),this.addEventListener("pointerleave",this.doHoverEnd)}static{this.styles=[ht`
|
|
13175
|
+
*/const Bn={LEFT:1,RIGHT:2,MIDDLE:4},te=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,SCREEN_PAN:4,OFFSET:8,DOLLY:16,ZOOM:32,TOUCH_ROTATE:64,TOUCH_TRUCK:128,TOUCH_SCREEN_PAN:256,TOUCH_OFFSET:512,TOUCH_DOLLY:1024,TOUCH_ZOOM:2048,TOUCH_DOLLY_TRUCK:4096,TOUCH_DOLLY_SCREEN_PAN:8192,TOUCH_DOLLY_OFFSET:16384,TOUCH_DOLLY_ROTATE:32768,TOUCH_ZOOM_TRUCK:65536,TOUCH_ZOOM_OFFSET:131072,TOUCH_ZOOM_SCREEN_PAN:262144,TOUCH_ZOOM_ROTATE:524288}),Qc={NONE:0,IN:1,OUT:-1};function Xo(i){return i.isPerspectiveCamera}function io(i){return i.isOrthographicCamera}const eo=Math.PI*2,vw=Math.PI/2,oD=1e-5,Wu=Math.PI/180;function Zs(i,e,t){return Math.max(e,Math.min(t,i))}function un(i,e=oD){return Math.abs(i)<e}function qt(i,e,t=oD){return un(i-e,t)}function bw(i,e){return Math.round(i/e)*e}function ju(i){return isFinite(i)?i:i<0?-Number.MAX_VALUE:Number.MAX_VALUE}function Xu(i){return Math.abs(i)<Number.MAX_VALUE?i:i*(1/0)}function Kp(i,e,t,n,s=1/0,r){n=Math.max(1e-4,n);const a=2/n,o=a*r,l=1/(1+o+.48*o*o+.235*o*o*o);let c=i-e;const u=e,h=s*n;c=Zs(c,-h,h),e=i-c;const d=(t.value+a*c)*r;t.value=(t.value-a*d)*l;let A=e+(c+d)*l;return u-i>0==A>u&&(A=u,t.value=(A-u)/r),A}function xw(i,e,t,n,s=1/0,r,a){n=Math.max(1e-4,n);const o=2/n,l=o*r,c=1/(1+l+.48*l*l+.235*l*l*l);let u=e.x,h=e.y,d=e.z,A=i.x-u,p=i.y-h,g=i.z-d;const m=u,f=h,y=d,_=s*n,E=_*_,v=A*A+p*p+g*g;if(v>E){const P=Math.sqrt(v);A=A/P*_,p=p/P*_,g=g/P*_}u=i.x-A,h=i.y-p,d=i.z-g;const C=(t.x+o*A)*r,x=(t.y+o*p)*r,I=(t.z+o*g)*r;t.x=(t.x-o*C)*c,t.y=(t.y-o*x)*c,t.z=(t.z-o*I)*c,a.x=u+(A+C)*c,a.y=h+(p+x)*c,a.z=d+(g+I)*c;const b=m-i.x,w=f-i.y,S=y-i.z,B=a.x-m,T=a.y-f,D=a.z-y;return b*B+w*T+S*D>0&&(a.x=m,a.y=f,a.z=y,t.x=(a.x-m)/r,t.y=(a.y-f)/r,t.z=(a.z-y)/r),a}function m0(i,e){e.set(0,0),i.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=i.length,e.y/=i.length}function y0(i,e){return io(i)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class tY{_listeners={};addEventListener(e,t){const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const n=this._listeners[e.type];if(n!==void 0){e.target=this;const s=n.slice(0);for(let r=0,a=s.length;r<a;r++)s[r].call(this,e)}}}const nY="3.1.2",Zp=1/8,iY=/Mac/.test(globalThis?.navigator?.platform);let dt,Cw,ef,_0,Wi,_t,Ft,Lc,Ju,mr,yr,Jo,Iw,ww,cs,Nc,Pc,Sw,E0,Bw,v0,b0,tf;class vh extends tY{static install(e){dt=e.THREE,Cw=Object.freeze(new dt.Vector3(0,0,0)),ef=Object.freeze(new dt.Vector3(0,1,0)),_0=Object.freeze(new dt.Vector3(0,0,1)),Wi=new dt.Vector2,_t=new dt.Vector3,Ft=new dt.Vector3,Lc=new dt.Vector3,Ju=new dt.Vector3,mr=new dt.Vector3,yr=new dt.Vector3,Jo=new dt.Vector3,Iw=new dt.Vector3,ww=new dt.Vector3,cs=new dt.Spherical,Nc=new dt.Spherical,Pc=new dt.Box3,Sw=new dt.Box3,E0=new dt.Sphere,Bw=new dt.Quaternion,v0=new dt.Quaternion,b0=new dt.Matrix4,tf=new dt.Raycaster}static get ACTION(){return te}minPolarAngle=0;maxPolarAngle=Math.PI;minAzimuthAngle=-1/0;maxAzimuthAngle=1/0;minDistance=Number.EPSILON;maxDistance=1/0;infinityDolly=!1;minZoom=.01;maxZoom=1/0;smoothTime=.25;draggingSmoothTime=.125;maxSpeed=1/0;azimuthRotateSpeed=1;polarRotateSpeed=1;dollySpeed=1;dollyDragInverted=!1;truckSpeed=2;dollyToCursor=!1;dragToOffset=!1;boundaryFriction=0;restThreshold=.01;colliderMeshes=[];mouseButtons;touches;cancel=()=>{};lockPointer;unlockPointer;_enabled=!0;_camera;_yAxisUpSpace;_yAxisUpSpaceInverse;_state=te.NONE;_domElement;_viewport=null;_target;_targetEnd;_focalOffset;_focalOffsetEnd;_spherical;_sphericalEnd;_lastDistance;_zoom;_zoomEnd;_lastZoom;_cameraUp0;_target0;_position0;_zoom0;_focalOffset0;_dollyControlCoord;_changedDolly=0;_changedZoom=0;_nearPlaneCorners;_hasRested=!0;_boundary;_boundaryEnclosesCamera=!1;_needsUpdate=!0;_updatedLastTime=!1;_elementRect=new DOMRect;_isDragging=!1;_dragNeedsUpdate=!0;_activePointers=[];_lockedPointer=null;_interactiveArea=new DOMRect(0,0,1,1);_isUserControllingRotate=!1;_isUserControllingDolly=!1;_isUserControllingTruck=!1;_isUserControllingOffset=!1;_isUserControllingZoom=!1;_lastDollyDirection=Qc.NONE;_thetaVelocity={value:0};_phiVelocity={value:0};_radiusVelocity={value:0};_targetVelocity=new dt.Vector3;_focalOffsetVelocity=new dt.Vector3;_zoomVelocity={value:0};set verticalDragToForward(e){console.warn("camera-controls: `verticalDragToForward` was removed. Use `mouseButtons.left = CameraControls.ACTION.SCREEN_PAN` instead.")}constructor(e,t){super(),typeof dt>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new dt.Quaternion().setFromUnitVectors(this._camera.up,ef),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=te.NONE,this._target=new dt.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new dt.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new dt.Spherical().setFromVector3(_t.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new dt.Vector3,new dt.Vector3,new dt.Vector3,new dt.Vector3],this._updateNearPlaneCorners(),this._boundary=new dt.Box3(new dt.Vector3(-1/0,-1/0,-1/0),new dt.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new dt.Vector2,this.mouseButtons={left:te.ROTATE,middle:te.DOLLY,right:te.TRUCK,wheel:Xo(this._camera)?te.DOLLY:io(this._camera)?te.ZOOM:te.NONE},this.touches={one:te.TOUCH_ROTATE,two:Xo(this._camera)?te.TOUCH_DOLLY_TRUCK:io(this._camera)?te.TOUCH_ZOOM_TRUCK:te.NONE,three:te.TOUCH_TRUCK};const n=new dt.Vector2,s=new dt.Vector2,r=new dt.Vector2,a=f=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),v=f.clientX/E.width,C=f.clientY/E.height;if(v<this._interactiveArea.left||v>this._interactiveArea.right||C<this._interactiveArea.top||C>this._interactiveArea.bottom)return}const y=f.pointerType!=="mouse"?null:(f.buttons&Bn.LEFT)===Bn.LEFT?Bn.LEFT:(f.buttons&Bn.MIDDLE)===Bn.MIDDLE?Bn.MIDDLE:(f.buttons&Bn.RIGHT)===Bn.RIGHT?Bn.RIGHT:null;if(y!==null){const E=this._findPointerByMouseButton(y);E&&this._disposePointer(E)}if((f.buttons&Bn.LEFT)===Bn.LEFT&&this._lockedPointer)return;const _={pointerId:f.pointerId,clientX:f.clientX,clientY:f.clientY,deltaX:0,deltaY:0,mouseButton:y};this._activePointers.push(_),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",l),this._isDragging=!0,d(f)},o=f=>{f.cancelable&&f.preventDefault();const y=f.pointerId,_=this._lockedPointer||this._findPointerById(y);if(_){if(_.clientX=f.clientX,_.clientY=f.clientY,_.deltaX=f.movementX,_.deltaY=f.movementY,this._state=0,f.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(f.buttons&Bn.LEFT)===Bn.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(f.buttons&Bn.MIDDLE)===Bn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(f.buttons&Bn.RIGHT)===Bn.RIGHT&&(this._state=this._state|this.mouseButtons.right);A()}},l=f=>{const y=this._findPointerById(f.pointerId);if(!(y&&y===this._lockedPointer)){if(y&&this._disposePointer(y),f.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=te.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=te.NONE;p()}};let c=-1;const u=f=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===te.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const x=this._domElement.getBoundingClientRect(),I=f.clientX/x.width,b=f.clientY/x.height;if(I<this._interactiveArea.left||I>this._interactiveArea.right||b<this._interactiveArea.top||b>this._interactiveArea.bottom)return}if(f.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===te.ROTATE||this.mouseButtons.wheel===te.TRUCK){const x=performance.now();c-x<1e3&&this._getClientRect(this._elementRect),c=x}const y=iY?-1:-3,_=f.deltaMode===1&&!f.ctrlKey?f.deltaY/y:f.deltaY/(y*10),E=this.dollyToCursor?(f.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,v=this.dollyToCursor?(f.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(f.ctrlKey?te.ZOOM:this.mouseButtons.wheel){case te.ROTATE:{this._rotateInternal(f.deltaX,f.deltaY),this._isUserControllingRotate=!0;break}case te.TRUCK:{this._truckInternal(f.deltaX,f.deltaY,!1,!1),this._isUserControllingTruck=!0;break}case te.SCREEN_PAN:{this._truckInternal(f.deltaX,f.deltaY,!1,!0),this._isUserControllingTruck=!0;break}case te.OFFSET:{this._truckInternal(f.deltaX,f.deltaY,!0,!1),this._isUserControllingOffset=!0;break}case te.DOLLY:{this._dollyInternal(-_,E,v),this._isUserControllingDolly=!0;break}case te.ZOOM:{this._zoomInternal(-_,E,v),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},h=f=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===vh.ACTION.NONE){const y=f instanceof PointerEvent?f.pointerId:0,_=this._findPointerById(y);_&&this._disposePointer(_),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l);return}f.preventDefault()}},d=f=>{if(!this._enabled)return;if(m0(this._activePointers,Wi),this._getClientRect(this._elementRect),n.copy(Wi),s.copy(Wi),this._activePointers.length>=2){const _=Wi.x-this._activePointers[1].clientX,E=Wi.y-this._activePointers[1].clientY,v=Math.sqrt(_*_+E*E);r.set(0,v);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,x=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(C,x)}if(this._state=0,!f)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in f&&f.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(f.buttons&Bn.LEFT)===Bn.LEFT&&(this._state=this._state|this.mouseButtons.left),(f.buttons&Bn.MIDDLE)===Bn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(f.buttons&Bn.RIGHT)===Bn.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&te.ROTATE)===te.ROTATE||(this._state&te.TOUCH_ROTATE)===te.TOUCH_ROTATE||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&te.TRUCK)===te.TRUCK||(this._state&te.SCREEN_PAN)===te.SCREEN_PAN||(this._state&te.TOUCH_TRUCK)===te.TOUCH_TRUCK||(this._state&te.TOUCH_SCREEN_PAN)===te.TOUCH_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&te.DOLLY)===te.DOLLY||(this._state&te.TOUCH_DOLLY)===te.TOUCH_DOLLY||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&te.ZOOM)===te.ZOOM||(this._state&te.TOUCH_ZOOM)===te.TOUCH_ZOOM||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_ZOOM_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&te.OFFSET)===te.OFFSET||(this._state&te.TOUCH_OFFSET)===te.TOUCH_OFFSET||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},A=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,m0(this._activePointers,Wi);const y=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,_=y?-y.deltaX:s.x-Wi.x,E=y?-y.deltaY:s.y-Wi.y;if(s.copy(Wi),((this._state&te.ROTATE)===te.ROTATE||(this._state&te.TOUCH_ROTATE)===te.TOUCH_ROTATE||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(_,E),this._isUserControllingRotate=!0),(this._state&te.DOLLY)===te.DOLLY||(this._state&te.ZOOM)===te.ZOOM){const v=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,x=this.dollyDragInverted?-1:1;(this._state&te.DOLLY)===te.DOLLY?(this._dollyInternal(x*E*Zp,v,C),this._isUserControllingDolly=!0):(this._zoomInternal(x*E*Zp,v,C),this._isUserControllingZoom=!0)}if((this._state&te.TOUCH_DOLLY)===te.TOUCH_DOLLY||(this._state&te.TOUCH_ZOOM)===te.TOUCH_ZOOM||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_ZOOM_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_ZOOM_ROTATE)===te.TOUCH_ZOOM_ROTATE){const v=Wi.x-this._activePointers[1].clientX,C=Wi.y-this._activePointers[1].clientY,x=Math.sqrt(v*v+C*C),I=r.y-x;r.set(0,x);const b=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&te.TOUCH_DOLLY)===te.TOUCH_DOLLY||(this._state&te.TOUCH_DOLLY_ROTATE)===te.TOUCH_DOLLY_ROTATE||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET?(this._dollyInternal(I*Zp,b,w),this._isUserControllingDolly=!0):(this._zoomInternal(I*Zp,b,w),this._isUserControllingZoom=!0)}((this._state&te.TRUCK)===te.TRUCK||(this._state&te.TOUCH_TRUCK)===te.TOUCH_TRUCK||(this._state&te.TOUCH_DOLLY_TRUCK)===te.TOUCH_DOLLY_TRUCK||(this._state&te.TOUCH_ZOOM_TRUCK)===te.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(_,E,!1,!1),this._isUserControllingTruck=!0),((this._state&te.SCREEN_PAN)===te.SCREEN_PAN||(this._state&te.TOUCH_SCREEN_PAN)===te.TOUCH_SCREEN_PAN||(this._state&te.TOUCH_DOLLY_SCREEN_PAN)===te.TOUCH_DOLLY_SCREEN_PAN||(this._state&te.TOUCH_ZOOM_SCREEN_PAN)===te.TOUCH_ZOOM_SCREEN_PAN)&&(this._truckInternal(_,E,!1,!0),this._isUserControllingTruck=!0),((this._state&te.OFFSET)===te.OFFSET||(this._state&te.TOUCH_OFFSET)===te.TOUCH_OFFSET||(this._state&te.TOUCH_DOLLY_OFFSET)===te.TOUCH_DOLLY_OFFSET||(this._state&te.TOUCH_ZOOM_OFFSET)===te.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(_,E,!0,!1),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{m0(this._activePointers,Wi),s.copy(Wi),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",g),this._domElement.ownerDocument.addEventListener("pointerlockerror",m),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",l),d())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),this._domElement?.ownerDocument.exitPointerLock(),this._domElement?.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement?.ownerDocument.removeEventListener("pointerlockerror",m),this.cancel()};const g=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},m=()=>{this.unlockPointer()};this._addAllEventListeners=f=>{this._domElement=f,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",a),this._domElement.addEventListener("pointercancel",l),this._domElement.addEventListener("wheel",u,{passive:!1}),this._domElement.addEventListener("contextmenu",h)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",a),this._domElement.removeEventListener("pointercancel",l),this._domElement.removeEventListener("wheel",u,{passive:!1}),this._domElement.removeEventListener("contextmenu",h),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l),this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",m))},this.cancel=()=>{this._state!==te.NONE&&(this._state=te.NONE,this._activePointers.length=0,p())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=Zs(e.width,0,1),this._interactiveArea.height=Zs(e.height,0,1),this._interactiveArea.x=Zs(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Zs(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const s=Zs(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=Zs(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=r,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const a=!n||qt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&qt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(a)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Qc.NONE,this._changedDolly=0,this._dollyToNoClamp(Zs(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const a=this._collisionTest(),o=qt(a,this._spherical.radius);if(!(n>e)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,a)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const r=!t||qt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(Ju).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=Zs(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||qt(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),mr.setFromMatrixColumn(this._camera.matrix,0),yr.setFromMatrixColumn(this._camera.matrix,1),mr.multiplyScalar(e),yr.multiplyScalar(-t);const s=_t.copy(mr).add(yr),r=Ft.copy(this._targetEnd).add(s);return this.moveTo(r.x,r.y,r.z,n)}forward(e,t=!1){_t.setFromMatrixColumn(this._camera.matrix,0),_t.crossVectors(this._camera.up,_t),_t.multiplyScalar(e);const n=Ft.copy(this._targetEnd).add(_t);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return _t.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+_t.x,this._targetEnd.y+_t.y,this._targetEnd.z+_t.z,t)}moveTo(e,t,n,s=!1){this._isUserControllingTruck=!1;const r=_t.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const a=!s||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,s=!1){const o=_t.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(o.x,o.y,o.z,s)}fitToBox(e,t,{cover:n=!1,paddingLeft:s=0,paddingRight:r=0,paddingBottom:a=0,paddingTop:o=0}={}){const l=[],c=e.isBox3?Pc.copy(e):Pc.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=bw(this._sphericalEnd.theta,vw),h=bw(this._sphericalEnd.phi,vw);l.push(this.rotateTo(u,h,t));const d=_t.setFromSpherical(this._sphericalEnd).normalize(),A=Bw.setFromUnitVectors(d,_0),p=qt(Math.abs(d.y),1);p&&A.multiply(v0.setFromAxisAngle(ef,u)),A.multiply(this._yAxisUpSpaceInverse);const g=Sw.makeEmpty();Ft.copy(c.min).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.min).setX(c.max.x).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.min).setY(c.max.y).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).setZ(c.min.z).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.min).setZ(c.max.z).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).setY(c.min.y).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).setX(c.min.x).applyQuaternion(A),g.expandByPoint(Ft),Ft.copy(c.max).applyQuaternion(A),g.expandByPoint(Ft),g.min.x-=s,g.min.y-=a,g.max.x+=r,g.max.y+=o,A.setFromUnitVectors(_0,d),p&&A.premultiply(v0.invert()),A.premultiply(this._yAxisUpSpace);const m=g.getSize(_t),f=g.getCenter(Ft).applyQuaternion(A);if(Xo(this._camera)){const y=this.getDistanceToFitBox(m.x,m.y,m.z,n);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.dollyTo(y,t)),l.push(this.setFocalOffset(0,0,0,t))}else if(io(this._camera)){const y=this._camera,_=y.right-y.left,E=y.top-y.bottom,v=n?Math.max(_/m.x,E/m.y):Math.min(_/m.x,E/m.y);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.zoomTo(v,t)),l.push(this.setFocalOffset(0,0,0,t))}return Promise.all(l)}fitToSphere(e,t){const n=[],r="isObject3D"in e?vh.createBoundingSphere(e,E0):E0.copy(e);if(n.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Xo(this._camera)){const a=this.getDistanceToFitSphere(r.radius);n.push(this.dollyTo(a,t))}else if(io(this._camera)){const a=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,l=2*r.radius,c=Math.min(a/l,o/l);n.push(this.zoomTo(c,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,s,r,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Qc.NONE,this._changedDolly=0;const l=Ft.set(s,r,a),c=_t.set(e,t,n);this._targetEnd.copy(l),this._sphericalEnd.setFromVector3(c.sub(l).applyQuaternion(this._yAxisUpSpace)),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!o||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold)&&qt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&qt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&qt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerp(e,t,n,s=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Qc.NONE,this._changedDolly=0;const r=_t.set(...e.target);if("spherical"in e)cs.set(...e.spherical);else{const h=Ft.set(...e.position);cs.setFromVector3(h.sub(r).applyQuaternion(this._yAxisUpSpace))}const a=Lc.set(...t.target);if("spherical"in t)Nc.set(...t.spherical);else{const h=Ft.set(...t.position);Nc.setFromVector3(h.sub(a).applyQuaternion(this._yAxisUpSpace))}this._targetEnd.copy(r.lerp(a,n));const o=Nc.theta-cs.theta,l=Nc.phi-cs.phi,c=Nc.radius-cs.radius;this._sphericalEnd.set(cs.radius+c*n,cs.phi+l*n,cs.theta+o*n),this._needsUpdate=!0,s||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!s||qt(this._target.x,this._targetEnd.x,this.restThreshold)&&qt(this._target.y,this._targetEnd.y,this.restThreshold)&&qt(this._target.z,this._targetEnd.z,this.restThreshold)&&qt(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&qt(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&qt(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,n,s,r,a,o,l,c,u,h,d,A,p=!1){return this.lerp({position:[e,t,n],target:[s,r,a]},{position:[o,l,c],target:[u,h,d]},A,p)}setPosition(e,t,n,s=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,n,s=!1){const r=this.getPosition(_t),a=this.setLookAt(r.x,r.y,r.z,e,t,n,s);return this._sphericalEnd.phi=Zs(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const r=!s||qt(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&qt(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&qt(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),mr.setFromMatrixColumn(this._camera.matrixWorldInverse,0),yr.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Jo.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=_t.set(e,t,n),r=s.distanceTo(this._camera.position),a=s.sub(this._camera.position);mr.multiplyScalar(a.x),yr.multiplyScalar(a.y),Jo.multiplyScalar(a.z),_t.copy(mr).add(yr).add(Jo),_t.z=_t.z+r,this.dollyTo(r,!1),this.setFocalOffset(-_t.x,_t.y,-_t.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,s){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new dt.Vector4,typeof e=="number"?this._viewport.set(e,t,n,s):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,s=!1){if(y0(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,a=this._camera.getEffectiveFOV()*Wu,o=this._camera.aspect;return((s?r>o:r<o)?t:e/o)*.5/Math.tan(a*.5)+n*.5}getDistanceToFitSphere(e){if(y0(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*Wu,n=Math.atan(Math.tan(t*.5)*this._camera.aspect)*2,s=1<this._camera.aspect?t:n;return e/Math.sin(s*.5)}getTarget(e,t=!0){return(e&&e.isVector3?e:new dt.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new dt.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e||new dt.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new dt.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){return this._sphericalEnd.theta=(this._sphericalEnd.theta%eo+eo)%eo,this._sphericalEnd.theta>Math.PI&&(this._sphericalEnd.theta-=eo),this._spherical.theta+=eo*Math.round((this._sphericalEnd.theta-this._spherical.theta)/eo),this}stop(){this._focalOffset.copy(this._focalOffsetEnd),this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd),this._zoom=this._zoomEnd}reset(e=!1){if(!qt(this._camera.up.x,this._cameraUp0.x)||!qt(this._camera.up.y,this._cameraUp0.y)||!qt(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const n=this.getPosition(_t);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}const t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,ef),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=_t.subVectors(this._target,this._camera.position).normalize(),t=Ft.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(_t);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){const t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,s=this._sphericalEnd.radius-this._spherical.radius,r=Iw.subVectors(this._targetEnd,this._target),a=ww.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(un(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const h=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=Kp(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,h,1/0,e),this._needsUpdate=!0}if(un(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const h=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=Kp(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,h,1/0,e),this._needsUpdate=!0}if(un(s))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const h=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=Kp(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,h,this.maxSpeed,e),this._needsUpdate=!0}if(un(r.x)&&un(r.y)&&un(r.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const h=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;xw(this._target,this._targetEnd,this._targetVelocity,h,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(un(a.x)&&un(a.y)&&un(a.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const h=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;xw(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,h,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(un(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const h=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=Kp(this._zoom,this._zoomEnd,this._zoomVelocity,h,1/0,e)}if(this.dollyToCursor){if(Xo(this._camera)&&this._changedDolly!==0){const h=this._spherical.radius-this._lastDistance,d=this._camera,A=this._getCameraDirection(Ju),p=_t.copy(A).cross(d.up).normalize();p.lengthSq()===0&&(p.x=1);const g=Ft.crossVectors(p,A),m=this._sphericalEnd.radius*Math.tan(d.getEffectiveFOV()*Wu*.5),y=(this._sphericalEnd.radius-h-this._sphericalEnd.radius)/this._sphericalEnd.radius,_=Lc.copy(this._targetEnd).add(p.multiplyScalar(this._dollyControlCoord.x*m*d.aspect)).add(g.multiplyScalar(this._dollyControlCoord.y*m)),E=_t.copy(this._targetEnd).lerp(_,y),v=this._lastDollyDirection===Qc.IN&&this._spherical.radius<=this.minDistance,C=this._lastDollyDirection===Qc.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(v||C)){this._sphericalEnd.radius-=h,this._spherical.radius-=h;const I=Ft.copy(A).multiplyScalar(-h);E.add(I)}this._boundary.clampPoint(E,E);const x=Ft.subVectors(E,this._targetEnd);this._targetEnd.copy(E),this._target.add(x),this._changedDolly-=h,un(this._changedDolly)&&(this._changedDolly=0)}else if(io(this._camera)&&this._changedZoom!==0){const h=this._zoom-this._lastZoom,d=this._camera,A=_t.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(d.near+d.far)/(d.near-d.far)).unproject(d),p=Ft.set(0,0,-1).applyQuaternion(d.quaternion),g=Lc.copy(A).add(p.multiplyScalar(-A.dot(d.up))),f=-(this._zoom-h-this._zoom)/this._zoom,y=this._getCameraDirection(Ju),_=this._targetEnd.dot(y),E=_t.copy(this._targetEnd).lerp(g,f),v=E.dot(y),C=y.multiplyScalar(v-_);E.sub(C),this._boundary.clampPoint(E,E);const x=Ft.subVectors(E,this._targetEnd);this._targetEnd.copy(E),this._target.add(x),this._changedZoom-=h,un(this._changedZoom)&&(this._changedZoom=0)}}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;const l=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,l),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target),(!un(this._focalOffset.x)||!un(this._focalOffset.y)||!un(this._focalOffset.z))&&(this._camera.matrix.compose(this._camera.position,this._camera.quaternion,this._camera.scale),mr.setFromMatrixColumn(this._camera.matrix,0),yr.setFromMatrixColumn(this._camera.matrix,1),Jo.setFromMatrixColumn(this._camera.matrix,2),mr.multiplyScalar(this._focalOffset.x),yr.multiplyScalar(-this._focalOffset.y),Jo.multiplyScalar(this._focalOffset.z),_t.copy(mr).add(yr).add(Jo),this._camera.position.add(_t),this._camera.updateMatrixWorld()),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),_t.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const u=this._needsUpdate;return u&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):u?(this.dispatchEvent({type:"update"}),un(t,this.restThreshold)&&un(n,this.restThreshold)&&un(s,this.restThreshold)&&un(r.x,this.restThreshold)&&un(r.y,this.restThreshold)&&un(r.z,this.restThreshold)&&un(a.x,this.restThreshold)&&un(a.y,this.restThreshold)&&un(a.z,this.restThreshold)&&un(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!u&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=u,this._needsUpdate=!1,u}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:ju(this.maxDistance),minZoom:this.minZoom,maxZoom:ju(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:ju(this.maxPolarAngle),minAzimuthAngle:ju(this.minAzimuthAngle),maxAzimuthAngle:ju(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,target:this._targetEnd.toArray(),position:_t.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e,t=!1){const n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=Xu(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=Xu(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=Xu(n.maxPolarAngle),this.minAzimuthAngle=Xu(n.minAzimuthAngle),this.maxAzimuthAngle=Xu(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),cs.setFromVector3(_t.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(cs.theta,cs.phi,t),this.dollyTo(cs.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){if(this._domElement){console.warn("camera-controls is already connected.");return}e.setAttribute("data-camera-controls-version",nY),this._addAllEventListeners(e),this._getClientRect(this._elementRect)}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find(t=>t.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const s=t.lengthSq();if(s===0)return e;const r=Ft.copy(t).add(e),o=this._boundary.clampPoint(r,Lc).sub(r),l=o.lengthSq();if(l===0)return e.add(t);if(l===s)return e;if(n===0)return e.add(t).add(o);{const c=1+n*l/t.dot(o);return e.add(Ft.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(Xo(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*Wu,s=Math.tan(n*.5)*t,r=s*e.aspect;this._nearPlaneCorners[0].set(-r,-s,0),this._nearPlaneCorners[1].set(r,-s,0),this._nearPlaneCorners[2].set(r,s,0),this._nearPlaneCorners[3].set(-r,s,0)}else if(io(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,s=e.right*t,r=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,r,0),this._nearPlaneCorners[1].set(s,r,0),this._nearPlaneCorners[2].set(s,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_truckInternal=(e,t,n,s)=>{let r,a;if(Xo(this._camera)){const o=_t.copy(this._camera.position).sub(this._target),l=this._camera.getEffectiveFOV()*Wu,c=o.length()*Math.tan(l*.5);r=this.truckSpeed*e*c/this._elementRect.height,a=this.truckSpeed*t*c/this._elementRect.height}else if(io(this._camera)){const o=this._camera;r=this.truckSpeed*e*(o.right-o.left)/o.zoom/this._elementRect.width,a=this.truckSpeed*t*(o.top-o.bottom)/o.zoom/this._elementRect.height}else return;s?(n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(r,0,!0),this.forward(-a,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y+a,this._focalOffsetEnd.z,!0):this.truck(r,a,!0)};_rotateInternal=(e,t)=>{const n=eo*this.azimuthRotateSpeed*e/this._elementRect.height,s=eo*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,s,!0)};_dollyInternal=(e,t,n)=>{const s=Math.pow(.95,-e*this.dollySpeed),r=this._sphericalEnd.radius,a=this._sphericalEnd.radius*s,o=Zs(a,this.minDistance,this.maxDistance),l=o-a;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(a,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(l,!0),this._dollyToNoClamp(o,!0)):this._dollyToNoClamp(o,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?a:o)-r,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)};_zoomInternal=(e,t,n)=>{const s=Math.pow(.95,e*this.dollySpeed),r=this._zoom,a=this._zoom*s;this.zoomTo(a,!0),this.dollyToCursor&&(this._changedZoom+=a-r,this._dollyControlCoord.set(t,n))};_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||y0(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(Ju);b0.lookAt(Cw,n,this._camera.up);for(let s=0;s<4;s++){const r=Ft.copy(this._nearPlaneCorners[s]);r.applyMatrix4(b0);const a=Lc.addVectors(this._target,r);tf.set(a,n),tf.far=this._spherical.radius+1;const o=tf.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance<e&&(e=o[0].distance)}return e}_getClientRect(e){if(!this._domElement)return;const t=this._domElement.getBoundingClientRect();return e.x=t.left,e.y=t.top,this._viewport?(e.x+=this._viewport.x,e.y+=t.height-this._viewport.w-this._viewport.y,e.width=this._viewport.z,e.height=this._viewport.w):(e.width=t.width,e.height=t.height),e}_createOnRestPromise(e){return e?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise(t=>{const n=()=>{this.removeEventListener("rest",n),t()};this.addEventListener("rest",n)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new dt.Sphere){const n=t,s=n.center;Pc.makeEmpty(),e.traverseVisible(a=>{a.isMesh&&Pc.expandByObject(a)}),Pc.getCenter(s);let r=0;return e.traverseVisible(a=>{if(!a.isMesh)return;const o=a;if(!o.geometry)return;const l=o.geometry.clone();l.applyMatrix4(o.matrixWorld);const u=l.attributes.position;for(let h=0,d=u.count;h<d;h++)_t.fromBufferAttribute(u,h),r=Math.max(r,s.distanceToSquared(_t))}),n.radius=Math.sqrt(r),n}}class Tw{constructor(e){this.__position=new Q,this.__target=new Q,this.setPosition(e.position.x,e.position.y,e.position.z),this.setTarget(e.target.x,e.target.y,e.target.z)}getPosition(){return this.__position}setPosition(e,t,n){this.__position.setX(e),this.__position.setY(t),this.__position.setZ(n)}getTarget(){return this.__target}setTarget(e,t,n){this.__target.setX(e),this.__target.setY(t),this.__target.setZ(n)}}class Gg extends Hb{constructor({appWcRef:e}){super({appWcRef:e}),this._loggerContext="CAMERA MANAGER",this.__cameras={},this.__mainRenderer={},this.__mainCameraControls={},this.__cameraDirection=new Q,this.__cameraSpherical=new Ll,this.__savedCameraState={position:new Q,target:new Q,focalLength:0},this.__currentCameraPosition=new Q,this.__currentTargetPosition=new Q}static{this.TAU=Math.PI*2}get cameraActions(){return vh.ACTION}getCameras(){return this.__cameras}get mainCameraControls(){return this.__mainCameraControls}getCurrentCameraTransforms(){return this.__cameras.main.getWorldPosition(this.__currentCameraPosition),this.__mainCameraControls.getTarget(this.__currentTargetPosition),{position:this.__currentCameraPosition,target:this.__currentTargetPosition,focalLength:this.__cameras.main.getFocalLength()}}getCurrentCameraRotation(){return{azimuthAngle:this.__mainCameraControls.azimuthAngle,polarAngle:this.__mainCameraControls.polarAngle,distance:this.__mainCameraControls.distance}}getCameraFocalLength(){return this.__cameras.main.getFocalLength()}setCameraFocalLength(e){this.__cameras.main.setFocalLength(e)}async fitCameraToSceneBounds(e=!0){const t=this._appWcRef.getSceneSphericalBounds().clone();if(t.isEmpty()||t.radius<=0)return;let n=this._appWcRef.productSettings.camera.cameraBoundsMultiplier;return this._appWcRef.cameraBoundsMultiplier!==0&&(n=this._appWcRef.cameraBoundsMultiplier),this._appWcRef.aspectRatio<1&&(n=1),t.radius=t.radius*n,await this.fitCameraToObject({objectToFocus:t,enableTransition:e})}__onMainCameraControlsControlStart(){const e=this.__mainCameraControls,t=e.currentAction===e.mouseButtons?.right||e.currentAction===e.touches?.two;this.__cameraSettings.canPan&&t?this._appWcRef.eventsManager.cameraControlsStart.fire({type:"pan"}):e.currentAction===e.mouseButtons?.left?this._appWcRef.eventsManager.cameraControlsStart.fire({type:"rotate"}):this._appWcRef.eventsManager.cameraControlsStart.fire({type:null})}__onMainCameraControlsControlEnd(){this._appWcRef.eventsManager.inputEnd.fire()}saveCurrentCameraTransforms(){this.__mainCameraControls.getPosition(this.__savedCameraState.position),this.__mainCameraControls.getTarget(this.__savedCameraState.target),this.__savedCameraState.focalLength=this.getCameraFocalLength()}resetCurrentCameraTransformsToLastSavedState(e=!0){this.moveCameraToLocation({newCameraTransforms:this.__savedCameraState,transition:e})}setCameraZoomLimits({minDistance:e,maxDistance:t}){this._appWcRef.productSettings.camera.canZoom===!1&&(e=null,t=null),e===null&&(e=.001),t===null&&(t=1/0);const n=this._appWcRef.getSceneSphericalBounds().radius;n<0||(this.__mainCameraControls.minDistance=Math.min(e,n),this.__mainCameraControls.maxDistance=n+t)}enableRotationControls(){this.__mainCameraControls.mouseButtons.left=this.cameraActions.ROTATE,this.__mainCameraControls.touches.one=this.cameraActions.TOUCH_ROTATE}disableRotationControls(){this.__mainCameraControls.mouseButtons.left=this.cameraActions.NONE,this.__mainCameraControls.touches.one=this.cameraActions.NONE}enablePanControls(){this.__mainCameraControls.touches.two=this.cameraActions.TOUCH_DOLLY_TRUCK,this.__mainCameraControls.mouseButtons.right=this.cameraActions.TRUCK}disablePanControls(){this.__mainCameraControls.touches.two=this.cameraActions.NONE,this.__mainCameraControls.mouseButtons.right=this.cameraActions.NONE}enableZoomControls(){if(this._appWcRef.disableZoom){this.disableZoomControls();return}this.__mainCameraControls.touches.two=this.cameraActions.TOUCH_DOLLY,this.__mainCameraControls.mouseButtons.wheel=this.cameraActions.DOLLY}disableZoomControls(){this.__mainCameraControls.mouseButtons.wheel=this.cameraActions.NONE,this.__mainCameraControls.touches.two=this.cameraActions.NONE}enableCameraZoomLimits(e){this.setCameraZoomLimits({minDistance:e.minDistance,maxDistance:e.maxDistance})}disableCameraZoomLimits(){this.setCameraZoomLimits({minDistance:null,maxDistance:null})}enableCameraRotationLimits(e){const{infinitePolarAngle:t,minPolarAngle:n,maxPolarAngle:s,infiniteAzimuthAngle:r,minAzimuthAngle:a,maxAzimuthAngle:o}=e;this.__mainCameraControls.minPolarAngle=t?-1/0:n,this.__mainCameraControls.maxPolarAngle=t?1/0:s,this.__mainCameraControls.minAzimuthAngle=r?-1/0:a,this.__mainCameraControls.maxAzimuthAngle=r?1/0:o}disableCameraRotationLimits(){this.__mainCameraControls.minPolarAngle=-1/0,this.__mainCameraControls.maxPolarAngle=1/0,this.__mainCameraControls.minAzimuthAngle=-1/0,this.__mainCameraControls.maxAzimuthAngle=1/0}updateCameraSettings(e){this.__cameraSettings=JSON.parse(JSON.stringify(e)),this.enableRotationControls();const{canPan:t,canZoom:n}=e;n?this.enableZoomControls():this.disableZoomControls(),t?this.enablePanControls():this.disablePanControls(),this.__mainCameraControls.mouseButtons.middle=this.cameraActions.NONE,this.__mainCameraControls.enabled=!0,this.__cameras.main.setFocalLength(e.focalLength),this.__cameras.main.near=e.nearClip,this.__cameras.main.far=e.farClip,this.enableCameraZoomLimits(e),this.enableCameraRotationLimits(e),this._appWcRef.transparentBackground===!1&&(this.__mainRenderer.setClearColor(e.backgroundColor),this.__mainRenderer.setClearAlpha(e.backgroundAlpha))}normalizeAngle(e){return Br.euclideanModulo(e,Gg.TAU)}absoluteAngle(e,t){const n=e-t;return Br.euclideanModulo(n+Math.PI,Gg.TAU)-Math.PI}async moveCameraToLocation({newCameraTransforms:e,freezeCamera:t=!1,transition:n=!0,targetCameraControlsRef:s=this.__mainCameraControls,ignoreCameraLimits:r=!1}){e instanceof Tw||(e=new Tw(e));const a=e.getPosition(),o=e.getTarget();if(s.enabled=!1,r===!0)s.setLookAt(a.x,a.y,a.z,o.x,o.y,o.z,n),s.normalizeRotations();else{this.__cameraDirection.set(0,0,0),this.__cameraDirection.subVectors(a,o),this.__cameraDirection.normalize();const l=a.distanceTo(o);this.__cameraSpherical.setFromVector3(this.__cameraDirection);const c=this.absoluteAngle(this.normalizeAngle(this.__cameraSpherical.theta),this.normalizeAngle(s.azimuthAngle)),u=this.absoluteAngle(this.normalizeAngle(this.__cameraSpherical.phi),this.normalizeAngle(s.polarAngle));s.rotate(c,u,n),s.moveTo(o.x,o.y,o.z,n),s.dollyTo(l,n)}t||(s.enabled=!0)}async rotateCameraToLocation({azimuthAngle:e,polarAngle:t,distance:n,transition:s=!0,targetCameraControlsRef:r=this.__mainCameraControls}){e&&r.rotateAzimuthTo(e,s),t&&r.rotatePolarTo(t,s),n&&r.dollyTo(n,s)}async fitCameraToObject({objectToFocus:e,enableTransition:t=!0}){return await this.__mainCameraControls.fitToSphere(e,t)}async wiggleCamera(){const e=this.__mainCameraControls.azimuthAngle,t=[0,.4,-.3,0];for(const n of t){if(!this._appWcRef.playInteractionPrompt)break;await this.__mainCameraControls.rotateAzimuthTo(e+n,!0)}}__onProductSettingsUpdated(){this.updateCameraSettings(this._appWcRef.productSettings.camera)}__onCameraMoveToTransform(e){e.detail.saveFirst&&this.saveCurrentCameraTransforms(),this.moveCameraToLocation({newCameraTransforms:e.detail.cameraTransforms,ignoreCameraLimits:e.detail.ignoreCameraLimits})}__onSceneBoundsChanged(){this.__mainCameraControls.setBoundary(this._appWcRef.getSceneBounds())}__setupEventListeners(){this.__mainCameraControls.addEventListener("controlstart",()=>{this.__onMainCameraControlsControlStart()}),this.__mainCameraControls.addEventListener("controlend",()=>{this.__onMainCameraControlsControlEnd()}),this._appWcRef.addEventListener(this._appWcRef.eventsManager.productSettingUpdatedEvent.name,this.__onProductSettingsUpdated.bind(this)),this._appWcRef.addEventListener(this._appWcRef.eventsManager.cameraMoveToTransform.name,this.__onCameraMoveToTransform.bind(this)),this._appWcRef.addEventListener(this._appWcRef.eventsManager.sceneBoundsChanged.name,this.__onSceneBoundsChanged.bind(this))}async setup({mainRenderer:e}){this.__mainRenderer=e;const t=new $n(75,window.innerWidth/window.innerHeight,.1,1e3);this.__cameras={main:t,screenshot:t.clone()},this.__cameras.main.name="MainCamera",this.__cameras.screenshot.name="ScreenshotCamera",this.__cameras.main.position.setZ(1);const n={Vector2:pe,Vector3:Q,Vector4:Mt,Quaternion:Yt,Matrix4:We,Spherical:Ll,Box3:Rn,Sphere:es,Raycaster:bb};vh.install({THREE:n}),this.__mainCameraControls=new vh(this.__cameras.main,e.domElement),this.__setupEventListeners()}}const sY='@font-face{font-family:Helvetica Neue;src:url(https://asset.myepigraph.com/design-assets/fonts/HelveticaNeue/HelveticaNeue-Light.otf) format("opentype");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:PPMori-Regular;src:url(https://asset.myepigraph.com/design-assets/fonts/PPMori/PPMori-Regular.woff2) format("woff2");font-display:swap}@font-face{font-family:PPMori-Bold;src:url(https://asset.myepigraph.com/design-assets/fonts/PPMori/PPMori-Bold.woff2) format("woff2");font-display:swap}@font-face{font-family:Inter;src:url(https://asset.myepigraph.com/design-assets/fonts/Inter/Inter-VariableFont_slnt_wght.ttf) format("truetype");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Inter;src:url(https://asset.myepigraph.com/design-assets/fonts/Inter/Inter_18pt-Bold.ttf) format("truetype");font-weight:700;font-style:normal;font-display:swap}',rY={Color:{Black:{25:{$type:"color",$value:"rgba(0, 0, 0, 0.0000)"},50:{$type:"color",$value:"rgba(0, 0, 0, 0.0500)"},100:{$type:"color",$value:"rgba(0, 0, 0, 0.1000)"},200:{$type:"color",$value:"rgba(0, 0, 0, 0.2000)"},300:{$type:"color",$value:"rgba(0, 0, 0, 0.3000)"},400:{$type:"color",$value:"rgba(0, 0, 0, 0.4000)"},500:{$type:"color",$value:"rgba(0, 0, 0, 0.5000)"},600:{$type:"color",$value:"rgba(0, 0, 0, 0.6000)"},700:{$type:"color",$value:"rgba(0, 0, 0, 0.7000)"},800:{$type:"color",$value:"rgba(0, 0, 0, 0.8000)"},900:{$type:"color",$value:"rgba(0, 0, 0, 0.9000)"},1e3:{$type:"color",$value:"#000000"}},White:{25:{$type:"color",$value:"rgba(255, 255, 255, 0.0250)"},50:{$type:"color",$value:"rgba(255, 255, 255, 0.0500)"},100:{$type:"color",$value:"rgba(255, 255, 255, 0.1000)"},200:{$type:"color",$value:"rgba(255, 255, 255, 0.2000)"},300:{$type:"color",$value:"rgba(255, 255, 255, 0.3000)"},400:{$type:"color",$value:"rgba(255, 255, 255, 0.4000)"},500:{$type:"color",$value:"rgba(255, 255, 255, 0.5000)"},600:{$type:"color",$value:"rgba(255, 255, 255, 0.6000)"},700:{$type:"color",$value:"rgba(255, 255, 255, 0.7000)"},800:{$type:"color",$value:"rgba(255, 255, 255, 0.8000)"},900:{$type:"color",$value:"rgba(255, 255, 255, 0.9000)"},1e3:{$type:"color",$value:"#ffffff"}},Green:{100:{$type:"color",$value:"#ebffee"},200:{$type:"color",$value:"#cff7d3"},300:{$type:"color",$value:"#aff4c6"},400:{$type:"color",$value:"#85e0a3"},500:{$type:"color",$value:"#14ae5c"},600:{$type:"color",$value:"#009951"},700:{$type:"color",$value:"#008043"},800:{$type:"color",$value:"#02542d"},900:{$type:"color",$value:"#024023"},1e3:{$type:"color",$value:"#062d1b"}},Red:{100:{$type:"color",$value:"#fee9e7"},200:{$type:"color",$value:"#fdd3d0"},300:{$type:"color",$value:"#fcb3ad"},400:{$type:"color",$value:"#f4776a"},500:{$type:"color",$value:"#ec221f"},600:{$type:"color",$value:"#c00f0c"},700:{$type:"color",$value:"#900b09"},800:{$type:"color",$value:"#690807"},900:{$type:"color",$value:"#4d0b0a"},1e3:{$type:"color",$value:"#300603"}},Yellow:{100:{$type:"color",$value:"#fffbeb"},200:{$type:"color",$value:"#fff1c2"},300:{$type:"color",$value:"#ffe8a3"},400:{$type:"color",$value:"#e8b931"},500:{$type:"color",$value:"#e5a000"},600:{$type:"color",$value:"#bf6a02"},700:{$type:"color",$value:"#975102"},800:{$type:"color",$value:"#682d03"},900:{$type:"color",$value:"#522504"},1e3:{$type:"color",$value:"#401b01"}},Blue:{100:{$type:"color",$value:"#fbfdff"},200:{$type:"color",$value:"#eaf4ff"},300:{$type:"color",$value:"#d5ebff"},400:{$type:"color",$value:"#c0e1ff"},500:{$type:"color",$value:"#91d0ff"},600:{$type:"color",$value:"#0094d5"},700:{$type:"color",$value:"#00679b"},800:{$type:"color",$value:"#003a5a"},900:{$type:"color",$value:"#003a5a"},1e3:{$type:"color",$value:"#002133"}},Slate:{100:{$type:"color",$value:"#f5f5f5"},200:{$type:"color",$value:"#e3e3e3"},300:{$type:"color",$value:"#cdcdcd"},400:{$type:"color",$value:"#b2b2b2"},500:{$type:"color",$value:"#949494"},600:{$type:"color",$value:"#767676"},700:{$type:"color",$value:"#5a5a5a"},800:{$type:"color",$value:"#434343"},900:{$type:"color",$value:"#303030"},1e3:{$type:"color",$value:"#242424"}},Grey:{25:{$type:"color",$value:"#f5f5f5"},50:{$type:"color",$value:"#f2f2f2"},100:{$type:"color",$value:"#e6e6e6"},200:{$type:"color",$value:"#cccccc"},300:{$type:"color",$value:"#b3b3b3"},400:{$type:"color",$value:"#999999"},500:{$type:"color",$value:"#7b7b7b"},600:{$type:"color",$value:"#666666"},700:{$type:"color",$value:"#4d4d4d"},800:{$type:"color",$value:"#333333"},900:{$type:"color",$value:"#1a1a1a"},1e3:{$type:"color",$value:"#0d0d0d"}},GreyAlpha:{25:{$type:"color",$value:"rgba(248, 248, 248, 0.8000)"},100:{$type:"color",$value:"rgba(242, 242, 242, 0.8000)"},500:{$type:"color",$value:"rgba(204, 204, 204, 0.2000)"},700:{$type:"color",$value:"rgba(204, 204, 204, 0.6000)"},800:{$type:"color",$value:"rgba(186, 186, 186, 0.6000)"},900:{$type:"color",$value:"rgba(50, 50, 50, 0.9000)"},"05":{$type:"color",$value:"rgba(253, 253, 253, 0.8000)"}}},Unit:{Space:{0:{$type:"number",$value:"0px"},100:{$type:"number",$value:"4px"},150:{$type:"number",$value:"6px"},200:{$type:"number",$value:"8px"},300:{$type:"number",$value:"12px"},400:{$type:"number",$value:"16px"},500:{$type:"number",$value:"20px"},600:{$type:"number",$value:"24px"},800:{$type:"number",$value:"32px"},1e3:{$type:"number",$value:"40px"},1200:{$type:"number",$value:"48px"},1600:{$type:"number",$value:"64px"},2e3:{$type:"number",$value:"80px"},2400:{$type:"number",$value:"96px"},2800:{$type:"number",$value:"112px"},3200:{$type:"number",$value:"128px"},3600:{$type:"number",$value:"144px"},4e3:{$type:"number",$value:"160px"},4400:{$type:"number",$value:"176px"},4800:{$type:"number",$value:"192px"},5200:{$type:"number",$value:"208px"},5600:{$type:"number",$value:"224px"},6e3:{$type:"number",$value:"240px"},6400:{$type:"number",$value:"256px"},7200:{$type:"number",$value:"288px"},8e3:{$type:"number",$value:"320px"},9600:{$type:"number",$value:"384px"},"0125":{$type:"number",$value:"0.5px"},"025":{$type:"number",$value:"1px"},"0325":{$type:"number",$value:"1.5px"},"050":{$type:"number",$value:"2px"}},Stack:{100:{$type:"number",$value:"-4px"},200:{$type:"number",$value:"-8px"},300:{$type:"number",$value:"-12px"},400:{$type:"number",$value:"-16px"},800:{$type:"number",$value:"-32px"},1e3:{$type:"number",$value:"-40px"},1600:{$type:"number",$value:"-64px"},2400:{$type:"number",$value:"-96px"},3200:{$type:"number",$value:"-128px"},4e3:{$type:"number",$value:"-160px"},4800:{$type:"number",$value:"-192px"},5600:{$type:"number",$value:"-224px"},7200:{$type:"number",$value:"-288px"},9600:{$type:"number",$value:"-384px"},"0125":{$type:"number",$value:"-0.5px"},"025":{$type:"number",$value:"-1px"},"0325":{$type:"number",$value:"-1.5px"},"050":{$type:"number",$value:"-2px"},"075":{$type:"number",$value:"-3px"}},Size:{4:{$type:"number",$value:"4px"},6:{$type:"number",$value:"6px"},8:{$type:"number",$value:"8px"},10:{$type:"number",$value:"10px"},12:{$type:"number",$value:"12px"},14:{$type:"number",$value:"14px"},16:{$type:"number",$value:"16px"},18:{$type:"number",$value:"18px"},20:{$type:"number",$value:"20px"},22:{$type:"number",$value:"22px"},24:{$type:"number",$value:"24px"},28:{$type:"number",$value:"28px"},30:{$type:"number",$value:"30px"},32:{$type:"number",$value:"32px"},40:{$type:"number",$value:"40px"},48:{$type:"number",$value:"48px"},64:{$type:"number",$value:"64px"},80:{$type:"number",$value:"80px"},96:{$type:"number",$value:"96px"},112:{$type:"number",$value:"112px"},128:{$type:"number",$value:"128px"},144:{$type:"number",$value:"144px"},160:{$type:"number",$value:"160px"},176:{$type:"number",$value:"176px"},224:{$type:"number",$value:"224px"}},Resolution:{XxsmallScreenMin:{$type:"number",$value:"375px"},XsmallScreenMin:{$type:"number",$value:"480px"},SmallScreenMin:{$type:"number",$value:"576px"},MediumScreenMin:{$type:"number",$value:"768px"},LargeScreenMin:{$type:"number",$value:"992px"},XlargeScreenMin:{$type:"number",$value:"1200px"},XxlargeScreenMin:{$type:"number",$value:"1400px"},XxxsmallScreenMax:{$type:"number",$value:"374px"},XxsmallScreenMax:{$type:"number",$value:"479px"},XsmallScreenMax:{$type:"number",$value:"575px"},SmallScreenMax:{$type:"number",$value:"767px"},MediumScreenMax:{$type:"number",$value:"991px"},LargeScreenMax:{$type:"number",$value:"1199px"},XlargeScreenMax:{$type:"number",$value:"1399px"},XxlargeScreenMax:{$type:"number",$value:"1920px"}}},Font:{Family:{Main:{$type:"string",$value:"PP Mori"},Body:{$type:"string",$value:"Helvetica LT Pro"},Epigraph:{$type:"string",$value:"PP Mori"}}}},lD={Color:{Brand:{Base:{$type:"color",$value:"#335166",$web:"var(--color-brand-base)"},BaseSecondary:{$type:"color",$value:"#2b4354",$web:"var(--color-brand-base-secondary)"},BaseTertiary:{$type:"color",$value:"#202f3a",$web:"var(--color-brand-base-tertiary)"},Accent:{$type:"color",$value:"#4276cf",$web:"var(--color-brand-accent)"},AccentSecondary:{$type:"color",$value:"#3761a8",$web:"var(--color-brand-accent-secondary)"},AccentTertiary:{$type:"color",$value:"#3761a8",$web:"var(--color-brand-accent-tertiary)"},Light:{$type:"color",$value:"#f8fbf6",$web:"var(--color-brand-light)"},Dark:{$type:"color",$value:"#111b22",$web:"var(--color-brand-dark)"}}},Font:{Brand:{Heading:{$type:"string",$value:"Helvetica Neue",$web:"var(--font-brand-heading)"},Paragraph:{$type:"string",$value:"Inter",$web:"var(--font-brand-body)"}}},Unit:{Brand:{Radius:{$type:"number",$value:"4px",$web:"var(--unit-brand-radius)"}}}},de={Color:{Surface:{Plain:{$value:"{Primitives.Color.White.1000}"},NeutralPrimary:{$value:"{Primitives.Color.Grey.100}"},NeutralSecondary:{$value:"{Primitives.Color.Grey.50}"},NeutralTertiary:{$value:"{Primitives.Color.Grey.25}"},ShadowSecondary:{$value:"{Primitives.Color.Black.200}"}},Fill:{Accent:{$value:"{BrandPrimitives.Color.Brand.Accent}"},AccentHover:{$value:"{BrandPrimitives.Color.Brand.AccentSecondary}"},AccentPress:{$value:"{BrandPrimitives.Color.Brand.AccentTertiary}"},Base:{$value:"{BrandPrimitives.Color.Brand.Base}"},BaseHover:{$value:"{BrandPrimitives.Color.Brand.BaseSecondary}"},BasePress:{$value:"{BrandPrimitives.Color.Brand.BaseTertiary}"},NeutralPrimary:{$value:"{Primitives.Color.Grey.700}"},NeutralSecondary:{$value:"{Primitives.Color.Grey.300}"},NeutralTertiary:{$value:"{Primitives.Color.Grey.100}"},SubtlePrimary:{$value:"{Primitives.Color.GreyAlpha.100}"},SubtleSecondary:{$value:"{Primitives.Color.GreyAlpha.25}"},DangerPrimary:{$value:"{Primitives.Color.Red.600}"},Disabled:{$value:"{Primitives.Color.Grey.200}"},HotspotSecondary:{$value:"{Primitives.Color.GreyAlpha.800}"}},Icon:{NeutralPrimary:{$value:"{Primitives.Color.Grey.800}"}},Text:{Invert:{$value:"{Primitives.Color.White.1000}"},NeutralPrimary:{$value:"{Primitives.Color.Grey.800}"},NeutralSecondary:{$value:"{Primitives.Color.Grey.700}"},Disabled:{$value:"{Primitives.Color.Grey.300}"}},Border:{AltContrast:{$value:"{BrandPrimitives.Color.Brand.Dark}"},SubtlePrimary:{$value:"{Primitives.Color.Grey.300}"},SubtleSecondary:{$value:"{Primitives.Color.GreyAlpha.700}"}}},Size:{Text:{Small:{$value:"{Primitives.Unit.Size.16}"},Medium:{$value:"{Primitives.Unit.Size.18}"},Large:{$value:"{Primitives.Unit.Size.20}"}},Icon:{Small:{$value:"{Primitives.Unit.Size.20}"},Medium:{$value:"{Primitives.Unit.Size.24}"},Large:{$value:"{Primitives.Unit.Size.28}"}},Radius:{Medium:{$value:"{Primitives.Unit.Space.150}"},Full:{$value:"{Primitives.Unit.Space.6000}"}},Stroke:{Regular:{$value:"{Primitives.Unit.Space.025}"},Thick:{$value:"{Primitives.Unit.Space.050}"}},Shadow:{None:{$value:"{Primitives.Unit.Space.0}"},Xsmall:{$value:"{Primitives.Unit.Space.025}"},Small:{$value:"{Primitives.Unit.Space.0325}"}},Blur:{Small:{$value:"{Primitives.Unit.Space.100}"}}},Space:{Padding:{Small:{$value:"{Primitives.Unit.Space.300}"},Medium:{$value:"{Primitives.Unit.Space.400}"},Regular:{$value:"{Primitives.Unit.Space.600}"}},Gap:{Small:{$value:"{Primitives.Unit.Space.200}"},Regular:{$value:"{Primitives.Unit.Space.400}"},Xxlarge:{$value:"{Primitives.Unit.Space.800}"}}},Font:{Family:{CustomH:{$value:"{BrandPrimitives.Font.Brand.Heading}"},CustomP:{$value:"{BrandPrimitives.Font.Brand.Paragraph}"},Main:{$value:"Helvetica Neue"}},Tracking:{Normal:{$value:"{Primitives.Unit.Space.0}"}}}};function oe(i){const e=/\{Primitives\.(.*?)}/,t=String(i).match(e),n=/\{BrandPrimitives\.(.*?)}/,s=String(i).match(n);let r=i;if(t){const a=t[1].split(".");r=rY[a[0]][a[1]][a[2]].$value}else if(s){const a=s[1].split("."),o=lD[a[0]][a[1]][a[2]],l=o.$web;r=`${l.substring(0,l.length-1)}, ${o.$value})`}return zi(r)}const Vb={poweredByEpigraphFooterText:"https://asset.myepigraph.com/design-assets/icons/powered-by-epigraph.svg",splashScreenLogo:"https://asset.myepigraph.com/design-assets/icons/default-splash-screen-image.svg",sampleQrCode:"https://asset.myepigraph.com/design-assets/icons/sample-qr-code.png"};function aY(){const i={};for(const[e,t]of Object.entries(lD))for(const[n,s]of Object.entries(t))for(const[r,a]of Object.entries(s)){const o=`${e}${n}${r}`;i[o]={name:zi(a.$web),defaultValue:a.$value,argType:{control:a.$type}}}return i}const oY=aY(),jh={size:{name:"size",defaultValue:"small",argType:{options:["small","medium","large"],control:"select"}},theme:{name:"theme",defaultValue:"light",argType:{options:["light","dark"],control:"select"}},disabled:{name:"disabled",defaultValue:!1,argType:{control:"boolean"}}};var lY=Object.defineProperty,du=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=a(e,t,s)||s);return s&&lY(e,t,s),s};const Jl=class cD extends mh{constructor(){super(),this.epgOnClickEventName="epgonclick",this.disabled=!1,this.theme=jh.theme.defaultValue.toString(),this.size=jh.size.defaultValue.toString(),cD.ensureFontsAreLoaded(),this.addEventListener("click",this.doClick),this.addEventListener("pointerover",this.doHoverStart),this.addEventListener("pointerleave",this.doHoverEnd)}static{this.styles=[ht`
|
|
13176
13176
|
:host {
|
|
13177
13177
|
font-family: ${oe(de.Font.Family.Main.$value)};
|
|
13178
13178
|
letter-spacing: 0.5px;
|
|
@@ -14202,7 +14202,7 @@ ${r.join(`
|
|
|
14202
14202
|
* @license
|
|
14203
14203
|
* Copyright 2020 Google LLC
|
|
14204
14204
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14205
|
-
*/const Yw=()=>new NY;let NY=class{};const
|
|
14205
|
+
*/const Yw=()=>new NY;let NY=class{};const x0=new WeakMap,qw=Xb(class extends LY{render(i){return _e}update(i,[e]){const t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=i.options?.host,this.rt(this.ct=i.element)),_e}rt(i){if(this.isConnected||(i=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let t=x0.get(e);t===void 0&&(t=new WeakMap,x0.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){return typeof this.G=="function"?x0.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var PY=Object.defineProperty,ec=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=a(e,t,s)||s);return s&&PY(e,t,s),s},PA=(i=>(i.IMAGE="image",i.VIDEO="video",i))(PA||{});class No extends Ei{constructor(){super(...arguments),this.mediaAlt=Pl.mediaAlt.defaultValue.toString(),this.mediaSrc=Pl.mediaSrc.defaultValue.toString(),this.mediaType=Pl.mediaType.defaultValue.toString(),this.mediaAutoplay=!1,this.__mediaVideoRef=Yw(),this.__videoControlsContainerRef=Yw(),this.__isPlaying=!1,this.__isLoading=!1}static{this.styles=[super.styles,ht`
|
|
14206
14206
|
:host {
|
|
14207
14207
|
display: flex;
|
|
14208
14208
|
font-size: 20px;
|
|
@@ -14307,7 +14307,7 @@ ${r.join(`
|
|
|
14307
14307
|
${this.__generateMediaHtmlElemType()}
|
|
14308
14308
|
</div>
|
|
14309
14309
|
</slot>
|
|
14310
|
-
`:_e}}ec([H({attribute:Pl.mediaAlt.name})],No.prototype,"mediaAlt");ec([H({attribute:Pl.mediaSrc.name})],No.prototype,"mediaSrc");ec([H({attribute:Pl.mediaType.name})],No.prototype,"mediaType");ec([H({type:Boolean,attribute:Pl.mediaAutoplay.name})],No.prototype,"mediaAutoplay");ec([H({attribute:!1})],No.prototype,"onClick");ec([Gn()],No.prototype,"__isPlaying");ec([Gn()],No.prototype,"__isLoading");window.customElements.get(Vw)||window.customElements.define(Vw,No);function Ww(i){return i!==null&&typeof i=="object"&&"constructor"in i&&i.constructor===Object}function Kb(i={},e={}){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof i[n]>"u"?i[n]=e[n]:Ww(e[n])&&Ww(i[n])&&Object.keys(e[n]).length>0&&Kb(i[n],e[n])})}const mD={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function hi(){const i=typeof document<"u"?document:{};return Kb(i,mD),i}const FY={document:mD,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(i){return typeof setTimeout>"u"?(i(),null):setTimeout(i,0)},cancelAnimationFrame(i){typeof setTimeout>"u"||clearTimeout(i)}};function wn(){const i=typeof window<"u"?window:{};return Kb(i,FY),i}function so(i=""){return i.trim().split(" ").filter(e=>!!e.trim())}function kY(i){const e=i;Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function Kh(i,e=0){return setTimeout(i,e)}function Fs(){return Date.now()}function UY(i){const e=wn();let t;return e.getComputedStyle&&(t=e.getComputedStyle(i,null)),!t&&i.currentStyle&&(t=i.currentStyle),t||(t=i.style),t}function Av(i,e="x"){const t=wn();let n,s,r;const a=UY(i);return t.WebKitCSSMatrix?(s=a.transform||a.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(o=>o.replace(",",".")).join(", ")),r=new t.WebKitCSSMatrix(s==="none"?"":s)):(r=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=r.toString().split(",")),e==="x"&&(t.WebKitCSSMatrix?s=r.m41:n.length===16?s=parseFloat(n[12]):s=parseFloat(n[4])),e==="y"&&(t.WebKitCSSMatrix?s=r.m42:n.length===16?s=parseFloat(n[13]):s=parseFloat(n[5])),s||0}function Rd(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function OY(i){return typeof window<"u"&&typeof window.HTMLElement<"u"?i instanceof HTMLElement:i&&(i.nodeType===1||i.nodeType===11)}function ds(...i){const e=Object(i[0]);for(let t=1;t<i.length;t+=1){const n=i[t];if(n!=null&&!OY(n)){const s=Object.keys(Object(n)).filter(r=>r!=="__proto__"&&r!=="constructor"&&r!=="prototype");for(let r=0,a=s.length;r<a;r+=1){const o=s[r],l=Object.getOwnPropertyDescriptor(n,o);l!==void 0&&l.enumerable&&(Rd(e[o])&&Rd(n[o])?n[o].__swiper__?e[o]=n[o]:ds(e[o],n[o]):!Rd(e[o])&&Rd(n[o])?(e[o]={},n[o].__swiper__?e[o]=n[o]:ds(e[o],n[o])):e[o]=n[o])}}}return e}function al(i,e,t){i.style.setProperty(e,t)}function yD({swiper:i,targetPosition:e,side:t}){const n=wn(),s=-i.translate;let r=null,a;const o=i.params.speed;i.wrapperEl.style.scrollSnapType="none",n.cancelAnimationFrame(i.cssModeFrameID);const l=e>s?"next":"prev",c=(h,d)=>l==="next"&&h>=d||l==="prev"&&h<=d,u=()=>{a=new Date().getTime(),r===null&&(r=a);const h=Math.max(Math.min((a-r)/o,1),0),d=.5-Math.cos(h*Math.PI)/2;let A=s+d*(e-s);if(c(A,e)&&(A=e),i.wrapperEl.scrollTo({[t]:A}),c(A,e)){i.wrapperEl.style.overflow="hidden",i.wrapperEl.style.scrollSnapType="",setTimeout(()=>{i.wrapperEl.style.overflow="",i.wrapperEl.scrollTo({[t]:A})}),n.cancelAnimationFrame(i.cssModeFrameID);return}i.cssModeFrameID=n.requestAnimationFrame(u)};u()}function tc(i){return i.querySelector(".swiper-slide-transform")||i.shadowRoot&&i.shadowRoot.querySelector(".swiper-slide-transform")||i}function yi(i,e=""){const t=wn(),n=[...i.children];return t.HTMLSlotElement&&i instanceof HTMLSlotElement&&n.push(...i.assignedElements()),e?n.filter(s=>s.matches(e)):n}function GY(i,e){const t=[e];for(;t.length>0;){const n=t.shift();if(i===n)return!0;t.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}function zY(i,e){const t=wn();let n=e.contains(i);return!n&&t.HTMLSlotElement&&e instanceof HTMLSlotElement&&(n=[...e.assignedElements()].includes(i),n||(n=GY(i,e))),n}function Vg(i){try{console.warn(i);return}catch{}}function ys(i,e=[]){const t=document.createElement(i);return t.classList.add(...Array.isArray(e)?e:so(e)),t}function Yg(i){const e=wn(),t=hi(),n=i.getBoundingClientRect(),s=t.body,r=i.clientTop||s.clientTop||0,a=i.clientLeft||s.clientLeft||0,o=i===e?e.scrollY:i.scrollTop,l=i===e?e.scrollX:i.scrollLeft;return{top:n.top+o-r,left:n.left+l-a}}function HY(i,e){const t=[];for(;i.previousElementSibling;){const n=i.previousElementSibling;e?n.matches(e)&&t.push(n):t.push(n),i=n}return t}function $Y(i,e){const t=[];for(;i.nextElementSibling;){const n=i.nextElementSibling;e?n.matches(e)&&t.push(n):t.push(n),i=n}return t}function _o(i,e){return wn().getComputedStyle(i,null).getPropertyValue(e)}function FA(i){let e=i,t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function Fl(i,e){const t=[];let n=i.parentElement;for(;n;)e?n.matches(e)&&t.push(n):t.push(n),n=n.parentElement;return t}function aA(i,e){function t(n){n.target===i&&(e.call(i,n),i.removeEventListener("transitionend",t))}e&&i.addEventListener("transitionend",t)}function pv(i,e,t){const n=wn();return i[e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(i,null).getPropertyValue(e==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(i,null).getPropertyValue(e==="width"?"margin-left":"margin-bottom"))}function St(i){return(Array.isArray(i)?i:[i]).filter(e=>!!e)}function Bm(i){return e=>Math.abs(e)>0&&i.browser&&i.browser.need3dFix&&Math.abs(e)%90===0?e+.001:e}function xs(i,e=""){typeof trustedTypes<"u"?i.innerHTML=trustedTypes.createPolicy("html",{createHTML:t=>t}).createHTML(e):i.innerHTML=e}let C_;function VY(){const i=wn(),e=hi();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in i||i.DocumentTouch&&e instanceof i.DocumentTouch)}}function _D(){return C_||(C_=VY()),C_}let I_;function YY({userAgent:i}={}){const e=_D(),t=wn(),n=t.navigator.platform,s=i||t.navigator.userAgent,r={ios:!1,android:!1},a=t.screen.width,o=t.screen.height,l=s.match(/(Android);?[\s\/]+([\d.]+)?/);let c=s.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const u=s.match(/(iPod)(.*OS\s([\d_]+))?/),h=!c&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),d=n==="Win32";let A=n==="MacIntel";const p=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!c&&A&&e.touch&&p.indexOf(`${a}x${o}`)>=0&&(c=s.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),A=!1),l&&!d&&(r.os="android",r.android=!0),(c||h||u)&&(r.os="ios",r.ios=!0),r}function ED(i={}){return I_||(I_=YY(i)),I_}let w_;function qY(){const i=wn(),e=ED();let t=!1;function n(){const o=i.navigator.userAgent.toLowerCase();return o.indexOf("safari")>=0&&o.indexOf("chrome")<0&&o.indexOf("android")<0}if(n()){const o=String(i.navigator.userAgent);if(o.includes("Version/")){const[l,c]=o.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));t=l<16||l===16&&c<2}}const s=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(i.navigator.userAgent),r=n(),a=r||s&&e.ios;return{isSafari:t||r,needPerspectiveFix:t,need3dFix:a,isWebView:s}}function vD(){return w_||(w_=qY()),w_}function WY({swiper:i,on:e,emit:t}){const n=wn();let s=null,r=null;const a=()=>{!i||i.destroyed||!i.initialized||(t("beforeResize"),t("resize"))},o=()=>{!i||i.destroyed||!i.initialized||(s=new ResizeObserver(u=>{r=n.requestAnimationFrame(()=>{const{width:h,height:d}=i;let A=h,p=d;u.forEach(({contentBoxSize:g,contentRect:m,target:f})=>{f&&f!==i.el||(A=m?m.width:(g[0]||g).inlineSize,p=m?m.height:(g[0]||g).blockSize)}),(A!==h||p!==d)&&a()})}),s.observe(i.el))},l=()=>{r&&n.cancelAnimationFrame(r),s&&s.unobserve&&i.el&&(s.unobserve(i.el),s=null)},c=()=>{!i||i.destroyed||!i.initialized||t("orientationchange")};e("init",()=>{if(i.params.resizeObserver&&typeof n.ResizeObserver<"u"){o();return}n.addEventListener("resize",a),n.addEventListener("orientationchange",c)}),e("destroy",()=>{l(),n.removeEventListener("resize",a),n.removeEventListener("orientationchange",c)})}function jY({swiper:i,extendParams:e,on:t,emit:n}){const s=[],r=wn(),a=(c,u={})=>{const h=r.MutationObserver||r.WebkitMutationObserver,d=new h(A=>{if(i.__preventObserver__)return;if(A.length===1){n("observerUpdate",A[0]);return}const p=function(){n("observerUpdate",A[0])};r.requestAnimationFrame?r.requestAnimationFrame(p):r.setTimeout(p,0)});d.observe(c,{attributes:typeof u.attributes>"u"?!0:u.attributes,childList:i.isElement||(typeof u.childList>"u"?!0:u).childList,characterData:typeof u.characterData>"u"?!0:u.characterData}),s.push(d)},o=()=>{if(i.params.observer){if(i.params.observeParents){const c=Fl(i.hostEl);for(let u=0;u<c.length;u+=1)a(c[u])}a(i.hostEl,{childList:i.params.observeSlideChildren}),a(i.wrapperEl,{attributes:!1})}},l=()=>{s.forEach(c=>{c.disconnect()}),s.splice(0,s.length)};e({observer:!1,observeParents:!1,observeSlideChildren:!1}),t("init",o),t("destroy",l)}var XY={on(i,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const s=t?"unshift":"push";return i.split(" ").forEach(r=>{n.eventsListeners[r]||(n.eventsListeners[r]=[]),n.eventsListeners[r][s](e)}),n},once(i,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;function s(...r){n.off(i,s),s.__emitterProxy&&delete s.__emitterProxy,e.apply(n,r)}return s.__emitterProxy=e,n.on(i,s,t)},onAny(i,e){const t=this;if(!t.eventsListeners||t.destroyed||typeof i!="function")return t;const n=e?"unshift":"push";return t.eventsAnyListeners.indexOf(i)<0&&t.eventsAnyListeners[n](i),t},offAny(i){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const t=e.eventsAnyListeners.indexOf(i);return t>=0&&e.eventsAnyListeners.splice(t,1),e},off(i,e){const t=this;return!t.eventsListeners||t.destroyed||!t.eventsListeners||i.split(" ").forEach(n=>{typeof e>"u"?t.eventsListeners[n]=[]:t.eventsListeners[n]&&t.eventsListeners[n].forEach((s,r)=>{(s===e||s.__emitterProxy&&s.__emitterProxy===e)&&t.eventsListeners[n].splice(r,1)})}),t},emit(...i){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,s;return typeof i[0]=="string"||Array.isArray(i[0])?(t=i[0],n=i.slice(1,i.length),s=e):(t=i[0].events,n=i[0].data,s=i[0].context||e),n.unshift(s),(Array.isArray(t)?t:t.split(" ")).forEach(a=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(o=>{o.apply(s,[a,...n])}),e.eventsListeners&&e.eventsListeners[a]&&e.eventsListeners[a].forEach(o=>{o.apply(s,n)})}),e}};function JY(){const i=this;let e,t;const n=i.el;typeof i.params.width<"u"&&i.params.width!==null?e=i.params.width:e=n.clientWidth,typeof i.params.height<"u"&&i.params.height!==null?t=i.params.height:t=n.clientHeight,!(e===0&&i.isHorizontal()||t===0&&i.isVertical())&&(e=e-parseInt(_o(n,"padding-left")||0,10)-parseInt(_o(n,"padding-right")||0,10),t=t-parseInt(_o(n,"padding-top")||0,10)-parseInt(_o(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(i,{width:e,height:t,size:i.isHorizontal()?e:t}))}function KY(){const i=this;function e(w,S){return parseFloat(w.getPropertyValue(i.getDirectionLabel(S))||0)}const t=i.params,{wrapperEl:n,slidesEl:s,rtlTranslate:r,wrongRTL:a}=i,o=i.virtual&&t.virtual.enabled,l=o?i.virtual.slides.length:i.slides.length,c=yi(s,`.${i.params.slideClass}, swiper-slide`),u=o?i.virtual.slides.length:c.length;let h=[];const d=[],A=[];let p=t.slidesOffsetBefore;typeof p=="function"&&(p=t.slidesOffsetBefore.call(i));let g=t.slidesOffsetAfter;typeof g=="function"&&(g=t.slidesOffsetAfter.call(i));const m=i.snapGrid.length,f=i.slidesGrid.length,y=i.size-p-g;let _=t.spaceBetween,E=-p,v=0,C=0;if(typeof y>"u")return;typeof _=="string"&&_.indexOf("%")>=0?_=parseFloat(_.replace("%",""))/100*y:typeof _=="string"&&(_=parseFloat(_)),i.virtualSize=-_-p-g,c.forEach(w=>{r?w.style.marginLeft="":w.style.marginRight="",w.style.marginBottom="",w.style.marginTop=""}),t.centeredSlides&&t.cssMode&&(al(n,"--swiper-centered-offset-before",""),al(n,"--swiper-centered-offset-after","")),t.cssMode&&(al(n,"--swiper-slides-offset-before",`${p}px`),al(n,"--swiper-slides-offset-after",`${g}px`));const x=t.grid&&t.grid.rows>1&&i.grid;x?i.grid.initSlides(c):i.grid&&i.grid.unsetSlides();let I;const b=t.slidesPerView==="auto"&&t.breakpoints&&Object.keys(t.breakpoints).filter(w=>typeof t.breakpoints[w].slidesPerView<"u").length>0;for(let w=0;w<u;w+=1){I=0;const S=c[w];if(!(S&&(x&&i.grid.updateSlide(w,S,c),_o(S,"display")==="none"))){if(o&&t.slidesPerView==="auto")t.virtual.slidesPerViewAutoSlideSize&&(I=t.virtual.slidesPerViewAutoSlideSize),I&&S&&(t.roundLengths&&(I=Math.floor(I)),S.style[i.getDirectionLabel("width")]=`${I}px`);else if(t.slidesPerView==="auto"){b&&(S.style[i.getDirectionLabel("width")]="");const B=getComputedStyle(S),T=S.style.transform,D=S.style.webkitTransform;if(T&&(S.style.transform="none"),D&&(S.style.webkitTransform="none"),t.roundLengths)I=i.isHorizontal()?pv(S,"width"):pv(S,"height");else{const P=e(B,"width"),R=e(B,"padding-left"),L=e(B,"padding-right"),F=e(B,"margin-left"),$=e(B,"margin-right"),J=B.getPropertyValue("box-sizing");if(J&&J==="border-box")I=P+F+$;else{const{clientWidth:W,offsetWidth:he}=S;I=P+R+L+F+$+(he-W)}}T&&(S.style.transform=T),D&&(S.style.webkitTransform=D),t.roundLengths&&(I=Math.floor(I))}else I=(y-(t.slidesPerView-1)*_)/t.slidesPerView,t.roundLengths&&(I=Math.floor(I)),S&&(S.style[i.getDirectionLabel("width")]=`${I}px`);S&&(S.swiperSlideSize=I),A.push(I),t.centeredSlides?(E=E+I/2+v/2+_,v===0&&w!==0&&(E=E-y/2-_),w===0&&(E=E-y/2-_),Math.abs(E)<1/1e3&&(E=0),t.roundLengths&&(E=Math.floor(E)),C%t.slidesPerGroup===0&&h.push(E),d.push(E)):(t.roundLengths&&(E=Math.floor(E)),(C-Math.min(i.params.slidesPerGroupSkip,C))%i.params.slidesPerGroup===0&&h.push(E),d.push(E),E=E+I+_),i.virtualSize+=I+_,v=I,C+=1}}if(i.virtualSize=Math.max(i.virtualSize,y)+g,r&&a&&(t.effect==="slide"||t.effect==="coverflow")&&(n.style.width=`${i.virtualSize+_}px`),t.setWrapperSize&&(n.style[i.getDirectionLabel("width")]=`${i.virtualSize+_}px`),x&&i.grid.updateWrapperSize(I,h),!t.centeredSlides){const w=t.slidesPerView!=="auto"&&t.slidesPerView%1!==0,S=t.snapToSlideEdge&&!t.loop&&(t.slidesPerView==="auto"||w);let B=h.length;if(S){let D;if(t.slidesPerView==="auto"){D=1;let P=0;for(let R=A.length-1;R>=0&&(P+=A[R]+(R<A.length-1?_:0),P<=y);R-=1)D=A.length-R}else D=Math.floor(t.slidesPerView);B=Math.max(u-D,0)}const T=[];for(let D=0;D<h.length;D+=1){let P=h[D];t.roundLengths&&(P=Math.floor(P)),S?D<=B&&T.push(P):h[D]<=i.virtualSize-y&&T.push(P)}h=T,Math.floor(i.virtualSize-y)-Math.floor(h[h.length-1])>1&&(S||h.push(i.virtualSize-y))}if(o&&t.loop){const w=A[0]+_;if(t.slidesPerGroup>1){const S=Math.ceil((i.virtual.slidesBefore+i.virtual.slidesAfter)/t.slidesPerGroup),B=w*t.slidesPerGroup;for(let T=0;T<S;T+=1)h.push(h[h.length-1]+B)}for(let S=0;S<i.virtual.slidesBefore+i.virtual.slidesAfter;S+=1)t.slidesPerGroup===1&&h.push(h[h.length-1]+w),d.push(d[d.length-1]+w),i.virtualSize+=w}if(h.length===0&&(h=[0]),_!==0){const w=i.isHorizontal()&&r?"marginLeft":i.getDirectionLabel("marginRight");c.filter((S,B)=>!t.cssMode||t.loop?!0:B!==c.length-1).forEach(S=>{S.style[w]=`${_}px`})}if(t.centeredSlides&&t.centeredSlidesBounds){let w=0;A.forEach(B=>{w+=B+(_||0)}),w-=_;const S=w>y?w-y:0;h=h.map(B=>B<=0?-p:B>S?S+g:B)}if(t.centerInsufficientSlides){let w=0;if(A.forEach(S=>{w+=S+(_||0)}),w-=_,w<y){const S=(y-w)/2;h.forEach((B,T)=>{h[T]=B-S}),d.forEach((B,T)=>{d[T]=B+S})}}if(Object.assign(i,{slides:c,snapGrid:h,slidesGrid:d,slidesSizesGrid:A}),t.centeredSlides&&t.cssMode&&!t.centeredSlidesBounds){al(n,"--swiper-centered-offset-before",`${-h[0]}px`),al(n,"--swiper-centered-offset-after",`${i.size/2-A[A.length-1]/2}px`);const w=-i.snapGrid[0],S=-i.slidesGrid[0];i.snapGrid=i.snapGrid.map(B=>B+w),i.slidesGrid=i.slidesGrid.map(B=>B+S)}if(u!==l&&i.emit("slidesLengthChange"),h.length!==m&&(i.params.watchOverflow&&i.checkOverflow(),i.emit("snapGridLengthChange")),d.length!==f&&i.emit("slidesGridLengthChange"),t.watchSlidesProgress&&i.updateSlidesOffset(),i.emit("slidesUpdated"),!o&&!t.cssMode&&(t.effect==="slide"||t.effect==="fade")){const w=`${t.containerModifierClass}backface-hidden`,S=i.el.classList.contains(w);u<=t.maxBackfaceHiddenSlides?S||i.el.classList.add(w):S&&i.el.classList.remove(w)}}function ZY(i){const e=this,t=[],n=e.virtual&&e.params.virtual.enabled;let s=0,r;typeof i=="number"?e.setTransition(i):i===!0&&e.setTransition(e.params.speed);const a=o=>n?e.slides[e.getSlideIndexByData(o)]:e.slides[o];if(e.params.slidesPerView!=="auto"&&e.params.slidesPerView>1)if(e.params.centeredSlides)(e.visibleSlides||[]).forEach(o=>{t.push(o)});else for(r=0;r<Math.ceil(e.params.slidesPerView);r+=1){const o=e.activeIndex+r;if(o>e.slides.length&&!n)break;t.push(a(o))}else t.push(a(e.activeIndex));for(r=0;r<t.length;r+=1)if(typeof t[r]<"u"){const o=t[r].offsetHeight;s=o>s?o:s}(s||s===0)&&(e.wrapperEl.style.height=`${s}px`)}function e9(){const i=this,e=i.slides,t=i.isElement?i.isHorizontal()?i.wrapperEl.offsetLeft:i.wrapperEl.offsetTop:0;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=(i.isHorizontal()?e[n].offsetLeft:e[n].offsetTop)-t-i.cssOverflowAdjustment()}const jw=(i,e,t)=>{e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)};function t9(i=this&&this.translate||0){const e=this,t=e.params,{slides:n,rtlTranslate:s,snapGrid:r}=e;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let a=-i;s&&(a=i),e.visibleSlidesIndexes=[],e.visibleSlides=[];let o=t.spaceBetween;typeof o=="string"&&o.indexOf("%")>=0?o=parseFloat(o.replace("%",""))/100*e.size:typeof o=="string"&&(o=parseFloat(o));for(let l=0;l<n.length;l+=1){const c=n[l];let u=c.swiperSlideOffset;t.cssMode&&t.centeredSlides&&(u-=n[0].swiperSlideOffset);const h=(a+(t.centeredSlides?e.minTranslate():0)-u)/(c.swiperSlideSize+o),d=(a-r[0]+(t.centeredSlides?e.minTranslate():0)-u)/(c.swiperSlideSize+o),A=-(a-u),p=A+e.slidesSizesGrid[l],g=A>=0&&A<=e.size-e.slidesSizesGrid[l],m=A>=0&&A<e.size-1||p>1&&p<=e.size||A<=0&&p>=e.size;m&&(e.visibleSlides.push(c),e.visibleSlidesIndexes.push(l)),jw(c,m,t.slideVisibleClass),jw(c,g,t.slideFullyVisibleClass),c.progress=s?-h:h,c.originalProgress=s?-d:d}}function n9(i){const e=this;if(typeof i>"u"){const u=e.rtlTranslate?-1:1;i=e&&e.translate&&e.translate*u||0}const t=e.params,n=e.maxTranslate()-e.minTranslate();let{progress:s,isBeginning:r,isEnd:a,progressLoop:o}=e;const l=r,c=a;if(n===0)s=0,r=!0,a=!0;else{s=(i-e.minTranslate())/n;const u=Math.abs(i-e.minTranslate())<1,h=Math.abs(i-e.maxTranslate())<1;r=u||s<=0,a=h||s>=1,u&&(s=0),h&&(s=1)}if(t.loop){const u=e.getSlideIndexByData(0),h=e.getSlideIndexByData(e.slides.length-1),d=e.slidesGrid[u],A=e.slidesGrid[h],p=e.slidesGrid[e.slidesGrid.length-1],g=Math.abs(i);g>=d?o=(g-d)/p:o=(g+p-A)/p,o>1&&(o-=1)}Object.assign(e,{progress:s,progressLoop:o,isBeginning:r,isEnd:a}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&e.updateSlidesProgress(i),r&&!l&&e.emit("reachBeginning toEdge"),a&&!c&&e.emit("reachEnd toEdge"),(l&&!r||c&&!a)&&e.emit("fromEdge"),e.emit("progress",s)}const S_=(i,e,t)=>{e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)};function i9(){const i=this,{slides:e,params:t,slidesEl:n,activeIndex:s}=i,r=i.virtual&&t.virtual.enabled,a=i.grid&&t.grid&&t.grid.rows>1,o=h=>yi(n,`.${t.slideClass}${h}, swiper-slide${h}`)[0];let l,c,u;if(r)if(t.loop){let h=s-i.virtual.slidesBefore;h<0&&(h=i.virtual.slides.length+h),h>=i.virtual.slides.length&&(h-=i.virtual.slides.length),l=o(`[data-swiper-slide-index="${h}"]`)}else l=o(`[data-swiper-slide-index="${s}"]`);else a?(l=e.find(h=>h.column===s),u=e.find(h=>h.column===s+1),c=e.find(h=>h.column===s-1)):l=e[s];l&&(a||(u=$Y(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!u&&(u=e[0]),c=HY(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!c===0&&(c=e[e.length-1]))),e.forEach(h=>{S_(h,h===l,t.slideActiveClass),S_(h,h===u,t.slideNextClass),S_(h,h===c,t.slidePrevClass)}),i.emitSlidesClasses()}const qf=(i,e)=>{if(!i||i.destroyed||!i.params)return;const t=()=>i.isElement?"swiper-slide":`.${i.params.slideClass}`,n=e.closest(t());if(n){let s=n.querySelector(`.${i.params.lazyPreloaderClass}`);!s&&i.isElement&&(n.shadowRoot?s=n.shadowRoot.querySelector(`.${i.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(s=n.shadowRoot.querySelector(`.${i.params.lazyPreloaderClass}`),s&&!s.lazyPreloaderManaged&&s.remove())})),s&&!s.lazyPreloaderManaged&&s.remove()}},B_=(i,e)=>{if(!i.slides[e])return;const t=i.slides[e].querySelector('[loading="lazy"]');t&&t.removeAttribute("loading")},fv=i=>{if(!i||i.destroyed||!i.params)return;let e=i.params.lazyPreloadPrevNext;const t=i.slides.length;if(!t||!e||e<0)return;e=Math.min(e,t);const n=i.params.slidesPerView==="auto"?i.slidesPerViewDynamic():Math.ceil(i.params.slidesPerView),s=i.activeIndex;if(i.params.grid&&i.params.grid.rows>1){const a=s,o=[a-e];o.push(...Array.from({length:e}).map((l,c)=>a+n+c)),i.slides.forEach((l,c)=>{o.includes(l.column)&&B_(i,c)});return}const r=s+n-1;if(i.params.rewind||i.params.loop)for(let a=s-e;a<=r+e;a+=1){const o=(a%t+t)%t;(o<s||o>r)&&B_(i,o)}else for(let a=Math.max(s-e,0);a<=Math.min(r+e,t-1);a+=1)a!==s&&(a>r||a<s)&&B_(i,a)};function s9(i){const{slidesGrid:e,params:t}=i,n=i.rtlTranslate?i.translate:-i.translate;let s;for(let r=0;r<e.length;r+=1)typeof e[r+1]<"u"?n>=e[r]&&n<e[r+1]-(e[r+1]-e[r])/2?s=r:n>=e[r]&&n<e[r+1]&&(s=r+1):n>=e[r]&&(s=r);return t.normalizeSlideIndex&&(s<0||typeof s>"u")&&(s=0),s}function r9(i){const e=this,t=e.rtlTranslate?e.translate:-e.translate,{snapGrid:n,params:s,activeIndex:r,realIndex:a,snapIndex:o}=e;let l=i,c;const u=A=>{let p=A-e.virtual.slidesBefore;return p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),p};if(typeof l>"u"&&(l=s9(e)),n.indexOf(t)>=0)c=n.indexOf(t);else{const A=Math.min(s.slidesPerGroupSkip,l);c=A+Math.floor((l-A)/s.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),l===r&&!e.params.loop){c!==o&&(e.snapIndex=c,e.emit("snapIndexChange"));return}if(l===r&&e.params.loop&&e.virtual&&e.params.virtual.enabled){e.realIndex=u(l);return}const h=e.grid&&s.grid&&s.grid.rows>1;let d;if(e.virtual&&s.virtual.enabled)s.loop?d=u(l):d=l;else if(h){const A=e.slides.find(g=>g.column===l);let p=parseInt(A.getAttribute("data-swiper-slide-index"),10);Number.isNaN(p)&&(p=Math.max(e.slides.indexOf(A),0)),d=Math.floor(p/s.grid.rows)}else if(e.slides[l]){const A=e.slides[l].getAttribute("data-swiper-slide-index");A?d=parseInt(A,10):d=l}else d=l;Object.assign(e,{previousSnapIndex:o,snapIndex:c,previousRealIndex:a,realIndex:d,previousIndex:r,activeIndex:l}),e.initialized&&fv(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&(a!==d&&e.emit("realIndexChange"),e.emit("slideChange"))}function a9(i,e){const t=this,n=t.params;let s=i.closest(`.${n.slideClass}, swiper-slide`);!s&&t.isElement&&e&&e.length>1&&e.includes(i)&&[...e.slice(e.indexOf(i)+1,e.length)].forEach(o=>{!s&&o.matches&&o.matches(`.${n.slideClass}, swiper-slide`)&&(s=o)});let r=!1,a;if(s){for(let o=0;o<t.slides.length;o+=1)if(t.slides[o]===s){r=!0,a=o;break}}if(s&&r)t.clickedSlide=s,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(s.getAttribute("data-swiper-slide-index"),10):t.clickedIndex=a;else{t.clickedSlide=void 0,t.clickedIndex=void 0;return}n.slideToClickedSlide&&t.clickedIndex!==void 0&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}var o9={updateSize:JY,updateSlides:KY,updateAutoHeight:ZY,updateSlidesOffset:e9,updateSlidesProgress:t9,updateProgress:n9,updateSlidesClasses:i9,updateActiveIndex:r9,updateClickedSlide:a9};function l9(i=this.isHorizontal()?"x":"y"){const e=this,{params:t,rtlTranslate:n,translate:s,wrapperEl:r}=e;if(t.virtualTranslate)return n?-s:s;if(t.cssMode)return s;let a=Av(r,i);return a+=e.cssOverflowAdjustment(),n&&(a=-a),a||0}function c9(i,e){const t=this,{rtlTranslate:n,params:s,wrapperEl:r,progress:a}=t;let o=0,l=0;const c=0;t.isHorizontal()?o=n?-i:i:l=i,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),t.previousTranslate=t.translate,t.translate=t.isHorizontal()?o:l,s.cssMode?r[t.isHorizontal()?"scrollLeft":"scrollTop"]=t.isHorizontal()?-o:-l:s.virtualTranslate||(t.isHorizontal()?o-=t.cssOverflowAdjustment():l-=t.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${l}px, ${c}px)`);let u;const h=t.maxTranslate()-t.minTranslate();h===0?u=0:u=(i-t.minTranslate())/h,u!==a&&t.updateProgress(i),t.emit("setTranslate",t.translate,e)}function h9(){return-this.snapGrid[0]}function u9(){return-this.snapGrid[this.snapGrid.length-1]}function d9(i=0,e=this.params.speed,t=!0,n=!0,s){const r=this,{params:a,wrapperEl:o}=r;if(r.animating&&a.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let u;if(n&&i>l?u=l:n&&i<c?u=c:u=i,r.updateProgress(u),a.cssMode){const h=r.isHorizontal();if(e===0)o[h?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return yD({swiper:r,targetPosition:-u,side:h?"left":"top"}),!0;o.scrollTo({[h?"left":"top"]:-u,behavior:"smooth"})}return!0}return e===0?(r.setTransition(0),r.setTranslate(u),t&&(r.emit("beforeTransitionStart",e,s),r.emit("transitionEnd"))):(r.setTransition(e),r.setTranslate(u),t&&(r.emit("beforeTransitionStart",e,s),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(d){!r||r.destroyed||d.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,t&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}var A9={getTranslate:l9,setTranslate:c9,minTranslate:h9,maxTranslate:u9,translateTo:d9};function p9(i,e){const t=this;t.params.cssMode||(t.wrapperEl.style.transitionDuration=`${i}ms`,t.wrapperEl.style.transitionDelay=i===0?"0ms":""),t.emit("setTransition",i,e)}function bD({swiper:i,runCallbacks:e,direction:t,step:n}){const{activeIndex:s,previousIndex:r}=i;let a=t;a||(s>r?a="next":s<r?a="prev":a="reset"),i.emit(`transition${n}`),e&&a==="reset"?i.emit(`slideResetTransition${n}`):e&&s!==r&&(i.emit(`slideChangeTransition${n}`),a==="next"?i.emit(`slideNextTransition${n}`):i.emit(`slidePrevTransition${n}`))}function f9(i=!0,e){const t=this,{params:n}=t;n.cssMode||(n.autoHeight&&t.updateAutoHeight(),bD({swiper:t,runCallbacks:i,direction:e,step:"Start"}))}function g9(i=!0,e){const t=this,{params:n}=t;t.animating=!1,!n.cssMode&&(t.setTransition(0),bD({swiper:t,runCallbacks:i,direction:e,step:"End"}))}var m9={setTransition:p9,transitionStart:f9,transitionEnd:g9};function y9(i=0,e,t=!0,n,s){typeof i=="string"&&(i=parseInt(i,10));const r=this;let a=i;a<0&&(a=0);const{params:o,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:h,rtlTranslate:d,wrapperEl:A,enabled:p}=r;if(!p&&!n&&!s||r.destroyed||r.animating&&o.preventInteractionOnTransition)return!1;typeof e>"u"&&(e=r.params.speed);const g=Math.min(r.params.slidesPerGroupSkip,a);let m=g+Math.floor((a-g)/r.params.slidesPerGroup);m>=l.length&&(m=l.length-1);const f=-l[m];if(o.normalizeSlideIndex)for(let x=0;x<c.length;x+=1){const I=-Math.floor(f*100),b=Math.floor(c[x]*100),w=Math.floor(c[x+1]*100);typeof c[x+1]<"u"?I>=b&&I<w-(w-b)/2?a=x:I>=b&&I<w&&(a=x+1):I>=b&&(a=x)}if(r.initialized&&a!==h&&(!r.allowSlideNext&&(d?f>r.translate&&f>r.minTranslate():f<r.translate&&f<r.minTranslate())||!r.allowSlidePrev&&f>r.translate&&f>r.maxTranslate()&&(h||0)!==a))return!1;a!==(u||0)&&t&&r.emit("beforeSlideChangeStart"),r.updateProgress(f);let y;a>h?y="next":a<h?y="prev":y="reset";const _=r.virtual&&r.params.virtual.enabled;if(!(_&&s)&&(d&&-f===r.translate||!d&&f===r.translate))return r.updateActiveIndex(a),o.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),o.effect!=="slide"&&r.setTranslate(f),y!=="reset"&&(r.transitionStart(t,y),r.transitionEnd(t,y)),!1;if(o.cssMode){const x=r.isHorizontal(),I=d?f:-f;if(e===0)_&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),_&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{A[x?"scrollLeft":"scrollTop"]=I})):A[x?"scrollLeft":"scrollTop"]=I,_&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return yD({swiper:r,targetPosition:I,side:x?"left":"top"}),!0;A.scrollTo({[x?"left":"top"]:I,behavior:"smooth"})}return!0}const C=vD().isSafari;return _&&!s&&C&&r.isElement&&r.virtual.update(!1,!1,a),r.setTransition(e),r.setTranslate(f),r.updateActiveIndex(a),r.updateSlidesClasses(),r.emit("beforeTransitionStart",e,n),r.transitionStart(t,y),e===0?r.transitionEnd(t,y):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(I){!r||r.destroyed||I.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(t,y))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function _9(i=0,e,t=!0,n){typeof i=="string"&&(i=parseInt(i,10));const s=this;if(s.destroyed)return;typeof e>"u"&&(e=s.params.speed);const r=s.grid&&s.params.grid&&s.params.grid.rows>1;let a=i;if(s.params.loop)if(s.virtual&&s.params.virtual.enabled)a=a+s.virtual.slidesBefore;else{let o;if(r){const g=a*s.params.grid.rows;o=s.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===g).column}else o=s.getSlideIndexByData(a);const l=r?Math.ceil(s.slides.length/s.params.grid.rows):s.slides.length,{centeredSlides:c,slidesOffsetBefore:u,slidesOffsetAfter:h}=s.params,d=c||!!u||!!h;let A=s.params.slidesPerView;A==="auto"?A=s.slidesPerViewDynamic():(A=Math.ceil(parseFloat(s.params.slidesPerView,10)),d&&A%2===0&&(A=A+1));let p=l-o<A;if(d&&(p=p||o<Math.ceil(A/2)),n&&d&&s.params.slidesPerView!=="auto"&&!r&&(p=!1),p){const g=d?o<s.activeIndex?"prev":"next":o-s.activeIndex-1<s.params.slidesPerView?"next":"prev";s.loopFix({direction:g,slideTo:!0,activeSlideIndex:g==="next"?o+1:o-l+1,slideRealIndex:g==="next"?s.realIndex:void 0})}if(r){const g=a*s.params.grid.rows;a=s.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===g).column}else a=s.getSlideIndexByData(a)}return requestAnimationFrame(()=>{s.slideTo(a,e,t,n)}),s}function E9(i,e=!0,t){const n=this,{enabled:s,params:r,animating:a}=n;if(!s||n.destroyed)return n;typeof i>"u"&&(i=n.params.speed);let o=r.slidesPerGroup;r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(o=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex<r.slidesPerGroupSkip?1:o,c=n.virtual&&r.virtual.enabled;if(r.loop){if(a&&!c&&r.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+l,i,e,t)}),!0}return r.rewind&&n.isEnd?n.slideTo(0,i,e,t):n.slideTo(n.activeIndex+l,i,e,t)}function v9(i,e=!0,t){const n=this,{params:s,snapGrid:r,slidesGrid:a,rtlTranslate:o,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof i>"u"&&(i=n.params.speed);const u=n.virtual&&s.virtual.enabled;if(s.loop){if(c&&!u&&s.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const h=o?n.translate:-n.translate;function d(y){return y<0?-Math.floor(Math.abs(y)):Math.floor(y)}const A=d(h),p=r.map(y=>d(y)),g=s.freeMode&&s.freeMode.enabled;let m=r[p.indexOf(A)-1];if(typeof m>"u"&&(s.cssMode||g)){let y;r.forEach((_,E)=>{A>=_&&(y=E)}),typeof y<"u"&&(m=g?r[y]:r[y>0?y-1:y])}let f=0;if(typeof m<"u"&&(f=a.indexOf(m),f<0&&(f=n.activeIndex-1),s.slidesPerView==="auto"&&s.slidesPerGroup===1&&s.slidesPerGroupAuto&&(f=f-n.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),s.rewind&&n.isBeginning){const y=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(y,i,e,t)}else if(s.loop&&n.activeIndex===0&&s.cssMode)return requestAnimationFrame(()=>{n.slideTo(f,i,e,t)}),!0;return n.slideTo(f,i,e,t)}function b9(i,e=!0,t){const n=this;if(!n.destroyed)return typeof i>"u"&&(i=n.params.speed),n.slideTo(n.activeIndex,i,e,t)}function x9(i,e=!0,t,n=.5){const s=this;if(s.destroyed)return;typeof i>"u"&&(i=s.params.speed);let r=s.activeIndex;const a=Math.min(s.params.slidesPerGroupSkip,r),o=a+Math.floor((r-a)/s.params.slidesPerGroup),l=s.rtlTranslate?s.translate:-s.translate;if(l>=s.snapGrid[o]){const c=s.snapGrid[o],u=s.snapGrid[o+1];l-c>(u-c)*n&&(r+=s.params.slidesPerGroup)}else{const c=s.snapGrid[o-1],u=s.snapGrid[o];l-c<=(u-c)*n&&(r-=s.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,s.slidesGrid.length-1),s.slideTo(r,i,e,t)}function C9(){const i=this;if(i.destroyed)return;const{params:e,slidesEl:t}=i,n=e.slidesPerView==="auto"?i.slidesPerViewDynamic():e.slidesPerView;let s=i.getSlideIndexWhenGrid(i.clickedIndex),r;const a=i.isElement?"swiper-slide":`.${e.slideClass}`,o=i.grid&&i.params.grid&&i.params.grid.rows>1;if(e.loop){if(i.animating)return;r=parseInt(i.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?i.slideToLoop(r):s>(o?(i.slides.length-n)/2-(i.params.grid.rows-1):i.slides.length-n)?(i.loopFix(),s=i.getSlideIndex(yi(t,`${a}[data-swiper-slide-index="${r}"]`)[0]),Kh(()=>{i.slideTo(s)})):i.slideTo(s)}else i.slideTo(s)}var I9={slideTo:y9,slideToLoop:_9,slideNext:E9,slidePrev:v9,slideReset:b9,slideToClosest:x9,slideToClickedSlide:C9};function w9(i,e){const t=this,{params:n,slidesEl:s}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const r=()=>{yi(s,`.${n.slideClass}, swiper-slide`).forEach((p,g)=>{p.setAttribute("data-swiper-slide-index",g)})},a=()=>{const A=yi(s,`.${n.slideBlankClass}`);A.forEach(p=>{p.remove()}),A.length>0&&(t.recalcSlides(),t.updateSlides())},o=t.grid&&n.grid&&n.grid.rows>1;n.loopAddBlankSlides&&(n.slidesPerGroup>1||o)&&a();const l=n.slidesPerGroup*(o?n.grid.rows:1),c=t.slides.length%l!==0,u=o&&t.slides.length%n.grid.rows!==0,h=A=>{for(let p=0;p<A;p+=1){const g=t.isElement?ys("swiper-slide",[n.slideBlankClass]):ys("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(g)}};if(c){if(n.loopAddBlankSlides){const A=l-t.slides.length%l;h(A),t.recalcSlides(),t.updateSlides()}else Vg("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(u){if(n.loopAddBlankSlides){const A=n.grid.rows-t.slides.length%n.grid.rows;h(A),t.recalcSlides(),t.updateSlides()}else Vg("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();const d=n.centeredSlides||!!n.slidesOffsetBefore||!!n.slidesOffsetAfter;t.loopFix({slideRealIndex:i,direction:d?void 0:"next",initial:e})}function S9({slideRealIndex:i,slideTo:e=!0,direction:t,setTranslate:n,activeSlideIndex:s,initial:r,byController:a,byMousewheel:o}={}){const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:u,allowSlideNext:h,slidesEl:d,params:A}=l,{centeredSlides:p,slidesOffsetBefore:g,slidesOffsetAfter:m,initialSlide:f}=A,y=p||!!g||!!m;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&A.virtual.enabled){e&&(!y&&l.snapIndex===0?l.slideTo(l.virtual.slides.length,0,!1,!0):y&&l.snapIndex<A.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=h,l.emit("loopFix");return}let _=A.slidesPerView;_==="auto"?_=l.slidesPerViewDynamic():(_=Math.ceil(parseFloat(A.slidesPerView,10)),y&&_%2===0&&(_=_+1));const E=A.slidesPerGroupAuto?_:A.slidesPerGroup;let v=y?Math.max(E,Math.ceil(_/2)):E;v%E!==0&&(v+=E-v%E),v+=A.loopAdditionalSlides,l.loopedSlides=v;const C=l.grid&&A.grid&&A.grid.rows>1;c.length<_+v||l.params.effect==="cards"&&c.length<_+v*2?Vg("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):C&&A.grid.fill==="row"&&Vg("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const x=[],I=[],b=C?Math.ceil(c.length/A.grid.rows):c.length,w=r&&b-f<_&&!y;let S=w?f:l.activeIndex;typeof s>"u"?s=l.getSlideIndex(c.find(F=>F.classList.contains(A.slideActiveClass))):S=s;const B=t==="next"||!t,T=t==="prev"||!t;let D=0,P=0;const L=(C?c[s].column:s)+(y&&typeof n>"u"?-_/2+.5:0);if(L<v){D=Math.max(v-L,E);for(let F=0;F<v-L;F+=1){const $=F-Math.floor(F/b)*b;if(C){const J=b-$-1;for(let W=c.length-1;W>=0;W-=1)c[W].column===J&&x.push(W)}else x.push(b-$-1)}}else if(L+_>b-v){P=Math.max(L-(b-v*2),E),w&&(P=Math.max(P,_-b+f+1));for(let F=0;F<P;F+=1){const $=F-Math.floor(F/b)*b;C?c.forEach((J,W)=>{J.column===$&&I.push(W)}):I.push($)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),l.params.effect==="cards"&&c.length<_+v*2&&(I.includes(s)&&I.splice(I.indexOf(s),1),x.includes(s)&&x.splice(x.indexOf(s),1)),T&&x.forEach(F=>{c[F].swiperLoopMoveDOM=!0,d.prepend(c[F]),c[F].swiperLoopMoveDOM=!1}),B&&I.forEach(F=>{c[F].swiperLoopMoveDOM=!0,d.append(c[F]),c[F].swiperLoopMoveDOM=!1}),l.recalcSlides(),A.slidesPerView==="auto"?l.updateSlides():C&&(x.length>0&&T||I.length>0&&B)&&l.slides.forEach((F,$)=>{l.grid.updateSlide($,F,l.slides)}),A.watchSlidesProgress&&l.updateSlidesOffset(),e){if(x.length>0&&T){if(typeof i>"u"){const F=l.slidesGrid[S],J=l.slidesGrid[S+D]-F;o?l.setTranslate(l.translate-J):(l.slideTo(S+Math.ceil(D),0,!1,!0),n&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else if(n){const F=C?x.length/A.grid.rows:x.length;l.slideTo(l.activeIndex+F,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(I.length>0&&B)if(typeof i>"u"){const F=l.slidesGrid[S],J=l.slidesGrid[S-P]-F;o?l.setTranslate(l.translate-J):(l.slideTo(S-P,0,!1,!0),n&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else{const F=C?I.length/A.grid.rows:I.length;l.slideTo(l.activeIndex-F,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=h,l.controller&&l.controller.control&&!a){const F={slideRealIndex:i,direction:t,setTranslate:n,activeSlideIndex:s,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach($=>{!$.destroyed&&$.params.loop&&$.loopFix({...F,slideTo:$.params.slidesPerView===A.slidesPerView?e:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...F,slideTo:l.controller.control.params.slidesPerView===A.slidesPerView?e:!1})}l.emit("loopFix")}function B9(){const i=this,{params:e,slidesEl:t}=i;if(!e.loop||!t||i.virtual&&i.params.virtual.enabled)return;i.recalcSlides();const n=[];i.slides.forEach(s=>{const r=typeof s.swiperSlideIndex>"u"?s.getAttribute("data-swiper-slide-index")*1:s.swiperSlideIndex;n[r]=s}),i.slides.forEach(s=>{s.removeAttribute("data-swiper-slide-index")}),n.forEach(s=>{t.append(s)}),i.recalcSlides(),i.slideTo(i.realIndex,0)}var T9={loopCreate:w9,loopFix:S9,loopDestroy:B9};function M9(i){const e=this;if(!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const t=e.params.touchEventsTarget==="container"?e.el:e.wrapperEl;e.isElement&&(e.__preventObserver__=!0),t.style.cursor="move",t.style.cursor=i?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})}function R9(){const i=this;i.params.watchOverflow&&i.isLocked||i.params.cssMode||(i.isElement&&(i.__preventObserver__=!0),i[i.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",i.isElement&&requestAnimationFrame(()=>{i.__preventObserver__=!1}))}var D9={setGrabCursor:M9,unsetGrabCursor:R9};function Q9(i,e=this){function t(n){if(!n||n===hi()||n===wn())return null;n.assignedSlot&&(n=n.assignedSlot);const s=n.closest(i);return!s&&!n.getRootNode?null:s||t(n.getRootNode().host)}return t(e)}function Xw(i,e,t){const n=wn(),{params:s}=i,r=s.edgeSwipeDetection,a=s.edgeSwipeThreshold;return r&&(t<=a||t>=n.innerWidth-a)?r==="prevent"?(e.preventDefault(),!0):!1:!0}function L9(i){const e=this,t=hi();let n=i;n.originalEvent&&(n=n.originalEvent);const s=e.touchEventsData;if(n.type==="pointerdown"){if(s.pointerId!==null&&s.pointerId!==n.pointerId)return;s.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(s.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){Xw(e,n,n.targetTouches[0].pageX);return}const{params:r,touches:a,enabled:o}=e;if(!o||!r.simulateTouch&&n.pointerType==="mouse"||e.animating&&r.preventInteractionOnTransition)return;!e.animating&&r.cssMode&&r.loop&&e.loopFix();let l=n.target;if(r.touchEventsTarget==="wrapper"&&!zY(l,e.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||s.isTouched&&s.isMoved)return;const c=!!r.noSwipingClass&&r.noSwipingClass!=="",u=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&u&&(l=u[0]);const h=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,d=!!(n.target&&n.target.shadowRoot);if(r.noSwiping&&(d?Q9(h,l):l.closest(h))){e.allowClick=!0;return}if(r.swipeHandler&&!l.closest(r.swipeHandler))return;a.currentX=n.pageX,a.currentY=n.pageY;const A=a.currentX,p=a.currentY;if(!Xw(e,n,A))return;Object.assign(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=A,a.startY=p,s.touchStartTime=Fs(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,r.threshold>0&&(s.allowThresholdMove=!1);let g=!0;l.matches(s.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(s.isTouched=!1)),t.activeElement&&t.activeElement.matches(s.focusableElements)&&t.activeElement!==l&&(n.pointerType==="mouse"||n.pointerType!=="mouse"&&!l.matches(s.focusableElements))&&t.activeElement.blur();const m=g&&e.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||m)&&!l.isContentEditable&&n.preventDefault(),r.freeMode&&r.freeMode.enabled&&e.freeMode&&e.animating&&!r.cssMode&&e.freeMode.onTouchStart(),e.emit("touchStart",n)}function N9(i){const e=hi(),t=this,n=t.touchEventsData,{params:s,touches:r,rtlTranslate:a,enabled:o}=t;if(!o||!s.simulateTouch&&i.pointerType==="mouse")return;let l=i;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(n.touchId!==null||l.pointerId!==n.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].find(v=>v.identifier===n.touchId),!c||c.identifier!==n.touchId)return}else c=l;if(!n.isTouched){n.startMoving&&n.isScrolling&&t.emit("touchMoveOpposite",l);return}const u=c.pageX,h=c.pageY;if(l.preventedByNestedSwiper){r.startX=u,r.startY=h;return}if(!t.allowTouchMove){l.target.matches(n.focusableElements)||(t.allowClick=!1),n.isTouched&&(Object.assign(r,{startX:u,startY:h,currentX:u,currentY:h}),n.touchStartTime=Fs());return}if(s.touchReleaseOnEdges&&!s.loop)if(t.isVertical()){if(h<r.startY&&t.translate<=t.maxTranslate()||h>r.startY&&t.translate>=t.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else{if(a&&(u>r.startX&&-t.translate<=t.maxTranslate()||u<r.startX&&-t.translate>=t.minTranslate()))return;if(!a&&(u<r.startX&&t.translate<=t.maxTranslate()||u>r.startX&&t.translate>=t.minTranslate()))return}if(e.activeElement&&e.activeElement.matches(n.focusableElements)&&e.activeElement!==l.target&&l.pointerType!=="mouse"&&e.activeElement.blur(),e.activeElement&&l.target===e.activeElement&&l.target.matches(n.focusableElements)){n.isMoved=!0,t.allowClick=!1;return}n.allowTouchCallbacks&&t.emit("touchMove",l),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=u,r.currentY=h;const d=r.currentX-r.startX,A=r.currentY-r.startY;if(t.params.threshold&&Math.sqrt(d**2+A**2)<t.params.threshold)return;if(typeof n.isScrolling>"u"){let v;t.isHorizontal()&&r.currentY===r.startY||t.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:d*d+A*A>=25&&(v=Math.atan2(Math.abs(A),Math.abs(d))*180/Math.PI,n.isScrolling=t.isHorizontal()?v>s.touchAngle:90-v>s.touchAngle)}if(n.isScrolling&&t.emit("touchMoveOpposite",l),typeof n.startMoving>"u"&&(r.currentX!==r.startX||r.currentY!==r.startY)&&(n.startMoving=!0),n.isScrolling||l.type==="touchmove"&&n.preventTouchMoveFromPointerMove){n.isTouched=!1;return}if(!n.startMoving)return;t.allowClick=!1,!s.cssMode&&l.cancelable&&l.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&l.stopPropagation();let p=t.isHorizontal()?d:A,g=t.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;s.oneWayMovement&&(p=Math.abs(p)*(a?1:-1),g=Math.abs(g)*(a?1:-1)),r.diff=p,p*=s.touchRatio,a&&(p=-p,g=-g);const m=t.touchesDirection;t.swipeDirection=p>0?"prev":"next",t.touchesDirection=g>0?"prev":"next";const f=t.params.loop&&!s.cssMode,y=t.touchesDirection==="next"&&t.allowSlideNext||t.touchesDirection==="prev"&&t.allowSlidePrev;if(!n.isMoved){if(f&&y&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const v=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(v)}n.allowMomentumBounce=!1,s.grabCursor&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!0),t.emit("sliderFirstMove",l)}if(new Date().getTime(),s._loopSwapReset!==!1&&n.isMoved&&n.allowThresholdMove&&m!==t.touchesDirection&&f&&y&&Math.abs(p)>=1){Object.assign(r,{startX:u,startY:h,currentX:u,currentY:h,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}t.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=p+n.startTranslate;let _=!0,E=s.resistanceRatio;if(s.touchReleaseOnEdges&&(E=0),p>0?(f&&y&&n.allowThresholdMove&&n.currentTranslate>(s.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]-(s.slidesPerView!=="auto"&&t.slides.length-s.slidesPerView>=2?t.slidesSizesGrid[t.activeIndex+1]+t.params.spaceBetween:0)-t.params.spaceBetween:t.minTranslate())&&t.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>t.minTranslate()&&(_=!1,s.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+n.startTranslate+p)**E))):p<0&&(f&&y&&n.allowThresholdMove&&n.currentTranslate<(s.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween+(s.slidesPerView!=="auto"&&t.slides.length-s.slidesPerView>=2?t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween:0):t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-(s.slidesPerView==="auto"?t.slidesPerViewDynamic():Math.ceil(parseFloat(s.slidesPerView,10)))}),n.currentTranslate<t.maxTranslate()&&(_=!1,s.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-n.startTranslate-p)**E))),_&&(l.preventedByNestedSwiper=!0),!t.allowSlideNext&&t.swipeDirection==="next"&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&t.swipeDirection==="prev"&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&!t.allowSlideNext&&(n.currentTranslate=n.startTranslate),s.threshold>0)if(Math.abs(p)>s.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,n.currentTranslate=n.startTranslate,r.diff=t.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY;return}}else{n.currentTranslate=n.startTranslate;return}!s.followFinger||s.cssMode||((s.freeMode&&s.freeMode.enabled&&t.freeMode||s.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate))}function P9(i){const e=this,t=e.touchEventsData;let n=i;n.originalEvent&&(n=n.originalEvent);let s;if(n.type==="touchend"||n.type==="touchcancel"){if(s=[...n.changedTouches].find(v=>v.identifier===t.touchId),!s||s.identifier!==t.touchId)return}else{if(t.touchId!==null||n.pointerId!==t.pointerId)return;s=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)&&!(["pointercancel","contextmenu"].includes(n.type)&&(e.browser.isSafari||e.browser.isWebView)))return;t.pointerId=null,t.touchId=null;const{params:a,touches:o,rtlTranslate:l,slidesGrid:c,enabled:u}=e;if(!u||!a.simulateTouch&&n.pointerType==="mouse")return;if(t.allowTouchCallbacks&&e.emit("touchEnd",n),t.allowTouchCallbacks=!1,!t.isTouched){t.isMoved&&a.grabCursor&&e.setGrabCursor(!1),t.isMoved=!1,t.startMoving=!1;return}a.grabCursor&&t.isMoved&&t.isTouched&&(e.allowSlideNext===!0||e.allowSlidePrev===!0)&&e.setGrabCursor(!1);const h=Fs(),d=h-t.touchStartTime;if(e.allowClick){const v=n.path||n.composedPath&&n.composedPath();e.updateClickedSlide(v&&v[0]||n.target,v),e.emit("tap click",n),d<300&&h-t.lastClickTime<300&&e.emit("doubleTap doubleClick",n)}if(t.lastClickTime=Fs(),Kh(()=>{e.destroyed||(e.allowClick=!0)}),!t.isTouched||!t.isMoved||!e.swipeDirection||o.diff===0&&!t.loopSwapReset||t.currentTranslate===t.startTranslate&&!t.loopSwapReset){t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;return}t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;let A;if(a.followFinger?A=l?e.translate:-e.translate:A=-t.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled){e.freeMode.onTouchEnd({currentPos:A});return}const p=A>=-e.maxTranslate()&&!e.params.loop;let g=0,m=e.slidesSizesGrid[0];for(let v=0;v<c.length;v+=v<a.slidesPerGroupSkip?1:a.slidesPerGroup){const C=v<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;typeof c[v+C]<"u"?(p||A>=c[v]&&A<c[v+C])&&(g=v,m=c[v+C]-c[v]):(p||A>=c[v])&&(g=v,m=c[c.length-1]-c[c.length-2])}let f=null,y=null;a.rewind&&(e.isBeginning?y=a.virtual&&a.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(f=0));const _=(A-c[g])/m,E=g<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(d>a.longSwipesMs){if(!a.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(_>=a.longSwipesRatio?e.slideTo(a.rewind&&e.isEnd?f:g+E):e.slideTo(g)),e.swipeDirection==="prev"&&(_>1-a.longSwipesRatio?e.slideTo(g+E):y!==null&&_<0&&Math.abs(_)>a.longSwipesRatio?e.slideTo(y):e.slideTo(g))}else{if(!a.shortSwipes){e.slideTo(e.activeIndex);return}e.navigation&&(n.target===e.navigation.nextEl||n.target===e.navigation.prevEl)?n.target===e.navigation.nextEl?e.slideTo(g+E):e.slideTo(g):(e.swipeDirection==="next"&&e.slideTo(f!==null?f:g+E),e.swipeDirection==="prev"&&e.slideTo(y!==null?y:g))}}function Jw(){const i=this,{params:e,el:t}=i;if(t&&t.offsetWidth===0)return;e.breakpoints&&i.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:s,snapGrid:r}=i,a=i.virtual&&i.params.virtual.enabled;i.allowSlideNext=!0,i.allowSlidePrev=!0,i.updateSize(),i.updateSlides(),i.updateSlidesClasses();const o=a&&e.loop;if((e.slidesPerView==="auto"||e.slidesPerView>1)&&i.isEnd&&!i.isBeginning&&!i.params.centeredSlides&&!o){const l=a?i.virtual.slides:i.slides;i.slideTo(l.length-1,0,!1,!0)}else i.params.loop&&!a?i.slideToLoop(i.realIndex,0,!1,!0):i.slideTo(i.activeIndex,0,!1,!0);i.autoplay&&i.autoplay.running&&i.autoplay.paused&&(clearTimeout(i.autoplay.resizeTimeout),i.autoplay.resizeTimeout=setTimeout(()=>{i.autoplay&&i.autoplay.running&&i.autoplay.paused&&i.autoplay.resume()},500)),i.allowSlidePrev=s,i.allowSlideNext=n,i.params.watchOverflow&&r!==i.snapGrid&&i.checkOverflow()}function F9(i){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&i.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(i.stopPropagation(),i.stopImmediatePropagation())))}function k9(){const i=this,{wrapperEl:e,rtlTranslate:t,enabled:n}=i;if(!n)return;i.previousTranslate=i.translate,i.isHorizontal()?i.translate=-e.scrollLeft:i.translate=-e.scrollTop,i.translate===0&&(i.translate=0),i.updateActiveIndex(),i.updateSlidesClasses();let s;const r=i.maxTranslate()-i.minTranslate();r===0?s=0:s=(i.translate-i.minTranslate())/r,s!==i.progress&&i.updateProgress(t?-i.translate:i.translate),i.emit("setTranslate",i.translate,!1)}function U9(i){const e=this;qf(e,i.target),!(e.params.cssMode||e.params.slidesPerView!=="auto"&&!e.params.autoHeight)&&e.update()}function O9(){const i=this;i.documentTouchHandlerProceeded||(i.documentTouchHandlerProceeded=!0,i.params.touchReleaseOnEdges&&(i.el.style.touchAction="auto"))}const xD=(i,e)=>{const t=hi(),{params:n,el:s,wrapperEl:r,device:a}=i,o=!!n.nested,l=e==="on"?"addEventListener":"removeEventListener",c=e;!s||typeof s=="string"||(t[l]("touchstart",i.onDocumentTouchStart,{passive:!1,capture:o}),s[l]("touchstart",i.onTouchStart,{passive:!1}),s[l]("pointerdown",i.onTouchStart,{passive:!1}),t[l]("touchmove",i.onTouchMove,{passive:!1,capture:o}),t[l]("pointermove",i.onTouchMove,{passive:!1,capture:o}),t[l]("touchend",i.onTouchEnd,{passive:!0}),t[l]("pointerup",i.onTouchEnd,{passive:!0}),t[l]("pointercancel",i.onTouchEnd,{passive:!0}),t[l]("touchcancel",i.onTouchEnd,{passive:!0}),t[l]("pointerout",i.onTouchEnd,{passive:!0}),t[l]("pointerleave",i.onTouchEnd,{passive:!0}),t[l]("contextmenu",i.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&s[l]("click",i.onClick,!0),n.cssMode&&r[l]("scroll",i.onScroll),n.updateOnWindowResize?i[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Jw,!0):i[c]("observerUpdate",Jw,!0),s[l]("load",i.onLoad,{capture:!0}))};function G9(){const i=this,{params:e}=i;i.onTouchStart=L9.bind(i),i.onTouchMove=N9.bind(i),i.onTouchEnd=P9.bind(i),i.onDocumentTouchStart=O9.bind(i),e.cssMode&&(i.onScroll=k9.bind(i)),i.onClick=F9.bind(i),i.onLoad=U9.bind(i),xD(i,"on")}function z9(){xD(this,"off")}var H9={attachEvents:G9,detachEvents:z9};const Kw=(i,e)=>i.grid&&e.grid&&e.grid.rows>1;function $9(){const i=this,{realIndex:e,initialized:t,params:n,el:s}=i,r=n.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const a=hi(),o=n.breakpointsBase==="window"||!n.breakpointsBase?n.breakpointsBase:"container",l=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?i.el:a.querySelector(n.breakpointsBase),c=i.getBreakpoint(r,o,l);if(!c||i.currentBreakpoint===c)return;const h=(c in r?r[c]:void 0)||i.originalParams,d=Kw(i,n),A=Kw(i,h),p=i.params.grabCursor,g=h.grabCursor,m=n.enabled;d&&!A?(s.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),i.emitContainerClasses()):!d&&A&&(s.classList.add(`${n.containerModifierClass}grid`),(h.grid.fill&&h.grid.fill==="column"||!h.grid.fill&&n.grid.fill==="column")&&s.classList.add(`${n.containerModifierClass}grid-column`),i.emitContainerClasses()),p&&!g?i.unsetGrabCursor():!p&&g&&i.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(C=>{if(typeof h[C]>"u")return;const x=n[C]&&n[C].enabled,I=h[C]&&h[C].enabled;x&&!I&&i[C].disable(),!x&&I&&i[C].enable()});const f=h.direction&&h.direction!==n.direction,y=n.loop&&(h.slidesPerView!==n.slidesPerView||f),_=n.loop;f&&t&&i.changeDirection(),ds(i.params,h);const E=i.params.enabled,v=i.params.loop;Object.assign(i,{allowTouchMove:i.params.allowTouchMove,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev}),m&&!E?i.disable():!m&&E&&i.enable(),i.currentBreakpoint=c,i.emit("_beforeBreakpoint",h),t&&(y?(i.loopDestroy(),i.loopCreate(e),i.updateSlides()):!_&&v?(i.loopCreate(e),i.updateSlides()):_&&!v&&i.loopDestroy()),i.emit("breakpoint",h)}function V9(i,e="window",t){if(!i||e==="container"&&!t)return;let n=!1;const s=wn(),r=e==="window"?s.innerHeight:t.clientHeight,a=Object.keys(i).map(o=>{if(typeof o=="string"&&o.indexOf("@")===0){const l=parseFloat(o.substr(1));return{value:r*l,point:o}}return{value:o,point:o}});a.sort((o,l)=>parseInt(o.value,10)-parseInt(l.value,10));for(let o=0;o<a.length;o+=1){const{point:l,value:c}=a[o];e==="window"?s.matchMedia(`(min-width: ${c}px)`).matches&&(n=l):c<=t.clientWidth&&(n=l)}return n||"max"}var Y9={setBreakpoint:$9,getBreakpoint:V9};function q9(i,e){const t=[];return i.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(s=>{n[s]&&t.push(e+s)}):typeof n=="string"&&t.push(e+n)}),t}function W9(){const i=this,{classNames:e,params:t,rtl:n,el:s,device:r}=i,a=q9(["initialized",t.direction,{"free-mode":i.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:n},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&t.grid.fill==="column"},{android:r.android},{ios:r.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides},{"watch-progress":t.watchSlidesProgress}],t.containerModifierClass);e.push(...a),s.classList.add(...e),i.emitContainerClasses()}function j9(){const i=this,{el:e,classNames:t}=i;!e||typeof e=="string"||(e.classList.remove(...t),i.emitContainerClasses())}var X9={addClasses:W9,removeClasses:j9};function J9(){const i=this,{isLocked:e,params:t}=i,{slidesOffsetBefore:n}=t;if(n){const s=i.slides.length-1,r=i.slidesGrid[s]+i.slidesSizesGrid[s]+n*2;i.isLocked=i.size>r}else i.isLocked=i.snapGrid.length===1;t.allowSlideNext===!0&&(i.allowSlideNext=!i.isLocked),t.allowSlidePrev===!0&&(i.allowSlidePrev=!i.isLocked),e&&e!==i.isLocked&&(i.isEnd=!1),e!==i.isLocked&&i.emit(i.isLocked?"lock":"unlock")}var K9={checkOverflow:J9},gv={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Z9(i,e){return function(n={}){const s=Object.keys(n)[0],r=n[s];if(typeof r!="object"||r===null){ds(e,n);return}if(i[s]===!0&&(i[s]={enabled:!0}),s==="navigation"&&i[s]&&i[s].enabled&&!i[s].prevEl&&!i[s].nextEl&&(i[s].auto=!0),["pagination","scrollbar"].indexOf(s)>=0&&i[s]&&i[s].enabled&&!i[s].el&&(i[s].auto=!0),!(s in i&&"enabled"in r)){ds(e,n);return}typeof i[s]=="object"&&!("enabled"in i[s])&&(i[s].enabled=!0),i[s]||(i[s]={enabled:!1}),ds(e,n)}}const T_={eventsEmitter:XY,update:o9,translate:A9,transition:m9,slide:I9,loop:T9,grabCursor:D9,events:H9,breakpoints:Y9,checkOverflow:K9,classes:X9},M_={};class us{constructor(...e){let t,n;e.length===1&&e[0].constructor&&Object.prototype.toString.call(e[0]).slice(8,-1)==="Object"?n=e[0]:[t,n]=e,n||(n={}),n=ds({},n),t&&!n.el&&(n.el=t);const s=hi();if(n.el&&typeof n.el=="string"&&s.querySelectorAll(n.el).length>1){const l=[];return s.querySelectorAll(n.el).forEach(c=>{const u=ds({},n,{el:c});l.push(new us(u))}),l}const r=this;r.__swiper__=!0,r.support=_D(),r.device=ED({userAgent:n.userAgent}),r.browser=vD(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],n.modules&&Array.isArray(n.modules)&&n.modules.forEach(l=>{typeof l=="function"&&r.modules.indexOf(l)<0&&r.modules.push(l)});const a={};r.modules.forEach(l=>{l({params:n,swiper:r,extendParams:Z9(n,a),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const o=ds({},gv,a);return r.params=ds({},o,M_,n),r.originalParams=ds({},r.params),r.passedParams=ds({},n),r.params&&r.params.on&&Object.keys(r.params.on).forEach(l=>{r.on(l,r.params.on[l])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return r.params.direction==="horizontal"},isVertical(){return r.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,s=yi(t,`.${n.slideClass}, swiper-slide`),r=FA(s[0]);return FA(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>t.getAttribute("data-swiper-slide-index")*1===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?e=Math.floor(e/this.params.grid.rows):this.params.grid.fill==="row"&&(e=e%Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const e=this,{slidesEl:t,params:n}=e;e.slides=yi(t,`.${n.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const s=n.minTranslate(),a=(n.maxTranslate()-s)*e+s;n.translateTo(a,typeof t>"u"?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(e.params.containerModifierClass)===0);e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(t.params.slideClass)===0).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const s=e.getSlideClasses(n);t.push({slideEl:n,classNames:s}),e.emit("_slideClass",n,s)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const n=this,{params:s,slides:r,slidesGrid:a,slidesSizesGrid:o,size:l,activeIndex:c}=n;let u=1;if(typeof s.slidesPerView=="number")return s.slidesPerView;if(s.centeredSlides){let h=r[c]?Math.ceil(r[c].swiperSlideSize):0,d;for(let A=c+1;A<r.length;A+=1)r[A]&&!d&&(h+=Math.ceil(r[A].swiperSlideSize),u+=1,h>l&&(d=!0));for(let A=c-1;A>=0;A-=1)r[A]&&!d&&(h+=r[A].swiperSlideSize,u+=1,h>l&&(d=!0))}else if(e==="current")for(let h=c+1;h<r.length;h+=1)(t?a[h]+o[h]-a[c]<l:a[h]-a[c]<l)&&(u+=1);else for(let h=c-1;h>=0;h-=1)a[c]-a[h]<l&&(u+=1);return u}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(a=>{a.complete&&qf(e,a)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function s(){const a=e.rtlTranslate?e.translate*-1:e.translate,o=Math.min(Math.max(a,e.maxTranslate()),e.minTranslate());e.setTranslate(o),e.updateActiveIndex(),e.updateSlidesClasses()}let r;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)s(),n.autoHeight&&e.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const a=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;r=e.slideTo(a.length-1,0,!1,!0)}else r=e.slideTo(e.activeIndex,0,!1,!0);r||s()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const n=this,s=n.params.direction;return e||(e=s==="horizontal"?"vertical":"horizontal"),e===s||e!=="horizontal"&&e!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${s}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(r=>{e==="vertical"?r.style.width="":r.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&e==="rtl"||!t.rtl&&e==="ltr"||(t.rtl=e==="rtl",t.rtlTranslate=t.params.direction==="horizontal"&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const s=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(s()):yi(n,s())[0];return!a&&t.params.createElements&&(a=ys("div",t.params.wrapperClass),n.append(a),yi(n,`.${t.params.slideClass}`).forEach(o=>{a.append(o)})),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||_o(n,"direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||_o(n,"direction")==="rtl"),wrongRTL:_o(a,"display")==="-webkit-box"}),!0}init(e){const t=this;if(t.initialized||t.mount(e)===!1)return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach(r=>{r.complete?qf(t,r):r.addEventListener("load",a=>{qf(t,a.target)})}),fv(t),t.initialized=!0,fv(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){const n=this,{params:s,el:r,wrapperEl:a,slides:o}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),s.loop&&n.loopDestroy(),t&&(n.removeClasses(),r&&typeof r!="string"&&r.removeAttribute("style"),a&&a.removeAttribute("style"),o&&o.length&&o.forEach(l=>{l.classList.remove(s.slideVisibleClass,s.slideFullyVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(l=>{n.off(l)}),e!==!1&&(n.el&&typeof n.el!="string"&&(n.el.swiper=null),kY(n)),n.destroyed=!0),null}static extendDefaults(e){ds(M_,e)}static get extendedDefaults(){return M_}static get defaults(){return gv}static installModule(e){us.prototype.__modules__||(us.prototype.__modules__=[]);const t=us.prototype.__modules__;typeof e=="function"&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(t=>us.installModule(t)),us):(us.installModule(e),us)}}Object.keys(T_).forEach(i=>{Object.keys(T_[i]).forEach(e=>{us.prototype[e]=T_[i][e]})});us.use([WY,jY]);function eq({swiper:i,extendParams:e,on:t,emit:n}){e({virtual:{enabled:!1,slides:[],cache:!0,slidesPerViewAutoSlideSize:320,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let s;const r=hi();i.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const a=r.createElement("div");function o(A,p){const g=i.params.virtual;if(g.cache&&i.virtual.cache[p])return i.virtual.cache[p];let m;return g.renderSlide?(m=g.renderSlide.call(i,A,p),typeof m=="string"&&(xs(a,m),m=a.children[0])):i.isElement?m=ys("swiper-slide"):m=ys("div",i.params.slideClass),m.setAttribute("data-swiper-slide-index",p),g.renderSlide||xs(m,A),g.cache&&(i.virtual.cache[p]=m),m}function l(A,p,g){const{slidesPerGroup:m,centeredSlides:f,slidesPerView:y,loop:_,initialSlide:E}=i.params;if(p&&!_&&E>0)return;const{addSlidesBefore:v,addSlidesAfter:C,slidesPerViewAutoSlideSize:x}=i.params.virtual,{from:I,to:b,slides:w,slidesGrid:S,offset:B}=i.virtual;i.params.cssMode||i.updateActiveIndex();const T=typeof g>"u"?i.activeIndex||0:g;let D;i.rtlTranslate?D="right":D=i.isHorizontal()?"left":"top";let P;if(y==="auto")if(x){let z=i.size;z||(z=i.isHorizontal()?i.el.getBoundingClientRect().width:i.el.getBoundingClientRect().height),P=Math.max(1,Math.ceil(z/x))}else P=1;else P=y;let R,L;f?(R=Math.floor(P/2)+m+C,L=Math.floor(P/2)+m+v):(R=P+(m-1)+C,L=(_?P:m)+v);let F=T-L,$=T+R;_||(F=Math.max(F,0),$=Math.min($,w.length-1));let J=(i.slidesGrid[F]||0)-(i.slidesGrid[0]||0);_&&T>=L?(F-=L,f||(J+=i.slidesGrid[0])):_&&T<L&&(F=-L,f&&(J+=i.slidesGrid[0])),Object.assign(i.virtual,{from:F,to:$,offset:J,slidesGrid:i.slidesGrid,slidesBefore:L,slidesAfter:R});function W(){i.updateSlides(),i.updateProgress(),i.updateSlidesClasses(),n("virtualUpdate")}if(I===F&&b===$&&!A){i.slidesGrid!==S&&J!==B&&i.slides.forEach(z=>{z.style[D]=`${J-Math.abs(i.cssOverflowAdjustment())}px`}),i.updateProgress(),n("virtualUpdate");return}if(i.params.virtual.renderExternal){i.params.virtual.renderExternal.call(i,{offset:J,from:F,to:$,slides:(function(){const ae=[];for(let Be=F;Be<=$;Be+=1)ae.push(w[Be]);return ae})()}),i.params.virtual.renderExternalUpdate?W():n("virtualUpdate");return}const he=[],le=[],Z=z=>{let ae=z;return z<0?ae=w.length+z:ae>=w.length&&(ae=ae-w.length),ae};if(A)i.slides.filter(z=>z.matches(`.${i.params.slideClass}, swiper-slide`)).forEach(z=>{z.remove()});else for(let z=I;z<=b;z+=1)if(z<F||z>$){const ae=Z(z);i.slides.filter(Be=>Be.matches(`.${i.params.slideClass}[data-swiper-slide-index="${ae}"], swiper-slide[data-swiper-slide-index="${ae}"]`)).forEach(Be=>{Be.remove()})}const ne=_?-w.length:0,G=_?w.length*2:w.length;for(let z=ne;z<G;z+=1)if(z>=F&&z<=$){const ae=Z(z);typeof b>"u"||A?le.push(ae):(z>b&&le.push(ae),z<I&&he.push(ae))}if(le.forEach(z=>{i.slidesEl.append(o(w[z],z))}),_)for(let z=he.length-1;z>=0;z-=1){const ae=he[z];i.slidesEl.prepend(o(w[ae],ae))}else he.sort((z,ae)=>ae-z),he.forEach(z=>{i.slidesEl.prepend(o(w[z],z))});yi(i.slidesEl,".swiper-slide, swiper-slide").forEach(z=>{z.style[D]=`${J-Math.abs(i.cssOverflowAdjustment())}px`}),W()}function c(A){if(typeof A=="object"&&"length"in A)for(let p=0;p<A.length;p+=1)A[p]&&i.virtual.slides.push(A[p]);else i.virtual.slides.push(A);l(!0)}function u(A){const p=i.activeIndex;let g=p+1,m=1;if(Array.isArray(A)){for(let f=0;f<A.length;f+=1)A[f]&&i.virtual.slides.unshift(A[f]);g=p+A.length,m=A.length}else i.virtual.slides.unshift(A);if(i.params.virtual.cache){const f=i.virtual.cache,y={};Object.keys(f).forEach(_=>{const E=f[_],v=E.getAttribute("data-swiper-slide-index");v&&E.setAttribute("data-swiper-slide-index",parseInt(v,10)+m),y[parseInt(_,10)+m]=E}),i.virtual.cache=y}l(!0),i.slideTo(g,0)}function h(A){if(typeof A>"u"||A===null)return;let p=i.activeIndex;if(Array.isArray(A))for(let g=A.length-1;g>=0;g-=1)i.params.virtual.cache&&(delete i.virtual.cache[A[g]],Object.keys(i.virtual.cache).forEach(m=>{m>A&&(i.virtual.cache[m-1]=i.virtual.cache[m],i.virtual.cache[m-1].setAttribute("data-swiper-slide-index",m-1),delete i.virtual.cache[m])})),i.virtual.slides.splice(A[g],1),A[g]<p&&(p-=1),p=Math.max(p,0);else i.params.virtual.cache&&(delete i.virtual.cache[A],Object.keys(i.virtual.cache).forEach(g=>{g>A&&(i.virtual.cache[g-1]=i.virtual.cache[g],i.virtual.cache[g-1].setAttribute("data-swiper-slide-index",g-1),delete i.virtual.cache[g])})),i.virtual.slides.splice(A,1),A<p&&(p-=1),p=Math.max(p,0);l(!0),i.slideTo(p,0)}function d(){i.virtual.slides=[],i.params.virtual.cache&&(i.virtual.cache={}),l(!0),i.slideTo(0,0)}t("beforeInit",()=>{if(!i.params.virtual.enabled)return;let A;if(typeof i.passedParams.virtual.slides>"u"){const p=[...i.slidesEl.children].filter(g=>g.matches(`.${i.params.slideClass}, swiper-slide`));p&&p.length&&(i.virtual.slides=[...p],A=!0,p.forEach((g,m)=>{g.setAttribute("data-swiper-slide-index",m),i.virtual.cache[m]=g,g.remove()}))}A||(i.virtual.slides=i.params.virtual.slides),i.classNames.push(`${i.params.containerModifierClass}virtual`),i.params.watchSlidesProgress=!0,i.originalParams.watchSlidesProgress=!0,l(!1,!0)}),t("setTranslate",()=>{i.params.virtual.enabled&&(i.params.cssMode&&!i._immediateVirtual?(clearTimeout(s),s=setTimeout(()=>{l()},100)):l())}),t("init update resize",()=>{i.params.virtual.enabled&&i.params.cssMode&&al(i.wrapperEl,"--swiper-virtual-size",`${i.virtualSize}px`)}),Object.assign(i.virtual,{appendSlide:c,prependSlide:u,removeSlide:h,removeAllSlides:d,update:l})}function tq({swiper:i,extendParams:e,on:t,emit:n}){const s=hi(),r=wn();i.keyboard={enabled:!1},e({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0,speed:void 0}});function a(c){if(!i.enabled)return;const{rtlTranslate:u}=i;let h=c;h.originalEvent&&(h=h.originalEvent);const d=h.keyCode||h.charCode,A=i.params.keyboard.pageUpDown,p=A&&d===33,g=A&&d===34,m=d===37,f=d===39,y=d===38,_=d===40;if(!i.allowSlideNext&&(i.isHorizontal()&&f||i.isVertical()&&_||g)||!i.allowSlidePrev&&(i.isHorizontal()&&m||i.isVertical()&&y||p))return!1;if(h.shiftKey||h.altKey||h.ctrlKey||h.metaKey||s.activeElement&&(s.activeElement.isContentEditable||s.activeElement.nodeName&&(s.activeElement.nodeName.toLowerCase()==="input"||s.activeElement.nodeName.toLowerCase()==="textarea")))return;if(i.params.keyboard.onlyInViewport&&(p||g||m||f||y||_)){let v=!1;if(Fl(i.el,`.${i.params.slideClass}, swiper-slide`).length>0&&Fl(i.el,`.${i.params.slideActiveClass}`).length===0)return;const C=i.el,x=C.clientWidth,I=C.clientHeight,b=r.innerWidth,w=r.innerHeight,S=Yg(C);u&&(S.left-=C.scrollLeft);const B=[[S.left,S.top],[S.left+x,S.top],[S.left,S.top+I],[S.left+x,S.top+I]];for(let T=0;T<B.length;T+=1){const D=B[T];if(D[0]>=0&&D[0]<=b&&D[1]>=0&&D[1]<=w){if(D[0]===0&&D[1]===0)continue;v=!0}}if(!v)return}const E=i.params.keyboard.speed;i.isHorizontal()?((p||g||m||f)&&(h.preventDefault?h.preventDefault():h.returnValue=!1),((g||f)&&!u||(p||m)&&u)&&i.slideNext(E),((p||m)&&!u||(g||f)&&u)&&i.slidePrev(E)):((p||g||y||_)&&(h.preventDefault?h.preventDefault():h.returnValue=!1),(g||_)&&i.slideNext(E),(p||y)&&i.slidePrev(E)),n("keyPress",d)}function o(){i.keyboard.enabled||(s.addEventListener("keydown",a),i.keyboard.enabled=!0)}function l(){i.keyboard.enabled&&(s.removeEventListener("keydown",a),i.keyboard.enabled=!1)}t("init",()=>{i.params.keyboard.enabled&&o()}),t("destroy",()=>{i.keyboard.enabled&&l()}),Object.assign(i.keyboard,{enable:o,disable:l})}function nq({swiper:i,extendParams:e,on:t,emit:n}){const s=wn();e({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),i.mousewheel={enabled:!1};let r,a=Fs(),o;const l=[];function c(y){let C=0,x=0,I=0,b=0;return"detail"in y&&(x=y.detail),"wheelDelta"in y&&(x=-y.wheelDelta/120),"wheelDeltaY"in y&&(x=-y.wheelDeltaY/120),"wheelDeltaX"in y&&(C=-y.wheelDeltaX/120),"axis"in y&&y.axis===y.HORIZONTAL_AXIS&&(C=x,x=0),I=C*10,b=x*10,"deltaY"in y&&(b=y.deltaY),"deltaX"in y&&(I=y.deltaX),y.shiftKey&&!I&&(I=b,b=0),(I||b)&&y.deltaMode&&(y.deltaMode===1?(I*=40,b*=40):(I*=800,b*=800)),I&&!C&&(C=I<1?-1:1),b&&!x&&(x=b<1?-1:1),{spinX:C,spinY:x,pixelX:I,pixelY:b}}function u(){i.enabled&&(i.mouseEntered=!0)}function h(){i.enabled&&(i.mouseEntered=!1)}function d(y){return i.params.mousewheel.thresholdDelta&&y.delta<i.params.mousewheel.thresholdDelta||i.params.mousewheel.thresholdTime&&Fs()-a<i.params.mousewheel.thresholdTime?!1:y.delta>=6&&Fs()-a<60?!0:(y.direction<0?(!i.isEnd||i.params.loop)&&!i.animating&&(i.slideNext(),n("scroll",y.raw)):(!i.isBeginning||i.params.loop)&&!i.animating&&(i.slidePrev(),n("scroll",y.raw)),a=new s.Date().getTime(),!1)}function A(y){const _=i.params.mousewheel;if(y.direction<0){if(i.isEnd&&!i.params.loop&&_.releaseOnEdges)return!0}else if(i.isBeginning&&!i.params.loop&&_.releaseOnEdges)return!0;return!1}function p(y){let _=y,E=!0;if(!i.enabled||y.target.closest(`.${i.params.mousewheel.noMousewheelClass}`))return;const v=i.params.mousewheel;i.params.cssMode&&_.preventDefault();let C=i.el;i.params.mousewheel.eventsTarget!=="container"&&(C=document.querySelector(i.params.mousewheel.eventsTarget));const x=C&&C.contains(_.target);if(!i.mouseEntered&&!x&&!v.releaseOnEdges)return!0;_.originalEvent&&(_=_.originalEvent);let I=0;const b=i.rtlTranslate?-1:1,w=c(_);if(v.forceToAxis)if(i.isHorizontal())if(Math.abs(w.pixelX)>Math.abs(w.pixelY))I=-w.pixelX*b;else return!0;else if(Math.abs(w.pixelY)>Math.abs(w.pixelX))I=-w.pixelY;else return!0;else I=Math.abs(w.pixelX)>Math.abs(w.pixelY)?-w.pixelX*b:-w.pixelY;if(I===0)return!0;v.invert&&(I=-I);let S=i.getTranslate()+I*v.sensitivity;if(S>=i.minTranslate()&&(S=i.minTranslate()),S<=i.maxTranslate()&&(S=i.maxTranslate()),E=i.params.loop?!0:!(S===i.minTranslate()||S===i.maxTranslate()),E&&i.params.nested&&_.stopPropagation(),!i.params.freeMode||!i.params.freeMode.enabled){const B={time:Fs(),delta:Math.abs(I),direction:Math.sign(I),raw:y};l.length>=2&&l.shift();const T=l.length?l[l.length-1]:void 0;if(l.push(B),T?(B.direction!==T.direction||B.delta>T.delta||B.time>T.time+150)&&d(B):d(B),A(B))return!0}else{const B={time:Fs(),delta:Math.abs(I),direction:Math.sign(I)},T=o&&B.time<o.time+500&&B.delta<=o.delta&&B.direction===o.direction;if(!T){o=void 0;let D=i.getTranslate()+I*v.sensitivity;const P=i.isBeginning,R=i.isEnd;if(D>=i.minTranslate()&&(D=i.minTranslate()),D<=i.maxTranslate()&&(D=i.maxTranslate()),i.setTransition(0),i.setTranslate(D),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!P&&i.isBeginning||!R&&i.isEnd)&&i.updateSlidesClasses(),i.params.loop&&i.loopFix({direction:B.direction<0?"next":"prev",byMousewheel:!0}),i.params.freeMode.sticky){clearTimeout(r),r=void 0,l.length>=15&&l.shift();const L=l.length?l[l.length-1]:void 0,F=l[0];if(l.push(B),L&&(B.delta>L.delta||B.direction!==L.direction))l.splice(0);else if(l.length>=15&&B.time-F.time<500&&F.delta-B.delta>=1&&B.delta<=6){const $=I>0?.8:.2;o=B,l.splice(0),r=Kh(()=>{i.destroyed||!i.params||i.slideToClosest(i.params.speed,!0,void 0,$)},0)}r||(r=Kh(()=>{if(i.destroyed||!i.params)return;const $=.5;o=B,l.splice(0),i.slideToClosest(i.params.speed,!0,void 0,$)},500))}if(T||n("scroll",_),i.params.autoplay&&i.params.autoplay.disableOnInteraction&&i.autoplay.stop(),v.releaseOnEdges&&(D===i.minTranslate()||D===i.maxTranslate()))return!0}}return _.preventDefault?_.preventDefault():_.returnValue=!1,!1}function g(y){let _=i.el;i.params.mousewheel.eventsTarget!=="container"&&(_=document.querySelector(i.params.mousewheel.eventsTarget)),_[y]("mouseenter",u),_[y]("mouseleave",h),_[y]("wheel",p)}function m(){return i.params.cssMode?(i.wrapperEl.removeEventListener("wheel",p),!0):i.mousewheel.enabled?!1:(g("addEventListener"),i.mousewheel.enabled=!0,!0)}function f(){return i.params.cssMode?(i.wrapperEl.addEventListener(event,p),!0):i.mousewheel.enabled?(g("removeEventListener"),i.mousewheel.enabled=!1,!0):!1}t("init",()=>{!i.params.mousewheel.enabled&&i.params.cssMode&&f(),i.params.mousewheel.enabled&&m()}),t("destroy",()=>{i.params.cssMode&&m(),i.mousewheel.enabled&&f()}),Object.assign(i.mousewheel,{enable:m,disable:f})}function Zb(i,e,t,n){return i.params.createElements&&Object.keys(n).forEach(s=>{if(!t[s]&&t.auto===!0){let r=yi(i.el,`.${n[s]}`)[0];r||(r=ys("div",n[s]),r.className=n[s],i.el.append(r)),t[s]=r,e[s]=r}}),t}const Zw='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function iq({swiper:i,extendParams:e,on:t,emit:n}){e({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),i.navigation={nextEl:null,prevEl:null,arrowSvg:Zw};function s(A){let p;return A&&typeof A=="string"&&i.isElement&&(p=i.el.querySelector(A)||i.hostEl.querySelector(A),p)?p:(A&&(typeof A=="string"&&(p=[...document.querySelectorAll(A)]),i.params.uniqueNavElements&&typeof A=="string"&&p&&p.length>1&&i.el.querySelectorAll(A).length===1?p=i.el.querySelector(A):p&&p.length===1&&(p=p[0])),A&&!p?A:p)}function r(A,p){const g=i.params.navigation;A=St(A),A.forEach(m=>{m&&(m.classList[p?"add":"remove"](...g.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=p),i.params.watchOverflow&&i.enabled&&m.classList[i.isLocked?"add":"remove"](g.lockClass))})}function a(){const{nextEl:A,prevEl:p}=i.navigation;if(i.params.loop){r(p,!1),r(A,!1);return}r(p,i.isBeginning&&!i.params.rewind),r(A,i.isEnd&&!i.params.rewind)}function o(A){A.preventDefault(),!(i.isBeginning&&!i.params.loop&&!i.params.rewind)&&(i.slidePrev(),n("navigationPrev"))}function l(A){A.preventDefault(),!(i.isEnd&&!i.params.loop&&!i.params.rewind)&&(i.slideNext(),n("navigationNext"))}function c(){const A=i.params.navigation;if(i.params.navigation=Zb(i,i.originalParams.navigation,i.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(A.nextEl||A.prevEl))return;let p=s(A.nextEl),g=s(A.prevEl);Object.assign(i.navigation,{nextEl:p,prevEl:g}),p=St(p),g=St(g);const m=(f,y)=>{if(f){if(A.addIcons&&f.matches(".swiper-button-next,.swiper-button-prev")&&!f.querySelector("svg")){const _=document.createElement("div");xs(_,Zw),f.appendChild(_.querySelector("svg")),_.remove()}f.addEventListener("click",y==="next"?l:o)}!i.enabled&&f&&f.classList.add(...A.lockClass.split(" "))};p.forEach(f=>m(f,"next")),g.forEach(f=>m(f,"prev"))}function u(){let{nextEl:A,prevEl:p}=i.navigation;A=St(A),p=St(p);const g=(m,f)=>{m.removeEventListener("click",f==="next"?l:o),m.classList.remove(...i.params.navigation.disabledClass.split(" "))};A.forEach(m=>g(m,"next")),p.forEach(m=>g(m,"prev"))}t("init",()=>{i.params.navigation.enabled===!1?d():(c(),a())}),t("toEdge fromEdge lock unlock",()=>{a()}),t("destroy",()=>{u()}),t("enable disable",()=>{let{nextEl:A,prevEl:p}=i.navigation;if(A=St(A),p=St(p),i.enabled){a();return}[...A,...p].filter(g=>!!g).forEach(g=>g.classList.add(i.params.navigation.lockClass))}),t("click",(A,p)=>{let{nextEl:g,prevEl:m}=i.navigation;g=St(g),m=St(m);const f=p.target;let y=m.includes(f)||g.includes(f);if(i.isElement&&!y){const _=p.path||p.composedPath&&p.composedPath();_&&(y=_.find(E=>g.includes(E)||m.includes(E)))}if(i.params.navigation.hideOnClick&&!y){if(i.pagination&&i.params.pagination&&i.params.pagination.clickable&&(i.pagination.el===f||i.pagination.el.contains(f)))return;let _;g.length?_=g[0].classList.contains(i.params.navigation.hiddenClass):m.length&&(_=m[0].classList.contains(i.params.navigation.hiddenClass)),n(_===!0?"navigationShow":"navigationHide"),[...g,...m].filter(E=>!!E).forEach(E=>E.classList.toggle(i.params.navigation.hiddenClass))}});const h=()=>{i.el.classList.remove(...i.params.navigation.navigationDisabledClass.split(" ")),c(),a()},d=()=>{i.el.classList.add(...i.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(i.navigation,{enable:h,disable:d,update:a,init:c,destroy:u})}function Ca(i=""){return`.${i.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function sq({swiper:i,extendParams:e,on:t,emit:n}){const s="swiper-pagination";e({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:f=>f,formatFractionTotal:f=>f,bulletClass:`${s}-bullet`,bulletActiveClass:`${s}-bullet-active`,modifierClass:`${s}-`,currentClass:`${s}-current`,totalClass:`${s}-total`,hiddenClass:`${s}-hidden`,progressbarFillClass:`${s}-progressbar-fill`,progressbarOppositeClass:`${s}-progressbar-opposite`,clickableClass:`${s}-clickable`,lockClass:`${s}-lock`,horizontalClass:`${s}-horizontal`,verticalClass:`${s}-vertical`,paginationDisabledClass:`${s}-disabled`}}),i.pagination={el:null,bullets:[]};let r,a=0;function o(){return!i.params.pagination.el||!i.pagination.el||Array.isArray(i.pagination.el)&&i.pagination.el.length===0}function l(f,y){const{bulletActiveClass:_}=i.params.pagination;f&&(f=f[`${y==="prev"?"previous":"next"}ElementSibling`],f&&(f.classList.add(`${_}-${y}`),f=f[`${y==="prev"?"previous":"next"}ElementSibling`],f&&f.classList.add(`${_}-${y}-${y}`)))}function c(f,y,_){if(f=f%_,y=y%_,y===f+1)return"next";if(y===f-1)return"previous"}function u(f){const y=f.target.closest(Ca(i.params.pagination.bulletClass));if(!y)return;f.preventDefault();const _=FA(y)*i.params.slidesPerGroup;if(i.params.loop){if(i.realIndex===_)return;const E=c(i.realIndex,_,i.slides.length);E==="next"?i.slideNext():E==="previous"?i.slidePrev():i.slideToLoop(_)}else i.slideTo(_)}function h(){const f=i.rtl,y=i.params.pagination;if(o())return;let _=i.pagination.el;_=St(_);let E,v;const C=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:i.slides.length,x=i.params.loop?Math.ceil(C/i.params.slidesPerGroup):i.snapGrid.length;if(i.params.loop?(v=i.previousRealIndex||0,E=i.params.slidesPerGroup>1?Math.floor(i.realIndex/i.params.slidesPerGroup):i.realIndex):typeof i.snapIndex<"u"?(E=i.snapIndex,v=i.previousSnapIndex):(v=i.previousIndex||0,E=i.activeIndex||0),y.type==="bullets"&&i.pagination.bullets&&i.pagination.bullets.length>0){const I=i.pagination.bullets;let b,w,S;if(y.dynamicBullets&&(r=pv(I[0],i.isHorizontal()?"width":"height"),_.forEach(B=>{B.style[i.isHorizontal()?"width":"height"]=`${r*(y.dynamicMainBullets+4)}px`}),y.dynamicMainBullets>1&&v!==void 0&&(a+=E-(v||0),a>y.dynamicMainBullets-1?a=y.dynamicMainBullets-1:a<0&&(a=0)),b=Math.max(E-a,0),w=b+(Math.min(I.length,y.dynamicMainBullets)-1),S=(w+b)/2),I.forEach(B=>{const T=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(D=>`${y.bulletActiveClass}${D}`)].map(D=>typeof D=="string"&&D.includes(" ")?D.split(" "):D).flat();B.classList.remove(...T)}),_.length>1)I.forEach(B=>{const T=FA(B);T===E?B.classList.add(...y.bulletActiveClass.split(" ")):i.isElement&&B.setAttribute("part","bullet"),y.dynamicBullets&&(T>=b&&T<=w&&B.classList.add(...`${y.bulletActiveClass}-main`.split(" ")),T===b&&l(B,"prev"),T===w&&l(B,"next"))});else{const B=I[E];if(B&&B.classList.add(...y.bulletActiveClass.split(" ")),i.isElement&&I.forEach((T,D)=>{T.setAttribute("part",D===E?"bullet-active":"bullet")}),y.dynamicBullets){const T=I[b],D=I[w];for(let P=b;P<=w;P+=1)I[P]&&I[P].classList.add(...`${y.bulletActiveClass}-main`.split(" "));l(T,"prev"),l(D,"next")}}if(y.dynamicBullets){const B=Math.min(I.length,y.dynamicMainBullets+4),T=(r*B-r)/2-S*r,D=f?"right":"left";I.forEach(P=>{P.style[i.isHorizontal()?D:"top"]=`${T}px`})}}_.forEach((I,b)=>{if(y.type==="fraction"&&(I.querySelectorAll(Ca(y.currentClass)).forEach(w=>{w.textContent=y.formatFractionCurrent(E+1)}),I.querySelectorAll(Ca(y.totalClass)).forEach(w=>{w.textContent=y.formatFractionTotal(x)})),y.type==="progressbar"){let w;y.progressbarOpposite?w=i.isHorizontal()?"vertical":"horizontal":w=i.isHorizontal()?"horizontal":"vertical";const S=(E+1)/x;let B=1,T=1;w==="horizontal"?B=S:T=S,I.querySelectorAll(Ca(y.progressbarFillClass)).forEach(D=>{D.style.transform=`translate3d(0,0,0) scaleX(${B}) scaleY(${T})`,D.style.transitionDuration=`${i.params.speed}ms`})}y.type==="custom"&&y.renderCustom?(xs(I,y.renderCustom(i,E+1,x)),b===0&&n("paginationRender",I)):(b===0&&n("paginationRender",I),n("paginationUpdate",I)),i.params.watchOverflow&&i.enabled&&I.classList[i.isLocked?"add":"remove"](y.lockClass)})}function d(){const f=i.params.pagination;if(o())return;const y=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:i.grid&&i.params.grid.rows>1?i.slides.length/Math.ceil(i.params.grid.rows):i.slides.length;let _=i.pagination.el;_=St(_);let E="";if(f.type==="bullets"){let v=i.params.loop?Math.ceil(y/i.params.slidesPerGroup):i.snapGrid.length;i.params.freeMode&&i.params.freeMode.enabled&&v>y&&(v=y);for(let C=0;C<v;C+=1)f.renderBullet?E+=f.renderBullet.call(i,C,f.bulletClass):E+=`<${f.bulletElement} ${i.isElement?'part="bullet"':""} class="${f.bulletClass}"></${f.bulletElement}>`}f.type==="fraction"&&(f.renderFraction?E=f.renderFraction.call(i,f.currentClass,f.totalClass):E=`<span class="${f.currentClass}"></span> / <span class="${f.totalClass}"></span>`),f.type==="progressbar"&&(f.renderProgressbar?E=f.renderProgressbar.call(i,f.progressbarFillClass):E=`<span class="${f.progressbarFillClass}"></span>`),i.pagination.bullets=[],_.forEach(v=>{f.type!=="custom"&&xs(v,E||""),f.type==="bullets"&&i.pagination.bullets.push(...v.querySelectorAll(Ca(f.bulletClass)))}),f.type!=="custom"&&n("paginationRender",_[0])}function A(){i.params.pagination=Zb(i,i.originalParams.pagination,i.params.pagination,{el:"swiper-pagination"});const f=i.params.pagination;if(!f.el)return;let y;typeof f.el=="string"&&i.isElement&&(y=i.el.querySelector(f.el)),!y&&typeof f.el=="string"&&(y=[...document.querySelectorAll(f.el)]),y||(y=f.el),!(!y||y.length===0)&&(i.params.uniqueNavElements&&typeof f.el=="string"&&Array.isArray(y)&&y.length>1&&(y=[...i.el.querySelectorAll(f.el)],y.length>1&&(y=y.find(_=>Fl(_,".swiper")[0]===i.el))),Array.isArray(y)&&y.length===1&&(y=y[0]),Object.assign(i.pagination,{el:y}),y=St(y),y.forEach(_=>{f.type==="bullets"&&f.clickable&&_.classList.add(...(f.clickableClass||"").split(" ")),_.classList.add(f.modifierClass+f.type),_.classList.add(i.isHorizontal()?f.horizontalClass:f.verticalClass),f.type==="bullets"&&f.dynamicBullets&&(_.classList.add(`${f.modifierClass}${f.type}-dynamic`),a=0,f.dynamicMainBullets<1&&(f.dynamicMainBullets=1)),f.type==="progressbar"&&f.progressbarOpposite&&_.classList.add(f.progressbarOppositeClass),f.clickable&&_.addEventListener("click",u),i.enabled||_.classList.add(f.lockClass)}))}function p(){const f=i.params.pagination;if(o())return;let y=i.pagination.el;y&&(y=St(y),y.forEach(_=>{_.classList.remove(f.hiddenClass),_.classList.remove(f.modifierClass+f.type),_.classList.remove(i.isHorizontal()?f.horizontalClass:f.verticalClass),f.clickable&&(_.classList.remove(...(f.clickableClass||"").split(" ")),_.removeEventListener("click",u))})),i.pagination.bullets&&i.pagination.bullets.forEach(_=>_.classList.remove(...f.bulletActiveClass.split(" ")))}t("changeDirection",()=>{if(!i.pagination||!i.pagination.el)return;const f=i.params.pagination;let{el:y}=i.pagination;y=St(y),y.forEach(_=>{_.classList.remove(f.horizontalClass,f.verticalClass),_.classList.add(i.isHorizontal()?f.horizontalClass:f.verticalClass)})}),t("init",()=>{i.params.pagination.enabled===!1?m():(A(),d(),h())}),t("activeIndexChange",()=>{typeof i.snapIndex>"u"&&h()}),t("snapIndexChange",()=>{h()}),t("snapGridLengthChange",()=>{d(),h()}),t("destroy",()=>{p()}),t("enable disable",()=>{let{el:f}=i.pagination;f&&(f=St(f),f.forEach(y=>y.classList[i.enabled?"remove":"add"](i.params.pagination.lockClass)))}),t("lock unlock",()=>{h()}),t("click",(f,y)=>{const _=y.target,E=St(i.pagination.el);if(i.params.pagination.el&&i.params.pagination.hideOnClick&&E&&E.length>0&&!_.classList.contains(i.params.pagination.bulletClass)){if(i.navigation&&(i.navigation.nextEl&&_===i.navigation.nextEl||i.navigation.prevEl&&_===i.navigation.prevEl))return;const v=E[0].classList.contains(i.params.pagination.hiddenClass);n(v===!0?"paginationShow":"paginationHide"),E.forEach(C=>C.classList.toggle(i.params.pagination.hiddenClass))}});const g=()=>{i.el.classList.remove(i.params.pagination.paginationDisabledClass);let{el:f}=i.pagination;f&&(f=St(f),f.forEach(y=>y.classList.remove(i.params.pagination.paginationDisabledClass))),A(),d(),h()},m=()=>{i.el.classList.add(i.params.pagination.paginationDisabledClass);let{el:f}=i.pagination;f&&(f=St(f),f.forEach(y=>y.classList.add(i.params.pagination.paginationDisabledClass))),p()};Object.assign(i.pagination,{enable:g,disable:m,render:d,update:h,init:A,destroy:p})}function rq({swiper:i,extendParams:e,on:t,emit:n}){const s=hi();let r=!1,a=null,o=null,l,c,u,h;e({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),i.scrollbar={el:null,dragEl:null};function d(){if(!i.params.scrollbar.el||!i.scrollbar.el)return;const{scrollbar:S,rtlTranslate:B}=i,{dragEl:T,el:D}=S,P=i.params.scrollbar,R=i.params.loop?i.progressLoop:i.progress;let L=c,F=(u-c)*R;B?(F=-F,F>0?(L=c-F,F=0):-F+c>u&&(L=u+F)):F<0?(L=c+F,F=0):F+c>u&&(L=u-F),i.isHorizontal()?(T.style.transform=`translate3d(${F}px, 0, 0)`,T.style.width=`${L}px`):(T.style.transform=`translate3d(0px, ${F}px, 0)`,T.style.height=`${L}px`),P.hide&&(clearTimeout(a),D.style.opacity=1,a=setTimeout(()=>{D.style.opacity=0,D.style.transitionDuration="400ms"},1e3))}function A(S){!i.params.scrollbar.el||!i.scrollbar.el||(i.scrollbar.dragEl.style.transitionDuration=`${S}ms`)}function p(){if(!i.params.scrollbar.el||!i.scrollbar.el)return;const{scrollbar:S}=i,{dragEl:B,el:T}=S;B.style.width="",B.style.height="",u=i.isHorizontal()?T.offsetWidth:T.offsetHeight,h=i.size/(i.virtualSize+i.params.slidesOffsetBefore-(i.params.centeredSlides?i.snapGrid[0]:0)),i.params.scrollbar.dragSize==="auto"?c=u*h:c=parseInt(i.params.scrollbar.dragSize,10),i.isHorizontal()?B.style.width=`${c}px`:B.style.height=`${c}px`,h>=1?T.style.display="none":T.style.display="",i.params.scrollbar.hide&&(T.style.opacity=0),i.params.watchOverflow&&i.enabled&&S.el.classList[i.isLocked?"add":"remove"](i.params.scrollbar.lockClass)}function g(S){return i.isHorizontal()?S.clientX:S.clientY}function m(S){const{scrollbar:B,rtlTranslate:T}=i,{el:D}=B;let P;P=(g(S)-Yg(D)[i.isHorizontal()?"left":"top"]-(l!==null?l:c/2))/(u-c),P=Math.max(Math.min(P,1),0),T&&(P=1-P);const R=i.minTranslate()+(i.maxTranslate()-i.minTranslate())*P;i.updateProgress(R),i.setTranslate(R),i.updateActiveIndex(),i.updateSlidesClasses()}function f(S){const B=i.params.scrollbar,{scrollbar:T,wrapperEl:D}=i,{el:P,dragEl:R}=T;r=!0,l=S.target===R?g(S)-S.target.getBoundingClientRect()[i.isHorizontal()?"left":"top"]:null,S.preventDefault(),S.stopPropagation(),D.style.transitionDuration="100ms",R.style.transitionDuration="100ms",m(S),clearTimeout(o),P.style.transitionDuration="0ms",B.hide&&(P.style.opacity=1),i.params.cssMode&&(i.wrapperEl.style["scroll-snap-type"]="none"),n("scrollbarDragStart",S)}function y(S){const{scrollbar:B,wrapperEl:T}=i,{el:D,dragEl:P}=B;r&&(S.preventDefault&&S.cancelable?S.preventDefault():S.returnValue=!1,m(S),T.style.transitionDuration="0ms",D.style.transitionDuration="0ms",P.style.transitionDuration="0ms",n("scrollbarDragMove",S))}function _(S){const B=i.params.scrollbar,{scrollbar:T,wrapperEl:D}=i,{el:P}=T;r&&(r=!1,i.params.cssMode&&(i.wrapperEl.style["scroll-snap-type"]="",D.style.transitionDuration=""),B.hide&&(clearTimeout(o),o=Kh(()=>{P.style.opacity=0,P.style.transitionDuration="400ms"},1e3)),n("scrollbarDragEnd",S),B.snapOnRelease&&i.slideToClosest())}function E(S){const{scrollbar:B,params:T}=i,D=B.el;if(!D)return;const P=D,R=T.passiveListeners?{passive:!1,capture:!1}:!1,L=T.passiveListeners?{passive:!0,capture:!1}:!1;if(!P)return;const F=S==="on"?"addEventListener":"removeEventListener";P[F]("pointerdown",f,R),s[F]("pointermove",y,R),s[F]("pointerup",_,L)}function v(){!i.params.scrollbar.el||!i.scrollbar.el||E("on")}function C(){!i.params.scrollbar.el||!i.scrollbar.el||E("off")}function x(){const{scrollbar:S,el:B}=i;i.params.scrollbar=Zb(i,i.originalParams.scrollbar,i.params.scrollbar,{el:"swiper-scrollbar"});const T=i.params.scrollbar;if(!T.el)return;let D;if(typeof T.el=="string"&&i.isElement&&(D=i.el.querySelector(T.el)),!D&&typeof T.el=="string"){if(D=s.querySelectorAll(T.el),!D.length)return}else D||(D=T.el);i.params.uniqueNavElements&&typeof T.el=="string"&&D.length>1&&B.querySelectorAll(T.el).length===1&&(D=B.querySelector(T.el)),D.length>0&&(D=D[0]),D.classList.add(i.isHorizontal()?T.horizontalClass:T.verticalClass);let P;D&&(P=D.querySelector(Ca(i.params.scrollbar.dragClass)),P||(P=ys("div",i.params.scrollbar.dragClass),D.append(P))),Object.assign(S,{el:D,dragEl:P}),T.draggable&&v(),D&&D.classList[i.enabled?"remove":"add"](...so(i.params.scrollbar.lockClass))}function I(){const S=i.params.scrollbar,B=i.scrollbar.el;B&&B.classList.remove(...so(i.isHorizontal()?S.horizontalClass:S.verticalClass)),C()}t("changeDirection",()=>{if(!i.scrollbar||!i.scrollbar.el)return;const S=i.params.scrollbar;let{el:B}=i.scrollbar;B=St(B),B.forEach(T=>{T.classList.remove(S.horizontalClass,S.verticalClass),T.classList.add(i.isHorizontal()?S.horizontalClass:S.verticalClass)})}),t("init",()=>{i.params.scrollbar.enabled===!1?w():(x(),p(),d())}),t("update resize observerUpdate lock unlock changeDirection",()=>{p()}),t("setTranslate",()=>{d()}),t("setTransition",(S,B)=>{A(B)}),t("enable disable",()=>{const{el:S}=i.scrollbar;S&&S.classList[i.enabled?"remove":"add"](...so(i.params.scrollbar.lockClass))}),t("destroy",()=>{I()});const b=()=>{i.el.classList.remove(...so(i.params.scrollbar.scrollbarDisabledClass)),i.scrollbar.el&&i.scrollbar.el.classList.remove(...so(i.params.scrollbar.scrollbarDisabledClass)),x(),p(),d()},w=()=>{i.el.classList.add(...so(i.params.scrollbar.scrollbarDisabledClass)),i.scrollbar.el&&i.scrollbar.el.classList.add(...so(i.params.scrollbar.scrollbarDisabledClass)),I()};Object.assign(i.scrollbar,{enable:b,disable:w,updateSize:p,setTranslate:d,init:x,destroy:I})}function aq({swiper:i,extendParams:e,on:t}){e({parallax:{enabled:!1}});const n="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",s=(o,l)=>{const{rtl:c}=i,u=c?-1:1,h=o.getAttribute("data-swiper-parallax")||"0";let d=o.getAttribute("data-swiper-parallax-x"),A=o.getAttribute("data-swiper-parallax-y");const p=o.getAttribute("data-swiper-parallax-scale"),g=o.getAttribute("data-swiper-parallax-opacity"),m=o.getAttribute("data-swiper-parallax-rotate");if(d||A?(d=d||"0",A=A||"0"):i.isHorizontal()?(d=h,A="0"):(A=h,d="0"),d.indexOf("%")>=0?d=`${parseInt(d,10)*l*u}%`:d=`${d*l*u}px`,A.indexOf("%")>=0?A=`${parseInt(A,10)*l}%`:A=`${A*l}px`,typeof g<"u"&&g!==null){const y=g-(g-1)*(1-Math.abs(l));o.style.opacity=y}let f=`translate3d(${d}, ${A}, 0px)`;if(typeof p<"u"&&p!==null){const y=p-(p-1)*(1-Math.abs(l));f+=` scale(${y})`}if(m&&typeof m<"u"&&m!==null){const y=m*l*-1;f+=` rotate(${y}deg)`}o.style.transform=f},r=()=>{const{el:o,slides:l,progress:c,snapGrid:u,isElement:h}=i,d=yi(o,n);i.isElement&&d.push(...yi(i.hostEl,n)),d.forEach(A=>{s(A,c)}),l.forEach((A,p)=>{let g=A.progress;i.params.slidesPerGroup>1&&i.params.slidesPerView!=="auto"&&(g+=Math.ceil(p/2)-c*(u.length-1)),g=Math.min(Math.max(g,-1),1),A.querySelectorAll(`${n}, [data-swiper-parallax-rotate]`).forEach(m=>{s(m,g)})})},a=(o=i.params.speed)=>{const{el:l,hostEl:c}=i,u=[...l.querySelectorAll(n)];i.isElement&&u.push(...c.querySelectorAll(n)),u.forEach(h=>{let d=parseInt(h.getAttribute("data-swiper-parallax-duration"),10)||o;o===0&&(d=0),h.style.transitionDuration=`${d}ms`})};t("beforeInit",()=>{i.params.parallax.enabled&&(i.params.watchSlidesProgress=!0,i.originalParams.watchSlidesProgress=!0)}),t("init",()=>{i.params.parallax.enabled&&r()}),t("setTranslate",()=>{i.params.parallax.enabled&&r()}),t("setTransition",(o,l)=>{i.params.parallax.enabled&&a(l)})}function oq({swiper:i,extendParams:e,on:t,emit:n}){const s=wn();e({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),i.zoom={enabled:!1};let r=1,a=!1,o=!1,l={x:0,y:0};const c=-3;let u,h;const d=[],A={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},p={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let m=1;Object.defineProperty(i.zoom,"scale",{get(){return m},set(Z){if(m!==Z){const ne=A.imageEl,G=A.slideEl;n("zoomChange",Z,ne,G)}m=Z}});function f(){if(d.length<2)return 1;const Z=d[0].pageX,ne=d[0].pageY,G=d[1].pageX,z=d[1].pageY;return Math.sqrt((G-Z)**2+(z-ne)**2)}function y(){const Z=i.params.zoom,ne=A.imageWrapEl.getAttribute("data-swiper-zoom")||Z.maxRatio;if(Z.limitToOriginalSize&&A.imageEl&&A.imageEl.naturalWidth){const G=A.imageEl.naturalWidth/A.imageEl.offsetWidth;return Math.min(G,ne)}return ne}function _(){if(d.length<2)return{x:null,y:null};const Z=A.imageEl.getBoundingClientRect();return[(d[0].pageX+(d[1].pageX-d[0].pageX)/2-Z.x-s.scrollX)/r,(d[0].pageY+(d[1].pageY-d[0].pageY)/2-Z.y-s.scrollY)/r]}function E(){return i.isElement?"swiper-slide":`.${i.params.slideClass}`}function v(Z){const ne=E();return!!(Z.target.matches(ne)||i.slides.filter(G=>G.contains(Z.target)).length>0)}function C(Z){const ne=`.${i.params.zoom.containerClass}`;return!!(Z.target.matches(ne)||[...i.hostEl.querySelectorAll(ne)].filter(G=>G.contains(Z.target)).length>0)}function x(Z){if(Z.pointerType==="mouse"&&d.splice(0,d.length),!v(Z))return;const ne=i.params.zoom;if(u=!1,h=!1,d.push(Z),!(d.length<2)){if(u=!0,A.scaleStart=f(),!A.slideEl){A.slideEl=Z.target.closest(`.${i.params.slideClass}, swiper-slide`),A.slideEl||(A.slideEl=i.slides[i.activeIndex]);let G=A.slideEl.querySelector(`.${ne.containerClass}`);if(G&&(G=G.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),A.imageEl=G,G?A.imageWrapEl=Fl(A.imageEl,`.${ne.containerClass}`)[0]:A.imageWrapEl=void 0,!A.imageWrapEl){A.imageEl=void 0;return}A.maxRatio=y()}if(A.imageEl){const[G,z]=_();A.originX=G,A.originY=z,A.imageEl.style.transitionDuration="0ms"}a=!0}}function I(Z){if(!v(Z))return;const ne=i.params.zoom,G=i.zoom,z=d.findIndex(ae=>ae.pointerId===Z.pointerId);z>=0&&(d[z]=Z),!(d.length<2)&&(h=!0,A.scaleMove=f(),A.imageEl&&(G.scale=A.scaleMove/A.scaleStart*r,G.scale>A.maxRatio&&(G.scale=A.maxRatio-1+(G.scale-A.maxRatio+1)**.5),G.scale<ne.minRatio&&(G.scale=ne.minRatio+1-(ne.minRatio-G.scale+1)**.5),A.imageEl.style.transform=`translate3d(0,0,0) scale(${G.scale})`))}function b(Z){if(!v(Z)||Z.pointerType==="mouse"&&Z.type==="pointerout")return;const ne=i.params.zoom,G=i.zoom,z=d.findIndex(ae=>ae.pointerId===Z.pointerId);z>=0&&d.splice(z,1),!(!u||!h)&&(u=!1,h=!1,A.imageEl&&(G.scale=Math.max(Math.min(G.scale,A.maxRatio),ne.minRatio),A.imageEl.style.transitionDuration=`${i.params.speed}ms`,A.imageEl.style.transform=`translate3d(0,0,0) scale(${G.scale})`,r=G.scale,a=!1,G.scale>1&&A.slideEl?A.slideEl.classList.add(`${ne.zoomedSlideClass}`):G.scale<=1&&A.slideEl&&A.slideEl.classList.remove(`${ne.zoomedSlideClass}`),G.scale===1&&(A.originX=0,A.originY=0,A.slideEl=void 0)))}let w;function S(){i.touchEventsData.preventTouchMoveFromPointerMove=!1}function B(){clearTimeout(w),i.touchEventsData.preventTouchMoveFromPointerMove=!0,w=setTimeout(()=>{i.destroyed||S()})}function T(Z){const ne=i.device;if(!A.imageEl||p.isTouched)return;ne.android&&Z.cancelable&&Z.preventDefault(),p.isTouched=!0;const G=d.length>0?d[0]:Z;p.touchesStart.x=G.pageX,p.touchesStart.y=G.pageY}function D(Z){const G=Z.pointerType==="mouse"&&i.params.zoom.panOnMouseMove;if(!v(Z)||!C(Z))return;const z=i.zoom;if(!A.imageEl)return;if(!p.isTouched||!A.slideEl){G&&L(Z);return}if(G){L(Z);return}p.isMoved||(p.width=A.imageEl.offsetWidth||A.imageEl.clientWidth,p.height=A.imageEl.offsetHeight||A.imageEl.clientHeight,p.startX=Av(A.imageWrapEl,"x")||0,p.startY=Av(A.imageWrapEl,"y")||0,A.slideWidth=A.slideEl.offsetWidth,A.slideHeight=A.slideEl.offsetHeight,A.imageWrapEl.style.transitionDuration="0ms");const ae=p.width*z.scale,Be=p.height*z.scale;if(p.minX=Math.min(A.slideWidth/2-ae/2,0),p.maxX=-p.minX,p.minY=Math.min(A.slideHeight/2-Be/2,0),p.maxY=-p.minY,p.touchesCurrent.x=d.length>0?d[0].pageX:Z.pageX,p.touchesCurrent.y=d.length>0?d[0].pageY:Z.pageY,Math.max(Math.abs(p.touchesCurrent.x-p.touchesStart.x),Math.abs(p.touchesCurrent.y-p.touchesStart.y))>5&&(i.allowClick=!1),!p.isMoved&&!a){if(i.isHorizontal()&&(Math.floor(p.minX)===Math.floor(p.startX)&&p.touchesCurrent.x<p.touchesStart.x||Math.floor(p.maxX)===Math.floor(p.startX)&&p.touchesCurrent.x>p.touchesStart.x)){p.isTouched=!1,S();return}if(!i.isHorizontal()&&(Math.floor(p.minY)===Math.floor(p.startY)&&p.touchesCurrent.y<p.touchesStart.y||Math.floor(p.maxY)===Math.floor(p.startY)&&p.touchesCurrent.y>p.touchesStart.y)){p.isTouched=!1,S();return}}Z.cancelable&&Z.preventDefault(),Z.stopPropagation(),B(),p.isMoved=!0;const De=(z.scale-r)/(A.maxRatio-i.params.zoom.minRatio),{originX:ut,originY:Qe}=A;p.currentX=p.touchesCurrent.x-p.touchesStart.x+p.startX+De*(p.width-ut*2),p.currentY=p.touchesCurrent.y-p.touchesStart.y+p.startY+De*(p.height-Qe*2),p.currentX<p.minX&&(p.currentX=p.minX+1-(p.minX-p.currentX+1)**.8),p.currentX>p.maxX&&(p.currentX=p.maxX-1+(p.currentX-p.maxX+1)**.8),p.currentY<p.minY&&(p.currentY=p.minY+1-(p.minY-p.currentY+1)**.8),p.currentY>p.maxY&&(p.currentY=p.maxY-1+(p.currentY-p.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=p.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=p.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(p.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(p.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(p.touchesCurrent.x-g.prevPositionX)<2&&(g.x=0),Math.abs(p.touchesCurrent.y-g.prevPositionY)<2&&(g.y=0),g.prevPositionX=p.touchesCurrent.x,g.prevPositionY=p.touchesCurrent.y,g.prevTime=Date.now(),A.imageWrapEl.style.transform=`translate3d(${p.currentX}px, ${p.currentY}px,0)`}function P(){const Z=i.zoom;if(d.length=0,!A.imageEl)return;if(!p.isTouched||!p.isMoved){p.isTouched=!1,p.isMoved=!1;return}p.isTouched=!1,p.isMoved=!1;let ne=300,G=300;const z=g.x*ne,ae=p.currentX+z,Be=g.y*G,fe=p.currentY+Be;g.x!==0&&(ne=Math.abs((ae-p.currentX)/g.x)),g.y!==0&&(G=Math.abs((fe-p.currentY)/g.y));const De=Math.max(ne,G);p.currentX=ae,p.currentY=fe;const ut=p.width*Z.scale,Qe=p.height*Z.scale;p.minX=Math.min(A.slideWidth/2-ut/2,0),p.maxX=-p.minX,p.minY=Math.min(A.slideHeight/2-Qe/2,0),p.maxY=-p.minY,p.currentX=Math.max(Math.min(p.currentX,p.maxX),p.minX),p.currentY=Math.max(Math.min(p.currentY,p.maxY),p.minY),A.imageWrapEl.style.transitionDuration=`${De}ms`,A.imageWrapEl.style.transform=`translate3d(${p.currentX}px, ${p.currentY}px,0)`}function R(){const Z=i.zoom;A.slideEl&&i.activeIndex!==i.slides.indexOf(A.slideEl)&&(A.imageEl&&(A.imageEl.style.transform="translate3d(0,0,0) scale(1)"),A.imageWrapEl&&(A.imageWrapEl.style.transform="translate3d(0,0,0)"),A.slideEl.classList.remove(`${i.params.zoom.zoomedSlideClass}`),Z.scale=1,r=1,A.slideEl=void 0,A.imageEl=void 0,A.imageWrapEl=void 0,A.originX=0,A.originY=0)}function L(Z){if(r<=1||!A.imageWrapEl||!v(Z)||!C(Z))return;const ne=s.getComputedStyle(A.imageWrapEl).transform,G=new s.DOMMatrix(ne);if(!o){o=!0,l.x=Z.clientX,l.y=Z.clientY,p.startX=G.e,p.startY=G.f,p.width=A.imageEl.offsetWidth||A.imageEl.clientWidth,p.height=A.imageEl.offsetHeight||A.imageEl.clientHeight,A.slideWidth=A.slideEl.offsetWidth,A.slideHeight=A.slideEl.offsetHeight;return}const z=(Z.clientX-l.x)*c,ae=(Z.clientY-l.y)*c,Be=p.width*r,fe=p.height*r,De=A.slideWidth,ut=A.slideHeight,Qe=Math.min(De/2-Be/2,0),Ye=-Qe,ot=Math.min(ut/2-fe/2,0),Ke=-ot,Ct=Math.max(Math.min(p.startX+z,Ye),Qe),U=Math.max(Math.min(p.startY+ae,Ke),ot);A.imageWrapEl.style.transitionDuration="0ms",A.imageWrapEl.style.transform=`translate3d(${Ct}px, ${U}px, 0)`,l.x=Z.clientX,l.y=Z.clientY,p.startX=Ct,p.startY=U,p.currentX=Ct,p.currentY=U}function F(Z){const ne=i.zoom,G=i.params.zoom;if(!A.slideEl){Z&&Z.target&&(A.slideEl=Z.target.closest(`.${i.params.slideClass}, swiper-slide`)),A.slideEl||(i.params.virtual&&i.params.virtual.enabled&&i.virtual?A.slideEl=yi(i.slidesEl,`.${i.params.slideActiveClass}`)[0]:A.slideEl=i.slides[i.activeIndex]);let ie=A.slideEl.querySelector(`.${G.containerClass}`);ie&&(ie=ie.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),A.imageEl=ie,ie?A.imageWrapEl=Fl(A.imageEl,`.${G.containerClass}`)[0]:A.imageWrapEl=void 0}if(!A.imageEl||!A.imageWrapEl)return;A.maxRatio=y(),i.params.cssMode&&(i.wrapperEl.style.overflow="hidden",i.wrapperEl.style.touchAction="none"),A.slideEl.classList.add(`${G.zoomedSlideClass}`);let z,ae,Be,fe,De,ut,Qe,Ye,ot,Ke,Ct,U,yt,je,Dt,Fe,k,M;typeof p.touchesStart.x>"u"&&Z?(z=Z.pageX,ae=Z.pageY):(z=p.touchesStart.x,ae=p.touchesStart.y);const Y=r,se=typeof Z=="number"?Z:null;r===1&&se&&(z=void 0,ae=void 0,p.touchesStart.x=void 0,p.touchesStart.y=void 0);const ce=y();ne.scale=se||ce,r=se||ce,Z&&!(r===1&&se)?(k=A.slideEl.offsetWidth,M=A.slideEl.offsetHeight,Be=Yg(A.slideEl).left+s.scrollX,fe=Yg(A.slideEl).top+s.scrollY,De=Be+k/2-z,ut=fe+M/2-ae,ot=A.imageEl.offsetWidth||A.imageEl.clientWidth,Ke=A.imageEl.offsetHeight||A.imageEl.clientHeight,Ct=ot*ne.scale,U=Ke*ne.scale,yt=Math.min(k/2-Ct/2,0),je=Math.min(M/2-U/2,0),Dt=-yt,Fe=-je,Y>0&&se&&typeof p.currentX=="number"&&typeof p.currentY=="number"?(Qe=p.currentX*ne.scale/Y,Ye=p.currentY*ne.scale/Y):(Qe=De*ne.scale,Ye=ut*ne.scale),Qe<yt&&(Qe=yt),Qe>Dt&&(Qe=Dt),Ye<je&&(Ye=je),Ye>Fe&&(Ye=Fe)):(Qe=0,Ye=0),se&&ne.scale===1&&(A.originX=0,A.originY=0),p.currentX=Qe,p.currentY=Ye,A.imageWrapEl.style.transitionDuration="300ms",A.imageWrapEl.style.transform=`translate3d(${Qe}px, ${Ye}px,0)`,A.imageEl.style.transitionDuration="300ms",A.imageEl.style.transform=`translate3d(0,0,0) scale(${ne.scale})`}function $(){const Z=i.zoom,ne=i.params.zoom;if(!A.slideEl){i.params.virtual&&i.params.virtual.enabled&&i.virtual?A.slideEl=yi(i.slidesEl,`.${i.params.slideActiveClass}`)[0]:A.slideEl=i.slides[i.activeIndex];let G=A.slideEl.querySelector(`.${ne.containerClass}`);G&&(G=G.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),A.imageEl=G,G?A.imageWrapEl=Fl(A.imageEl,`.${ne.containerClass}`)[0]:A.imageWrapEl=void 0}!A.imageEl||!A.imageWrapEl||(A.maxRatio=y(),i.params.cssMode&&(i.wrapperEl.style.overflow="",i.wrapperEl.style.touchAction=""),Z.scale=1,r=1,p.currentX=void 0,p.currentY=void 0,p.touchesStart.x=void 0,p.touchesStart.y=void 0,A.imageWrapEl.style.transitionDuration="300ms",A.imageWrapEl.style.transform="translate3d(0,0,0)",A.imageEl.style.transitionDuration="300ms",A.imageEl.style.transform="translate3d(0,0,0) scale(1)",A.slideEl.classList.remove(`${ne.zoomedSlideClass}`),A.slideEl=void 0,A.originX=0,A.originY=0,i.params.zoom.panOnMouseMove&&(l={x:0,y:0},o&&(o=!1,p.startX=0,p.startY=0)))}function J(Z){const ne=i.zoom;ne.scale&&ne.scale!==1?$():F(Z)}function W(){const Z=i.params.passiveListeners?{passive:!0,capture:!1}:!1,ne=i.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:Z,activeListenerWithCapture:ne}}function he(){const Z=i.zoom;if(Z.enabled)return;Z.enabled=!0;const{passiveListener:ne,activeListenerWithCapture:G}=W();i.wrapperEl.addEventListener("pointerdown",x,ne),i.wrapperEl.addEventListener("pointermove",I,G),["pointerup","pointercancel","pointerout"].forEach(z=>{i.wrapperEl.addEventListener(z,b,ne)}),i.wrapperEl.addEventListener("pointermove",D,G)}function le(){const Z=i.zoom;if(!Z.enabled)return;Z.enabled=!1;const{passiveListener:ne,activeListenerWithCapture:G}=W();i.wrapperEl.removeEventListener("pointerdown",x,ne),i.wrapperEl.removeEventListener("pointermove",I,G),["pointerup","pointercancel","pointerout"].forEach(z=>{i.wrapperEl.removeEventListener(z,b,ne)}),i.wrapperEl.removeEventListener("pointermove",D,G)}t("init",()=>{i.params.zoom.enabled&&he()}),t("destroy",()=>{le()}),t("touchStart",(Z,ne)=>{i.zoom.enabled&&T(ne)}),t("touchEnd",(Z,ne)=>{i.zoom.enabled&&P()}),t("doubleTap",(Z,ne)=>{!i.animating&&i.params.zoom.enabled&&i.zoom.enabled&&i.params.zoom.toggle&&J(ne)}),t("transitionEnd",()=>{i.zoom.enabled&&i.params.zoom.enabled&&R()}),t("slideChange",()=>{i.zoom.enabled&&i.params.zoom.enabled&&i.params.cssMode&&R()}),Object.assign(i.zoom,{enable:he,disable:le,in:F,out:$,toggle:J})}function lq({swiper:i,extendParams:e,on:t}){e({controller:{control:void 0,inverse:!1,by:"slide"}}),i.controller={control:void 0};function n(l,c){const u=(function(){let p,g,m;return(f,y)=>{for(g=-1,p=f.length;p-g>1;)m=p+g>>1,f[m]<=y?g=m:p=m;return p}})();this.x=l,this.y=c,this.lastIndex=l.length-1;let h,d;return this.interpolate=function(p){return p?(d=u(this.x,p),h=d-1,(p-this.x[h])*(this.y[d]-this.y[h])/(this.x[d]-this.x[h])+this.y[h]):0},this}function s(l){i.controller.spline=i.params.loop?new n(i.slidesGrid,l.slidesGrid):new n(i.snapGrid,l.snapGrid)}function r(l,c){const u=i.controller.control;let h,d;const A=i.constructor;function p(g){if(g.destroyed)return;const m=i.rtlTranslate?-i.translate:i.translate;i.params.controller.by==="slide"&&(s(g),d=-i.controller.spline.interpolate(-m)),(!d||i.params.controller.by==="container")&&(h=(g.maxTranslate()-g.minTranslate())/(i.maxTranslate()-i.minTranslate()),(Number.isNaN(h)||!Number.isFinite(h))&&(h=1),d=(m-i.minTranslate())*h+g.minTranslate()),i.params.controller.inverse&&(d=g.maxTranslate()-d),g.updateProgress(d),g.setTranslate(d,i),g.updateActiveIndex(),g.updateSlidesClasses()}if(Array.isArray(u))for(let g=0;g<u.length;g+=1)u[g]!==c&&u[g]instanceof A&&p(u[g]);else u instanceof A&&c!==u&&p(u)}function a(l,c){const u=i.constructor,h=i.controller.control;let d;function A(p){p.destroyed||(p.setTransition(l,i),l!==0&&(p.transitionStart(),p.params.autoHeight&&Kh(()=>{p.updateAutoHeight()}),aA(p.wrapperEl,()=>{h&&p.transitionEnd()})))}if(Array.isArray(h))for(d=0;d<h.length;d+=1)h[d]!==c&&h[d]instanceof u&&A(h[d]);else h instanceof u&&c!==h&&A(h)}function o(){i.controller.control&&i.controller.spline&&(i.controller.spline=void 0,delete i.controller.spline)}t("beforeInit",()=>{if(typeof window<"u"&&(typeof i.params.controller.control=="string"||i.params.controller.control instanceof HTMLElement)){(typeof i.params.controller.control=="string"?[...document.querySelectorAll(i.params.controller.control)]:[i.params.controller.control]).forEach(c=>{if(i.controller.control||(i.controller.control=[]),c&&c.swiper)i.controller.control.push(c.swiper);else if(c){const u=`${i.params.eventsPrefix}init`,h=d=>{i.controller.control.push(d.detail[0]),i.update(),c.removeEventListener(u,h)};c.addEventListener(u,h)}});return}i.controller.control=i.params.controller.control}),t("update",()=>{o()}),t("resize",()=>{o()}),t("observerUpdate",()=>{o()}),t("setTranslate",(l,c,u)=>{!i.controller.control||i.controller.control.destroyed||i.controller.setTranslate(c,u)}),t("setTransition",(l,c,u)=>{!i.controller.control||i.controller.control.destroyed||i.controller.setTransition(c,u)}),Object.assign(i.controller,{setTranslate:r,setTransition:a})}function cq({swiper:i,extendParams:e,on:t}){e({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0,wrapperLiveRegion:!0}}),i.a11y={clicked:!1};let n=null,s,r,a=new Date().getTime();function o(R){const L=n;L.length!==0&&xs(L,R)}function l(R=16){const L=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(R).replace(/x/g,L)}function c(R){R=St(R),R.forEach(L=>{L.setAttribute("tabIndex","0")})}function u(R){R=St(R),R.forEach(L=>{L.setAttribute("tabIndex","-1")})}function h(R,L){R=St(R),R.forEach(F=>{F.setAttribute("role",L)})}function d(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-roledescription",L)})}function A(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-controls",L)})}function p(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-label",L)})}function g(R,L){R=St(R),R.forEach(F=>{F.setAttribute("id",L)})}function m(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-live",L)})}function f(R){R=St(R),R.forEach(L=>{L.setAttribute("aria-disabled",!0)})}function y(R){R=St(R),R.forEach(L=>{L.setAttribute("aria-disabled",!1)})}function _(R){if(R.keyCode!==13&&R.keyCode!==32)return;const L=i.params.a11y,F=R.target;if(!(i.pagination&&i.pagination.el&&(F===i.pagination.el||i.pagination.el.contains(R.target))&&!R.target.matches(Ca(i.params.pagination.bulletClass)))){if(i.navigation&&i.navigation.prevEl&&i.navigation.nextEl){const $=St(i.navigation.prevEl);St(i.navigation.nextEl).includes(F)&&(i.isEnd&&!i.params.loop||i.slideNext(),i.isEnd?o(L.lastSlideMessage):o(L.nextSlideMessage)),$.includes(F)&&(i.isBeginning&&!i.params.loop||i.slidePrev(),i.isBeginning?o(L.firstSlideMessage):o(L.prevSlideMessage))}i.pagination&&F.matches(Ca(i.params.pagination.bulletClass))&&F.click()}}function E(){if(i.params.loop||i.params.rewind||!i.navigation)return;const{nextEl:R,prevEl:L}=i.navigation;L&&(i.isBeginning?(f(L),u(L)):(y(L),c(L))),R&&(i.isEnd?(f(R),u(R)):(y(R),c(R)))}function v(){return i.pagination&&i.pagination.bullets&&i.pagination.bullets.length}function C(){return v()&&i.params.pagination.clickable}function x(){const R=i.params.a11y;v()&&i.pagination.bullets.forEach(L=>{i.params.pagination.clickable&&(c(L),i.params.pagination.renderBullet||(h(L,"button"),p(L,R.paginationBulletMessage.replace(/\{\{index\}\}/,FA(L)+1)))),L.matches(Ca(i.params.pagination.bulletActiveClass))?L.setAttribute("aria-current","true"):L.removeAttribute("aria-current")})}const I=(R,L,F)=>{c(R),R.tagName!=="BUTTON"&&(h(R,"button"),R.addEventListener("keydown",_)),p(R,F),A(R,L)},b=R=>{r&&r!==R.target&&!r.contains(R.target)&&(s=!0),i.a11y.clicked=!0},w=()=>{s=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.destroyed||(i.a11y.clicked=!1)})})},S=R=>{a=new Date().getTime()},B=R=>{if(i.a11y.clicked||!i.params.a11y.scrollOnFocus||new Date().getTime()-a<100)return;const L=R.target.closest(`.${i.params.slideClass}, swiper-slide`);if(!L||!i.slides.includes(L))return;r=L;const F=i.virtual&&i.params.virtual.enabled,$=(F?parseInt(L.getAttribute("data-swiper-slide-index"),10):i.slides.indexOf(L))===i.activeIndex,J=i.params.watchSlidesProgress&&i.visibleSlides&&i.visibleSlides.includes(L);$||J||R.sourceCapabilities&&R.sourceCapabilities.firesTouchEvents||(i.isHorizontal()?i.el.scrollLeft=0:i.el.scrollTop=0,requestAnimationFrame(()=>{s||(i.params.loop?i.slideToLoop(i.getSlideIndexWhenGrid(parseInt(L.getAttribute("data-swiper-slide-index"))),0):F?i.slideTo(i.getSlideIndexWhenGrid(parseInt(L.getAttribute("data-swiper-slide-index"),10)),0):i.slideTo(i.getSlideIndexWhenGrid(i.slides.indexOf(L)),0),s=!1)}))},T=()=>{const R=i.params.a11y;R.itemRoleDescriptionMessage&&d(i.slides,R.itemRoleDescriptionMessage),R.slideRole&&h(i.slides,R.slideRole);const L=i.slides.length;R.slideLabelMessage&&i.slides.forEach((F,$)=>{const J=i.params.loop?parseInt(F.getAttribute("data-swiper-slide-index"),10):$,W=R.slideLabelMessage.replace(/\{\{index\}\}/,J+1).replace(/\{\{slidesLength\}\}/,L);p(F,W)})},D=()=>{const R=i.params.a11y;i.el.append(n);const L=i.el;R.containerRoleDescriptionMessage&&d(L,R.containerRoleDescriptionMessage),R.containerMessage&&p(L,R.containerMessage),R.containerRole&&h(L,R.containerRole);const F=i.wrapperEl,$=R.id||F.getAttribute("id")||`swiper-wrapper-${l(16)}`;if(g(F,$),R.wrapperLiveRegion){const le=i.params.autoplay&&i.params.autoplay.enabled?"off":"polite";m(F,le)}T();let{nextEl:J,prevEl:W}=i.navigation?i.navigation:{};J=St(J),W=St(W),J&&J.forEach(le=>I(le,$,R.nextSlideMessage)),W&&W.forEach(le=>I(le,$,R.prevSlideMessage)),C()&&St(i.pagination.el).forEach(Z=>{Z.addEventListener("keydown",_)}),hi().addEventListener("visibilitychange",S),i.el.addEventListener("focus",B,!0),i.el.addEventListener("pointerdown",b,!0),i.el.addEventListener("pointerup",w,!0)};function P(){n&&n.remove();let{nextEl:R,prevEl:L}=i.navigation?i.navigation:{};R=St(R),L=St(L),R&&R.forEach($=>$.removeEventListener("keydown",_)),L&&L.forEach($=>$.removeEventListener("keydown",_)),C()&&St(i.pagination.el).forEach(J=>{J.removeEventListener("keydown",_)}),hi().removeEventListener("visibilitychange",S),i.el&&typeof i.el!="string"&&(i.el.removeEventListener("focus",B,!0),i.el.removeEventListener("pointerdown",b,!0),i.el.removeEventListener("pointerup",w,!0))}t("beforeInit",()=>{n=ys("span",i.params.a11y.notificationClass),n.setAttribute("aria-live","assertive"),n.setAttribute("aria-atomic","true")}),t("afterInit",()=>{i.params.a11y.enabled&&D()}),t("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{i.params.a11y.enabled&&T()}),t("fromEdge toEdge afterInit lock unlock",()=>{i.params.a11y.enabled&&E()}),t("paginationUpdate",()=>{i.params.a11y.enabled&&x()}),t("destroy",()=>{i.params.a11y.enabled&&P()})}function hq({swiper:i,extendParams:e,on:t}){e({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let n=!1,s={};const r=d=>d.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),a=d=>{const A=wn();let p;d?p=new URL(d):p=A.location;const g=p.pathname.slice(1).split("/").filter(_=>_!==""),m=g.length,f=g[m-2],y=g[m-1];return{key:f,value:y}},o=(d,A)=>{const p=wn();if(!n||!i.params.history.enabled)return;let g;i.params.url?g=new URL(i.params.url):g=p.location;const m=i.virtual&&i.params.virtual.enabled?i.slidesEl.querySelector(`[data-swiper-slide-index="${A}"]`):i.slides[A];let f=r(m.getAttribute("data-history"));if(i.params.history.root.length>0){let _=i.params.history.root;_[_.length-1]==="/"&&(_=_.slice(0,_.length-1)),f=`${_}/${d?`${d}/`:""}${f}`}else g.pathname.includes(d)||(f=`${d?`${d}/`:""}${f}`);i.params.history.keepQuery&&(f+=g.search);const y=p.history.state;y&&y.value===f||(i.params.history.replaceState?p.history.replaceState({value:f},null,f):p.history.pushState({value:f},null,f))},l=(d,A,p)=>{if(A)for(let g=0,m=i.slides.length;g<m;g+=1){const f=i.slides[g];if(r(f.getAttribute("data-history"))===A){const _=i.getSlideIndex(f);i.slideTo(_,d,p)}}else i.slideTo(0,d,p)},c=()=>{s=a(i.params.url),l(i.params.speed,s.value,!1)},u=()=>{const d=wn();if(i.params.history){if(!d.history||!d.history.pushState){i.params.history.enabled=!1,i.params.hashNavigation.enabled=!0;return}if(n=!0,s=a(i.params.url),!s.key&&!s.value){i.params.history.replaceState||d.addEventListener("popstate",c);return}l(0,s.value,i.params.runCallbacksOnInit),i.params.history.replaceState||d.addEventListener("popstate",c)}},h=()=>{const d=wn();i.params.history.replaceState||d.removeEventListener("popstate",c)};t("init",()=>{i.params.history.enabled&&u()}),t("destroy",()=>{i.params.history.enabled&&h()}),t("transitionEnd _freeModeNoMomentumRelease",()=>{n&&o(i.params.history.key,i.activeIndex)}),t("slideChange",()=>{n&&i.params.cssMode&&o(i.params.history.key,i.activeIndex)})}function uq({swiper:i,extendParams:e,emit:t,on:n}){let s=!1;const r=hi(),a=wn();e({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(h,d){if(i.virtual&&i.params.virtual.enabled){const A=i.slides.find(g=>g.getAttribute("data-hash")===d);return A?parseInt(A.getAttribute("data-swiper-slide-index"),10):0}return i.getSlideIndex(yi(i.slidesEl,`.${i.params.slideClass}[data-hash="${d}"], swiper-slide[data-hash="${d}"]`)[0])}}});const o=()=>{t("hashChange");const h=r.location.hash.replace("#",""),d=i.virtual&&i.params.virtual.enabled?i.slidesEl.querySelector(`[data-swiper-slide-index="${i.activeIndex}"]`):i.slides[i.activeIndex],A=d?d.getAttribute("data-hash"):"";if(h!==A){const p=i.params.hashNavigation.getSlideIndex(i,h);if(typeof p>"u"||Number.isNaN(p))return;i.slideTo(p)}},l=()=>{if(!s||!i.params.hashNavigation.enabled)return;const h=i.virtual&&i.params.virtual.enabled?i.slidesEl.querySelector(`[data-swiper-slide-index="${i.activeIndex}"]`):i.slides[i.activeIndex],d=h?h.getAttribute("data-hash")||h.getAttribute("data-history"):"";i.params.hashNavigation.replaceState&&a.history&&a.history.replaceState?(a.history.replaceState(null,null,`#${d}`||""),t("hashSet")):(r.location.hash=d||"",t("hashSet"))},c=()=>{if(!i.params.hashNavigation.enabled||i.params.history&&i.params.history.enabled)return;s=!0;const h=r.location.hash.replace("#","");if(h){const A=i.params.hashNavigation.getSlideIndex(i,h);i.slideTo(A||0,0,i.params.runCallbacksOnInit,!0)}i.params.hashNavigation.watchState&&a.addEventListener("hashchange",o)},u=()=>{i.params.hashNavigation.watchState&&a.removeEventListener("hashchange",o)};n("init",()=>{i.params.hashNavigation.enabled&&c()}),n("destroy",()=>{i.params.hashNavigation.enabled&&u()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{s&&l()}),n("slideChange",()=>{s&&i.params.cssMode&&l()})}function dq({swiper:i,extendParams:e,on:t,emit:n,params:s}){i.autoplay={running:!1,paused:!1,timeLeft:0},e({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let r,a,o=s&&s.autoplay?s.autoplay.delay:3e3,l=s&&s.autoplay?s.autoplay.delay:3e3,c,u=new Date().getTime(),h,d,A,p,g,m;function f(L){!i||i.destroyed||!i.wrapperEl||L.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",f),!(m||L.detail&&L.detail.bySwiperTouchMove)&&b())}const y=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?h=!0:h&&(l=c,h=!1);const L=i.autoplay.paused?c:u+l-new Date().getTime();i.autoplay.timeLeft=L,n("autoplayTimeLeft",L,L/o),a=requestAnimationFrame(()=>{y()})},_=()=>{let L;return i.virtual&&i.params.virtual.enabled?L=i.slides.find($=>$.classList.contains("swiper-slide-active")):L=i.slides[i.activeIndex],L?parseInt(L.getAttribute("data-swiper-autoplay"),10):void 0},E=()=>{let L=i.params.autoplay.delay;const F=_();return!Number.isNaN(F)&&F>0&&(L=F),L},v=L=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(a),y();let F=L;typeof F>"u"&&(F=E(),o=F,l=F),c=F;const $=i.params.speed,J=()=>{!i||i.destroyed||(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev($,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,$,!0,!0),n("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext($,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,$,!0,!0),n("autoplay")),i.params.cssMode&&(u=new Date().getTime(),requestAnimationFrame(()=>{v()})))};return F>0?(clearTimeout(r),r=setTimeout(()=>{J()},F)):requestAnimationFrame(()=>{J()}),F},C=()=>{u=new Date().getTime(),i.autoplay.running=!0,v(),n("autoplayStart")},x=()=>{i.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(a),n("autoplayStop")},I=(L,F)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(r),L||(g=!0);const $=()=>{n("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",f):b()};if(i.autoplay.paused=!0,F){$();return}c=(c||i.params.autoplay.delay)-(new Date().getTime()-u),!(i.isEnd&&c<0&&!i.params.loop)&&(c<0&&(c=0),$())},b=()=>{i.isEnd&&c<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(u=new Date().getTime(),g?(g=!1,v(c)):v(),i.autoplay.paused=!1,n("autoplayResume"))},w=()=>{if(i.destroyed||!i.autoplay.running)return;const L=hi();L.visibilityState==="hidden"&&(g=!0,I(!0)),L.visibilityState==="visible"&&b()},S=L=>{L.pointerType==="mouse"&&(g=!0,m=!0,!(i.animating||i.autoplay.paused)&&I(!0))},B=L=>{L.pointerType==="mouse"&&(m=!1,i.autoplay.paused&&b())},T=()=>{i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",S),i.el.addEventListener("pointerleave",B))},D=()=>{i.el&&typeof i.el!="string"&&(i.el.removeEventListener("pointerenter",S),i.el.removeEventListener("pointerleave",B))},P=()=>{hi().addEventListener("visibilitychange",w)},R=()=>{hi().removeEventListener("visibilitychange",w)};t("init",()=>{i.params.autoplay.enabled&&(T(),P(),C())}),t("destroy",()=>{D(),R(),i.autoplay.running&&x()}),t("_freeModeStaticRelease",()=>{(A||g)&&b()}),t("_freeModeNoMomentumRelease",()=>{i.params.autoplay.disableOnInteraction?x():I(!0,!0)}),t("beforeTransitionStart",(L,F,$)=>{i.destroyed||!i.autoplay.running||($||!i.params.autoplay.disableOnInteraction?I(!0,!0):x())}),t("sliderFirstMove",()=>{if(!(i.destroyed||!i.autoplay.running)){if(i.params.autoplay.disableOnInteraction){x();return}d=!0,A=!1,g=!1,p=setTimeout(()=>{g=!0,A=!0,I(!0)},200)}}),t("touchEnd",()=>{if(!(i.destroyed||!i.autoplay.running||!d)){if(clearTimeout(p),clearTimeout(r),i.params.autoplay.disableOnInteraction){A=!1,d=!1;return}A&&i.params.cssMode&&b(),A=!1,d=!1}}),t("slideChange",()=>{i.destroyed||!i.autoplay.running||i.autoplay.paused&&(c=E(),o=E())}),Object.assign(i.autoplay,{start:C,stop:x,pause:I,resume:b})}function Aq({swiper:i,extendParams:e,on:t}){e({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=!1,s=!1;i.thumbs={swiper:null};function r(){const u=i.thumbs.swiper;return!u||u.destroyed?!1:u.params.virtual&&u.params.virtual.enabled}function a(){const u=i.thumbs.swiper;if(!u||u.destroyed)return;const h=u.clickedIndex,d=u.clickedSlide;if(d&&d.classList.contains(i.params.thumbs.slideThumbActiveClass)||typeof h>"u"||h===null)return;let A;u.params.loop?A=parseInt(u.clickedSlide.getAttribute("data-swiper-slide-index"),10):A=h,i.params.loop?i.slideToLoop(A):i.slideTo(A)}function o(){const{thumbs:u}=i.params;if(n)return!1;n=!0;const h=i.constructor;if(u.swiper instanceof h){if(u.swiper.destroyed)return n=!1,!1;i.thumbs.swiper=u.swiper,Object.assign(i.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(i.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),i.thumbs.swiper.update()}else if(Rd(u.swiper)){const d=Object.assign({},u.swiper);Object.assign(d,{watchSlidesProgress:!0,slideToClickedSlide:!1}),i.thumbs.swiper=new h(d),s=!0}return i.thumbs.swiper.el.classList.add(i.params.thumbs.thumbsContainerClass),i.thumbs.swiper.on("tap",a),r()&&i.thumbs.swiper.on("virtualUpdate",()=>{l(!1,{autoScroll:!1})}),!0}function l(u,h){const d=i.thumbs.swiper;if(!d||d.destroyed)return;let A=1;const p=i.params.thumbs.slideThumbActiveClass;if(i.params.slidesPerView>1&&!i.params.centeredSlides&&(A=i.params.slidesPerView),i.params.thumbs.multipleActiveThumbs||(A=1),A=Math.floor(A),d.slides.forEach(g=>g.classList.remove(p)),d.params.loop||r())for(let g=0;g<A;g+=1)yi(d.slidesEl,`[data-swiper-slide-index="${i.realIndex+g}"]`).forEach(m=>{m.classList.add(p)});else for(let g=0;g<A;g+=1)d.slides[i.realIndex+g]&&d.slides[i.realIndex+g].classList.add(p);(h?.autoScroll??!0)&&c(u?0:void 0)}function c(u){const h=i.thumbs.swiper;if(!h||h.destroyed)return;const d=h.params.slidesPerView==="auto"?h.slidesPerViewDynamic():h.params.slidesPerView,A=i.params.thumbs.autoScrollOffset,p=A&&!h.params.loop;if(i.realIndex!==h.realIndex||p){const g=h.activeIndex;let m,f;if(h.params.loop){const y=h.slides.find(_=>_.getAttribute("data-swiper-slide-index")===`${i.realIndex}`);m=h.slides.indexOf(y),f=i.activeIndex>i.previousIndex?"next":"prev"}else m=i.realIndex,f=m>i.previousIndex?"next":"prev";p&&(m+=f==="next"?A:-1*A),h.visibleSlidesIndexes&&h.visibleSlidesIndexes.indexOf(m)<0&&(h.params.centeredSlides?m>g?m=m-Math.floor(d/2)+1:m=m+Math.floor(d/2)-1:m>g&&h.params.slidesPerGroup,h.slideTo(m,u))}}t("beforeInit",()=>{const{thumbs:u}=i.params;if(!(!u||!u.swiper))if(typeof u.swiper=="string"||u.swiper instanceof HTMLElement){const h=hi(),d=()=>{const p=typeof u.swiper=="string"?h.querySelector(u.swiper):u.swiper;if(p&&p.swiper)u.swiper=p.swiper,o(),l(!0);else if(p){const g=`${i.params.eventsPrefix}init`,m=f=>{u.swiper=f.detail[0],p.removeEventListener(g,m),o(),l(!0),u.swiper.update(),i.update()};p.addEventListener(g,m)}return p},A=()=>{if(i.destroyed)return;d()||requestAnimationFrame(A)};requestAnimationFrame(A)}else o(),l(!0)}),t("slideChange update resize observerUpdate",()=>{l()}),t("setTransition",(u,h)=>{const d=i.thumbs.swiper;!d||d.destroyed||d.setTransition(h)}),t("beforeDestroy",()=>{const u=i.thumbs.swiper;!u||u.destroyed||s&&u.destroy()}),Object.assign(i.thumbs,{init:o,update:l})}function pq({swiper:i,extendParams:e,emit:t,once:n}){e({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function s(){if(i.params.cssMode)return;const o=i.getTranslate();i.setTranslate(o),i.setTransition(0),i.touchEventsData.velocities.length=0,i.freeMode.onTouchEnd({currentPos:i.rtl?i.translate:-i.translate})}function r(){if(i.params.cssMode)return;const{touchEventsData:o,touches:l}=i;o.velocities.length===0&&o.velocities.push({position:l[i.isHorizontal()?"startX":"startY"],time:o.touchStartTime}),o.velocities.push({position:l[i.isHorizontal()?"currentX":"currentY"],time:Fs()})}function a({currentPos:o}){if(i.params.cssMode)return;const{params:l,wrapperEl:c,rtlTranslate:u,snapGrid:h,touchEventsData:d}=i,p=Fs()-d.touchStartTime;if(o<-i.minTranslate()){i.slideTo(i.activeIndex);return}if(o>-i.maxTranslate()){i.slides.length<h.length?i.slideTo(h.length-1):i.slideTo(i.slides.length-1);return}if(l.freeMode.momentum){if(d.velocities.length>1){const C=d.velocities.pop(),x=d.velocities.pop(),I=C.position-x.position,b=C.time-x.time;i.velocity=I/b,i.velocity/=2,Math.abs(i.velocity)<l.freeMode.minimumVelocity&&(i.velocity=0),(b>150||Fs()-C.time>300)&&(i.velocity=0)}else i.velocity=0;i.velocity*=l.freeMode.momentumVelocityRatio,d.velocities.length=0;let g=1e3*l.freeMode.momentumRatio;const m=i.velocity*g;let f=i.translate+m;u&&(f=-f);let y=!1,_;const E=Math.abs(i.velocity)*20*l.freeMode.momentumBounceRatio;let v;if(f<i.maxTranslate())l.freeMode.momentumBounce?(f+i.maxTranslate()<-E&&(f=i.maxTranslate()-E),_=i.maxTranslate(),y=!0,d.allowMomentumBounce=!0):f=i.maxTranslate(),l.loop&&l.centeredSlides&&(v=!0);else if(f>i.minTranslate())l.freeMode.momentumBounce?(f-i.minTranslate()>E&&(f=i.minTranslate()+E),_=i.minTranslate(),y=!0,d.allowMomentumBounce=!0):f=i.minTranslate(),l.loop&&l.centeredSlides&&(v=!0);else if(l.freeMode.sticky){let C;for(let x=0;x<h.length;x+=1)if(h[x]>-f){C=x;break}Math.abs(h[C]-f)<Math.abs(h[C-1]-f)||i.swipeDirection==="next"?f=h[C]:f=h[C-1],f=-f}if(v&&n("transitionEnd",()=>{i.loopFix()}),i.velocity!==0){if(u?g=Math.abs((-f-i.translate)/i.velocity):g=Math.abs((f-i.translate)/i.velocity),l.freeMode.sticky){const C=Math.abs((u?-f:f)-i.translate),x=i.slidesSizesGrid[i.activeIndex];C<x?g=l.speed:C<2*x?g=l.speed*1.5:g=l.speed*2.5}}else if(l.freeMode.sticky){i.slideToClosest();return}l.freeMode.momentumBounce&&y?(i.updateProgress(_),i.setTransition(g),i.setTranslate(f),i.transitionStart(!0,i.swipeDirection),i.animating=!0,aA(c,()=>{!i||i.destroyed||!d.allowMomentumBounce||(t("momentumBounce"),i.setTransition(l.speed),setTimeout(()=>{i.setTranslate(_),aA(c,()=>{!i||i.destroyed||i.transitionEnd()})},0))})):i.velocity?(t("_freeModeNoMomentumRelease"),i.updateProgress(f),i.setTransition(g),i.setTranslate(f),i.transitionStart(!0,i.swipeDirection),i.animating||(i.animating=!0,aA(c,()=>{!i||i.destroyed||i.transitionEnd()}))):i.updateProgress(f),i.updateActiveIndex(),i.updateSlidesClasses()}else if(l.freeMode.sticky){i.slideToClosest();return}else l.freeMode&&t("_freeModeNoMomentumRelease");(!l.freeMode.momentum||p>=l.longSwipesMs)&&(t("_freeModeStaticRelease"),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses())}Object.assign(i,{freeMode:{onTouchStart:s,onTouchMove:r,onTouchEnd:a}})}function fq({swiper:i,extendParams:e,on:t}){e({grid:{rows:1,fill:"column"}});let n,s,r,a;const o=()=>{let p=i.params.spaceBetween;return typeof p=="string"&&p.indexOf("%")>=0?p=parseFloat(p.replace("%",""))/100*i.size:typeof p=="string"&&(p=parseFloat(p)),p},l=p=>{const{slidesPerView:g}=i.params,{rows:m,fill:f}=i.params.grid,y=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:p.length;r=Math.floor(y/m),Math.floor(y/m)===y/m?n=y:n=Math.ceil(y/m)*m,g!=="auto"&&f==="row"&&(n=Math.max(n,Math.floor(g)*m)),s=n/m},c=()=>{i.slides&&i.slides.forEach(p=>{p.swiperSlideGridSet&&(p.style.height="",p.style[i.getDirectionLabel("margin-top")]="")})},u=(p,g,m)=>{const{slidesPerGroup:f}=i.params,y=o(),{rows:_,fill:E}=i.params.grid,v=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:m.length;let C,x,I;if(E==="row"&&f>1){const b=Math.floor(p/(f*_)),w=p-_*f*b,S=b===0?f:Math.min(Math.ceil((v-b*_*f)/_),f);I=Math.floor(w/S),x=w-I*S+b*f,C=x+I*n/_,g.style.order=C}else E==="column"?(x=Math.floor(p/_),I=p-x*_,(x>r||x===r&&I===_-1)&&(I+=1,I>=_&&(I=0,x+=1))):(I=Math.floor(p/s),x=p-I*s);g.row=I,g.column=x,g.style.height=`calc((100% - ${(_-1)*y}px) / ${_})`,g.style[i.getDirectionLabel("margin-top")]=I!==0?y&&`${y}px`:"",g.swiperSlideGridSet=!0},h=(p,g)=>{const{centeredSlides:m,roundLengths:f}=i.params,y=o(),{rows:_}=i.params.grid;if(i.virtualSize=(p+y)*n,i.virtualSize=Math.ceil(i.virtualSize/_)-y,i.params.cssMode||(i.wrapperEl.style[i.getDirectionLabel("width")]=`${i.virtualSize+y}px`),m){const E=[];for(let v=0;v<g.length;v+=1){let C=g[v];f&&(C=Math.floor(C)),g[v]<i.virtualSize+g[0]&&E.push(C)}g.splice(0,g.length),g.push(...E)}},d=()=>{a=i.params.grid&&i.params.grid.rows>1},A=()=>{const{params:p,el:g}=i,m=p.grid&&p.grid.rows>1;a&&!m?(g.classList.remove(`${p.containerModifierClass}grid`,`${p.containerModifierClass}grid-column`),r=1,i.emitContainerClasses()):!a&&m&&(g.classList.add(`${p.containerModifierClass}grid`),p.grid.fill==="column"&&g.classList.add(`${p.containerModifierClass}grid-column`),i.emitContainerClasses()),a=m};t("init",d),t("update",A),i.grid={initSlides:l,unsetSlides:c,updateSlide:u,updateWrapperSize:h}}function gq(i){const e=this,{params:t,slidesEl:n}=e;t.loop&&e.loopDestroy();const s=r=>{if(typeof r=="string"){const a=document.createElement("div");xs(a,r),n.append(a.children[0]),xs(a,"")}else n.append(r)};if(typeof i=="object"&&"length"in i)for(let r=0;r<i.length;r+=1)i[r]&&s(i[r]);else s(i);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function mq(i){const e=this,{params:t,activeIndex:n,slidesEl:s}=e;t.loop&&e.loopDestroy();let r=n+1;const a=o=>{if(typeof o=="string"){const l=document.createElement("div");xs(l,o),s.prepend(l.children[0]),xs(l,"")}else s.prepend(o)};if(typeof i=="object"&&"length"in i){for(let o=0;o<i.length;o+=1)i[o]&&a(i[o]);r=n+i.length}else a(i);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(r,0,!1)}function yq(i,e){const t=this,{params:n,activeIndex:s,slidesEl:r}=t;let a=s;n.loop&&(a-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const o=t.slides.length;if(i<=0){t.prependSlide(e);return}if(i>=o){t.appendSlide(e);return}let l=a>i?a+1:a;const c=[];for(let u=o-1;u>=i;u-=1){const h=t.slides[u];h.remove(),c.unshift(h)}if(typeof e=="object"&&"length"in e){for(let u=0;u<e.length;u+=1)e[u]&&r.append(e[u]);l=a>i?a+e.length:a}else r.append(e);for(let u=0;u<c.length;u+=1)r.append(c[u]);t.recalcSlides(),n.loop&&t.loopCreate(),(!n.observer||t.isElement)&&t.update(),n.loop?t.slideTo(l+t.loopedSlides,0,!1):t.slideTo(l,0,!1)}function _q(i){const e=this,{params:t,activeIndex:n}=e;let s=n;t.loop&&(s-=e.loopedSlides,e.loopDestroy());let r=s,a;if(typeof i=="object"&&"length"in i){for(let o=0;o<i.length;o+=1)a=i[o],e.slides[a]&&e.slides[a].remove(),a<r&&(r-=1);r=Math.max(r,0)}else a=i,e.slides[a]&&e.slides[a].remove(),a<r&&(r-=1),r=Math.max(r,0);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),t.loop?e.slideTo(r+e.loopedSlides,0,!1):e.slideTo(r,0,!1)}function Eq(){const i=this,e=[];for(let t=0;t<i.slides.length;t+=1)e.push(t);i.removeSlide(e)}function vq({swiper:i}){Object.assign(i,{appendSlide:gq.bind(i),prependSlide:mq.bind(i),addSlide:yq.bind(i),removeSlide:_q.bind(i),removeAllSlides:Eq.bind(i)})}function gu(i){const{effect:e,swiper:t,on:n,setTranslate:s,setTransition:r,overwriteParams:a,perspective:o,recreateShadows:l,getEffectParams:c}=i;n("beforeInit",()=>{if(t.params.effect!==e)return;t.classNames.push(`${t.params.containerModifierClass}${e}`),o&&o()&&t.classNames.push(`${t.params.containerModifierClass}3d`);const h=a?a():{};Object.assign(t.params,h),Object.assign(t.originalParams,h)}),n("setTranslate _virtualUpdated",()=>{t.params.effect===e&&s()}),n("setTransition",(h,d)=>{t.params.effect===e&&r(d)}),n("transitionEnd",()=>{if(t.params.effect===e&&l){if(!c||!c().slideShadows)return;t.slides.forEach(h=>{h.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>d.remove())}),l()}});let u;n("virtualUpdate",()=>{t.params.effect===e&&(t.slides.length||(u=!0),requestAnimationFrame(()=>{u&&t.slides&&t.slides.length&&(s(),u=!1)}))})}function JA(i,e){const t=tc(e);return t!==e&&(t.style.backfaceVisibility="hidden",t.style["-webkit-backface-visibility"]="hidden"),t}function Tm({swiper:i,duration:e,transformElements:t,allSlides:n}){const{activeIndex:s}=i,r=a=>a.parentElement?a.parentElement:i.slides.find(l=>l.shadowRoot&&l.shadowRoot===a.parentNode);if(i.params.virtualTranslate&&e!==0){let a=!1,o;n?o=t:o=t.filter(l=>{const c=l.classList.contains("swiper-slide-transform")?r(l):l;return i.getSlideIndex(c)===s}),o.forEach(l=>{aA(l,()=>{if(a||!i||i.destroyed)return;a=!0,i.animating=!1;const c=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i.wrapperEl.dispatchEvent(c)})})}}function bq({swiper:i,extendParams:e,on:t}){e({fadeEffect:{crossFade:!1}}),gu({effect:"fade",swiper:i,on:t,setTranslate:()=>{const{slides:r}=i,a=i.params.fadeEffect;for(let o=0;o<r.length;o+=1){const l=i.slides[o];let u=-l.swiperSlideOffset;i.params.virtualTranslate||(u-=i.translate);let h=0;i.isHorizontal()||(h=u,u=0);const d=i.params.fadeEffect.crossFade?Math.max(1-Math.abs(l.progress),0):1+Math.min(Math.max(l.progress,-1),0),A=JA(a,l);A.style.opacity=d,A.style.transform=`translate3d(${u}px, ${h}px, 0px)`}},setTransition:r=>{const a=i.slides.map(o=>tc(o));a.forEach(o=>{o.style.transitionDuration=`${r}ms`}),Tm({swiper:i,duration:r,transformElements:a,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!i.params.cssMode})})}function xq({swiper:i,extendParams:e,on:t}){e({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const n=(o,l,c)=>{let u=c?o.querySelector(".swiper-slide-shadow-left"):o.querySelector(".swiper-slide-shadow-top"),h=c?o.querySelector(".swiper-slide-shadow-right"):o.querySelector(".swiper-slide-shadow-bottom");u||(u=ys("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"left":"top"}`.split(" ")),o.append(u)),h||(h=ys("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"right":"bottom"}`.split(" ")),o.append(h)),u&&(u.style.opacity=Math.max(-l,0)),h&&(h.style.opacity=Math.max(l,0))};gu({effect:"cube",swiper:i,on:t,setTranslate:()=>{const{el:o,wrapperEl:l,slides:c,width:u,height:h,rtlTranslate:d,size:A,browser:p}=i,g=Bm(i),m=i.params.cubeEffect,f=i.isHorizontal(),y=i.virtual&&i.params.virtual.enabled;let _=0,E;m.shadow&&(f?(E=i.wrapperEl.querySelector(".swiper-cube-shadow"),E||(E=ys("div","swiper-cube-shadow"),i.wrapperEl.append(E)),E.style.height=`${u}px`):(E=o.querySelector(".swiper-cube-shadow"),E||(E=ys("div","swiper-cube-shadow"),o.append(E))));for(let C=0;C<c.length;C+=1){const x=c[C];let I=C;y&&(I=parseInt(x.getAttribute("data-swiper-slide-index"),10));let b=I*90,w=Math.floor(b/360);d&&(b=-b,w=Math.floor(-b/360));const S=Math.max(Math.min(x.progress,1),-1);let B=0,T=0,D=0;I%4===0?(B=-w*4*A,D=0):(I-1)%4===0?(B=0,D=-w*4*A):(I-2)%4===0?(B=A+w*4*A,D=A):(I-3)%4===0&&(B=-A,D=3*A+A*4*w),d&&(B=-B),f||(T=B,B=0);const P=`rotateX(${g(f?0:-b)}deg) rotateY(${g(f?b:0)}deg) translate3d(${B}px, ${T}px, ${D}px)`;S<=1&&S>-1&&(_=I*90+S*90,d&&(_=-I*90-S*90)),x.style.transform=P,m.slideShadows&&n(x,S,f)}if(l.style.transformOrigin=`50% 50% -${A/2}px`,l.style["-webkit-transform-origin"]=`50% 50% -${A/2}px`,m.shadow)if(f)E.style.transform=`translate3d(0px, ${u/2+m.shadowOffset}px, ${-u/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${m.shadowScale})`;else{const C=Math.abs(_)-Math.floor(Math.abs(_)/90)*90,x=1.5-(Math.sin(C*2*Math.PI/360)/2+Math.cos(C*2*Math.PI/360)/2),I=m.shadowScale,b=m.shadowScale/x,w=m.shadowOffset;E.style.transform=`scale3d(${I}, 1, ${b}) translate3d(0px, ${h/2+w}px, ${-h/2/b}px) rotateX(-89.99deg)`}const v=(p.isSafari||p.isWebView)&&p.needPerspectiveFix?-A/2:0;l.style.transform=`translate3d(0px,0,${v}px) rotateX(${g(i.isHorizontal()?0:_)}deg) rotateY(${g(i.isHorizontal()?-_:0)}deg)`,l.style.setProperty("--swiper-cube-translate-z",`${v}px`)},setTransition:o=>{const{el:l,slides:c}=i;if(c.forEach(u=>{u.style.transitionDuration=`${o}ms`,u.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(h=>{h.style.transitionDuration=`${o}ms`})}),i.params.cubeEffect.shadow&&!i.isHorizontal()){const u=l.querySelector(".swiper-cube-shadow");u&&(u.style.transitionDuration=`${o}ms`)}},recreateShadows:()=>{const o=i.isHorizontal();i.slides.forEach(l=>{const c=Math.max(Math.min(l.progress,1),-1);n(l,c,o)})},getEffectParams:()=>i.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Zh(i,e,t){const n=`swiper-slide-shadow${t?`-${t}`:""}${i?` swiper-slide-shadow-${i}`:""}`,s=tc(e);let r=s.querySelector(`.${n.split(" ").join(".")}`);return r||(r=ys("div",n.split(" ")),s.append(r)),r}function Cq({swiper:i,extendParams:e,on:t}){e({flipEffect:{slideShadows:!0,limitRotation:!0}});const n=(o,l)=>{let c=i.isHorizontal()?o.querySelector(".swiper-slide-shadow-left"):o.querySelector(".swiper-slide-shadow-top"),u=i.isHorizontal()?o.querySelector(".swiper-slide-shadow-right"):o.querySelector(".swiper-slide-shadow-bottom");c||(c=Zh("flip",o,i.isHorizontal()?"left":"top")),u||(u=Zh("flip",o,i.isHorizontal()?"right":"bottom")),c&&(c.style.opacity=Math.max(-l,0)),u&&(u.style.opacity=Math.max(l,0))};gu({effect:"flip",swiper:i,on:t,setTranslate:()=>{const{slides:o,rtlTranslate:l}=i,c=i.params.flipEffect,u=Bm(i);for(let h=0;h<o.length;h+=1){const d=o[h];let A=d.progress;i.params.flipEffect.limitRotation&&(A=Math.max(Math.min(d.progress,1),-1));const p=d.swiperSlideOffset;let m=-180*A,f=0,y=i.params.cssMode?-p-i.translate:-p,_=0;i.isHorizontal()?l&&(m=-m):(_=y,y=0,f=-m,m=0),d.style.zIndex=-Math.abs(Math.round(A))+o.length,c.slideShadows&&n(d,A);const E=`translate3d(${y}px, ${_}px, 0px) rotateX(${u(f)}deg) rotateY(${u(m)}deg)`,v=JA(c,d);v.style.transform=E}},setTransition:o=>{const l=i.slides.map(c=>tc(c));l.forEach(c=>{c.style.transitionDuration=`${o}ms`,c.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(u=>{u.style.transitionDuration=`${o}ms`})}),Tm({swiper:i,duration:o,transformElements:l})},recreateShadows:()=>{i.params.flipEffect,i.slides.forEach(o=>{let l=o.progress;i.params.flipEffect.limitRotation&&(l=Math.max(Math.min(o.progress,1),-1)),n(o,l)})},getEffectParams:()=>i.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!i.params.cssMode})})}function Iq({swiper:i,extendParams:e,on:t}){e({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),gu({effect:"coverflow",swiper:i,on:t,setTranslate:()=>{const{width:r,height:a,slides:o,slidesSizesGrid:l}=i,c=i.params.coverflowEffect,u=i.isHorizontal(),h=i.translate,d=u?-h+r/2:-h+a/2,A=u?c.rotate:-c.rotate,p=c.depth,g=Bm(i);for(let m=0,f=o.length;m<f;m+=1){const y=o[m],_=l[m],E=y.swiperSlideOffset,v=(d-E-_/2)/_,C=typeof c.modifier=="function"?c.modifier(v):v*c.modifier;let x=u?A*C:0,I=u?0:A*C,b=-p*Math.abs(C),w=c.stretch;typeof w=="string"&&w.indexOf("%")!==-1&&(w=parseFloat(c.stretch)/100*_);let S=u?0:w*C,B=u?w*C:0,T=1-(1-c.scale)*Math.abs(C);Math.abs(B)<.001&&(B=0),Math.abs(S)<.001&&(S=0),Math.abs(b)<.001&&(b=0),Math.abs(x)<.001&&(x=0),Math.abs(I)<.001&&(I=0),Math.abs(T)<.001&&(T=0);const D=`translate3d(${B}px,${S}px,${b}px) rotateX(${g(I)}deg) rotateY(${g(x)}deg) scale(${T})`,P=JA(c,y);if(P.style.transform=D,y.style.zIndex=-Math.abs(Math.round(C))+1,c.slideShadows){let R=u?y.querySelector(".swiper-slide-shadow-left"):y.querySelector(".swiper-slide-shadow-top"),L=u?y.querySelector(".swiper-slide-shadow-right"):y.querySelector(".swiper-slide-shadow-bottom");R||(R=Zh("coverflow",y,u?"left":"top")),L||(L=Zh("coverflow",y,u?"right":"bottom")),R&&(R.style.opacity=C>0?C:0),L&&(L.style.opacity=-C>0?-C:0)}}},setTransition:r=>{i.slides.map(o=>tc(o)).forEach(o=>{o.style.transitionDuration=`${r}ms`,o.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(l=>{l.style.transitionDuration=`${r}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function wq({swiper:i,extendParams:e,on:t}){e({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const n=a=>typeof a=="string"?a:`${a}px`;gu({effect:"creative",swiper:i,on:t,setTranslate:()=>{const{slides:a,wrapperEl:o,slidesSizesGrid:l}=i,c=i.params.creativeEffect,{progressMultiplier:u}=c,h=i.params.centeredSlides,d=Bm(i);if(h){const A=l[0]/2-i.params.slidesOffsetBefore||0;o.style.transform=`translateX(calc(50% - ${A}px))`}for(let A=0;A<a.length;A+=1){const p=a[A],g=p.progress,m=Math.min(Math.max(p.progress,-c.limitProgress),c.limitProgress);let f=m;h||(f=Math.min(Math.max(p.originalProgress,-c.limitProgress),c.limitProgress));const y=p.swiperSlideOffset,_=[i.params.cssMode?-y-i.translate:-y,0,0],E=[0,0,0];let v=!1;i.isHorizontal()||(_[1]=_[0],_[0]=0);let C={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};m<0?(C=c.next,v=!0):m>0&&(C=c.prev,v=!0),_.forEach((T,D)=>{_[D]=`calc(${T}px + (${n(C.translate[D])} * ${Math.abs(m*u)}))`}),E.forEach((T,D)=>{let P=C.rotate[D]*Math.abs(m*u);E[D]=P}),p.style.zIndex=-Math.abs(Math.round(g))+a.length;const x=_.join(", "),I=`rotateX(${d(E[0])}deg) rotateY(${d(E[1])}deg) rotateZ(${d(E[2])}deg)`,b=f<0?`scale(${1+(1-C.scale)*f*u})`:`scale(${1-(1-C.scale)*f*u})`,w=f<0?1+(1-C.opacity)*f*u:1-(1-C.opacity)*f*u,S=`translate3d(${x}) ${I} ${b}`;if(v&&C.shadow||!v){let T=p.querySelector(".swiper-slide-shadow");if(!T&&C.shadow&&(T=Zh("creative",p)),T){const D=c.shadowPerProgress?m*(1/c.limitProgress):m;T.style.opacity=Math.min(Math.max(Math.abs(D),0),1)}}const B=JA(c,p);B.style.transform=S,B.style.opacity=w,C.origin&&(B.style.transformOrigin=C.origin)}},setTransition:a=>{const o=i.slides.map(l=>tc(l));o.forEach(l=>{l.style.transitionDuration=`${a}ms`,l.querySelectorAll(".swiper-slide-shadow").forEach(c=>{c.style.transitionDuration=`${a}ms`})}),Tm({swiper:i,duration:a,transformElements:o,allSlides:!0})},perspective:()=>i.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!i.params.cssMode})})}function Sq({swiper:i,extendParams:e,on:t}){e({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),gu({effect:"cards",swiper:i,on:t,setTranslate:()=>{const{slides:r,activeIndex:a,rtlTranslate:o}=i,l=i.params.cardsEffect,{startTranslate:c,isTouched:u}=i.touchEventsData,h=o?-i.translate:i.translate;for(let d=0;d<r.length;d+=1){const A=r[d],p=A.progress,g=Math.min(Math.max(p,-4),4);let m=A.swiperSlideOffset;i.params.centeredSlides&&!i.params.cssMode&&(i.wrapperEl.style.transform=`translateX(${i.minTranslate()}px)`),i.params.centeredSlides&&i.params.cssMode&&(m-=r[0].swiperSlideOffset);let f=i.params.cssMode?-m-i.translate:-m,y=0;const _=-100*Math.abs(g);let E=1,v=-l.perSlideRotate*g,C=l.perSlideOffset-Math.abs(g)*.75;const x=i.virtual&&i.params.virtual.enabled?i.virtual.from+d:d,I=(x===a||x===a-1)&&g>0&&g<1&&(u||i.params.cssMode)&&h<c,b=(x===a||x===a+1)&&g<0&&g>-1&&(u||i.params.cssMode)&&h>c;if(I||b){const T=(1-Math.abs((Math.abs(g)-.5)/.5))**.5;v+=-28*g*T,E+=-.5*T,C+=96*T,y=`${(l.rotate||i.isHorizontal()?-25:0)*T*Math.abs(g)}%`}if(g<0?f=`calc(${f}px ${o?"-":"+"} (${C*Math.abs(g)}%))`:g>0?f=`calc(${f}px ${o?"-":"+"} (-${C*Math.abs(g)}%))`:f=`${f}px`,!i.isHorizontal()){const T=y;y=f,f=T}const w=g<0?`${1+(1-E)*g}`:`${1-(1-E)*g}`,S=`
|
|
14310
|
+
`:_e}}ec([H({attribute:Pl.mediaAlt.name})],No.prototype,"mediaAlt");ec([H({attribute:Pl.mediaSrc.name})],No.prototype,"mediaSrc");ec([H({attribute:Pl.mediaType.name})],No.prototype,"mediaType");ec([H({type:Boolean,attribute:Pl.mediaAutoplay.name})],No.prototype,"mediaAutoplay");ec([H({attribute:!1})],No.prototype,"onClick");ec([Gn()],No.prototype,"__isPlaying");ec([Gn()],No.prototype,"__isLoading");window.customElements.get(Vw)||window.customElements.define(Vw,No);function Ww(i){return i!==null&&typeof i=="object"&&"constructor"in i&&i.constructor===Object}function Kb(i={},e={}){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof i[n]>"u"?i[n]=e[n]:Ww(e[n])&&Ww(i[n])&&Object.keys(e[n]).length>0&&Kb(i[n],e[n])})}const mD={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function hi(){const i=typeof document<"u"?document:{};return Kb(i,mD),i}const FY={document:mD,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(i){return typeof setTimeout>"u"?(i(),null):setTimeout(i,0)},cancelAnimationFrame(i){typeof setTimeout>"u"||clearTimeout(i)}};function wn(){const i=typeof window<"u"?window:{};return Kb(i,FY),i}function so(i=""){return i.trim().split(" ").filter(e=>!!e.trim())}function kY(i){const e=i;Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function Kh(i,e=0){return setTimeout(i,e)}function Fs(){return Date.now()}function UY(i){const e=wn();let t;return e.getComputedStyle&&(t=e.getComputedStyle(i,null)),!t&&i.currentStyle&&(t=i.currentStyle),t||(t=i.style),t}function Av(i,e="x"){const t=wn();let n,s,r;const a=UY(i);return t.WebKitCSSMatrix?(s=a.transform||a.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(o=>o.replace(",",".")).join(", ")),r=new t.WebKitCSSMatrix(s==="none"?"":s)):(r=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=r.toString().split(",")),e==="x"&&(t.WebKitCSSMatrix?s=r.m41:n.length===16?s=parseFloat(n[12]):s=parseFloat(n[4])),e==="y"&&(t.WebKitCSSMatrix?s=r.m42:n.length===16?s=parseFloat(n[13]):s=parseFloat(n[5])),s||0}function Rd(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function OY(i){return typeof window<"u"&&typeof window.HTMLElement<"u"?i instanceof HTMLElement:i&&(i.nodeType===1||i.nodeType===11)}function ds(...i){const e=Object(i[0]);for(let t=1;t<i.length;t+=1){const n=i[t];if(n!=null&&!OY(n)){const s=Object.keys(Object(n)).filter(r=>r!=="__proto__"&&r!=="constructor"&&r!=="prototype");for(let r=0,a=s.length;r<a;r+=1){const o=s[r],l=Object.getOwnPropertyDescriptor(n,o);l!==void 0&&l.enumerable&&(Rd(e[o])&&Rd(n[o])?n[o].__swiper__?e[o]=n[o]:ds(e[o],n[o]):!Rd(e[o])&&Rd(n[o])?(e[o]={},n[o].__swiper__?e[o]=n[o]:ds(e[o],n[o])):e[o]=n[o])}}}return e}function al(i,e,t){i.style.setProperty(e,t)}function yD({swiper:i,targetPosition:e,side:t}){const n=wn(),s=-i.translate;let r=null,a;const o=i.params.speed;i.wrapperEl.style.scrollSnapType="none",n.cancelAnimationFrame(i.cssModeFrameID);const l=e>s?"next":"prev",c=(h,d)=>l==="next"&&h>=d||l==="prev"&&h<=d,u=()=>{a=new Date().getTime(),r===null&&(r=a);const h=Math.max(Math.min((a-r)/o,1),0),d=.5-Math.cos(h*Math.PI)/2;let A=s+d*(e-s);if(c(A,e)&&(A=e),i.wrapperEl.scrollTo({[t]:A}),c(A,e)){i.wrapperEl.style.overflow="hidden",i.wrapperEl.style.scrollSnapType="",setTimeout(()=>{i.wrapperEl.style.overflow="",i.wrapperEl.scrollTo({[t]:A})}),n.cancelAnimationFrame(i.cssModeFrameID);return}i.cssModeFrameID=n.requestAnimationFrame(u)};u()}function tc(i){return i.querySelector(".swiper-slide-transform")||i.shadowRoot&&i.shadowRoot.querySelector(".swiper-slide-transform")||i}function yi(i,e=""){const t=wn(),n=[...i.children];return t.HTMLSlotElement&&i instanceof HTMLSlotElement&&n.push(...i.assignedElements()),e?n.filter(s=>s.matches(e)):n}function GY(i,e){const t=[e];for(;t.length>0;){const n=t.shift();if(i===n)return!0;t.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}function zY(i,e){const t=wn();let n=e.contains(i);return!n&&t.HTMLSlotElement&&e instanceof HTMLSlotElement&&(n=[...e.assignedElements()].includes(i),n||(n=GY(i,e))),n}function Vg(i){try{console.warn(i);return}catch{}}function ys(i,e=[]){const t=document.createElement(i);return t.classList.add(...Array.isArray(e)?e:so(e)),t}function Yg(i){const e=wn(),t=hi(),n=i.getBoundingClientRect(),s=t.body,r=i.clientTop||s.clientTop||0,a=i.clientLeft||s.clientLeft||0,o=i===e?e.scrollY:i.scrollTop,l=i===e?e.scrollX:i.scrollLeft;return{top:n.top+o-r,left:n.left+l-a}}function HY(i,e){const t=[];for(;i.previousElementSibling;){const n=i.previousElementSibling;e?n.matches(e)&&t.push(n):t.push(n),i=n}return t}function $Y(i,e){const t=[];for(;i.nextElementSibling;){const n=i.nextElementSibling;e?n.matches(e)&&t.push(n):t.push(n),i=n}return t}function _o(i,e){return wn().getComputedStyle(i,null).getPropertyValue(e)}function FA(i){let e=i,t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function Fl(i,e){const t=[];let n=i.parentElement;for(;n;)e?n.matches(e)&&t.push(n):t.push(n),n=n.parentElement;return t}function aA(i,e){function t(n){n.target===i&&(e.call(i,n),i.removeEventListener("transitionend",t))}e&&i.addEventListener("transitionend",t)}function pv(i,e,t){const n=wn();return i[e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(i,null).getPropertyValue(e==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(i,null).getPropertyValue(e==="width"?"margin-left":"margin-bottom"))}function St(i){return(Array.isArray(i)?i:[i]).filter(e=>!!e)}function Bm(i){return e=>Math.abs(e)>0&&i.browser&&i.browser.need3dFix&&Math.abs(e)%90===0?e+.001:e}function xs(i,e=""){typeof trustedTypes<"u"?i.innerHTML=trustedTypes.createPolicy("html",{createHTML:t=>t}).createHTML(e):i.innerHTML=e}let C0;function VY(){const i=wn(),e=hi();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in i||i.DocumentTouch&&e instanceof i.DocumentTouch)}}function _D(){return C0||(C0=VY()),C0}let I0;function YY({userAgent:i}={}){const e=_D(),t=wn(),n=t.navigator.platform,s=i||t.navigator.userAgent,r={ios:!1,android:!1},a=t.screen.width,o=t.screen.height,l=s.match(/(Android);?[\s\/]+([\d.]+)?/);let c=s.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const u=s.match(/(iPod)(.*OS\s([\d_]+))?/),h=!c&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),d=n==="Win32";let A=n==="MacIntel";const p=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!c&&A&&e.touch&&p.indexOf(`${a}x${o}`)>=0&&(c=s.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),A=!1),l&&!d&&(r.os="android",r.android=!0),(c||h||u)&&(r.os="ios",r.ios=!0),r}function ED(i={}){return I0||(I0=YY(i)),I0}let w0;function qY(){const i=wn(),e=ED();let t=!1;function n(){const o=i.navigator.userAgent.toLowerCase();return o.indexOf("safari")>=0&&o.indexOf("chrome")<0&&o.indexOf("android")<0}if(n()){const o=String(i.navigator.userAgent);if(o.includes("Version/")){const[l,c]=o.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));t=l<16||l===16&&c<2}}const s=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(i.navigator.userAgent),r=n(),a=r||s&&e.ios;return{isSafari:t||r,needPerspectiveFix:t,need3dFix:a,isWebView:s}}function vD(){return w0||(w0=qY()),w0}function WY({swiper:i,on:e,emit:t}){const n=wn();let s=null,r=null;const a=()=>{!i||i.destroyed||!i.initialized||(t("beforeResize"),t("resize"))},o=()=>{!i||i.destroyed||!i.initialized||(s=new ResizeObserver(u=>{r=n.requestAnimationFrame(()=>{const{width:h,height:d}=i;let A=h,p=d;u.forEach(({contentBoxSize:g,contentRect:m,target:f})=>{f&&f!==i.el||(A=m?m.width:(g[0]||g).inlineSize,p=m?m.height:(g[0]||g).blockSize)}),(A!==h||p!==d)&&a()})}),s.observe(i.el))},l=()=>{r&&n.cancelAnimationFrame(r),s&&s.unobserve&&i.el&&(s.unobserve(i.el),s=null)},c=()=>{!i||i.destroyed||!i.initialized||t("orientationchange")};e("init",()=>{if(i.params.resizeObserver&&typeof n.ResizeObserver<"u"){o();return}n.addEventListener("resize",a),n.addEventListener("orientationchange",c)}),e("destroy",()=>{l(),n.removeEventListener("resize",a),n.removeEventListener("orientationchange",c)})}function jY({swiper:i,extendParams:e,on:t,emit:n}){const s=[],r=wn(),a=(c,u={})=>{const h=r.MutationObserver||r.WebkitMutationObserver,d=new h(A=>{if(i.__preventObserver__)return;if(A.length===1){n("observerUpdate",A[0]);return}const p=function(){n("observerUpdate",A[0])};r.requestAnimationFrame?r.requestAnimationFrame(p):r.setTimeout(p,0)});d.observe(c,{attributes:typeof u.attributes>"u"?!0:u.attributes,childList:i.isElement||(typeof u.childList>"u"?!0:u).childList,characterData:typeof u.characterData>"u"?!0:u.characterData}),s.push(d)},o=()=>{if(i.params.observer){if(i.params.observeParents){const c=Fl(i.hostEl);for(let u=0;u<c.length;u+=1)a(c[u])}a(i.hostEl,{childList:i.params.observeSlideChildren}),a(i.wrapperEl,{attributes:!1})}},l=()=>{s.forEach(c=>{c.disconnect()}),s.splice(0,s.length)};e({observer:!1,observeParents:!1,observeSlideChildren:!1}),t("init",o),t("destroy",l)}var XY={on(i,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const s=t?"unshift":"push";return i.split(" ").forEach(r=>{n.eventsListeners[r]||(n.eventsListeners[r]=[]),n.eventsListeners[r][s](e)}),n},once(i,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;function s(...r){n.off(i,s),s.__emitterProxy&&delete s.__emitterProxy,e.apply(n,r)}return s.__emitterProxy=e,n.on(i,s,t)},onAny(i,e){const t=this;if(!t.eventsListeners||t.destroyed||typeof i!="function")return t;const n=e?"unshift":"push";return t.eventsAnyListeners.indexOf(i)<0&&t.eventsAnyListeners[n](i),t},offAny(i){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const t=e.eventsAnyListeners.indexOf(i);return t>=0&&e.eventsAnyListeners.splice(t,1),e},off(i,e){const t=this;return!t.eventsListeners||t.destroyed||!t.eventsListeners||i.split(" ").forEach(n=>{typeof e>"u"?t.eventsListeners[n]=[]:t.eventsListeners[n]&&t.eventsListeners[n].forEach((s,r)=>{(s===e||s.__emitterProxy&&s.__emitterProxy===e)&&t.eventsListeners[n].splice(r,1)})}),t},emit(...i){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,s;return typeof i[0]=="string"||Array.isArray(i[0])?(t=i[0],n=i.slice(1,i.length),s=e):(t=i[0].events,n=i[0].data,s=i[0].context||e),n.unshift(s),(Array.isArray(t)?t:t.split(" ")).forEach(a=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(o=>{o.apply(s,[a,...n])}),e.eventsListeners&&e.eventsListeners[a]&&e.eventsListeners[a].forEach(o=>{o.apply(s,n)})}),e}};function JY(){const i=this;let e,t;const n=i.el;typeof i.params.width<"u"&&i.params.width!==null?e=i.params.width:e=n.clientWidth,typeof i.params.height<"u"&&i.params.height!==null?t=i.params.height:t=n.clientHeight,!(e===0&&i.isHorizontal()||t===0&&i.isVertical())&&(e=e-parseInt(_o(n,"padding-left")||0,10)-parseInt(_o(n,"padding-right")||0,10),t=t-parseInt(_o(n,"padding-top")||0,10)-parseInt(_o(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(i,{width:e,height:t,size:i.isHorizontal()?e:t}))}function KY(){const i=this;function e(w,S){return parseFloat(w.getPropertyValue(i.getDirectionLabel(S))||0)}const t=i.params,{wrapperEl:n,slidesEl:s,rtlTranslate:r,wrongRTL:a}=i,o=i.virtual&&t.virtual.enabled,l=o?i.virtual.slides.length:i.slides.length,c=yi(s,`.${i.params.slideClass}, swiper-slide`),u=o?i.virtual.slides.length:c.length;let h=[];const d=[],A=[];let p=t.slidesOffsetBefore;typeof p=="function"&&(p=t.slidesOffsetBefore.call(i));let g=t.slidesOffsetAfter;typeof g=="function"&&(g=t.slidesOffsetAfter.call(i));const m=i.snapGrid.length,f=i.slidesGrid.length,y=i.size-p-g;let _=t.spaceBetween,E=-p,v=0,C=0;if(typeof y>"u")return;typeof _=="string"&&_.indexOf("%")>=0?_=parseFloat(_.replace("%",""))/100*y:typeof _=="string"&&(_=parseFloat(_)),i.virtualSize=-_-p-g,c.forEach(w=>{r?w.style.marginLeft="":w.style.marginRight="",w.style.marginBottom="",w.style.marginTop=""}),t.centeredSlides&&t.cssMode&&(al(n,"--swiper-centered-offset-before",""),al(n,"--swiper-centered-offset-after","")),t.cssMode&&(al(n,"--swiper-slides-offset-before",`${p}px`),al(n,"--swiper-slides-offset-after",`${g}px`));const x=t.grid&&t.grid.rows>1&&i.grid;x?i.grid.initSlides(c):i.grid&&i.grid.unsetSlides();let I;const b=t.slidesPerView==="auto"&&t.breakpoints&&Object.keys(t.breakpoints).filter(w=>typeof t.breakpoints[w].slidesPerView<"u").length>0;for(let w=0;w<u;w+=1){I=0;const S=c[w];if(!(S&&(x&&i.grid.updateSlide(w,S,c),_o(S,"display")==="none"))){if(o&&t.slidesPerView==="auto")t.virtual.slidesPerViewAutoSlideSize&&(I=t.virtual.slidesPerViewAutoSlideSize),I&&S&&(t.roundLengths&&(I=Math.floor(I)),S.style[i.getDirectionLabel("width")]=`${I}px`);else if(t.slidesPerView==="auto"){b&&(S.style[i.getDirectionLabel("width")]="");const B=getComputedStyle(S),T=S.style.transform,D=S.style.webkitTransform;if(T&&(S.style.transform="none"),D&&(S.style.webkitTransform="none"),t.roundLengths)I=i.isHorizontal()?pv(S,"width"):pv(S,"height");else{const P=e(B,"width"),R=e(B,"padding-left"),L=e(B,"padding-right"),F=e(B,"margin-left"),$=e(B,"margin-right"),J=B.getPropertyValue("box-sizing");if(J&&J==="border-box")I=P+F+$;else{const{clientWidth:W,offsetWidth:he}=S;I=P+R+L+F+$+(he-W)}}T&&(S.style.transform=T),D&&(S.style.webkitTransform=D),t.roundLengths&&(I=Math.floor(I))}else I=(y-(t.slidesPerView-1)*_)/t.slidesPerView,t.roundLengths&&(I=Math.floor(I)),S&&(S.style[i.getDirectionLabel("width")]=`${I}px`);S&&(S.swiperSlideSize=I),A.push(I),t.centeredSlides?(E=E+I/2+v/2+_,v===0&&w!==0&&(E=E-y/2-_),w===0&&(E=E-y/2-_),Math.abs(E)<1/1e3&&(E=0),t.roundLengths&&(E=Math.floor(E)),C%t.slidesPerGroup===0&&h.push(E),d.push(E)):(t.roundLengths&&(E=Math.floor(E)),(C-Math.min(i.params.slidesPerGroupSkip,C))%i.params.slidesPerGroup===0&&h.push(E),d.push(E),E=E+I+_),i.virtualSize+=I+_,v=I,C+=1}}if(i.virtualSize=Math.max(i.virtualSize,y)+g,r&&a&&(t.effect==="slide"||t.effect==="coverflow")&&(n.style.width=`${i.virtualSize+_}px`),t.setWrapperSize&&(n.style[i.getDirectionLabel("width")]=`${i.virtualSize+_}px`),x&&i.grid.updateWrapperSize(I,h),!t.centeredSlides){const w=t.slidesPerView!=="auto"&&t.slidesPerView%1!==0,S=t.snapToSlideEdge&&!t.loop&&(t.slidesPerView==="auto"||w);let B=h.length;if(S){let D;if(t.slidesPerView==="auto"){D=1;let P=0;for(let R=A.length-1;R>=0&&(P+=A[R]+(R<A.length-1?_:0),P<=y);R-=1)D=A.length-R}else D=Math.floor(t.slidesPerView);B=Math.max(u-D,0)}const T=[];for(let D=0;D<h.length;D+=1){let P=h[D];t.roundLengths&&(P=Math.floor(P)),S?D<=B&&T.push(P):h[D]<=i.virtualSize-y&&T.push(P)}h=T,Math.floor(i.virtualSize-y)-Math.floor(h[h.length-1])>1&&(S||h.push(i.virtualSize-y))}if(o&&t.loop){const w=A[0]+_;if(t.slidesPerGroup>1){const S=Math.ceil((i.virtual.slidesBefore+i.virtual.slidesAfter)/t.slidesPerGroup),B=w*t.slidesPerGroup;for(let T=0;T<S;T+=1)h.push(h[h.length-1]+B)}for(let S=0;S<i.virtual.slidesBefore+i.virtual.slidesAfter;S+=1)t.slidesPerGroup===1&&h.push(h[h.length-1]+w),d.push(d[d.length-1]+w),i.virtualSize+=w}if(h.length===0&&(h=[0]),_!==0){const w=i.isHorizontal()&&r?"marginLeft":i.getDirectionLabel("marginRight");c.filter((S,B)=>!t.cssMode||t.loop?!0:B!==c.length-1).forEach(S=>{S.style[w]=`${_}px`})}if(t.centeredSlides&&t.centeredSlidesBounds){let w=0;A.forEach(B=>{w+=B+(_||0)}),w-=_;const S=w>y?w-y:0;h=h.map(B=>B<=0?-p:B>S?S+g:B)}if(t.centerInsufficientSlides){let w=0;if(A.forEach(S=>{w+=S+(_||0)}),w-=_,w<y){const S=(y-w)/2;h.forEach((B,T)=>{h[T]=B-S}),d.forEach((B,T)=>{d[T]=B+S})}}if(Object.assign(i,{slides:c,snapGrid:h,slidesGrid:d,slidesSizesGrid:A}),t.centeredSlides&&t.cssMode&&!t.centeredSlidesBounds){al(n,"--swiper-centered-offset-before",`${-h[0]}px`),al(n,"--swiper-centered-offset-after",`${i.size/2-A[A.length-1]/2}px`);const w=-i.snapGrid[0],S=-i.slidesGrid[0];i.snapGrid=i.snapGrid.map(B=>B+w),i.slidesGrid=i.slidesGrid.map(B=>B+S)}if(u!==l&&i.emit("slidesLengthChange"),h.length!==m&&(i.params.watchOverflow&&i.checkOverflow(),i.emit("snapGridLengthChange")),d.length!==f&&i.emit("slidesGridLengthChange"),t.watchSlidesProgress&&i.updateSlidesOffset(),i.emit("slidesUpdated"),!o&&!t.cssMode&&(t.effect==="slide"||t.effect==="fade")){const w=`${t.containerModifierClass}backface-hidden`,S=i.el.classList.contains(w);u<=t.maxBackfaceHiddenSlides?S||i.el.classList.add(w):S&&i.el.classList.remove(w)}}function ZY(i){const e=this,t=[],n=e.virtual&&e.params.virtual.enabled;let s=0,r;typeof i=="number"?e.setTransition(i):i===!0&&e.setTransition(e.params.speed);const a=o=>n?e.slides[e.getSlideIndexByData(o)]:e.slides[o];if(e.params.slidesPerView!=="auto"&&e.params.slidesPerView>1)if(e.params.centeredSlides)(e.visibleSlides||[]).forEach(o=>{t.push(o)});else for(r=0;r<Math.ceil(e.params.slidesPerView);r+=1){const o=e.activeIndex+r;if(o>e.slides.length&&!n)break;t.push(a(o))}else t.push(a(e.activeIndex));for(r=0;r<t.length;r+=1)if(typeof t[r]<"u"){const o=t[r].offsetHeight;s=o>s?o:s}(s||s===0)&&(e.wrapperEl.style.height=`${s}px`)}function e9(){const i=this,e=i.slides,t=i.isElement?i.isHorizontal()?i.wrapperEl.offsetLeft:i.wrapperEl.offsetTop:0;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=(i.isHorizontal()?e[n].offsetLeft:e[n].offsetTop)-t-i.cssOverflowAdjustment()}const jw=(i,e,t)=>{e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)};function t9(i=this&&this.translate||0){const e=this,t=e.params,{slides:n,rtlTranslate:s,snapGrid:r}=e;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let a=-i;s&&(a=i),e.visibleSlidesIndexes=[],e.visibleSlides=[];let o=t.spaceBetween;typeof o=="string"&&o.indexOf("%")>=0?o=parseFloat(o.replace("%",""))/100*e.size:typeof o=="string"&&(o=parseFloat(o));for(let l=0;l<n.length;l+=1){const c=n[l];let u=c.swiperSlideOffset;t.cssMode&&t.centeredSlides&&(u-=n[0].swiperSlideOffset);const h=(a+(t.centeredSlides?e.minTranslate():0)-u)/(c.swiperSlideSize+o),d=(a-r[0]+(t.centeredSlides?e.minTranslate():0)-u)/(c.swiperSlideSize+o),A=-(a-u),p=A+e.slidesSizesGrid[l],g=A>=0&&A<=e.size-e.slidesSizesGrid[l],m=A>=0&&A<e.size-1||p>1&&p<=e.size||A<=0&&p>=e.size;m&&(e.visibleSlides.push(c),e.visibleSlidesIndexes.push(l)),jw(c,m,t.slideVisibleClass),jw(c,g,t.slideFullyVisibleClass),c.progress=s?-h:h,c.originalProgress=s?-d:d}}function n9(i){const e=this;if(typeof i>"u"){const u=e.rtlTranslate?-1:1;i=e&&e.translate&&e.translate*u||0}const t=e.params,n=e.maxTranslate()-e.minTranslate();let{progress:s,isBeginning:r,isEnd:a,progressLoop:o}=e;const l=r,c=a;if(n===0)s=0,r=!0,a=!0;else{s=(i-e.minTranslate())/n;const u=Math.abs(i-e.minTranslate())<1,h=Math.abs(i-e.maxTranslate())<1;r=u||s<=0,a=h||s>=1,u&&(s=0),h&&(s=1)}if(t.loop){const u=e.getSlideIndexByData(0),h=e.getSlideIndexByData(e.slides.length-1),d=e.slidesGrid[u],A=e.slidesGrid[h],p=e.slidesGrid[e.slidesGrid.length-1],g=Math.abs(i);g>=d?o=(g-d)/p:o=(g+p-A)/p,o>1&&(o-=1)}Object.assign(e,{progress:s,progressLoop:o,isBeginning:r,isEnd:a}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&e.updateSlidesProgress(i),r&&!l&&e.emit("reachBeginning toEdge"),a&&!c&&e.emit("reachEnd toEdge"),(l&&!r||c&&!a)&&e.emit("fromEdge"),e.emit("progress",s)}const S0=(i,e,t)=>{e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)};function i9(){const i=this,{slides:e,params:t,slidesEl:n,activeIndex:s}=i,r=i.virtual&&t.virtual.enabled,a=i.grid&&t.grid&&t.grid.rows>1,o=h=>yi(n,`.${t.slideClass}${h}, swiper-slide${h}`)[0];let l,c,u;if(r)if(t.loop){let h=s-i.virtual.slidesBefore;h<0&&(h=i.virtual.slides.length+h),h>=i.virtual.slides.length&&(h-=i.virtual.slides.length),l=o(`[data-swiper-slide-index="${h}"]`)}else l=o(`[data-swiper-slide-index="${s}"]`);else a?(l=e.find(h=>h.column===s),u=e.find(h=>h.column===s+1),c=e.find(h=>h.column===s-1)):l=e[s];l&&(a||(u=$Y(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!u&&(u=e[0]),c=HY(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!c===0&&(c=e[e.length-1]))),e.forEach(h=>{S0(h,h===l,t.slideActiveClass),S0(h,h===u,t.slideNextClass),S0(h,h===c,t.slidePrevClass)}),i.emitSlidesClasses()}const qf=(i,e)=>{if(!i||i.destroyed||!i.params)return;const t=()=>i.isElement?"swiper-slide":`.${i.params.slideClass}`,n=e.closest(t());if(n){let s=n.querySelector(`.${i.params.lazyPreloaderClass}`);!s&&i.isElement&&(n.shadowRoot?s=n.shadowRoot.querySelector(`.${i.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(s=n.shadowRoot.querySelector(`.${i.params.lazyPreloaderClass}`),s&&!s.lazyPreloaderManaged&&s.remove())})),s&&!s.lazyPreloaderManaged&&s.remove()}},B0=(i,e)=>{if(!i.slides[e])return;const t=i.slides[e].querySelector('[loading="lazy"]');t&&t.removeAttribute("loading")},fv=i=>{if(!i||i.destroyed||!i.params)return;let e=i.params.lazyPreloadPrevNext;const t=i.slides.length;if(!t||!e||e<0)return;e=Math.min(e,t);const n=i.params.slidesPerView==="auto"?i.slidesPerViewDynamic():Math.ceil(i.params.slidesPerView),s=i.activeIndex;if(i.params.grid&&i.params.grid.rows>1){const a=s,o=[a-e];o.push(...Array.from({length:e}).map((l,c)=>a+n+c)),i.slides.forEach((l,c)=>{o.includes(l.column)&&B0(i,c)});return}const r=s+n-1;if(i.params.rewind||i.params.loop)for(let a=s-e;a<=r+e;a+=1){const o=(a%t+t)%t;(o<s||o>r)&&B0(i,o)}else for(let a=Math.max(s-e,0);a<=Math.min(r+e,t-1);a+=1)a!==s&&(a>r||a<s)&&B0(i,a)};function s9(i){const{slidesGrid:e,params:t}=i,n=i.rtlTranslate?i.translate:-i.translate;let s;for(let r=0;r<e.length;r+=1)typeof e[r+1]<"u"?n>=e[r]&&n<e[r+1]-(e[r+1]-e[r])/2?s=r:n>=e[r]&&n<e[r+1]&&(s=r+1):n>=e[r]&&(s=r);return t.normalizeSlideIndex&&(s<0||typeof s>"u")&&(s=0),s}function r9(i){const e=this,t=e.rtlTranslate?e.translate:-e.translate,{snapGrid:n,params:s,activeIndex:r,realIndex:a,snapIndex:o}=e;let l=i,c;const u=A=>{let p=A-e.virtual.slidesBefore;return p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),p};if(typeof l>"u"&&(l=s9(e)),n.indexOf(t)>=0)c=n.indexOf(t);else{const A=Math.min(s.slidesPerGroupSkip,l);c=A+Math.floor((l-A)/s.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),l===r&&!e.params.loop){c!==o&&(e.snapIndex=c,e.emit("snapIndexChange"));return}if(l===r&&e.params.loop&&e.virtual&&e.params.virtual.enabled){e.realIndex=u(l);return}const h=e.grid&&s.grid&&s.grid.rows>1;let d;if(e.virtual&&s.virtual.enabled)s.loop?d=u(l):d=l;else if(h){const A=e.slides.find(g=>g.column===l);let p=parseInt(A.getAttribute("data-swiper-slide-index"),10);Number.isNaN(p)&&(p=Math.max(e.slides.indexOf(A),0)),d=Math.floor(p/s.grid.rows)}else if(e.slides[l]){const A=e.slides[l].getAttribute("data-swiper-slide-index");A?d=parseInt(A,10):d=l}else d=l;Object.assign(e,{previousSnapIndex:o,snapIndex:c,previousRealIndex:a,realIndex:d,previousIndex:r,activeIndex:l}),e.initialized&&fv(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&(a!==d&&e.emit("realIndexChange"),e.emit("slideChange"))}function a9(i,e){const t=this,n=t.params;let s=i.closest(`.${n.slideClass}, swiper-slide`);!s&&t.isElement&&e&&e.length>1&&e.includes(i)&&[...e.slice(e.indexOf(i)+1,e.length)].forEach(o=>{!s&&o.matches&&o.matches(`.${n.slideClass}, swiper-slide`)&&(s=o)});let r=!1,a;if(s){for(let o=0;o<t.slides.length;o+=1)if(t.slides[o]===s){r=!0,a=o;break}}if(s&&r)t.clickedSlide=s,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(s.getAttribute("data-swiper-slide-index"),10):t.clickedIndex=a;else{t.clickedSlide=void 0,t.clickedIndex=void 0;return}n.slideToClickedSlide&&t.clickedIndex!==void 0&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}var o9={updateSize:JY,updateSlides:KY,updateAutoHeight:ZY,updateSlidesOffset:e9,updateSlidesProgress:t9,updateProgress:n9,updateSlidesClasses:i9,updateActiveIndex:r9,updateClickedSlide:a9};function l9(i=this.isHorizontal()?"x":"y"){const e=this,{params:t,rtlTranslate:n,translate:s,wrapperEl:r}=e;if(t.virtualTranslate)return n?-s:s;if(t.cssMode)return s;let a=Av(r,i);return a+=e.cssOverflowAdjustment(),n&&(a=-a),a||0}function c9(i,e){const t=this,{rtlTranslate:n,params:s,wrapperEl:r,progress:a}=t;let o=0,l=0;const c=0;t.isHorizontal()?o=n?-i:i:l=i,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),t.previousTranslate=t.translate,t.translate=t.isHorizontal()?o:l,s.cssMode?r[t.isHorizontal()?"scrollLeft":"scrollTop"]=t.isHorizontal()?-o:-l:s.virtualTranslate||(t.isHorizontal()?o-=t.cssOverflowAdjustment():l-=t.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${l}px, ${c}px)`);let u;const h=t.maxTranslate()-t.minTranslate();h===0?u=0:u=(i-t.minTranslate())/h,u!==a&&t.updateProgress(i),t.emit("setTranslate",t.translate,e)}function h9(){return-this.snapGrid[0]}function u9(){return-this.snapGrid[this.snapGrid.length-1]}function d9(i=0,e=this.params.speed,t=!0,n=!0,s){const r=this,{params:a,wrapperEl:o}=r;if(r.animating&&a.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let u;if(n&&i>l?u=l:n&&i<c?u=c:u=i,r.updateProgress(u),a.cssMode){const h=r.isHorizontal();if(e===0)o[h?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return yD({swiper:r,targetPosition:-u,side:h?"left":"top"}),!0;o.scrollTo({[h?"left":"top"]:-u,behavior:"smooth"})}return!0}return e===0?(r.setTransition(0),r.setTranslate(u),t&&(r.emit("beforeTransitionStart",e,s),r.emit("transitionEnd"))):(r.setTransition(e),r.setTranslate(u),t&&(r.emit("beforeTransitionStart",e,s),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(d){!r||r.destroyed||d.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,t&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}var A9={getTranslate:l9,setTranslate:c9,minTranslate:h9,maxTranslate:u9,translateTo:d9};function p9(i,e){const t=this;t.params.cssMode||(t.wrapperEl.style.transitionDuration=`${i}ms`,t.wrapperEl.style.transitionDelay=i===0?"0ms":""),t.emit("setTransition",i,e)}function bD({swiper:i,runCallbacks:e,direction:t,step:n}){const{activeIndex:s,previousIndex:r}=i;let a=t;a||(s>r?a="next":s<r?a="prev":a="reset"),i.emit(`transition${n}`),e&&a==="reset"?i.emit(`slideResetTransition${n}`):e&&s!==r&&(i.emit(`slideChangeTransition${n}`),a==="next"?i.emit(`slideNextTransition${n}`):i.emit(`slidePrevTransition${n}`))}function f9(i=!0,e){const t=this,{params:n}=t;n.cssMode||(n.autoHeight&&t.updateAutoHeight(),bD({swiper:t,runCallbacks:i,direction:e,step:"Start"}))}function g9(i=!0,e){const t=this,{params:n}=t;t.animating=!1,!n.cssMode&&(t.setTransition(0),bD({swiper:t,runCallbacks:i,direction:e,step:"End"}))}var m9={setTransition:p9,transitionStart:f9,transitionEnd:g9};function y9(i=0,e,t=!0,n,s){typeof i=="string"&&(i=parseInt(i,10));const r=this;let a=i;a<0&&(a=0);const{params:o,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:h,rtlTranslate:d,wrapperEl:A,enabled:p}=r;if(!p&&!n&&!s||r.destroyed||r.animating&&o.preventInteractionOnTransition)return!1;typeof e>"u"&&(e=r.params.speed);const g=Math.min(r.params.slidesPerGroupSkip,a);let m=g+Math.floor((a-g)/r.params.slidesPerGroup);m>=l.length&&(m=l.length-1);const f=-l[m];if(o.normalizeSlideIndex)for(let x=0;x<c.length;x+=1){const I=-Math.floor(f*100),b=Math.floor(c[x]*100),w=Math.floor(c[x+1]*100);typeof c[x+1]<"u"?I>=b&&I<w-(w-b)/2?a=x:I>=b&&I<w&&(a=x+1):I>=b&&(a=x)}if(r.initialized&&a!==h&&(!r.allowSlideNext&&(d?f>r.translate&&f>r.minTranslate():f<r.translate&&f<r.minTranslate())||!r.allowSlidePrev&&f>r.translate&&f>r.maxTranslate()&&(h||0)!==a))return!1;a!==(u||0)&&t&&r.emit("beforeSlideChangeStart"),r.updateProgress(f);let y;a>h?y="next":a<h?y="prev":y="reset";const _=r.virtual&&r.params.virtual.enabled;if(!(_&&s)&&(d&&-f===r.translate||!d&&f===r.translate))return r.updateActiveIndex(a),o.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),o.effect!=="slide"&&r.setTranslate(f),y!=="reset"&&(r.transitionStart(t,y),r.transitionEnd(t,y)),!1;if(o.cssMode){const x=r.isHorizontal(),I=d?f:-f;if(e===0)_&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),_&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{A[x?"scrollLeft":"scrollTop"]=I})):A[x?"scrollLeft":"scrollTop"]=I,_&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return yD({swiper:r,targetPosition:I,side:x?"left":"top"}),!0;A.scrollTo({[x?"left":"top"]:I,behavior:"smooth"})}return!0}const C=vD().isSafari;return _&&!s&&C&&r.isElement&&r.virtual.update(!1,!1,a),r.setTransition(e),r.setTranslate(f),r.updateActiveIndex(a),r.updateSlidesClasses(),r.emit("beforeTransitionStart",e,n),r.transitionStart(t,y),e===0?r.transitionEnd(t,y):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(I){!r||r.destroyed||I.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(t,y))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function _9(i=0,e,t=!0,n){typeof i=="string"&&(i=parseInt(i,10));const s=this;if(s.destroyed)return;typeof e>"u"&&(e=s.params.speed);const r=s.grid&&s.params.grid&&s.params.grid.rows>1;let a=i;if(s.params.loop)if(s.virtual&&s.params.virtual.enabled)a=a+s.virtual.slidesBefore;else{let o;if(r){const g=a*s.params.grid.rows;o=s.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===g).column}else o=s.getSlideIndexByData(a);const l=r?Math.ceil(s.slides.length/s.params.grid.rows):s.slides.length,{centeredSlides:c,slidesOffsetBefore:u,slidesOffsetAfter:h}=s.params,d=c||!!u||!!h;let A=s.params.slidesPerView;A==="auto"?A=s.slidesPerViewDynamic():(A=Math.ceil(parseFloat(s.params.slidesPerView,10)),d&&A%2===0&&(A=A+1));let p=l-o<A;if(d&&(p=p||o<Math.ceil(A/2)),n&&d&&s.params.slidesPerView!=="auto"&&!r&&(p=!1),p){const g=d?o<s.activeIndex?"prev":"next":o-s.activeIndex-1<s.params.slidesPerView?"next":"prev";s.loopFix({direction:g,slideTo:!0,activeSlideIndex:g==="next"?o+1:o-l+1,slideRealIndex:g==="next"?s.realIndex:void 0})}if(r){const g=a*s.params.grid.rows;a=s.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===g).column}else a=s.getSlideIndexByData(a)}return requestAnimationFrame(()=>{s.slideTo(a,e,t,n)}),s}function E9(i,e=!0,t){const n=this,{enabled:s,params:r,animating:a}=n;if(!s||n.destroyed)return n;typeof i>"u"&&(i=n.params.speed);let o=r.slidesPerGroup;r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(o=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex<r.slidesPerGroupSkip?1:o,c=n.virtual&&r.virtual.enabled;if(r.loop){if(a&&!c&&r.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+l,i,e,t)}),!0}return r.rewind&&n.isEnd?n.slideTo(0,i,e,t):n.slideTo(n.activeIndex+l,i,e,t)}function v9(i,e=!0,t){const n=this,{params:s,snapGrid:r,slidesGrid:a,rtlTranslate:o,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof i>"u"&&(i=n.params.speed);const u=n.virtual&&s.virtual.enabled;if(s.loop){if(c&&!u&&s.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const h=o?n.translate:-n.translate;function d(y){return y<0?-Math.floor(Math.abs(y)):Math.floor(y)}const A=d(h),p=r.map(y=>d(y)),g=s.freeMode&&s.freeMode.enabled;let m=r[p.indexOf(A)-1];if(typeof m>"u"&&(s.cssMode||g)){let y;r.forEach((_,E)=>{A>=_&&(y=E)}),typeof y<"u"&&(m=g?r[y]:r[y>0?y-1:y])}let f=0;if(typeof m<"u"&&(f=a.indexOf(m),f<0&&(f=n.activeIndex-1),s.slidesPerView==="auto"&&s.slidesPerGroup===1&&s.slidesPerGroupAuto&&(f=f-n.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),s.rewind&&n.isBeginning){const y=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(y,i,e,t)}else if(s.loop&&n.activeIndex===0&&s.cssMode)return requestAnimationFrame(()=>{n.slideTo(f,i,e,t)}),!0;return n.slideTo(f,i,e,t)}function b9(i,e=!0,t){const n=this;if(!n.destroyed)return typeof i>"u"&&(i=n.params.speed),n.slideTo(n.activeIndex,i,e,t)}function x9(i,e=!0,t,n=.5){const s=this;if(s.destroyed)return;typeof i>"u"&&(i=s.params.speed);let r=s.activeIndex;const a=Math.min(s.params.slidesPerGroupSkip,r),o=a+Math.floor((r-a)/s.params.slidesPerGroup),l=s.rtlTranslate?s.translate:-s.translate;if(l>=s.snapGrid[o]){const c=s.snapGrid[o],u=s.snapGrid[o+1];l-c>(u-c)*n&&(r+=s.params.slidesPerGroup)}else{const c=s.snapGrid[o-1],u=s.snapGrid[o];l-c<=(u-c)*n&&(r-=s.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,s.slidesGrid.length-1),s.slideTo(r,i,e,t)}function C9(){const i=this;if(i.destroyed)return;const{params:e,slidesEl:t}=i,n=e.slidesPerView==="auto"?i.slidesPerViewDynamic():e.slidesPerView;let s=i.getSlideIndexWhenGrid(i.clickedIndex),r;const a=i.isElement?"swiper-slide":`.${e.slideClass}`,o=i.grid&&i.params.grid&&i.params.grid.rows>1;if(e.loop){if(i.animating)return;r=parseInt(i.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?i.slideToLoop(r):s>(o?(i.slides.length-n)/2-(i.params.grid.rows-1):i.slides.length-n)?(i.loopFix(),s=i.getSlideIndex(yi(t,`${a}[data-swiper-slide-index="${r}"]`)[0]),Kh(()=>{i.slideTo(s)})):i.slideTo(s)}else i.slideTo(s)}var I9={slideTo:y9,slideToLoop:_9,slideNext:E9,slidePrev:v9,slideReset:b9,slideToClosest:x9,slideToClickedSlide:C9};function w9(i,e){const t=this,{params:n,slidesEl:s}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const r=()=>{yi(s,`.${n.slideClass}, swiper-slide`).forEach((p,g)=>{p.setAttribute("data-swiper-slide-index",g)})},a=()=>{const A=yi(s,`.${n.slideBlankClass}`);A.forEach(p=>{p.remove()}),A.length>0&&(t.recalcSlides(),t.updateSlides())},o=t.grid&&n.grid&&n.grid.rows>1;n.loopAddBlankSlides&&(n.slidesPerGroup>1||o)&&a();const l=n.slidesPerGroup*(o?n.grid.rows:1),c=t.slides.length%l!==0,u=o&&t.slides.length%n.grid.rows!==0,h=A=>{for(let p=0;p<A;p+=1){const g=t.isElement?ys("swiper-slide",[n.slideBlankClass]):ys("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(g)}};if(c){if(n.loopAddBlankSlides){const A=l-t.slides.length%l;h(A),t.recalcSlides(),t.updateSlides()}else Vg("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(u){if(n.loopAddBlankSlides){const A=n.grid.rows-t.slides.length%n.grid.rows;h(A),t.recalcSlides(),t.updateSlides()}else Vg("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();const d=n.centeredSlides||!!n.slidesOffsetBefore||!!n.slidesOffsetAfter;t.loopFix({slideRealIndex:i,direction:d?void 0:"next",initial:e})}function S9({slideRealIndex:i,slideTo:e=!0,direction:t,setTranslate:n,activeSlideIndex:s,initial:r,byController:a,byMousewheel:o}={}){const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:u,allowSlideNext:h,slidesEl:d,params:A}=l,{centeredSlides:p,slidesOffsetBefore:g,slidesOffsetAfter:m,initialSlide:f}=A,y=p||!!g||!!m;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&A.virtual.enabled){e&&(!y&&l.snapIndex===0?l.slideTo(l.virtual.slides.length,0,!1,!0):y&&l.snapIndex<A.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=h,l.emit("loopFix");return}let _=A.slidesPerView;_==="auto"?_=l.slidesPerViewDynamic():(_=Math.ceil(parseFloat(A.slidesPerView,10)),y&&_%2===0&&(_=_+1));const E=A.slidesPerGroupAuto?_:A.slidesPerGroup;let v=y?Math.max(E,Math.ceil(_/2)):E;v%E!==0&&(v+=E-v%E),v+=A.loopAdditionalSlides,l.loopedSlides=v;const C=l.grid&&A.grid&&A.grid.rows>1;c.length<_+v||l.params.effect==="cards"&&c.length<_+v*2?Vg("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):C&&A.grid.fill==="row"&&Vg("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const x=[],I=[],b=C?Math.ceil(c.length/A.grid.rows):c.length,w=r&&b-f<_&&!y;let S=w?f:l.activeIndex;typeof s>"u"?s=l.getSlideIndex(c.find(F=>F.classList.contains(A.slideActiveClass))):S=s;const B=t==="next"||!t,T=t==="prev"||!t;let D=0,P=0;const L=(C?c[s].column:s)+(y&&typeof n>"u"?-_/2+.5:0);if(L<v){D=Math.max(v-L,E);for(let F=0;F<v-L;F+=1){const $=F-Math.floor(F/b)*b;if(C){const J=b-$-1;for(let W=c.length-1;W>=0;W-=1)c[W].column===J&&x.push(W)}else x.push(b-$-1)}}else if(L+_>b-v){P=Math.max(L-(b-v*2),E),w&&(P=Math.max(P,_-b+f+1));for(let F=0;F<P;F+=1){const $=F-Math.floor(F/b)*b;C?c.forEach((J,W)=>{J.column===$&&I.push(W)}):I.push($)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),l.params.effect==="cards"&&c.length<_+v*2&&(I.includes(s)&&I.splice(I.indexOf(s),1),x.includes(s)&&x.splice(x.indexOf(s),1)),T&&x.forEach(F=>{c[F].swiperLoopMoveDOM=!0,d.prepend(c[F]),c[F].swiperLoopMoveDOM=!1}),B&&I.forEach(F=>{c[F].swiperLoopMoveDOM=!0,d.append(c[F]),c[F].swiperLoopMoveDOM=!1}),l.recalcSlides(),A.slidesPerView==="auto"?l.updateSlides():C&&(x.length>0&&T||I.length>0&&B)&&l.slides.forEach((F,$)=>{l.grid.updateSlide($,F,l.slides)}),A.watchSlidesProgress&&l.updateSlidesOffset(),e){if(x.length>0&&T){if(typeof i>"u"){const F=l.slidesGrid[S],J=l.slidesGrid[S+D]-F;o?l.setTranslate(l.translate-J):(l.slideTo(S+Math.ceil(D),0,!1,!0),n&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else if(n){const F=C?x.length/A.grid.rows:x.length;l.slideTo(l.activeIndex+F,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(I.length>0&&B)if(typeof i>"u"){const F=l.slidesGrid[S],J=l.slidesGrid[S-P]-F;o?l.setTranslate(l.translate-J):(l.slideTo(S-P,0,!1,!0),n&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else{const F=C?I.length/A.grid.rows:I.length;l.slideTo(l.activeIndex-F,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=h,l.controller&&l.controller.control&&!a){const F={slideRealIndex:i,direction:t,setTranslate:n,activeSlideIndex:s,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach($=>{!$.destroyed&&$.params.loop&&$.loopFix({...F,slideTo:$.params.slidesPerView===A.slidesPerView?e:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...F,slideTo:l.controller.control.params.slidesPerView===A.slidesPerView?e:!1})}l.emit("loopFix")}function B9(){const i=this,{params:e,slidesEl:t}=i;if(!e.loop||!t||i.virtual&&i.params.virtual.enabled)return;i.recalcSlides();const n=[];i.slides.forEach(s=>{const r=typeof s.swiperSlideIndex>"u"?s.getAttribute("data-swiper-slide-index")*1:s.swiperSlideIndex;n[r]=s}),i.slides.forEach(s=>{s.removeAttribute("data-swiper-slide-index")}),n.forEach(s=>{t.append(s)}),i.recalcSlides(),i.slideTo(i.realIndex,0)}var T9={loopCreate:w9,loopFix:S9,loopDestroy:B9};function M9(i){const e=this;if(!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const t=e.params.touchEventsTarget==="container"?e.el:e.wrapperEl;e.isElement&&(e.__preventObserver__=!0),t.style.cursor="move",t.style.cursor=i?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})}function R9(){const i=this;i.params.watchOverflow&&i.isLocked||i.params.cssMode||(i.isElement&&(i.__preventObserver__=!0),i[i.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",i.isElement&&requestAnimationFrame(()=>{i.__preventObserver__=!1}))}var D9={setGrabCursor:M9,unsetGrabCursor:R9};function Q9(i,e=this){function t(n){if(!n||n===hi()||n===wn())return null;n.assignedSlot&&(n=n.assignedSlot);const s=n.closest(i);return!s&&!n.getRootNode?null:s||t(n.getRootNode().host)}return t(e)}function Xw(i,e,t){const n=wn(),{params:s}=i,r=s.edgeSwipeDetection,a=s.edgeSwipeThreshold;return r&&(t<=a||t>=n.innerWidth-a)?r==="prevent"?(e.preventDefault(),!0):!1:!0}function L9(i){const e=this,t=hi();let n=i;n.originalEvent&&(n=n.originalEvent);const s=e.touchEventsData;if(n.type==="pointerdown"){if(s.pointerId!==null&&s.pointerId!==n.pointerId)return;s.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(s.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){Xw(e,n,n.targetTouches[0].pageX);return}const{params:r,touches:a,enabled:o}=e;if(!o||!r.simulateTouch&&n.pointerType==="mouse"||e.animating&&r.preventInteractionOnTransition)return;!e.animating&&r.cssMode&&r.loop&&e.loopFix();let l=n.target;if(r.touchEventsTarget==="wrapper"&&!zY(l,e.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||s.isTouched&&s.isMoved)return;const c=!!r.noSwipingClass&&r.noSwipingClass!=="",u=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&u&&(l=u[0]);const h=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,d=!!(n.target&&n.target.shadowRoot);if(r.noSwiping&&(d?Q9(h,l):l.closest(h))){e.allowClick=!0;return}if(r.swipeHandler&&!l.closest(r.swipeHandler))return;a.currentX=n.pageX,a.currentY=n.pageY;const A=a.currentX,p=a.currentY;if(!Xw(e,n,A))return;Object.assign(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=A,a.startY=p,s.touchStartTime=Fs(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,r.threshold>0&&(s.allowThresholdMove=!1);let g=!0;l.matches(s.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(s.isTouched=!1)),t.activeElement&&t.activeElement.matches(s.focusableElements)&&t.activeElement!==l&&(n.pointerType==="mouse"||n.pointerType!=="mouse"&&!l.matches(s.focusableElements))&&t.activeElement.blur();const m=g&&e.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||m)&&!l.isContentEditable&&n.preventDefault(),r.freeMode&&r.freeMode.enabled&&e.freeMode&&e.animating&&!r.cssMode&&e.freeMode.onTouchStart(),e.emit("touchStart",n)}function N9(i){const e=hi(),t=this,n=t.touchEventsData,{params:s,touches:r,rtlTranslate:a,enabled:o}=t;if(!o||!s.simulateTouch&&i.pointerType==="mouse")return;let l=i;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(n.touchId!==null||l.pointerId!==n.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].find(v=>v.identifier===n.touchId),!c||c.identifier!==n.touchId)return}else c=l;if(!n.isTouched){n.startMoving&&n.isScrolling&&t.emit("touchMoveOpposite",l);return}const u=c.pageX,h=c.pageY;if(l.preventedByNestedSwiper){r.startX=u,r.startY=h;return}if(!t.allowTouchMove){l.target.matches(n.focusableElements)||(t.allowClick=!1),n.isTouched&&(Object.assign(r,{startX:u,startY:h,currentX:u,currentY:h}),n.touchStartTime=Fs());return}if(s.touchReleaseOnEdges&&!s.loop)if(t.isVertical()){if(h<r.startY&&t.translate<=t.maxTranslate()||h>r.startY&&t.translate>=t.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else{if(a&&(u>r.startX&&-t.translate<=t.maxTranslate()||u<r.startX&&-t.translate>=t.minTranslate()))return;if(!a&&(u<r.startX&&t.translate<=t.maxTranslate()||u>r.startX&&t.translate>=t.minTranslate()))return}if(e.activeElement&&e.activeElement.matches(n.focusableElements)&&e.activeElement!==l.target&&l.pointerType!=="mouse"&&e.activeElement.blur(),e.activeElement&&l.target===e.activeElement&&l.target.matches(n.focusableElements)){n.isMoved=!0,t.allowClick=!1;return}n.allowTouchCallbacks&&t.emit("touchMove",l),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=u,r.currentY=h;const d=r.currentX-r.startX,A=r.currentY-r.startY;if(t.params.threshold&&Math.sqrt(d**2+A**2)<t.params.threshold)return;if(typeof n.isScrolling>"u"){let v;t.isHorizontal()&&r.currentY===r.startY||t.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:d*d+A*A>=25&&(v=Math.atan2(Math.abs(A),Math.abs(d))*180/Math.PI,n.isScrolling=t.isHorizontal()?v>s.touchAngle:90-v>s.touchAngle)}if(n.isScrolling&&t.emit("touchMoveOpposite",l),typeof n.startMoving>"u"&&(r.currentX!==r.startX||r.currentY!==r.startY)&&(n.startMoving=!0),n.isScrolling||l.type==="touchmove"&&n.preventTouchMoveFromPointerMove){n.isTouched=!1;return}if(!n.startMoving)return;t.allowClick=!1,!s.cssMode&&l.cancelable&&l.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&l.stopPropagation();let p=t.isHorizontal()?d:A,g=t.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;s.oneWayMovement&&(p=Math.abs(p)*(a?1:-1),g=Math.abs(g)*(a?1:-1)),r.diff=p,p*=s.touchRatio,a&&(p=-p,g=-g);const m=t.touchesDirection;t.swipeDirection=p>0?"prev":"next",t.touchesDirection=g>0?"prev":"next";const f=t.params.loop&&!s.cssMode,y=t.touchesDirection==="next"&&t.allowSlideNext||t.touchesDirection==="prev"&&t.allowSlidePrev;if(!n.isMoved){if(f&&y&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const v=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(v)}n.allowMomentumBounce=!1,s.grabCursor&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!0),t.emit("sliderFirstMove",l)}if(new Date().getTime(),s._loopSwapReset!==!1&&n.isMoved&&n.allowThresholdMove&&m!==t.touchesDirection&&f&&y&&Math.abs(p)>=1){Object.assign(r,{startX:u,startY:h,currentX:u,currentY:h,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}t.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=p+n.startTranslate;let _=!0,E=s.resistanceRatio;if(s.touchReleaseOnEdges&&(E=0),p>0?(f&&y&&n.allowThresholdMove&&n.currentTranslate>(s.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]-(s.slidesPerView!=="auto"&&t.slides.length-s.slidesPerView>=2?t.slidesSizesGrid[t.activeIndex+1]+t.params.spaceBetween:0)-t.params.spaceBetween:t.minTranslate())&&t.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>t.minTranslate()&&(_=!1,s.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+n.startTranslate+p)**E))):p<0&&(f&&y&&n.allowThresholdMove&&n.currentTranslate<(s.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween+(s.slidesPerView!=="auto"&&t.slides.length-s.slidesPerView>=2?t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween:0):t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-(s.slidesPerView==="auto"?t.slidesPerViewDynamic():Math.ceil(parseFloat(s.slidesPerView,10)))}),n.currentTranslate<t.maxTranslate()&&(_=!1,s.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-n.startTranslate-p)**E))),_&&(l.preventedByNestedSwiper=!0),!t.allowSlideNext&&t.swipeDirection==="next"&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&t.swipeDirection==="prev"&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&!t.allowSlideNext&&(n.currentTranslate=n.startTranslate),s.threshold>0)if(Math.abs(p)>s.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,n.currentTranslate=n.startTranslate,r.diff=t.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY;return}}else{n.currentTranslate=n.startTranslate;return}!s.followFinger||s.cssMode||((s.freeMode&&s.freeMode.enabled&&t.freeMode||s.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate))}function P9(i){const e=this,t=e.touchEventsData;let n=i;n.originalEvent&&(n=n.originalEvent);let s;if(n.type==="touchend"||n.type==="touchcancel"){if(s=[...n.changedTouches].find(v=>v.identifier===t.touchId),!s||s.identifier!==t.touchId)return}else{if(t.touchId!==null||n.pointerId!==t.pointerId)return;s=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)&&!(["pointercancel","contextmenu"].includes(n.type)&&(e.browser.isSafari||e.browser.isWebView)))return;t.pointerId=null,t.touchId=null;const{params:a,touches:o,rtlTranslate:l,slidesGrid:c,enabled:u}=e;if(!u||!a.simulateTouch&&n.pointerType==="mouse")return;if(t.allowTouchCallbacks&&e.emit("touchEnd",n),t.allowTouchCallbacks=!1,!t.isTouched){t.isMoved&&a.grabCursor&&e.setGrabCursor(!1),t.isMoved=!1,t.startMoving=!1;return}a.grabCursor&&t.isMoved&&t.isTouched&&(e.allowSlideNext===!0||e.allowSlidePrev===!0)&&e.setGrabCursor(!1);const h=Fs(),d=h-t.touchStartTime;if(e.allowClick){const v=n.path||n.composedPath&&n.composedPath();e.updateClickedSlide(v&&v[0]||n.target,v),e.emit("tap click",n),d<300&&h-t.lastClickTime<300&&e.emit("doubleTap doubleClick",n)}if(t.lastClickTime=Fs(),Kh(()=>{e.destroyed||(e.allowClick=!0)}),!t.isTouched||!t.isMoved||!e.swipeDirection||o.diff===0&&!t.loopSwapReset||t.currentTranslate===t.startTranslate&&!t.loopSwapReset){t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;return}t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;let A;if(a.followFinger?A=l?e.translate:-e.translate:A=-t.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled){e.freeMode.onTouchEnd({currentPos:A});return}const p=A>=-e.maxTranslate()&&!e.params.loop;let g=0,m=e.slidesSizesGrid[0];for(let v=0;v<c.length;v+=v<a.slidesPerGroupSkip?1:a.slidesPerGroup){const C=v<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;typeof c[v+C]<"u"?(p||A>=c[v]&&A<c[v+C])&&(g=v,m=c[v+C]-c[v]):(p||A>=c[v])&&(g=v,m=c[c.length-1]-c[c.length-2])}let f=null,y=null;a.rewind&&(e.isBeginning?y=a.virtual&&a.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(f=0));const _=(A-c[g])/m,E=g<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(d>a.longSwipesMs){if(!a.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(_>=a.longSwipesRatio?e.slideTo(a.rewind&&e.isEnd?f:g+E):e.slideTo(g)),e.swipeDirection==="prev"&&(_>1-a.longSwipesRatio?e.slideTo(g+E):y!==null&&_<0&&Math.abs(_)>a.longSwipesRatio?e.slideTo(y):e.slideTo(g))}else{if(!a.shortSwipes){e.slideTo(e.activeIndex);return}e.navigation&&(n.target===e.navigation.nextEl||n.target===e.navigation.prevEl)?n.target===e.navigation.nextEl?e.slideTo(g+E):e.slideTo(g):(e.swipeDirection==="next"&&e.slideTo(f!==null?f:g+E),e.swipeDirection==="prev"&&e.slideTo(y!==null?y:g))}}function Jw(){const i=this,{params:e,el:t}=i;if(t&&t.offsetWidth===0)return;e.breakpoints&&i.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:s,snapGrid:r}=i,a=i.virtual&&i.params.virtual.enabled;i.allowSlideNext=!0,i.allowSlidePrev=!0,i.updateSize(),i.updateSlides(),i.updateSlidesClasses();const o=a&&e.loop;if((e.slidesPerView==="auto"||e.slidesPerView>1)&&i.isEnd&&!i.isBeginning&&!i.params.centeredSlides&&!o){const l=a?i.virtual.slides:i.slides;i.slideTo(l.length-1,0,!1,!0)}else i.params.loop&&!a?i.slideToLoop(i.realIndex,0,!1,!0):i.slideTo(i.activeIndex,0,!1,!0);i.autoplay&&i.autoplay.running&&i.autoplay.paused&&(clearTimeout(i.autoplay.resizeTimeout),i.autoplay.resizeTimeout=setTimeout(()=>{i.autoplay&&i.autoplay.running&&i.autoplay.paused&&i.autoplay.resume()},500)),i.allowSlidePrev=s,i.allowSlideNext=n,i.params.watchOverflow&&r!==i.snapGrid&&i.checkOverflow()}function F9(i){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&i.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(i.stopPropagation(),i.stopImmediatePropagation())))}function k9(){const i=this,{wrapperEl:e,rtlTranslate:t,enabled:n}=i;if(!n)return;i.previousTranslate=i.translate,i.isHorizontal()?i.translate=-e.scrollLeft:i.translate=-e.scrollTop,i.translate===0&&(i.translate=0),i.updateActiveIndex(),i.updateSlidesClasses();let s;const r=i.maxTranslate()-i.minTranslate();r===0?s=0:s=(i.translate-i.minTranslate())/r,s!==i.progress&&i.updateProgress(t?-i.translate:i.translate),i.emit("setTranslate",i.translate,!1)}function U9(i){const e=this;qf(e,i.target),!(e.params.cssMode||e.params.slidesPerView!=="auto"&&!e.params.autoHeight)&&e.update()}function O9(){const i=this;i.documentTouchHandlerProceeded||(i.documentTouchHandlerProceeded=!0,i.params.touchReleaseOnEdges&&(i.el.style.touchAction="auto"))}const xD=(i,e)=>{const t=hi(),{params:n,el:s,wrapperEl:r,device:a}=i,o=!!n.nested,l=e==="on"?"addEventListener":"removeEventListener",c=e;!s||typeof s=="string"||(t[l]("touchstart",i.onDocumentTouchStart,{passive:!1,capture:o}),s[l]("touchstart",i.onTouchStart,{passive:!1}),s[l]("pointerdown",i.onTouchStart,{passive:!1}),t[l]("touchmove",i.onTouchMove,{passive:!1,capture:o}),t[l]("pointermove",i.onTouchMove,{passive:!1,capture:o}),t[l]("touchend",i.onTouchEnd,{passive:!0}),t[l]("pointerup",i.onTouchEnd,{passive:!0}),t[l]("pointercancel",i.onTouchEnd,{passive:!0}),t[l]("touchcancel",i.onTouchEnd,{passive:!0}),t[l]("pointerout",i.onTouchEnd,{passive:!0}),t[l]("pointerleave",i.onTouchEnd,{passive:!0}),t[l]("contextmenu",i.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&s[l]("click",i.onClick,!0),n.cssMode&&r[l]("scroll",i.onScroll),n.updateOnWindowResize?i[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Jw,!0):i[c]("observerUpdate",Jw,!0),s[l]("load",i.onLoad,{capture:!0}))};function G9(){const i=this,{params:e}=i;i.onTouchStart=L9.bind(i),i.onTouchMove=N9.bind(i),i.onTouchEnd=P9.bind(i),i.onDocumentTouchStart=O9.bind(i),e.cssMode&&(i.onScroll=k9.bind(i)),i.onClick=F9.bind(i),i.onLoad=U9.bind(i),xD(i,"on")}function z9(){xD(this,"off")}var H9={attachEvents:G9,detachEvents:z9};const Kw=(i,e)=>i.grid&&e.grid&&e.grid.rows>1;function $9(){const i=this,{realIndex:e,initialized:t,params:n,el:s}=i,r=n.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const a=hi(),o=n.breakpointsBase==="window"||!n.breakpointsBase?n.breakpointsBase:"container",l=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?i.el:a.querySelector(n.breakpointsBase),c=i.getBreakpoint(r,o,l);if(!c||i.currentBreakpoint===c)return;const h=(c in r?r[c]:void 0)||i.originalParams,d=Kw(i,n),A=Kw(i,h),p=i.params.grabCursor,g=h.grabCursor,m=n.enabled;d&&!A?(s.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),i.emitContainerClasses()):!d&&A&&(s.classList.add(`${n.containerModifierClass}grid`),(h.grid.fill&&h.grid.fill==="column"||!h.grid.fill&&n.grid.fill==="column")&&s.classList.add(`${n.containerModifierClass}grid-column`),i.emitContainerClasses()),p&&!g?i.unsetGrabCursor():!p&&g&&i.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(C=>{if(typeof h[C]>"u")return;const x=n[C]&&n[C].enabled,I=h[C]&&h[C].enabled;x&&!I&&i[C].disable(),!x&&I&&i[C].enable()});const f=h.direction&&h.direction!==n.direction,y=n.loop&&(h.slidesPerView!==n.slidesPerView||f),_=n.loop;f&&t&&i.changeDirection(),ds(i.params,h);const E=i.params.enabled,v=i.params.loop;Object.assign(i,{allowTouchMove:i.params.allowTouchMove,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev}),m&&!E?i.disable():!m&&E&&i.enable(),i.currentBreakpoint=c,i.emit("_beforeBreakpoint",h),t&&(y?(i.loopDestroy(),i.loopCreate(e),i.updateSlides()):!_&&v?(i.loopCreate(e),i.updateSlides()):_&&!v&&i.loopDestroy()),i.emit("breakpoint",h)}function V9(i,e="window",t){if(!i||e==="container"&&!t)return;let n=!1;const s=wn(),r=e==="window"?s.innerHeight:t.clientHeight,a=Object.keys(i).map(o=>{if(typeof o=="string"&&o.indexOf("@")===0){const l=parseFloat(o.substr(1));return{value:r*l,point:o}}return{value:o,point:o}});a.sort((o,l)=>parseInt(o.value,10)-parseInt(l.value,10));for(let o=0;o<a.length;o+=1){const{point:l,value:c}=a[o];e==="window"?s.matchMedia(`(min-width: ${c}px)`).matches&&(n=l):c<=t.clientWidth&&(n=l)}return n||"max"}var Y9={setBreakpoint:$9,getBreakpoint:V9};function q9(i,e){const t=[];return i.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(s=>{n[s]&&t.push(e+s)}):typeof n=="string"&&t.push(e+n)}),t}function W9(){const i=this,{classNames:e,params:t,rtl:n,el:s,device:r}=i,a=q9(["initialized",t.direction,{"free-mode":i.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:n},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&t.grid.fill==="column"},{android:r.android},{ios:r.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides},{"watch-progress":t.watchSlidesProgress}],t.containerModifierClass);e.push(...a),s.classList.add(...e),i.emitContainerClasses()}function j9(){const i=this,{el:e,classNames:t}=i;!e||typeof e=="string"||(e.classList.remove(...t),i.emitContainerClasses())}var X9={addClasses:W9,removeClasses:j9};function J9(){const i=this,{isLocked:e,params:t}=i,{slidesOffsetBefore:n}=t;if(n){const s=i.slides.length-1,r=i.slidesGrid[s]+i.slidesSizesGrid[s]+n*2;i.isLocked=i.size>r}else i.isLocked=i.snapGrid.length===1;t.allowSlideNext===!0&&(i.allowSlideNext=!i.isLocked),t.allowSlidePrev===!0&&(i.allowSlidePrev=!i.isLocked),e&&e!==i.isLocked&&(i.isEnd=!1),e!==i.isLocked&&i.emit(i.isLocked?"lock":"unlock")}var K9={checkOverflow:J9},gv={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Z9(i,e){return function(n={}){const s=Object.keys(n)[0],r=n[s];if(typeof r!="object"||r===null){ds(e,n);return}if(i[s]===!0&&(i[s]={enabled:!0}),s==="navigation"&&i[s]&&i[s].enabled&&!i[s].prevEl&&!i[s].nextEl&&(i[s].auto=!0),["pagination","scrollbar"].indexOf(s)>=0&&i[s]&&i[s].enabled&&!i[s].el&&(i[s].auto=!0),!(s in i&&"enabled"in r)){ds(e,n);return}typeof i[s]=="object"&&!("enabled"in i[s])&&(i[s].enabled=!0),i[s]||(i[s]={enabled:!1}),ds(e,n)}}const T0={eventsEmitter:XY,update:o9,translate:A9,transition:m9,slide:I9,loop:T9,grabCursor:D9,events:H9,breakpoints:Y9,checkOverflow:K9,classes:X9},M0={};class us{constructor(...e){let t,n;e.length===1&&e[0].constructor&&Object.prototype.toString.call(e[0]).slice(8,-1)==="Object"?n=e[0]:[t,n]=e,n||(n={}),n=ds({},n),t&&!n.el&&(n.el=t);const s=hi();if(n.el&&typeof n.el=="string"&&s.querySelectorAll(n.el).length>1){const l=[];return s.querySelectorAll(n.el).forEach(c=>{const u=ds({},n,{el:c});l.push(new us(u))}),l}const r=this;r.__swiper__=!0,r.support=_D(),r.device=ED({userAgent:n.userAgent}),r.browser=vD(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],n.modules&&Array.isArray(n.modules)&&n.modules.forEach(l=>{typeof l=="function"&&r.modules.indexOf(l)<0&&r.modules.push(l)});const a={};r.modules.forEach(l=>{l({params:n,swiper:r,extendParams:Z9(n,a),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const o=ds({},gv,a);return r.params=ds({},o,M0,n),r.originalParams=ds({},r.params),r.passedParams=ds({},n),r.params&&r.params.on&&Object.keys(r.params.on).forEach(l=>{r.on(l,r.params.on[l])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return r.params.direction==="horizontal"},isVertical(){return r.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,s=yi(t,`.${n.slideClass}, swiper-slide`),r=FA(s[0]);return FA(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>t.getAttribute("data-swiper-slide-index")*1===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?e=Math.floor(e/this.params.grid.rows):this.params.grid.fill==="row"&&(e=e%Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const e=this,{slidesEl:t,params:n}=e;e.slides=yi(t,`.${n.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const s=n.minTranslate(),a=(n.maxTranslate()-s)*e+s;n.translateTo(a,typeof t>"u"?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(e.params.containerModifierClass)===0);e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(t.params.slideClass)===0).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const s=e.getSlideClasses(n);t.push({slideEl:n,classNames:s}),e.emit("_slideClass",n,s)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const n=this,{params:s,slides:r,slidesGrid:a,slidesSizesGrid:o,size:l,activeIndex:c}=n;let u=1;if(typeof s.slidesPerView=="number")return s.slidesPerView;if(s.centeredSlides){let h=r[c]?Math.ceil(r[c].swiperSlideSize):0,d;for(let A=c+1;A<r.length;A+=1)r[A]&&!d&&(h+=Math.ceil(r[A].swiperSlideSize),u+=1,h>l&&(d=!0));for(let A=c-1;A>=0;A-=1)r[A]&&!d&&(h+=r[A].swiperSlideSize,u+=1,h>l&&(d=!0))}else if(e==="current")for(let h=c+1;h<r.length;h+=1)(t?a[h]+o[h]-a[c]<l:a[h]-a[c]<l)&&(u+=1);else for(let h=c-1;h>=0;h-=1)a[c]-a[h]<l&&(u+=1);return u}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(a=>{a.complete&&qf(e,a)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function s(){const a=e.rtlTranslate?e.translate*-1:e.translate,o=Math.min(Math.max(a,e.maxTranslate()),e.minTranslate());e.setTranslate(o),e.updateActiveIndex(),e.updateSlidesClasses()}let r;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)s(),n.autoHeight&&e.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const a=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;r=e.slideTo(a.length-1,0,!1,!0)}else r=e.slideTo(e.activeIndex,0,!1,!0);r||s()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const n=this,s=n.params.direction;return e||(e=s==="horizontal"?"vertical":"horizontal"),e===s||e!=="horizontal"&&e!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${s}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(r=>{e==="vertical"?r.style.width="":r.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&e==="rtl"||!t.rtl&&e==="ltr"||(t.rtl=e==="rtl",t.rtlTranslate=t.params.direction==="horizontal"&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const s=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(s()):yi(n,s())[0];return!a&&t.params.createElements&&(a=ys("div",t.params.wrapperClass),n.append(a),yi(n,`.${t.params.slideClass}`).forEach(o=>{a.append(o)})),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||_o(n,"direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||_o(n,"direction")==="rtl"),wrongRTL:_o(a,"display")==="-webkit-box"}),!0}init(e){const t=this;if(t.initialized||t.mount(e)===!1)return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach(r=>{r.complete?qf(t,r):r.addEventListener("load",a=>{qf(t,a.target)})}),fv(t),t.initialized=!0,fv(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){const n=this,{params:s,el:r,wrapperEl:a,slides:o}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),s.loop&&n.loopDestroy(),t&&(n.removeClasses(),r&&typeof r!="string"&&r.removeAttribute("style"),a&&a.removeAttribute("style"),o&&o.length&&o.forEach(l=>{l.classList.remove(s.slideVisibleClass,s.slideFullyVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(l=>{n.off(l)}),e!==!1&&(n.el&&typeof n.el!="string"&&(n.el.swiper=null),kY(n)),n.destroyed=!0),null}static extendDefaults(e){ds(M0,e)}static get extendedDefaults(){return M0}static get defaults(){return gv}static installModule(e){us.prototype.__modules__||(us.prototype.__modules__=[]);const t=us.prototype.__modules__;typeof e=="function"&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(t=>us.installModule(t)),us):(us.installModule(e),us)}}Object.keys(T0).forEach(i=>{Object.keys(T0[i]).forEach(e=>{us.prototype[e]=T0[i][e]})});us.use([WY,jY]);function eq({swiper:i,extendParams:e,on:t,emit:n}){e({virtual:{enabled:!1,slides:[],cache:!0,slidesPerViewAutoSlideSize:320,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let s;const r=hi();i.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const a=r.createElement("div");function o(A,p){const g=i.params.virtual;if(g.cache&&i.virtual.cache[p])return i.virtual.cache[p];let m;return g.renderSlide?(m=g.renderSlide.call(i,A,p),typeof m=="string"&&(xs(a,m),m=a.children[0])):i.isElement?m=ys("swiper-slide"):m=ys("div",i.params.slideClass),m.setAttribute("data-swiper-slide-index",p),g.renderSlide||xs(m,A),g.cache&&(i.virtual.cache[p]=m),m}function l(A,p,g){const{slidesPerGroup:m,centeredSlides:f,slidesPerView:y,loop:_,initialSlide:E}=i.params;if(p&&!_&&E>0)return;const{addSlidesBefore:v,addSlidesAfter:C,slidesPerViewAutoSlideSize:x}=i.params.virtual,{from:I,to:b,slides:w,slidesGrid:S,offset:B}=i.virtual;i.params.cssMode||i.updateActiveIndex();const T=typeof g>"u"?i.activeIndex||0:g;let D;i.rtlTranslate?D="right":D=i.isHorizontal()?"left":"top";let P;if(y==="auto")if(x){let z=i.size;z||(z=i.isHorizontal()?i.el.getBoundingClientRect().width:i.el.getBoundingClientRect().height),P=Math.max(1,Math.ceil(z/x))}else P=1;else P=y;let R,L;f?(R=Math.floor(P/2)+m+C,L=Math.floor(P/2)+m+v):(R=P+(m-1)+C,L=(_?P:m)+v);let F=T-L,$=T+R;_||(F=Math.max(F,0),$=Math.min($,w.length-1));let J=(i.slidesGrid[F]||0)-(i.slidesGrid[0]||0);_&&T>=L?(F-=L,f||(J+=i.slidesGrid[0])):_&&T<L&&(F=-L,f&&(J+=i.slidesGrid[0])),Object.assign(i.virtual,{from:F,to:$,offset:J,slidesGrid:i.slidesGrid,slidesBefore:L,slidesAfter:R});function W(){i.updateSlides(),i.updateProgress(),i.updateSlidesClasses(),n("virtualUpdate")}if(I===F&&b===$&&!A){i.slidesGrid!==S&&J!==B&&i.slides.forEach(z=>{z.style[D]=`${J-Math.abs(i.cssOverflowAdjustment())}px`}),i.updateProgress(),n("virtualUpdate");return}if(i.params.virtual.renderExternal){i.params.virtual.renderExternal.call(i,{offset:J,from:F,to:$,slides:(function(){const ae=[];for(let Be=F;Be<=$;Be+=1)ae.push(w[Be]);return ae})()}),i.params.virtual.renderExternalUpdate?W():n("virtualUpdate");return}const he=[],le=[],Z=z=>{let ae=z;return z<0?ae=w.length+z:ae>=w.length&&(ae=ae-w.length),ae};if(A)i.slides.filter(z=>z.matches(`.${i.params.slideClass}, swiper-slide`)).forEach(z=>{z.remove()});else for(let z=I;z<=b;z+=1)if(z<F||z>$){const ae=Z(z);i.slides.filter(Be=>Be.matches(`.${i.params.slideClass}[data-swiper-slide-index="${ae}"], swiper-slide[data-swiper-slide-index="${ae}"]`)).forEach(Be=>{Be.remove()})}const ne=_?-w.length:0,G=_?w.length*2:w.length;for(let z=ne;z<G;z+=1)if(z>=F&&z<=$){const ae=Z(z);typeof b>"u"||A?le.push(ae):(z>b&&le.push(ae),z<I&&he.push(ae))}if(le.forEach(z=>{i.slidesEl.append(o(w[z],z))}),_)for(let z=he.length-1;z>=0;z-=1){const ae=he[z];i.slidesEl.prepend(o(w[ae],ae))}else he.sort((z,ae)=>ae-z),he.forEach(z=>{i.slidesEl.prepend(o(w[z],z))});yi(i.slidesEl,".swiper-slide, swiper-slide").forEach(z=>{z.style[D]=`${J-Math.abs(i.cssOverflowAdjustment())}px`}),W()}function c(A){if(typeof A=="object"&&"length"in A)for(let p=0;p<A.length;p+=1)A[p]&&i.virtual.slides.push(A[p]);else i.virtual.slides.push(A);l(!0)}function u(A){const p=i.activeIndex;let g=p+1,m=1;if(Array.isArray(A)){for(let f=0;f<A.length;f+=1)A[f]&&i.virtual.slides.unshift(A[f]);g=p+A.length,m=A.length}else i.virtual.slides.unshift(A);if(i.params.virtual.cache){const f=i.virtual.cache,y={};Object.keys(f).forEach(_=>{const E=f[_],v=E.getAttribute("data-swiper-slide-index");v&&E.setAttribute("data-swiper-slide-index",parseInt(v,10)+m),y[parseInt(_,10)+m]=E}),i.virtual.cache=y}l(!0),i.slideTo(g,0)}function h(A){if(typeof A>"u"||A===null)return;let p=i.activeIndex;if(Array.isArray(A))for(let g=A.length-1;g>=0;g-=1)i.params.virtual.cache&&(delete i.virtual.cache[A[g]],Object.keys(i.virtual.cache).forEach(m=>{m>A&&(i.virtual.cache[m-1]=i.virtual.cache[m],i.virtual.cache[m-1].setAttribute("data-swiper-slide-index",m-1),delete i.virtual.cache[m])})),i.virtual.slides.splice(A[g],1),A[g]<p&&(p-=1),p=Math.max(p,0);else i.params.virtual.cache&&(delete i.virtual.cache[A],Object.keys(i.virtual.cache).forEach(g=>{g>A&&(i.virtual.cache[g-1]=i.virtual.cache[g],i.virtual.cache[g-1].setAttribute("data-swiper-slide-index",g-1),delete i.virtual.cache[g])})),i.virtual.slides.splice(A,1),A<p&&(p-=1),p=Math.max(p,0);l(!0),i.slideTo(p,0)}function d(){i.virtual.slides=[],i.params.virtual.cache&&(i.virtual.cache={}),l(!0),i.slideTo(0,0)}t("beforeInit",()=>{if(!i.params.virtual.enabled)return;let A;if(typeof i.passedParams.virtual.slides>"u"){const p=[...i.slidesEl.children].filter(g=>g.matches(`.${i.params.slideClass}, swiper-slide`));p&&p.length&&(i.virtual.slides=[...p],A=!0,p.forEach((g,m)=>{g.setAttribute("data-swiper-slide-index",m),i.virtual.cache[m]=g,g.remove()}))}A||(i.virtual.slides=i.params.virtual.slides),i.classNames.push(`${i.params.containerModifierClass}virtual`),i.params.watchSlidesProgress=!0,i.originalParams.watchSlidesProgress=!0,l(!1,!0)}),t("setTranslate",()=>{i.params.virtual.enabled&&(i.params.cssMode&&!i._immediateVirtual?(clearTimeout(s),s=setTimeout(()=>{l()},100)):l())}),t("init update resize",()=>{i.params.virtual.enabled&&i.params.cssMode&&al(i.wrapperEl,"--swiper-virtual-size",`${i.virtualSize}px`)}),Object.assign(i.virtual,{appendSlide:c,prependSlide:u,removeSlide:h,removeAllSlides:d,update:l})}function tq({swiper:i,extendParams:e,on:t,emit:n}){const s=hi(),r=wn();i.keyboard={enabled:!1},e({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0,speed:void 0}});function a(c){if(!i.enabled)return;const{rtlTranslate:u}=i;let h=c;h.originalEvent&&(h=h.originalEvent);const d=h.keyCode||h.charCode,A=i.params.keyboard.pageUpDown,p=A&&d===33,g=A&&d===34,m=d===37,f=d===39,y=d===38,_=d===40;if(!i.allowSlideNext&&(i.isHorizontal()&&f||i.isVertical()&&_||g)||!i.allowSlidePrev&&(i.isHorizontal()&&m||i.isVertical()&&y||p))return!1;if(h.shiftKey||h.altKey||h.ctrlKey||h.metaKey||s.activeElement&&(s.activeElement.isContentEditable||s.activeElement.nodeName&&(s.activeElement.nodeName.toLowerCase()==="input"||s.activeElement.nodeName.toLowerCase()==="textarea")))return;if(i.params.keyboard.onlyInViewport&&(p||g||m||f||y||_)){let v=!1;if(Fl(i.el,`.${i.params.slideClass}, swiper-slide`).length>0&&Fl(i.el,`.${i.params.slideActiveClass}`).length===0)return;const C=i.el,x=C.clientWidth,I=C.clientHeight,b=r.innerWidth,w=r.innerHeight,S=Yg(C);u&&(S.left-=C.scrollLeft);const B=[[S.left,S.top],[S.left+x,S.top],[S.left,S.top+I],[S.left+x,S.top+I]];for(let T=0;T<B.length;T+=1){const D=B[T];if(D[0]>=0&&D[0]<=b&&D[1]>=0&&D[1]<=w){if(D[0]===0&&D[1]===0)continue;v=!0}}if(!v)return}const E=i.params.keyboard.speed;i.isHorizontal()?((p||g||m||f)&&(h.preventDefault?h.preventDefault():h.returnValue=!1),((g||f)&&!u||(p||m)&&u)&&i.slideNext(E),((p||m)&&!u||(g||f)&&u)&&i.slidePrev(E)):((p||g||y||_)&&(h.preventDefault?h.preventDefault():h.returnValue=!1),(g||_)&&i.slideNext(E),(p||y)&&i.slidePrev(E)),n("keyPress",d)}function o(){i.keyboard.enabled||(s.addEventListener("keydown",a),i.keyboard.enabled=!0)}function l(){i.keyboard.enabled&&(s.removeEventListener("keydown",a),i.keyboard.enabled=!1)}t("init",()=>{i.params.keyboard.enabled&&o()}),t("destroy",()=>{i.keyboard.enabled&&l()}),Object.assign(i.keyboard,{enable:o,disable:l})}function nq({swiper:i,extendParams:e,on:t,emit:n}){const s=wn();e({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),i.mousewheel={enabled:!1};let r,a=Fs(),o;const l=[];function c(y){let C=0,x=0,I=0,b=0;return"detail"in y&&(x=y.detail),"wheelDelta"in y&&(x=-y.wheelDelta/120),"wheelDeltaY"in y&&(x=-y.wheelDeltaY/120),"wheelDeltaX"in y&&(C=-y.wheelDeltaX/120),"axis"in y&&y.axis===y.HORIZONTAL_AXIS&&(C=x,x=0),I=C*10,b=x*10,"deltaY"in y&&(b=y.deltaY),"deltaX"in y&&(I=y.deltaX),y.shiftKey&&!I&&(I=b,b=0),(I||b)&&y.deltaMode&&(y.deltaMode===1?(I*=40,b*=40):(I*=800,b*=800)),I&&!C&&(C=I<1?-1:1),b&&!x&&(x=b<1?-1:1),{spinX:C,spinY:x,pixelX:I,pixelY:b}}function u(){i.enabled&&(i.mouseEntered=!0)}function h(){i.enabled&&(i.mouseEntered=!1)}function d(y){return i.params.mousewheel.thresholdDelta&&y.delta<i.params.mousewheel.thresholdDelta||i.params.mousewheel.thresholdTime&&Fs()-a<i.params.mousewheel.thresholdTime?!1:y.delta>=6&&Fs()-a<60?!0:(y.direction<0?(!i.isEnd||i.params.loop)&&!i.animating&&(i.slideNext(),n("scroll",y.raw)):(!i.isBeginning||i.params.loop)&&!i.animating&&(i.slidePrev(),n("scroll",y.raw)),a=new s.Date().getTime(),!1)}function A(y){const _=i.params.mousewheel;if(y.direction<0){if(i.isEnd&&!i.params.loop&&_.releaseOnEdges)return!0}else if(i.isBeginning&&!i.params.loop&&_.releaseOnEdges)return!0;return!1}function p(y){let _=y,E=!0;if(!i.enabled||y.target.closest(`.${i.params.mousewheel.noMousewheelClass}`))return;const v=i.params.mousewheel;i.params.cssMode&&_.preventDefault();let C=i.el;i.params.mousewheel.eventsTarget!=="container"&&(C=document.querySelector(i.params.mousewheel.eventsTarget));const x=C&&C.contains(_.target);if(!i.mouseEntered&&!x&&!v.releaseOnEdges)return!0;_.originalEvent&&(_=_.originalEvent);let I=0;const b=i.rtlTranslate?-1:1,w=c(_);if(v.forceToAxis)if(i.isHorizontal())if(Math.abs(w.pixelX)>Math.abs(w.pixelY))I=-w.pixelX*b;else return!0;else if(Math.abs(w.pixelY)>Math.abs(w.pixelX))I=-w.pixelY;else return!0;else I=Math.abs(w.pixelX)>Math.abs(w.pixelY)?-w.pixelX*b:-w.pixelY;if(I===0)return!0;v.invert&&(I=-I);let S=i.getTranslate()+I*v.sensitivity;if(S>=i.minTranslate()&&(S=i.minTranslate()),S<=i.maxTranslate()&&(S=i.maxTranslate()),E=i.params.loop?!0:!(S===i.minTranslate()||S===i.maxTranslate()),E&&i.params.nested&&_.stopPropagation(),!i.params.freeMode||!i.params.freeMode.enabled){const B={time:Fs(),delta:Math.abs(I),direction:Math.sign(I),raw:y};l.length>=2&&l.shift();const T=l.length?l[l.length-1]:void 0;if(l.push(B),T?(B.direction!==T.direction||B.delta>T.delta||B.time>T.time+150)&&d(B):d(B),A(B))return!0}else{const B={time:Fs(),delta:Math.abs(I),direction:Math.sign(I)},T=o&&B.time<o.time+500&&B.delta<=o.delta&&B.direction===o.direction;if(!T){o=void 0;let D=i.getTranslate()+I*v.sensitivity;const P=i.isBeginning,R=i.isEnd;if(D>=i.minTranslate()&&(D=i.minTranslate()),D<=i.maxTranslate()&&(D=i.maxTranslate()),i.setTransition(0),i.setTranslate(D),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!P&&i.isBeginning||!R&&i.isEnd)&&i.updateSlidesClasses(),i.params.loop&&i.loopFix({direction:B.direction<0?"next":"prev",byMousewheel:!0}),i.params.freeMode.sticky){clearTimeout(r),r=void 0,l.length>=15&&l.shift();const L=l.length?l[l.length-1]:void 0,F=l[0];if(l.push(B),L&&(B.delta>L.delta||B.direction!==L.direction))l.splice(0);else if(l.length>=15&&B.time-F.time<500&&F.delta-B.delta>=1&&B.delta<=6){const $=I>0?.8:.2;o=B,l.splice(0),r=Kh(()=>{i.destroyed||!i.params||i.slideToClosest(i.params.speed,!0,void 0,$)},0)}r||(r=Kh(()=>{if(i.destroyed||!i.params)return;const $=.5;o=B,l.splice(0),i.slideToClosest(i.params.speed,!0,void 0,$)},500))}if(T||n("scroll",_),i.params.autoplay&&i.params.autoplay.disableOnInteraction&&i.autoplay.stop(),v.releaseOnEdges&&(D===i.minTranslate()||D===i.maxTranslate()))return!0}}return _.preventDefault?_.preventDefault():_.returnValue=!1,!1}function g(y){let _=i.el;i.params.mousewheel.eventsTarget!=="container"&&(_=document.querySelector(i.params.mousewheel.eventsTarget)),_[y]("mouseenter",u),_[y]("mouseleave",h),_[y]("wheel",p)}function m(){return i.params.cssMode?(i.wrapperEl.removeEventListener("wheel",p),!0):i.mousewheel.enabled?!1:(g("addEventListener"),i.mousewheel.enabled=!0,!0)}function f(){return i.params.cssMode?(i.wrapperEl.addEventListener(event,p),!0):i.mousewheel.enabled?(g("removeEventListener"),i.mousewheel.enabled=!1,!0):!1}t("init",()=>{!i.params.mousewheel.enabled&&i.params.cssMode&&f(),i.params.mousewheel.enabled&&m()}),t("destroy",()=>{i.params.cssMode&&m(),i.mousewheel.enabled&&f()}),Object.assign(i.mousewheel,{enable:m,disable:f})}function Zb(i,e,t,n){return i.params.createElements&&Object.keys(n).forEach(s=>{if(!t[s]&&t.auto===!0){let r=yi(i.el,`.${n[s]}`)[0];r||(r=ys("div",n[s]),r.className=n[s],i.el.append(r)),t[s]=r,e[s]=r}}),t}const Zw='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function iq({swiper:i,extendParams:e,on:t,emit:n}){e({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),i.navigation={nextEl:null,prevEl:null,arrowSvg:Zw};function s(A){let p;return A&&typeof A=="string"&&i.isElement&&(p=i.el.querySelector(A)||i.hostEl.querySelector(A),p)?p:(A&&(typeof A=="string"&&(p=[...document.querySelectorAll(A)]),i.params.uniqueNavElements&&typeof A=="string"&&p&&p.length>1&&i.el.querySelectorAll(A).length===1?p=i.el.querySelector(A):p&&p.length===1&&(p=p[0])),A&&!p?A:p)}function r(A,p){const g=i.params.navigation;A=St(A),A.forEach(m=>{m&&(m.classList[p?"add":"remove"](...g.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=p),i.params.watchOverflow&&i.enabled&&m.classList[i.isLocked?"add":"remove"](g.lockClass))})}function a(){const{nextEl:A,prevEl:p}=i.navigation;if(i.params.loop){r(p,!1),r(A,!1);return}r(p,i.isBeginning&&!i.params.rewind),r(A,i.isEnd&&!i.params.rewind)}function o(A){A.preventDefault(),!(i.isBeginning&&!i.params.loop&&!i.params.rewind)&&(i.slidePrev(),n("navigationPrev"))}function l(A){A.preventDefault(),!(i.isEnd&&!i.params.loop&&!i.params.rewind)&&(i.slideNext(),n("navigationNext"))}function c(){const A=i.params.navigation;if(i.params.navigation=Zb(i,i.originalParams.navigation,i.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(A.nextEl||A.prevEl))return;let p=s(A.nextEl),g=s(A.prevEl);Object.assign(i.navigation,{nextEl:p,prevEl:g}),p=St(p),g=St(g);const m=(f,y)=>{if(f){if(A.addIcons&&f.matches(".swiper-button-next,.swiper-button-prev")&&!f.querySelector("svg")){const _=document.createElement("div");xs(_,Zw),f.appendChild(_.querySelector("svg")),_.remove()}f.addEventListener("click",y==="next"?l:o)}!i.enabled&&f&&f.classList.add(...A.lockClass.split(" "))};p.forEach(f=>m(f,"next")),g.forEach(f=>m(f,"prev"))}function u(){let{nextEl:A,prevEl:p}=i.navigation;A=St(A),p=St(p);const g=(m,f)=>{m.removeEventListener("click",f==="next"?l:o),m.classList.remove(...i.params.navigation.disabledClass.split(" "))};A.forEach(m=>g(m,"next")),p.forEach(m=>g(m,"prev"))}t("init",()=>{i.params.navigation.enabled===!1?d():(c(),a())}),t("toEdge fromEdge lock unlock",()=>{a()}),t("destroy",()=>{u()}),t("enable disable",()=>{let{nextEl:A,prevEl:p}=i.navigation;if(A=St(A),p=St(p),i.enabled){a();return}[...A,...p].filter(g=>!!g).forEach(g=>g.classList.add(i.params.navigation.lockClass))}),t("click",(A,p)=>{let{nextEl:g,prevEl:m}=i.navigation;g=St(g),m=St(m);const f=p.target;let y=m.includes(f)||g.includes(f);if(i.isElement&&!y){const _=p.path||p.composedPath&&p.composedPath();_&&(y=_.find(E=>g.includes(E)||m.includes(E)))}if(i.params.navigation.hideOnClick&&!y){if(i.pagination&&i.params.pagination&&i.params.pagination.clickable&&(i.pagination.el===f||i.pagination.el.contains(f)))return;let _;g.length?_=g[0].classList.contains(i.params.navigation.hiddenClass):m.length&&(_=m[0].classList.contains(i.params.navigation.hiddenClass)),n(_===!0?"navigationShow":"navigationHide"),[...g,...m].filter(E=>!!E).forEach(E=>E.classList.toggle(i.params.navigation.hiddenClass))}});const h=()=>{i.el.classList.remove(...i.params.navigation.navigationDisabledClass.split(" ")),c(),a()},d=()=>{i.el.classList.add(...i.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(i.navigation,{enable:h,disable:d,update:a,init:c,destroy:u})}function Ca(i=""){return`.${i.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function sq({swiper:i,extendParams:e,on:t,emit:n}){const s="swiper-pagination";e({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:f=>f,formatFractionTotal:f=>f,bulletClass:`${s}-bullet`,bulletActiveClass:`${s}-bullet-active`,modifierClass:`${s}-`,currentClass:`${s}-current`,totalClass:`${s}-total`,hiddenClass:`${s}-hidden`,progressbarFillClass:`${s}-progressbar-fill`,progressbarOppositeClass:`${s}-progressbar-opposite`,clickableClass:`${s}-clickable`,lockClass:`${s}-lock`,horizontalClass:`${s}-horizontal`,verticalClass:`${s}-vertical`,paginationDisabledClass:`${s}-disabled`}}),i.pagination={el:null,bullets:[]};let r,a=0;function o(){return!i.params.pagination.el||!i.pagination.el||Array.isArray(i.pagination.el)&&i.pagination.el.length===0}function l(f,y){const{bulletActiveClass:_}=i.params.pagination;f&&(f=f[`${y==="prev"?"previous":"next"}ElementSibling`],f&&(f.classList.add(`${_}-${y}`),f=f[`${y==="prev"?"previous":"next"}ElementSibling`],f&&f.classList.add(`${_}-${y}-${y}`)))}function c(f,y,_){if(f=f%_,y=y%_,y===f+1)return"next";if(y===f-1)return"previous"}function u(f){const y=f.target.closest(Ca(i.params.pagination.bulletClass));if(!y)return;f.preventDefault();const _=FA(y)*i.params.slidesPerGroup;if(i.params.loop){if(i.realIndex===_)return;const E=c(i.realIndex,_,i.slides.length);E==="next"?i.slideNext():E==="previous"?i.slidePrev():i.slideToLoop(_)}else i.slideTo(_)}function h(){const f=i.rtl,y=i.params.pagination;if(o())return;let _=i.pagination.el;_=St(_);let E,v;const C=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:i.slides.length,x=i.params.loop?Math.ceil(C/i.params.slidesPerGroup):i.snapGrid.length;if(i.params.loop?(v=i.previousRealIndex||0,E=i.params.slidesPerGroup>1?Math.floor(i.realIndex/i.params.slidesPerGroup):i.realIndex):typeof i.snapIndex<"u"?(E=i.snapIndex,v=i.previousSnapIndex):(v=i.previousIndex||0,E=i.activeIndex||0),y.type==="bullets"&&i.pagination.bullets&&i.pagination.bullets.length>0){const I=i.pagination.bullets;let b,w,S;if(y.dynamicBullets&&(r=pv(I[0],i.isHorizontal()?"width":"height"),_.forEach(B=>{B.style[i.isHorizontal()?"width":"height"]=`${r*(y.dynamicMainBullets+4)}px`}),y.dynamicMainBullets>1&&v!==void 0&&(a+=E-(v||0),a>y.dynamicMainBullets-1?a=y.dynamicMainBullets-1:a<0&&(a=0)),b=Math.max(E-a,0),w=b+(Math.min(I.length,y.dynamicMainBullets)-1),S=(w+b)/2),I.forEach(B=>{const T=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(D=>`${y.bulletActiveClass}${D}`)].map(D=>typeof D=="string"&&D.includes(" ")?D.split(" "):D).flat();B.classList.remove(...T)}),_.length>1)I.forEach(B=>{const T=FA(B);T===E?B.classList.add(...y.bulletActiveClass.split(" ")):i.isElement&&B.setAttribute("part","bullet"),y.dynamicBullets&&(T>=b&&T<=w&&B.classList.add(...`${y.bulletActiveClass}-main`.split(" ")),T===b&&l(B,"prev"),T===w&&l(B,"next"))});else{const B=I[E];if(B&&B.classList.add(...y.bulletActiveClass.split(" ")),i.isElement&&I.forEach((T,D)=>{T.setAttribute("part",D===E?"bullet-active":"bullet")}),y.dynamicBullets){const T=I[b],D=I[w];for(let P=b;P<=w;P+=1)I[P]&&I[P].classList.add(...`${y.bulletActiveClass}-main`.split(" "));l(T,"prev"),l(D,"next")}}if(y.dynamicBullets){const B=Math.min(I.length,y.dynamicMainBullets+4),T=(r*B-r)/2-S*r,D=f?"right":"left";I.forEach(P=>{P.style[i.isHorizontal()?D:"top"]=`${T}px`})}}_.forEach((I,b)=>{if(y.type==="fraction"&&(I.querySelectorAll(Ca(y.currentClass)).forEach(w=>{w.textContent=y.formatFractionCurrent(E+1)}),I.querySelectorAll(Ca(y.totalClass)).forEach(w=>{w.textContent=y.formatFractionTotal(x)})),y.type==="progressbar"){let w;y.progressbarOpposite?w=i.isHorizontal()?"vertical":"horizontal":w=i.isHorizontal()?"horizontal":"vertical";const S=(E+1)/x;let B=1,T=1;w==="horizontal"?B=S:T=S,I.querySelectorAll(Ca(y.progressbarFillClass)).forEach(D=>{D.style.transform=`translate3d(0,0,0) scaleX(${B}) scaleY(${T})`,D.style.transitionDuration=`${i.params.speed}ms`})}y.type==="custom"&&y.renderCustom?(xs(I,y.renderCustom(i,E+1,x)),b===0&&n("paginationRender",I)):(b===0&&n("paginationRender",I),n("paginationUpdate",I)),i.params.watchOverflow&&i.enabled&&I.classList[i.isLocked?"add":"remove"](y.lockClass)})}function d(){const f=i.params.pagination;if(o())return;const y=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:i.grid&&i.params.grid.rows>1?i.slides.length/Math.ceil(i.params.grid.rows):i.slides.length;let _=i.pagination.el;_=St(_);let E="";if(f.type==="bullets"){let v=i.params.loop?Math.ceil(y/i.params.slidesPerGroup):i.snapGrid.length;i.params.freeMode&&i.params.freeMode.enabled&&v>y&&(v=y);for(let C=0;C<v;C+=1)f.renderBullet?E+=f.renderBullet.call(i,C,f.bulletClass):E+=`<${f.bulletElement} ${i.isElement?'part="bullet"':""} class="${f.bulletClass}"></${f.bulletElement}>`}f.type==="fraction"&&(f.renderFraction?E=f.renderFraction.call(i,f.currentClass,f.totalClass):E=`<span class="${f.currentClass}"></span> / <span class="${f.totalClass}"></span>`),f.type==="progressbar"&&(f.renderProgressbar?E=f.renderProgressbar.call(i,f.progressbarFillClass):E=`<span class="${f.progressbarFillClass}"></span>`),i.pagination.bullets=[],_.forEach(v=>{f.type!=="custom"&&xs(v,E||""),f.type==="bullets"&&i.pagination.bullets.push(...v.querySelectorAll(Ca(f.bulletClass)))}),f.type!=="custom"&&n("paginationRender",_[0])}function A(){i.params.pagination=Zb(i,i.originalParams.pagination,i.params.pagination,{el:"swiper-pagination"});const f=i.params.pagination;if(!f.el)return;let y;typeof f.el=="string"&&i.isElement&&(y=i.el.querySelector(f.el)),!y&&typeof f.el=="string"&&(y=[...document.querySelectorAll(f.el)]),y||(y=f.el),!(!y||y.length===0)&&(i.params.uniqueNavElements&&typeof f.el=="string"&&Array.isArray(y)&&y.length>1&&(y=[...i.el.querySelectorAll(f.el)],y.length>1&&(y=y.find(_=>Fl(_,".swiper")[0]===i.el))),Array.isArray(y)&&y.length===1&&(y=y[0]),Object.assign(i.pagination,{el:y}),y=St(y),y.forEach(_=>{f.type==="bullets"&&f.clickable&&_.classList.add(...(f.clickableClass||"").split(" ")),_.classList.add(f.modifierClass+f.type),_.classList.add(i.isHorizontal()?f.horizontalClass:f.verticalClass),f.type==="bullets"&&f.dynamicBullets&&(_.classList.add(`${f.modifierClass}${f.type}-dynamic`),a=0,f.dynamicMainBullets<1&&(f.dynamicMainBullets=1)),f.type==="progressbar"&&f.progressbarOpposite&&_.classList.add(f.progressbarOppositeClass),f.clickable&&_.addEventListener("click",u),i.enabled||_.classList.add(f.lockClass)}))}function p(){const f=i.params.pagination;if(o())return;let y=i.pagination.el;y&&(y=St(y),y.forEach(_=>{_.classList.remove(f.hiddenClass),_.classList.remove(f.modifierClass+f.type),_.classList.remove(i.isHorizontal()?f.horizontalClass:f.verticalClass),f.clickable&&(_.classList.remove(...(f.clickableClass||"").split(" ")),_.removeEventListener("click",u))})),i.pagination.bullets&&i.pagination.bullets.forEach(_=>_.classList.remove(...f.bulletActiveClass.split(" ")))}t("changeDirection",()=>{if(!i.pagination||!i.pagination.el)return;const f=i.params.pagination;let{el:y}=i.pagination;y=St(y),y.forEach(_=>{_.classList.remove(f.horizontalClass,f.verticalClass),_.classList.add(i.isHorizontal()?f.horizontalClass:f.verticalClass)})}),t("init",()=>{i.params.pagination.enabled===!1?m():(A(),d(),h())}),t("activeIndexChange",()=>{typeof i.snapIndex>"u"&&h()}),t("snapIndexChange",()=>{h()}),t("snapGridLengthChange",()=>{d(),h()}),t("destroy",()=>{p()}),t("enable disable",()=>{let{el:f}=i.pagination;f&&(f=St(f),f.forEach(y=>y.classList[i.enabled?"remove":"add"](i.params.pagination.lockClass)))}),t("lock unlock",()=>{h()}),t("click",(f,y)=>{const _=y.target,E=St(i.pagination.el);if(i.params.pagination.el&&i.params.pagination.hideOnClick&&E&&E.length>0&&!_.classList.contains(i.params.pagination.bulletClass)){if(i.navigation&&(i.navigation.nextEl&&_===i.navigation.nextEl||i.navigation.prevEl&&_===i.navigation.prevEl))return;const v=E[0].classList.contains(i.params.pagination.hiddenClass);n(v===!0?"paginationShow":"paginationHide"),E.forEach(C=>C.classList.toggle(i.params.pagination.hiddenClass))}});const g=()=>{i.el.classList.remove(i.params.pagination.paginationDisabledClass);let{el:f}=i.pagination;f&&(f=St(f),f.forEach(y=>y.classList.remove(i.params.pagination.paginationDisabledClass))),A(),d(),h()},m=()=>{i.el.classList.add(i.params.pagination.paginationDisabledClass);let{el:f}=i.pagination;f&&(f=St(f),f.forEach(y=>y.classList.add(i.params.pagination.paginationDisabledClass))),p()};Object.assign(i.pagination,{enable:g,disable:m,render:d,update:h,init:A,destroy:p})}function rq({swiper:i,extendParams:e,on:t,emit:n}){const s=hi();let r=!1,a=null,o=null,l,c,u,h;e({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),i.scrollbar={el:null,dragEl:null};function d(){if(!i.params.scrollbar.el||!i.scrollbar.el)return;const{scrollbar:S,rtlTranslate:B}=i,{dragEl:T,el:D}=S,P=i.params.scrollbar,R=i.params.loop?i.progressLoop:i.progress;let L=c,F=(u-c)*R;B?(F=-F,F>0?(L=c-F,F=0):-F+c>u&&(L=u+F)):F<0?(L=c+F,F=0):F+c>u&&(L=u-F),i.isHorizontal()?(T.style.transform=`translate3d(${F}px, 0, 0)`,T.style.width=`${L}px`):(T.style.transform=`translate3d(0px, ${F}px, 0)`,T.style.height=`${L}px`),P.hide&&(clearTimeout(a),D.style.opacity=1,a=setTimeout(()=>{D.style.opacity=0,D.style.transitionDuration="400ms"},1e3))}function A(S){!i.params.scrollbar.el||!i.scrollbar.el||(i.scrollbar.dragEl.style.transitionDuration=`${S}ms`)}function p(){if(!i.params.scrollbar.el||!i.scrollbar.el)return;const{scrollbar:S}=i,{dragEl:B,el:T}=S;B.style.width="",B.style.height="",u=i.isHorizontal()?T.offsetWidth:T.offsetHeight,h=i.size/(i.virtualSize+i.params.slidesOffsetBefore-(i.params.centeredSlides?i.snapGrid[0]:0)),i.params.scrollbar.dragSize==="auto"?c=u*h:c=parseInt(i.params.scrollbar.dragSize,10),i.isHorizontal()?B.style.width=`${c}px`:B.style.height=`${c}px`,h>=1?T.style.display="none":T.style.display="",i.params.scrollbar.hide&&(T.style.opacity=0),i.params.watchOverflow&&i.enabled&&S.el.classList[i.isLocked?"add":"remove"](i.params.scrollbar.lockClass)}function g(S){return i.isHorizontal()?S.clientX:S.clientY}function m(S){const{scrollbar:B,rtlTranslate:T}=i,{el:D}=B;let P;P=(g(S)-Yg(D)[i.isHorizontal()?"left":"top"]-(l!==null?l:c/2))/(u-c),P=Math.max(Math.min(P,1),0),T&&(P=1-P);const R=i.minTranslate()+(i.maxTranslate()-i.minTranslate())*P;i.updateProgress(R),i.setTranslate(R),i.updateActiveIndex(),i.updateSlidesClasses()}function f(S){const B=i.params.scrollbar,{scrollbar:T,wrapperEl:D}=i,{el:P,dragEl:R}=T;r=!0,l=S.target===R?g(S)-S.target.getBoundingClientRect()[i.isHorizontal()?"left":"top"]:null,S.preventDefault(),S.stopPropagation(),D.style.transitionDuration="100ms",R.style.transitionDuration="100ms",m(S),clearTimeout(o),P.style.transitionDuration="0ms",B.hide&&(P.style.opacity=1),i.params.cssMode&&(i.wrapperEl.style["scroll-snap-type"]="none"),n("scrollbarDragStart",S)}function y(S){const{scrollbar:B,wrapperEl:T}=i,{el:D,dragEl:P}=B;r&&(S.preventDefault&&S.cancelable?S.preventDefault():S.returnValue=!1,m(S),T.style.transitionDuration="0ms",D.style.transitionDuration="0ms",P.style.transitionDuration="0ms",n("scrollbarDragMove",S))}function _(S){const B=i.params.scrollbar,{scrollbar:T,wrapperEl:D}=i,{el:P}=T;r&&(r=!1,i.params.cssMode&&(i.wrapperEl.style["scroll-snap-type"]="",D.style.transitionDuration=""),B.hide&&(clearTimeout(o),o=Kh(()=>{P.style.opacity=0,P.style.transitionDuration="400ms"},1e3)),n("scrollbarDragEnd",S),B.snapOnRelease&&i.slideToClosest())}function E(S){const{scrollbar:B,params:T}=i,D=B.el;if(!D)return;const P=D,R=T.passiveListeners?{passive:!1,capture:!1}:!1,L=T.passiveListeners?{passive:!0,capture:!1}:!1;if(!P)return;const F=S==="on"?"addEventListener":"removeEventListener";P[F]("pointerdown",f,R),s[F]("pointermove",y,R),s[F]("pointerup",_,L)}function v(){!i.params.scrollbar.el||!i.scrollbar.el||E("on")}function C(){!i.params.scrollbar.el||!i.scrollbar.el||E("off")}function x(){const{scrollbar:S,el:B}=i;i.params.scrollbar=Zb(i,i.originalParams.scrollbar,i.params.scrollbar,{el:"swiper-scrollbar"});const T=i.params.scrollbar;if(!T.el)return;let D;if(typeof T.el=="string"&&i.isElement&&(D=i.el.querySelector(T.el)),!D&&typeof T.el=="string"){if(D=s.querySelectorAll(T.el),!D.length)return}else D||(D=T.el);i.params.uniqueNavElements&&typeof T.el=="string"&&D.length>1&&B.querySelectorAll(T.el).length===1&&(D=B.querySelector(T.el)),D.length>0&&(D=D[0]),D.classList.add(i.isHorizontal()?T.horizontalClass:T.verticalClass);let P;D&&(P=D.querySelector(Ca(i.params.scrollbar.dragClass)),P||(P=ys("div",i.params.scrollbar.dragClass),D.append(P))),Object.assign(S,{el:D,dragEl:P}),T.draggable&&v(),D&&D.classList[i.enabled?"remove":"add"](...so(i.params.scrollbar.lockClass))}function I(){const S=i.params.scrollbar,B=i.scrollbar.el;B&&B.classList.remove(...so(i.isHorizontal()?S.horizontalClass:S.verticalClass)),C()}t("changeDirection",()=>{if(!i.scrollbar||!i.scrollbar.el)return;const S=i.params.scrollbar;let{el:B}=i.scrollbar;B=St(B),B.forEach(T=>{T.classList.remove(S.horizontalClass,S.verticalClass),T.classList.add(i.isHorizontal()?S.horizontalClass:S.verticalClass)})}),t("init",()=>{i.params.scrollbar.enabled===!1?w():(x(),p(),d())}),t("update resize observerUpdate lock unlock changeDirection",()=>{p()}),t("setTranslate",()=>{d()}),t("setTransition",(S,B)=>{A(B)}),t("enable disable",()=>{const{el:S}=i.scrollbar;S&&S.classList[i.enabled?"remove":"add"](...so(i.params.scrollbar.lockClass))}),t("destroy",()=>{I()});const b=()=>{i.el.classList.remove(...so(i.params.scrollbar.scrollbarDisabledClass)),i.scrollbar.el&&i.scrollbar.el.classList.remove(...so(i.params.scrollbar.scrollbarDisabledClass)),x(),p(),d()},w=()=>{i.el.classList.add(...so(i.params.scrollbar.scrollbarDisabledClass)),i.scrollbar.el&&i.scrollbar.el.classList.add(...so(i.params.scrollbar.scrollbarDisabledClass)),I()};Object.assign(i.scrollbar,{enable:b,disable:w,updateSize:p,setTranslate:d,init:x,destroy:I})}function aq({swiper:i,extendParams:e,on:t}){e({parallax:{enabled:!1}});const n="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",s=(o,l)=>{const{rtl:c}=i,u=c?-1:1,h=o.getAttribute("data-swiper-parallax")||"0";let d=o.getAttribute("data-swiper-parallax-x"),A=o.getAttribute("data-swiper-parallax-y");const p=o.getAttribute("data-swiper-parallax-scale"),g=o.getAttribute("data-swiper-parallax-opacity"),m=o.getAttribute("data-swiper-parallax-rotate");if(d||A?(d=d||"0",A=A||"0"):i.isHorizontal()?(d=h,A="0"):(A=h,d="0"),d.indexOf("%")>=0?d=`${parseInt(d,10)*l*u}%`:d=`${d*l*u}px`,A.indexOf("%")>=0?A=`${parseInt(A,10)*l}%`:A=`${A*l}px`,typeof g<"u"&&g!==null){const y=g-(g-1)*(1-Math.abs(l));o.style.opacity=y}let f=`translate3d(${d}, ${A}, 0px)`;if(typeof p<"u"&&p!==null){const y=p-(p-1)*(1-Math.abs(l));f+=` scale(${y})`}if(m&&typeof m<"u"&&m!==null){const y=m*l*-1;f+=` rotate(${y}deg)`}o.style.transform=f},r=()=>{const{el:o,slides:l,progress:c,snapGrid:u,isElement:h}=i,d=yi(o,n);i.isElement&&d.push(...yi(i.hostEl,n)),d.forEach(A=>{s(A,c)}),l.forEach((A,p)=>{let g=A.progress;i.params.slidesPerGroup>1&&i.params.slidesPerView!=="auto"&&(g+=Math.ceil(p/2)-c*(u.length-1)),g=Math.min(Math.max(g,-1),1),A.querySelectorAll(`${n}, [data-swiper-parallax-rotate]`).forEach(m=>{s(m,g)})})},a=(o=i.params.speed)=>{const{el:l,hostEl:c}=i,u=[...l.querySelectorAll(n)];i.isElement&&u.push(...c.querySelectorAll(n)),u.forEach(h=>{let d=parseInt(h.getAttribute("data-swiper-parallax-duration"),10)||o;o===0&&(d=0),h.style.transitionDuration=`${d}ms`})};t("beforeInit",()=>{i.params.parallax.enabled&&(i.params.watchSlidesProgress=!0,i.originalParams.watchSlidesProgress=!0)}),t("init",()=>{i.params.parallax.enabled&&r()}),t("setTranslate",()=>{i.params.parallax.enabled&&r()}),t("setTransition",(o,l)=>{i.params.parallax.enabled&&a(l)})}function oq({swiper:i,extendParams:e,on:t,emit:n}){const s=wn();e({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),i.zoom={enabled:!1};let r=1,a=!1,o=!1,l={x:0,y:0};const c=-3;let u,h;const d=[],A={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},p={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let m=1;Object.defineProperty(i.zoom,"scale",{get(){return m},set(Z){if(m!==Z){const ne=A.imageEl,G=A.slideEl;n("zoomChange",Z,ne,G)}m=Z}});function f(){if(d.length<2)return 1;const Z=d[0].pageX,ne=d[0].pageY,G=d[1].pageX,z=d[1].pageY;return Math.sqrt((G-Z)**2+(z-ne)**2)}function y(){const Z=i.params.zoom,ne=A.imageWrapEl.getAttribute("data-swiper-zoom")||Z.maxRatio;if(Z.limitToOriginalSize&&A.imageEl&&A.imageEl.naturalWidth){const G=A.imageEl.naturalWidth/A.imageEl.offsetWidth;return Math.min(G,ne)}return ne}function _(){if(d.length<2)return{x:null,y:null};const Z=A.imageEl.getBoundingClientRect();return[(d[0].pageX+(d[1].pageX-d[0].pageX)/2-Z.x-s.scrollX)/r,(d[0].pageY+(d[1].pageY-d[0].pageY)/2-Z.y-s.scrollY)/r]}function E(){return i.isElement?"swiper-slide":`.${i.params.slideClass}`}function v(Z){const ne=E();return!!(Z.target.matches(ne)||i.slides.filter(G=>G.contains(Z.target)).length>0)}function C(Z){const ne=`.${i.params.zoom.containerClass}`;return!!(Z.target.matches(ne)||[...i.hostEl.querySelectorAll(ne)].filter(G=>G.contains(Z.target)).length>0)}function x(Z){if(Z.pointerType==="mouse"&&d.splice(0,d.length),!v(Z))return;const ne=i.params.zoom;if(u=!1,h=!1,d.push(Z),!(d.length<2)){if(u=!0,A.scaleStart=f(),!A.slideEl){A.slideEl=Z.target.closest(`.${i.params.slideClass}, swiper-slide`),A.slideEl||(A.slideEl=i.slides[i.activeIndex]);let G=A.slideEl.querySelector(`.${ne.containerClass}`);if(G&&(G=G.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),A.imageEl=G,G?A.imageWrapEl=Fl(A.imageEl,`.${ne.containerClass}`)[0]:A.imageWrapEl=void 0,!A.imageWrapEl){A.imageEl=void 0;return}A.maxRatio=y()}if(A.imageEl){const[G,z]=_();A.originX=G,A.originY=z,A.imageEl.style.transitionDuration="0ms"}a=!0}}function I(Z){if(!v(Z))return;const ne=i.params.zoom,G=i.zoom,z=d.findIndex(ae=>ae.pointerId===Z.pointerId);z>=0&&(d[z]=Z),!(d.length<2)&&(h=!0,A.scaleMove=f(),A.imageEl&&(G.scale=A.scaleMove/A.scaleStart*r,G.scale>A.maxRatio&&(G.scale=A.maxRatio-1+(G.scale-A.maxRatio+1)**.5),G.scale<ne.minRatio&&(G.scale=ne.minRatio+1-(ne.minRatio-G.scale+1)**.5),A.imageEl.style.transform=`translate3d(0,0,0) scale(${G.scale})`))}function b(Z){if(!v(Z)||Z.pointerType==="mouse"&&Z.type==="pointerout")return;const ne=i.params.zoom,G=i.zoom,z=d.findIndex(ae=>ae.pointerId===Z.pointerId);z>=0&&d.splice(z,1),!(!u||!h)&&(u=!1,h=!1,A.imageEl&&(G.scale=Math.max(Math.min(G.scale,A.maxRatio),ne.minRatio),A.imageEl.style.transitionDuration=`${i.params.speed}ms`,A.imageEl.style.transform=`translate3d(0,0,0) scale(${G.scale})`,r=G.scale,a=!1,G.scale>1&&A.slideEl?A.slideEl.classList.add(`${ne.zoomedSlideClass}`):G.scale<=1&&A.slideEl&&A.slideEl.classList.remove(`${ne.zoomedSlideClass}`),G.scale===1&&(A.originX=0,A.originY=0,A.slideEl=void 0)))}let w;function S(){i.touchEventsData.preventTouchMoveFromPointerMove=!1}function B(){clearTimeout(w),i.touchEventsData.preventTouchMoveFromPointerMove=!0,w=setTimeout(()=>{i.destroyed||S()})}function T(Z){const ne=i.device;if(!A.imageEl||p.isTouched)return;ne.android&&Z.cancelable&&Z.preventDefault(),p.isTouched=!0;const G=d.length>0?d[0]:Z;p.touchesStart.x=G.pageX,p.touchesStart.y=G.pageY}function D(Z){const G=Z.pointerType==="mouse"&&i.params.zoom.panOnMouseMove;if(!v(Z)||!C(Z))return;const z=i.zoom;if(!A.imageEl)return;if(!p.isTouched||!A.slideEl){G&&L(Z);return}if(G){L(Z);return}p.isMoved||(p.width=A.imageEl.offsetWidth||A.imageEl.clientWidth,p.height=A.imageEl.offsetHeight||A.imageEl.clientHeight,p.startX=Av(A.imageWrapEl,"x")||0,p.startY=Av(A.imageWrapEl,"y")||0,A.slideWidth=A.slideEl.offsetWidth,A.slideHeight=A.slideEl.offsetHeight,A.imageWrapEl.style.transitionDuration="0ms");const ae=p.width*z.scale,Be=p.height*z.scale;if(p.minX=Math.min(A.slideWidth/2-ae/2,0),p.maxX=-p.minX,p.minY=Math.min(A.slideHeight/2-Be/2,0),p.maxY=-p.minY,p.touchesCurrent.x=d.length>0?d[0].pageX:Z.pageX,p.touchesCurrent.y=d.length>0?d[0].pageY:Z.pageY,Math.max(Math.abs(p.touchesCurrent.x-p.touchesStart.x),Math.abs(p.touchesCurrent.y-p.touchesStart.y))>5&&(i.allowClick=!1),!p.isMoved&&!a){if(i.isHorizontal()&&(Math.floor(p.minX)===Math.floor(p.startX)&&p.touchesCurrent.x<p.touchesStart.x||Math.floor(p.maxX)===Math.floor(p.startX)&&p.touchesCurrent.x>p.touchesStart.x)){p.isTouched=!1,S();return}if(!i.isHorizontal()&&(Math.floor(p.minY)===Math.floor(p.startY)&&p.touchesCurrent.y<p.touchesStart.y||Math.floor(p.maxY)===Math.floor(p.startY)&&p.touchesCurrent.y>p.touchesStart.y)){p.isTouched=!1,S();return}}Z.cancelable&&Z.preventDefault(),Z.stopPropagation(),B(),p.isMoved=!0;const De=(z.scale-r)/(A.maxRatio-i.params.zoom.minRatio),{originX:ut,originY:Qe}=A;p.currentX=p.touchesCurrent.x-p.touchesStart.x+p.startX+De*(p.width-ut*2),p.currentY=p.touchesCurrent.y-p.touchesStart.y+p.startY+De*(p.height-Qe*2),p.currentX<p.minX&&(p.currentX=p.minX+1-(p.minX-p.currentX+1)**.8),p.currentX>p.maxX&&(p.currentX=p.maxX-1+(p.currentX-p.maxX+1)**.8),p.currentY<p.minY&&(p.currentY=p.minY+1-(p.minY-p.currentY+1)**.8),p.currentY>p.maxY&&(p.currentY=p.maxY-1+(p.currentY-p.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=p.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=p.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(p.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(p.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(p.touchesCurrent.x-g.prevPositionX)<2&&(g.x=0),Math.abs(p.touchesCurrent.y-g.prevPositionY)<2&&(g.y=0),g.prevPositionX=p.touchesCurrent.x,g.prevPositionY=p.touchesCurrent.y,g.prevTime=Date.now(),A.imageWrapEl.style.transform=`translate3d(${p.currentX}px, ${p.currentY}px,0)`}function P(){const Z=i.zoom;if(d.length=0,!A.imageEl)return;if(!p.isTouched||!p.isMoved){p.isTouched=!1,p.isMoved=!1;return}p.isTouched=!1,p.isMoved=!1;let ne=300,G=300;const z=g.x*ne,ae=p.currentX+z,Be=g.y*G,fe=p.currentY+Be;g.x!==0&&(ne=Math.abs((ae-p.currentX)/g.x)),g.y!==0&&(G=Math.abs((fe-p.currentY)/g.y));const De=Math.max(ne,G);p.currentX=ae,p.currentY=fe;const ut=p.width*Z.scale,Qe=p.height*Z.scale;p.minX=Math.min(A.slideWidth/2-ut/2,0),p.maxX=-p.minX,p.minY=Math.min(A.slideHeight/2-Qe/2,0),p.maxY=-p.minY,p.currentX=Math.max(Math.min(p.currentX,p.maxX),p.minX),p.currentY=Math.max(Math.min(p.currentY,p.maxY),p.minY),A.imageWrapEl.style.transitionDuration=`${De}ms`,A.imageWrapEl.style.transform=`translate3d(${p.currentX}px, ${p.currentY}px,0)`}function R(){const Z=i.zoom;A.slideEl&&i.activeIndex!==i.slides.indexOf(A.slideEl)&&(A.imageEl&&(A.imageEl.style.transform="translate3d(0,0,0) scale(1)"),A.imageWrapEl&&(A.imageWrapEl.style.transform="translate3d(0,0,0)"),A.slideEl.classList.remove(`${i.params.zoom.zoomedSlideClass}`),Z.scale=1,r=1,A.slideEl=void 0,A.imageEl=void 0,A.imageWrapEl=void 0,A.originX=0,A.originY=0)}function L(Z){if(r<=1||!A.imageWrapEl||!v(Z)||!C(Z))return;const ne=s.getComputedStyle(A.imageWrapEl).transform,G=new s.DOMMatrix(ne);if(!o){o=!0,l.x=Z.clientX,l.y=Z.clientY,p.startX=G.e,p.startY=G.f,p.width=A.imageEl.offsetWidth||A.imageEl.clientWidth,p.height=A.imageEl.offsetHeight||A.imageEl.clientHeight,A.slideWidth=A.slideEl.offsetWidth,A.slideHeight=A.slideEl.offsetHeight;return}const z=(Z.clientX-l.x)*c,ae=(Z.clientY-l.y)*c,Be=p.width*r,fe=p.height*r,De=A.slideWidth,ut=A.slideHeight,Qe=Math.min(De/2-Be/2,0),Ye=-Qe,ot=Math.min(ut/2-fe/2,0),Ke=-ot,Ct=Math.max(Math.min(p.startX+z,Ye),Qe),U=Math.max(Math.min(p.startY+ae,Ke),ot);A.imageWrapEl.style.transitionDuration="0ms",A.imageWrapEl.style.transform=`translate3d(${Ct}px, ${U}px, 0)`,l.x=Z.clientX,l.y=Z.clientY,p.startX=Ct,p.startY=U,p.currentX=Ct,p.currentY=U}function F(Z){const ne=i.zoom,G=i.params.zoom;if(!A.slideEl){Z&&Z.target&&(A.slideEl=Z.target.closest(`.${i.params.slideClass}, swiper-slide`)),A.slideEl||(i.params.virtual&&i.params.virtual.enabled&&i.virtual?A.slideEl=yi(i.slidesEl,`.${i.params.slideActiveClass}`)[0]:A.slideEl=i.slides[i.activeIndex]);let ie=A.slideEl.querySelector(`.${G.containerClass}`);ie&&(ie=ie.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),A.imageEl=ie,ie?A.imageWrapEl=Fl(A.imageEl,`.${G.containerClass}`)[0]:A.imageWrapEl=void 0}if(!A.imageEl||!A.imageWrapEl)return;A.maxRatio=y(),i.params.cssMode&&(i.wrapperEl.style.overflow="hidden",i.wrapperEl.style.touchAction="none"),A.slideEl.classList.add(`${G.zoomedSlideClass}`);let z,ae,Be,fe,De,ut,Qe,Ye,ot,Ke,Ct,U,yt,je,Dt,Fe,k,M;typeof p.touchesStart.x>"u"&&Z?(z=Z.pageX,ae=Z.pageY):(z=p.touchesStart.x,ae=p.touchesStart.y);const Y=r,se=typeof Z=="number"?Z:null;r===1&&se&&(z=void 0,ae=void 0,p.touchesStart.x=void 0,p.touchesStart.y=void 0);const ce=y();ne.scale=se||ce,r=se||ce,Z&&!(r===1&&se)?(k=A.slideEl.offsetWidth,M=A.slideEl.offsetHeight,Be=Yg(A.slideEl).left+s.scrollX,fe=Yg(A.slideEl).top+s.scrollY,De=Be+k/2-z,ut=fe+M/2-ae,ot=A.imageEl.offsetWidth||A.imageEl.clientWidth,Ke=A.imageEl.offsetHeight||A.imageEl.clientHeight,Ct=ot*ne.scale,U=Ke*ne.scale,yt=Math.min(k/2-Ct/2,0),je=Math.min(M/2-U/2,0),Dt=-yt,Fe=-je,Y>0&&se&&typeof p.currentX=="number"&&typeof p.currentY=="number"?(Qe=p.currentX*ne.scale/Y,Ye=p.currentY*ne.scale/Y):(Qe=De*ne.scale,Ye=ut*ne.scale),Qe<yt&&(Qe=yt),Qe>Dt&&(Qe=Dt),Ye<je&&(Ye=je),Ye>Fe&&(Ye=Fe)):(Qe=0,Ye=0),se&&ne.scale===1&&(A.originX=0,A.originY=0),p.currentX=Qe,p.currentY=Ye,A.imageWrapEl.style.transitionDuration="300ms",A.imageWrapEl.style.transform=`translate3d(${Qe}px, ${Ye}px,0)`,A.imageEl.style.transitionDuration="300ms",A.imageEl.style.transform=`translate3d(0,0,0) scale(${ne.scale})`}function $(){const Z=i.zoom,ne=i.params.zoom;if(!A.slideEl){i.params.virtual&&i.params.virtual.enabled&&i.virtual?A.slideEl=yi(i.slidesEl,`.${i.params.slideActiveClass}`)[0]:A.slideEl=i.slides[i.activeIndex];let G=A.slideEl.querySelector(`.${ne.containerClass}`);G&&(G=G.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),A.imageEl=G,G?A.imageWrapEl=Fl(A.imageEl,`.${ne.containerClass}`)[0]:A.imageWrapEl=void 0}!A.imageEl||!A.imageWrapEl||(A.maxRatio=y(),i.params.cssMode&&(i.wrapperEl.style.overflow="",i.wrapperEl.style.touchAction=""),Z.scale=1,r=1,p.currentX=void 0,p.currentY=void 0,p.touchesStart.x=void 0,p.touchesStart.y=void 0,A.imageWrapEl.style.transitionDuration="300ms",A.imageWrapEl.style.transform="translate3d(0,0,0)",A.imageEl.style.transitionDuration="300ms",A.imageEl.style.transform="translate3d(0,0,0) scale(1)",A.slideEl.classList.remove(`${ne.zoomedSlideClass}`),A.slideEl=void 0,A.originX=0,A.originY=0,i.params.zoom.panOnMouseMove&&(l={x:0,y:0},o&&(o=!1,p.startX=0,p.startY=0)))}function J(Z){const ne=i.zoom;ne.scale&&ne.scale!==1?$():F(Z)}function W(){const Z=i.params.passiveListeners?{passive:!0,capture:!1}:!1,ne=i.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:Z,activeListenerWithCapture:ne}}function he(){const Z=i.zoom;if(Z.enabled)return;Z.enabled=!0;const{passiveListener:ne,activeListenerWithCapture:G}=W();i.wrapperEl.addEventListener("pointerdown",x,ne),i.wrapperEl.addEventListener("pointermove",I,G),["pointerup","pointercancel","pointerout"].forEach(z=>{i.wrapperEl.addEventListener(z,b,ne)}),i.wrapperEl.addEventListener("pointermove",D,G)}function le(){const Z=i.zoom;if(!Z.enabled)return;Z.enabled=!1;const{passiveListener:ne,activeListenerWithCapture:G}=W();i.wrapperEl.removeEventListener("pointerdown",x,ne),i.wrapperEl.removeEventListener("pointermove",I,G),["pointerup","pointercancel","pointerout"].forEach(z=>{i.wrapperEl.removeEventListener(z,b,ne)}),i.wrapperEl.removeEventListener("pointermove",D,G)}t("init",()=>{i.params.zoom.enabled&&he()}),t("destroy",()=>{le()}),t("touchStart",(Z,ne)=>{i.zoom.enabled&&T(ne)}),t("touchEnd",(Z,ne)=>{i.zoom.enabled&&P()}),t("doubleTap",(Z,ne)=>{!i.animating&&i.params.zoom.enabled&&i.zoom.enabled&&i.params.zoom.toggle&&J(ne)}),t("transitionEnd",()=>{i.zoom.enabled&&i.params.zoom.enabled&&R()}),t("slideChange",()=>{i.zoom.enabled&&i.params.zoom.enabled&&i.params.cssMode&&R()}),Object.assign(i.zoom,{enable:he,disable:le,in:F,out:$,toggle:J})}function lq({swiper:i,extendParams:e,on:t}){e({controller:{control:void 0,inverse:!1,by:"slide"}}),i.controller={control:void 0};function n(l,c){const u=(function(){let p,g,m;return(f,y)=>{for(g=-1,p=f.length;p-g>1;)m=p+g>>1,f[m]<=y?g=m:p=m;return p}})();this.x=l,this.y=c,this.lastIndex=l.length-1;let h,d;return this.interpolate=function(p){return p?(d=u(this.x,p),h=d-1,(p-this.x[h])*(this.y[d]-this.y[h])/(this.x[d]-this.x[h])+this.y[h]):0},this}function s(l){i.controller.spline=i.params.loop?new n(i.slidesGrid,l.slidesGrid):new n(i.snapGrid,l.snapGrid)}function r(l,c){const u=i.controller.control;let h,d;const A=i.constructor;function p(g){if(g.destroyed)return;const m=i.rtlTranslate?-i.translate:i.translate;i.params.controller.by==="slide"&&(s(g),d=-i.controller.spline.interpolate(-m)),(!d||i.params.controller.by==="container")&&(h=(g.maxTranslate()-g.minTranslate())/(i.maxTranslate()-i.minTranslate()),(Number.isNaN(h)||!Number.isFinite(h))&&(h=1),d=(m-i.minTranslate())*h+g.minTranslate()),i.params.controller.inverse&&(d=g.maxTranslate()-d),g.updateProgress(d),g.setTranslate(d,i),g.updateActiveIndex(),g.updateSlidesClasses()}if(Array.isArray(u))for(let g=0;g<u.length;g+=1)u[g]!==c&&u[g]instanceof A&&p(u[g]);else u instanceof A&&c!==u&&p(u)}function a(l,c){const u=i.constructor,h=i.controller.control;let d;function A(p){p.destroyed||(p.setTransition(l,i),l!==0&&(p.transitionStart(),p.params.autoHeight&&Kh(()=>{p.updateAutoHeight()}),aA(p.wrapperEl,()=>{h&&p.transitionEnd()})))}if(Array.isArray(h))for(d=0;d<h.length;d+=1)h[d]!==c&&h[d]instanceof u&&A(h[d]);else h instanceof u&&c!==h&&A(h)}function o(){i.controller.control&&i.controller.spline&&(i.controller.spline=void 0,delete i.controller.spline)}t("beforeInit",()=>{if(typeof window<"u"&&(typeof i.params.controller.control=="string"||i.params.controller.control instanceof HTMLElement)){(typeof i.params.controller.control=="string"?[...document.querySelectorAll(i.params.controller.control)]:[i.params.controller.control]).forEach(c=>{if(i.controller.control||(i.controller.control=[]),c&&c.swiper)i.controller.control.push(c.swiper);else if(c){const u=`${i.params.eventsPrefix}init`,h=d=>{i.controller.control.push(d.detail[0]),i.update(),c.removeEventListener(u,h)};c.addEventListener(u,h)}});return}i.controller.control=i.params.controller.control}),t("update",()=>{o()}),t("resize",()=>{o()}),t("observerUpdate",()=>{o()}),t("setTranslate",(l,c,u)=>{!i.controller.control||i.controller.control.destroyed||i.controller.setTranslate(c,u)}),t("setTransition",(l,c,u)=>{!i.controller.control||i.controller.control.destroyed||i.controller.setTransition(c,u)}),Object.assign(i.controller,{setTranslate:r,setTransition:a})}function cq({swiper:i,extendParams:e,on:t}){e({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0,wrapperLiveRegion:!0}}),i.a11y={clicked:!1};let n=null,s,r,a=new Date().getTime();function o(R){const L=n;L.length!==0&&xs(L,R)}function l(R=16){const L=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(R).replace(/x/g,L)}function c(R){R=St(R),R.forEach(L=>{L.setAttribute("tabIndex","0")})}function u(R){R=St(R),R.forEach(L=>{L.setAttribute("tabIndex","-1")})}function h(R,L){R=St(R),R.forEach(F=>{F.setAttribute("role",L)})}function d(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-roledescription",L)})}function A(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-controls",L)})}function p(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-label",L)})}function g(R,L){R=St(R),R.forEach(F=>{F.setAttribute("id",L)})}function m(R,L){R=St(R),R.forEach(F=>{F.setAttribute("aria-live",L)})}function f(R){R=St(R),R.forEach(L=>{L.setAttribute("aria-disabled",!0)})}function y(R){R=St(R),R.forEach(L=>{L.setAttribute("aria-disabled",!1)})}function _(R){if(R.keyCode!==13&&R.keyCode!==32)return;const L=i.params.a11y,F=R.target;if(!(i.pagination&&i.pagination.el&&(F===i.pagination.el||i.pagination.el.contains(R.target))&&!R.target.matches(Ca(i.params.pagination.bulletClass)))){if(i.navigation&&i.navigation.prevEl&&i.navigation.nextEl){const $=St(i.navigation.prevEl);St(i.navigation.nextEl).includes(F)&&(i.isEnd&&!i.params.loop||i.slideNext(),i.isEnd?o(L.lastSlideMessage):o(L.nextSlideMessage)),$.includes(F)&&(i.isBeginning&&!i.params.loop||i.slidePrev(),i.isBeginning?o(L.firstSlideMessage):o(L.prevSlideMessage))}i.pagination&&F.matches(Ca(i.params.pagination.bulletClass))&&F.click()}}function E(){if(i.params.loop||i.params.rewind||!i.navigation)return;const{nextEl:R,prevEl:L}=i.navigation;L&&(i.isBeginning?(f(L),u(L)):(y(L),c(L))),R&&(i.isEnd?(f(R),u(R)):(y(R),c(R)))}function v(){return i.pagination&&i.pagination.bullets&&i.pagination.bullets.length}function C(){return v()&&i.params.pagination.clickable}function x(){const R=i.params.a11y;v()&&i.pagination.bullets.forEach(L=>{i.params.pagination.clickable&&(c(L),i.params.pagination.renderBullet||(h(L,"button"),p(L,R.paginationBulletMessage.replace(/\{\{index\}\}/,FA(L)+1)))),L.matches(Ca(i.params.pagination.bulletActiveClass))?L.setAttribute("aria-current","true"):L.removeAttribute("aria-current")})}const I=(R,L,F)=>{c(R),R.tagName!=="BUTTON"&&(h(R,"button"),R.addEventListener("keydown",_)),p(R,F),A(R,L)},b=R=>{r&&r!==R.target&&!r.contains(R.target)&&(s=!0),i.a11y.clicked=!0},w=()=>{s=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.destroyed||(i.a11y.clicked=!1)})})},S=R=>{a=new Date().getTime()},B=R=>{if(i.a11y.clicked||!i.params.a11y.scrollOnFocus||new Date().getTime()-a<100)return;const L=R.target.closest(`.${i.params.slideClass}, swiper-slide`);if(!L||!i.slides.includes(L))return;r=L;const F=i.virtual&&i.params.virtual.enabled,$=(F?parseInt(L.getAttribute("data-swiper-slide-index"),10):i.slides.indexOf(L))===i.activeIndex,J=i.params.watchSlidesProgress&&i.visibleSlides&&i.visibleSlides.includes(L);$||J||R.sourceCapabilities&&R.sourceCapabilities.firesTouchEvents||(i.isHorizontal()?i.el.scrollLeft=0:i.el.scrollTop=0,requestAnimationFrame(()=>{s||(i.params.loop?i.slideToLoop(i.getSlideIndexWhenGrid(parseInt(L.getAttribute("data-swiper-slide-index"))),0):F?i.slideTo(i.getSlideIndexWhenGrid(parseInt(L.getAttribute("data-swiper-slide-index"),10)),0):i.slideTo(i.getSlideIndexWhenGrid(i.slides.indexOf(L)),0),s=!1)}))},T=()=>{const R=i.params.a11y;R.itemRoleDescriptionMessage&&d(i.slides,R.itemRoleDescriptionMessage),R.slideRole&&h(i.slides,R.slideRole);const L=i.slides.length;R.slideLabelMessage&&i.slides.forEach((F,$)=>{const J=i.params.loop?parseInt(F.getAttribute("data-swiper-slide-index"),10):$,W=R.slideLabelMessage.replace(/\{\{index\}\}/,J+1).replace(/\{\{slidesLength\}\}/,L);p(F,W)})},D=()=>{const R=i.params.a11y;i.el.append(n);const L=i.el;R.containerRoleDescriptionMessage&&d(L,R.containerRoleDescriptionMessage),R.containerMessage&&p(L,R.containerMessage),R.containerRole&&h(L,R.containerRole);const F=i.wrapperEl,$=R.id||F.getAttribute("id")||`swiper-wrapper-${l(16)}`;if(g(F,$),R.wrapperLiveRegion){const le=i.params.autoplay&&i.params.autoplay.enabled?"off":"polite";m(F,le)}T();let{nextEl:J,prevEl:W}=i.navigation?i.navigation:{};J=St(J),W=St(W),J&&J.forEach(le=>I(le,$,R.nextSlideMessage)),W&&W.forEach(le=>I(le,$,R.prevSlideMessage)),C()&&St(i.pagination.el).forEach(Z=>{Z.addEventListener("keydown",_)}),hi().addEventListener("visibilitychange",S),i.el.addEventListener("focus",B,!0),i.el.addEventListener("pointerdown",b,!0),i.el.addEventListener("pointerup",w,!0)};function P(){n&&n.remove();let{nextEl:R,prevEl:L}=i.navigation?i.navigation:{};R=St(R),L=St(L),R&&R.forEach($=>$.removeEventListener("keydown",_)),L&&L.forEach($=>$.removeEventListener("keydown",_)),C()&&St(i.pagination.el).forEach(J=>{J.removeEventListener("keydown",_)}),hi().removeEventListener("visibilitychange",S),i.el&&typeof i.el!="string"&&(i.el.removeEventListener("focus",B,!0),i.el.removeEventListener("pointerdown",b,!0),i.el.removeEventListener("pointerup",w,!0))}t("beforeInit",()=>{n=ys("span",i.params.a11y.notificationClass),n.setAttribute("aria-live","assertive"),n.setAttribute("aria-atomic","true")}),t("afterInit",()=>{i.params.a11y.enabled&&D()}),t("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{i.params.a11y.enabled&&T()}),t("fromEdge toEdge afterInit lock unlock",()=>{i.params.a11y.enabled&&E()}),t("paginationUpdate",()=>{i.params.a11y.enabled&&x()}),t("destroy",()=>{i.params.a11y.enabled&&P()})}function hq({swiper:i,extendParams:e,on:t}){e({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let n=!1,s={};const r=d=>d.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),a=d=>{const A=wn();let p;d?p=new URL(d):p=A.location;const g=p.pathname.slice(1).split("/").filter(_=>_!==""),m=g.length,f=g[m-2],y=g[m-1];return{key:f,value:y}},o=(d,A)=>{const p=wn();if(!n||!i.params.history.enabled)return;let g;i.params.url?g=new URL(i.params.url):g=p.location;const m=i.virtual&&i.params.virtual.enabled?i.slidesEl.querySelector(`[data-swiper-slide-index="${A}"]`):i.slides[A];let f=r(m.getAttribute("data-history"));if(i.params.history.root.length>0){let _=i.params.history.root;_[_.length-1]==="/"&&(_=_.slice(0,_.length-1)),f=`${_}/${d?`${d}/`:""}${f}`}else g.pathname.includes(d)||(f=`${d?`${d}/`:""}${f}`);i.params.history.keepQuery&&(f+=g.search);const y=p.history.state;y&&y.value===f||(i.params.history.replaceState?p.history.replaceState({value:f},null,f):p.history.pushState({value:f},null,f))},l=(d,A,p)=>{if(A)for(let g=0,m=i.slides.length;g<m;g+=1){const f=i.slides[g];if(r(f.getAttribute("data-history"))===A){const _=i.getSlideIndex(f);i.slideTo(_,d,p)}}else i.slideTo(0,d,p)},c=()=>{s=a(i.params.url),l(i.params.speed,s.value,!1)},u=()=>{const d=wn();if(i.params.history){if(!d.history||!d.history.pushState){i.params.history.enabled=!1,i.params.hashNavigation.enabled=!0;return}if(n=!0,s=a(i.params.url),!s.key&&!s.value){i.params.history.replaceState||d.addEventListener("popstate",c);return}l(0,s.value,i.params.runCallbacksOnInit),i.params.history.replaceState||d.addEventListener("popstate",c)}},h=()=>{const d=wn();i.params.history.replaceState||d.removeEventListener("popstate",c)};t("init",()=>{i.params.history.enabled&&u()}),t("destroy",()=>{i.params.history.enabled&&h()}),t("transitionEnd _freeModeNoMomentumRelease",()=>{n&&o(i.params.history.key,i.activeIndex)}),t("slideChange",()=>{n&&i.params.cssMode&&o(i.params.history.key,i.activeIndex)})}function uq({swiper:i,extendParams:e,emit:t,on:n}){let s=!1;const r=hi(),a=wn();e({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(h,d){if(i.virtual&&i.params.virtual.enabled){const A=i.slides.find(g=>g.getAttribute("data-hash")===d);return A?parseInt(A.getAttribute("data-swiper-slide-index"),10):0}return i.getSlideIndex(yi(i.slidesEl,`.${i.params.slideClass}[data-hash="${d}"], swiper-slide[data-hash="${d}"]`)[0])}}});const o=()=>{t("hashChange");const h=r.location.hash.replace("#",""),d=i.virtual&&i.params.virtual.enabled?i.slidesEl.querySelector(`[data-swiper-slide-index="${i.activeIndex}"]`):i.slides[i.activeIndex],A=d?d.getAttribute("data-hash"):"";if(h!==A){const p=i.params.hashNavigation.getSlideIndex(i,h);if(typeof p>"u"||Number.isNaN(p))return;i.slideTo(p)}},l=()=>{if(!s||!i.params.hashNavigation.enabled)return;const h=i.virtual&&i.params.virtual.enabled?i.slidesEl.querySelector(`[data-swiper-slide-index="${i.activeIndex}"]`):i.slides[i.activeIndex],d=h?h.getAttribute("data-hash")||h.getAttribute("data-history"):"";i.params.hashNavigation.replaceState&&a.history&&a.history.replaceState?(a.history.replaceState(null,null,`#${d}`||""),t("hashSet")):(r.location.hash=d||"",t("hashSet"))},c=()=>{if(!i.params.hashNavigation.enabled||i.params.history&&i.params.history.enabled)return;s=!0;const h=r.location.hash.replace("#","");if(h){const A=i.params.hashNavigation.getSlideIndex(i,h);i.slideTo(A||0,0,i.params.runCallbacksOnInit,!0)}i.params.hashNavigation.watchState&&a.addEventListener("hashchange",o)},u=()=>{i.params.hashNavigation.watchState&&a.removeEventListener("hashchange",o)};n("init",()=>{i.params.hashNavigation.enabled&&c()}),n("destroy",()=>{i.params.hashNavigation.enabled&&u()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{s&&l()}),n("slideChange",()=>{s&&i.params.cssMode&&l()})}function dq({swiper:i,extendParams:e,on:t,emit:n,params:s}){i.autoplay={running:!1,paused:!1,timeLeft:0},e({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let r,a,o=s&&s.autoplay?s.autoplay.delay:3e3,l=s&&s.autoplay?s.autoplay.delay:3e3,c,u=new Date().getTime(),h,d,A,p,g,m;function f(L){!i||i.destroyed||!i.wrapperEl||L.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",f),!(m||L.detail&&L.detail.bySwiperTouchMove)&&b())}const y=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?h=!0:h&&(l=c,h=!1);const L=i.autoplay.paused?c:u+l-new Date().getTime();i.autoplay.timeLeft=L,n("autoplayTimeLeft",L,L/o),a=requestAnimationFrame(()=>{y()})},_=()=>{let L;return i.virtual&&i.params.virtual.enabled?L=i.slides.find($=>$.classList.contains("swiper-slide-active")):L=i.slides[i.activeIndex],L?parseInt(L.getAttribute("data-swiper-autoplay"),10):void 0},E=()=>{let L=i.params.autoplay.delay;const F=_();return!Number.isNaN(F)&&F>0&&(L=F),L},v=L=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(a),y();let F=L;typeof F>"u"&&(F=E(),o=F,l=F),c=F;const $=i.params.speed,J=()=>{!i||i.destroyed||(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev($,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,$,!0,!0),n("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext($,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,$,!0,!0),n("autoplay")),i.params.cssMode&&(u=new Date().getTime(),requestAnimationFrame(()=>{v()})))};return F>0?(clearTimeout(r),r=setTimeout(()=>{J()},F)):requestAnimationFrame(()=>{J()}),F},C=()=>{u=new Date().getTime(),i.autoplay.running=!0,v(),n("autoplayStart")},x=()=>{i.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(a),n("autoplayStop")},I=(L,F)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(r),L||(g=!0);const $=()=>{n("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",f):b()};if(i.autoplay.paused=!0,F){$();return}c=(c||i.params.autoplay.delay)-(new Date().getTime()-u),!(i.isEnd&&c<0&&!i.params.loop)&&(c<0&&(c=0),$())},b=()=>{i.isEnd&&c<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(u=new Date().getTime(),g?(g=!1,v(c)):v(),i.autoplay.paused=!1,n("autoplayResume"))},w=()=>{if(i.destroyed||!i.autoplay.running)return;const L=hi();L.visibilityState==="hidden"&&(g=!0,I(!0)),L.visibilityState==="visible"&&b()},S=L=>{L.pointerType==="mouse"&&(g=!0,m=!0,!(i.animating||i.autoplay.paused)&&I(!0))},B=L=>{L.pointerType==="mouse"&&(m=!1,i.autoplay.paused&&b())},T=()=>{i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",S),i.el.addEventListener("pointerleave",B))},D=()=>{i.el&&typeof i.el!="string"&&(i.el.removeEventListener("pointerenter",S),i.el.removeEventListener("pointerleave",B))},P=()=>{hi().addEventListener("visibilitychange",w)},R=()=>{hi().removeEventListener("visibilitychange",w)};t("init",()=>{i.params.autoplay.enabled&&(T(),P(),C())}),t("destroy",()=>{D(),R(),i.autoplay.running&&x()}),t("_freeModeStaticRelease",()=>{(A||g)&&b()}),t("_freeModeNoMomentumRelease",()=>{i.params.autoplay.disableOnInteraction?x():I(!0,!0)}),t("beforeTransitionStart",(L,F,$)=>{i.destroyed||!i.autoplay.running||($||!i.params.autoplay.disableOnInteraction?I(!0,!0):x())}),t("sliderFirstMove",()=>{if(!(i.destroyed||!i.autoplay.running)){if(i.params.autoplay.disableOnInteraction){x();return}d=!0,A=!1,g=!1,p=setTimeout(()=>{g=!0,A=!0,I(!0)},200)}}),t("touchEnd",()=>{if(!(i.destroyed||!i.autoplay.running||!d)){if(clearTimeout(p),clearTimeout(r),i.params.autoplay.disableOnInteraction){A=!1,d=!1;return}A&&i.params.cssMode&&b(),A=!1,d=!1}}),t("slideChange",()=>{i.destroyed||!i.autoplay.running||i.autoplay.paused&&(c=E(),o=E())}),Object.assign(i.autoplay,{start:C,stop:x,pause:I,resume:b})}function Aq({swiper:i,extendParams:e,on:t}){e({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=!1,s=!1;i.thumbs={swiper:null};function r(){const u=i.thumbs.swiper;return!u||u.destroyed?!1:u.params.virtual&&u.params.virtual.enabled}function a(){const u=i.thumbs.swiper;if(!u||u.destroyed)return;const h=u.clickedIndex,d=u.clickedSlide;if(d&&d.classList.contains(i.params.thumbs.slideThumbActiveClass)||typeof h>"u"||h===null)return;let A;u.params.loop?A=parseInt(u.clickedSlide.getAttribute("data-swiper-slide-index"),10):A=h,i.params.loop?i.slideToLoop(A):i.slideTo(A)}function o(){const{thumbs:u}=i.params;if(n)return!1;n=!0;const h=i.constructor;if(u.swiper instanceof h){if(u.swiper.destroyed)return n=!1,!1;i.thumbs.swiper=u.swiper,Object.assign(i.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(i.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),i.thumbs.swiper.update()}else if(Rd(u.swiper)){const d=Object.assign({},u.swiper);Object.assign(d,{watchSlidesProgress:!0,slideToClickedSlide:!1}),i.thumbs.swiper=new h(d),s=!0}return i.thumbs.swiper.el.classList.add(i.params.thumbs.thumbsContainerClass),i.thumbs.swiper.on("tap",a),r()&&i.thumbs.swiper.on("virtualUpdate",()=>{l(!1,{autoScroll:!1})}),!0}function l(u,h){const d=i.thumbs.swiper;if(!d||d.destroyed)return;let A=1;const p=i.params.thumbs.slideThumbActiveClass;if(i.params.slidesPerView>1&&!i.params.centeredSlides&&(A=i.params.slidesPerView),i.params.thumbs.multipleActiveThumbs||(A=1),A=Math.floor(A),d.slides.forEach(g=>g.classList.remove(p)),d.params.loop||r())for(let g=0;g<A;g+=1)yi(d.slidesEl,`[data-swiper-slide-index="${i.realIndex+g}"]`).forEach(m=>{m.classList.add(p)});else for(let g=0;g<A;g+=1)d.slides[i.realIndex+g]&&d.slides[i.realIndex+g].classList.add(p);(h?.autoScroll??!0)&&c(u?0:void 0)}function c(u){const h=i.thumbs.swiper;if(!h||h.destroyed)return;const d=h.params.slidesPerView==="auto"?h.slidesPerViewDynamic():h.params.slidesPerView,A=i.params.thumbs.autoScrollOffset,p=A&&!h.params.loop;if(i.realIndex!==h.realIndex||p){const g=h.activeIndex;let m,f;if(h.params.loop){const y=h.slides.find(_=>_.getAttribute("data-swiper-slide-index")===`${i.realIndex}`);m=h.slides.indexOf(y),f=i.activeIndex>i.previousIndex?"next":"prev"}else m=i.realIndex,f=m>i.previousIndex?"next":"prev";p&&(m+=f==="next"?A:-1*A),h.visibleSlidesIndexes&&h.visibleSlidesIndexes.indexOf(m)<0&&(h.params.centeredSlides?m>g?m=m-Math.floor(d/2)+1:m=m+Math.floor(d/2)-1:m>g&&h.params.slidesPerGroup,h.slideTo(m,u))}}t("beforeInit",()=>{const{thumbs:u}=i.params;if(!(!u||!u.swiper))if(typeof u.swiper=="string"||u.swiper instanceof HTMLElement){const h=hi(),d=()=>{const p=typeof u.swiper=="string"?h.querySelector(u.swiper):u.swiper;if(p&&p.swiper)u.swiper=p.swiper,o(),l(!0);else if(p){const g=`${i.params.eventsPrefix}init`,m=f=>{u.swiper=f.detail[0],p.removeEventListener(g,m),o(),l(!0),u.swiper.update(),i.update()};p.addEventListener(g,m)}return p},A=()=>{if(i.destroyed)return;d()||requestAnimationFrame(A)};requestAnimationFrame(A)}else o(),l(!0)}),t("slideChange update resize observerUpdate",()=>{l()}),t("setTransition",(u,h)=>{const d=i.thumbs.swiper;!d||d.destroyed||d.setTransition(h)}),t("beforeDestroy",()=>{const u=i.thumbs.swiper;!u||u.destroyed||s&&u.destroy()}),Object.assign(i.thumbs,{init:o,update:l})}function pq({swiper:i,extendParams:e,emit:t,once:n}){e({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function s(){if(i.params.cssMode)return;const o=i.getTranslate();i.setTranslate(o),i.setTransition(0),i.touchEventsData.velocities.length=0,i.freeMode.onTouchEnd({currentPos:i.rtl?i.translate:-i.translate})}function r(){if(i.params.cssMode)return;const{touchEventsData:o,touches:l}=i;o.velocities.length===0&&o.velocities.push({position:l[i.isHorizontal()?"startX":"startY"],time:o.touchStartTime}),o.velocities.push({position:l[i.isHorizontal()?"currentX":"currentY"],time:Fs()})}function a({currentPos:o}){if(i.params.cssMode)return;const{params:l,wrapperEl:c,rtlTranslate:u,snapGrid:h,touchEventsData:d}=i,p=Fs()-d.touchStartTime;if(o<-i.minTranslate()){i.slideTo(i.activeIndex);return}if(o>-i.maxTranslate()){i.slides.length<h.length?i.slideTo(h.length-1):i.slideTo(i.slides.length-1);return}if(l.freeMode.momentum){if(d.velocities.length>1){const C=d.velocities.pop(),x=d.velocities.pop(),I=C.position-x.position,b=C.time-x.time;i.velocity=I/b,i.velocity/=2,Math.abs(i.velocity)<l.freeMode.minimumVelocity&&(i.velocity=0),(b>150||Fs()-C.time>300)&&(i.velocity=0)}else i.velocity=0;i.velocity*=l.freeMode.momentumVelocityRatio,d.velocities.length=0;let g=1e3*l.freeMode.momentumRatio;const m=i.velocity*g;let f=i.translate+m;u&&(f=-f);let y=!1,_;const E=Math.abs(i.velocity)*20*l.freeMode.momentumBounceRatio;let v;if(f<i.maxTranslate())l.freeMode.momentumBounce?(f+i.maxTranslate()<-E&&(f=i.maxTranslate()-E),_=i.maxTranslate(),y=!0,d.allowMomentumBounce=!0):f=i.maxTranslate(),l.loop&&l.centeredSlides&&(v=!0);else if(f>i.minTranslate())l.freeMode.momentumBounce?(f-i.minTranslate()>E&&(f=i.minTranslate()+E),_=i.minTranslate(),y=!0,d.allowMomentumBounce=!0):f=i.minTranslate(),l.loop&&l.centeredSlides&&(v=!0);else if(l.freeMode.sticky){let C;for(let x=0;x<h.length;x+=1)if(h[x]>-f){C=x;break}Math.abs(h[C]-f)<Math.abs(h[C-1]-f)||i.swipeDirection==="next"?f=h[C]:f=h[C-1],f=-f}if(v&&n("transitionEnd",()=>{i.loopFix()}),i.velocity!==0){if(u?g=Math.abs((-f-i.translate)/i.velocity):g=Math.abs((f-i.translate)/i.velocity),l.freeMode.sticky){const C=Math.abs((u?-f:f)-i.translate),x=i.slidesSizesGrid[i.activeIndex];C<x?g=l.speed:C<2*x?g=l.speed*1.5:g=l.speed*2.5}}else if(l.freeMode.sticky){i.slideToClosest();return}l.freeMode.momentumBounce&&y?(i.updateProgress(_),i.setTransition(g),i.setTranslate(f),i.transitionStart(!0,i.swipeDirection),i.animating=!0,aA(c,()=>{!i||i.destroyed||!d.allowMomentumBounce||(t("momentumBounce"),i.setTransition(l.speed),setTimeout(()=>{i.setTranslate(_),aA(c,()=>{!i||i.destroyed||i.transitionEnd()})},0))})):i.velocity?(t("_freeModeNoMomentumRelease"),i.updateProgress(f),i.setTransition(g),i.setTranslate(f),i.transitionStart(!0,i.swipeDirection),i.animating||(i.animating=!0,aA(c,()=>{!i||i.destroyed||i.transitionEnd()}))):i.updateProgress(f),i.updateActiveIndex(),i.updateSlidesClasses()}else if(l.freeMode.sticky){i.slideToClosest();return}else l.freeMode&&t("_freeModeNoMomentumRelease");(!l.freeMode.momentum||p>=l.longSwipesMs)&&(t("_freeModeStaticRelease"),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses())}Object.assign(i,{freeMode:{onTouchStart:s,onTouchMove:r,onTouchEnd:a}})}function fq({swiper:i,extendParams:e,on:t}){e({grid:{rows:1,fill:"column"}});let n,s,r,a;const o=()=>{let p=i.params.spaceBetween;return typeof p=="string"&&p.indexOf("%")>=0?p=parseFloat(p.replace("%",""))/100*i.size:typeof p=="string"&&(p=parseFloat(p)),p},l=p=>{const{slidesPerView:g}=i.params,{rows:m,fill:f}=i.params.grid,y=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:p.length;r=Math.floor(y/m),Math.floor(y/m)===y/m?n=y:n=Math.ceil(y/m)*m,g!=="auto"&&f==="row"&&(n=Math.max(n,Math.floor(g)*m)),s=n/m},c=()=>{i.slides&&i.slides.forEach(p=>{p.swiperSlideGridSet&&(p.style.height="",p.style[i.getDirectionLabel("margin-top")]="")})},u=(p,g,m)=>{const{slidesPerGroup:f}=i.params,y=o(),{rows:_,fill:E}=i.params.grid,v=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:m.length;let C,x,I;if(E==="row"&&f>1){const b=Math.floor(p/(f*_)),w=p-_*f*b,S=b===0?f:Math.min(Math.ceil((v-b*_*f)/_),f);I=Math.floor(w/S),x=w-I*S+b*f,C=x+I*n/_,g.style.order=C}else E==="column"?(x=Math.floor(p/_),I=p-x*_,(x>r||x===r&&I===_-1)&&(I+=1,I>=_&&(I=0,x+=1))):(I=Math.floor(p/s),x=p-I*s);g.row=I,g.column=x,g.style.height=`calc((100% - ${(_-1)*y}px) / ${_})`,g.style[i.getDirectionLabel("margin-top")]=I!==0?y&&`${y}px`:"",g.swiperSlideGridSet=!0},h=(p,g)=>{const{centeredSlides:m,roundLengths:f}=i.params,y=o(),{rows:_}=i.params.grid;if(i.virtualSize=(p+y)*n,i.virtualSize=Math.ceil(i.virtualSize/_)-y,i.params.cssMode||(i.wrapperEl.style[i.getDirectionLabel("width")]=`${i.virtualSize+y}px`),m){const E=[];for(let v=0;v<g.length;v+=1){let C=g[v];f&&(C=Math.floor(C)),g[v]<i.virtualSize+g[0]&&E.push(C)}g.splice(0,g.length),g.push(...E)}},d=()=>{a=i.params.grid&&i.params.grid.rows>1},A=()=>{const{params:p,el:g}=i,m=p.grid&&p.grid.rows>1;a&&!m?(g.classList.remove(`${p.containerModifierClass}grid`,`${p.containerModifierClass}grid-column`),r=1,i.emitContainerClasses()):!a&&m&&(g.classList.add(`${p.containerModifierClass}grid`),p.grid.fill==="column"&&g.classList.add(`${p.containerModifierClass}grid-column`),i.emitContainerClasses()),a=m};t("init",d),t("update",A),i.grid={initSlides:l,unsetSlides:c,updateSlide:u,updateWrapperSize:h}}function gq(i){const e=this,{params:t,slidesEl:n}=e;t.loop&&e.loopDestroy();const s=r=>{if(typeof r=="string"){const a=document.createElement("div");xs(a,r),n.append(a.children[0]),xs(a,"")}else n.append(r)};if(typeof i=="object"&&"length"in i)for(let r=0;r<i.length;r+=1)i[r]&&s(i[r]);else s(i);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function mq(i){const e=this,{params:t,activeIndex:n,slidesEl:s}=e;t.loop&&e.loopDestroy();let r=n+1;const a=o=>{if(typeof o=="string"){const l=document.createElement("div");xs(l,o),s.prepend(l.children[0]),xs(l,"")}else s.prepend(o)};if(typeof i=="object"&&"length"in i){for(let o=0;o<i.length;o+=1)i[o]&&a(i[o]);r=n+i.length}else a(i);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(r,0,!1)}function yq(i,e){const t=this,{params:n,activeIndex:s,slidesEl:r}=t;let a=s;n.loop&&(a-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const o=t.slides.length;if(i<=0){t.prependSlide(e);return}if(i>=o){t.appendSlide(e);return}let l=a>i?a+1:a;const c=[];for(let u=o-1;u>=i;u-=1){const h=t.slides[u];h.remove(),c.unshift(h)}if(typeof e=="object"&&"length"in e){for(let u=0;u<e.length;u+=1)e[u]&&r.append(e[u]);l=a>i?a+e.length:a}else r.append(e);for(let u=0;u<c.length;u+=1)r.append(c[u]);t.recalcSlides(),n.loop&&t.loopCreate(),(!n.observer||t.isElement)&&t.update(),n.loop?t.slideTo(l+t.loopedSlides,0,!1):t.slideTo(l,0,!1)}function _q(i){const e=this,{params:t,activeIndex:n}=e;let s=n;t.loop&&(s-=e.loopedSlides,e.loopDestroy());let r=s,a;if(typeof i=="object"&&"length"in i){for(let o=0;o<i.length;o+=1)a=i[o],e.slides[a]&&e.slides[a].remove(),a<r&&(r-=1);r=Math.max(r,0)}else a=i,e.slides[a]&&e.slides[a].remove(),a<r&&(r-=1),r=Math.max(r,0);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),t.loop?e.slideTo(r+e.loopedSlides,0,!1):e.slideTo(r,0,!1)}function Eq(){const i=this,e=[];for(let t=0;t<i.slides.length;t+=1)e.push(t);i.removeSlide(e)}function vq({swiper:i}){Object.assign(i,{appendSlide:gq.bind(i),prependSlide:mq.bind(i),addSlide:yq.bind(i),removeSlide:_q.bind(i),removeAllSlides:Eq.bind(i)})}function gu(i){const{effect:e,swiper:t,on:n,setTranslate:s,setTransition:r,overwriteParams:a,perspective:o,recreateShadows:l,getEffectParams:c}=i;n("beforeInit",()=>{if(t.params.effect!==e)return;t.classNames.push(`${t.params.containerModifierClass}${e}`),o&&o()&&t.classNames.push(`${t.params.containerModifierClass}3d`);const h=a?a():{};Object.assign(t.params,h),Object.assign(t.originalParams,h)}),n("setTranslate _virtualUpdated",()=>{t.params.effect===e&&s()}),n("setTransition",(h,d)=>{t.params.effect===e&&r(d)}),n("transitionEnd",()=>{if(t.params.effect===e&&l){if(!c||!c().slideShadows)return;t.slides.forEach(h=>{h.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>d.remove())}),l()}});let u;n("virtualUpdate",()=>{t.params.effect===e&&(t.slides.length||(u=!0),requestAnimationFrame(()=>{u&&t.slides&&t.slides.length&&(s(),u=!1)}))})}function JA(i,e){const t=tc(e);return t!==e&&(t.style.backfaceVisibility="hidden",t.style["-webkit-backface-visibility"]="hidden"),t}function Tm({swiper:i,duration:e,transformElements:t,allSlides:n}){const{activeIndex:s}=i,r=a=>a.parentElement?a.parentElement:i.slides.find(l=>l.shadowRoot&&l.shadowRoot===a.parentNode);if(i.params.virtualTranslate&&e!==0){let a=!1,o;n?o=t:o=t.filter(l=>{const c=l.classList.contains("swiper-slide-transform")?r(l):l;return i.getSlideIndex(c)===s}),o.forEach(l=>{aA(l,()=>{if(a||!i||i.destroyed)return;a=!0,i.animating=!1;const c=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i.wrapperEl.dispatchEvent(c)})})}}function bq({swiper:i,extendParams:e,on:t}){e({fadeEffect:{crossFade:!1}}),gu({effect:"fade",swiper:i,on:t,setTranslate:()=>{const{slides:r}=i,a=i.params.fadeEffect;for(let o=0;o<r.length;o+=1){const l=i.slides[o];let u=-l.swiperSlideOffset;i.params.virtualTranslate||(u-=i.translate);let h=0;i.isHorizontal()||(h=u,u=0);const d=i.params.fadeEffect.crossFade?Math.max(1-Math.abs(l.progress),0):1+Math.min(Math.max(l.progress,-1),0),A=JA(a,l);A.style.opacity=d,A.style.transform=`translate3d(${u}px, ${h}px, 0px)`}},setTransition:r=>{const a=i.slides.map(o=>tc(o));a.forEach(o=>{o.style.transitionDuration=`${r}ms`}),Tm({swiper:i,duration:r,transformElements:a,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!i.params.cssMode})})}function xq({swiper:i,extendParams:e,on:t}){e({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const n=(o,l,c)=>{let u=c?o.querySelector(".swiper-slide-shadow-left"):o.querySelector(".swiper-slide-shadow-top"),h=c?o.querySelector(".swiper-slide-shadow-right"):o.querySelector(".swiper-slide-shadow-bottom");u||(u=ys("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"left":"top"}`.split(" ")),o.append(u)),h||(h=ys("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"right":"bottom"}`.split(" ")),o.append(h)),u&&(u.style.opacity=Math.max(-l,0)),h&&(h.style.opacity=Math.max(l,0))};gu({effect:"cube",swiper:i,on:t,setTranslate:()=>{const{el:o,wrapperEl:l,slides:c,width:u,height:h,rtlTranslate:d,size:A,browser:p}=i,g=Bm(i),m=i.params.cubeEffect,f=i.isHorizontal(),y=i.virtual&&i.params.virtual.enabled;let _=0,E;m.shadow&&(f?(E=i.wrapperEl.querySelector(".swiper-cube-shadow"),E||(E=ys("div","swiper-cube-shadow"),i.wrapperEl.append(E)),E.style.height=`${u}px`):(E=o.querySelector(".swiper-cube-shadow"),E||(E=ys("div","swiper-cube-shadow"),o.append(E))));for(let C=0;C<c.length;C+=1){const x=c[C];let I=C;y&&(I=parseInt(x.getAttribute("data-swiper-slide-index"),10));let b=I*90,w=Math.floor(b/360);d&&(b=-b,w=Math.floor(-b/360));const S=Math.max(Math.min(x.progress,1),-1);let B=0,T=0,D=0;I%4===0?(B=-w*4*A,D=0):(I-1)%4===0?(B=0,D=-w*4*A):(I-2)%4===0?(B=A+w*4*A,D=A):(I-3)%4===0&&(B=-A,D=3*A+A*4*w),d&&(B=-B),f||(T=B,B=0);const P=`rotateX(${g(f?0:-b)}deg) rotateY(${g(f?b:0)}deg) translate3d(${B}px, ${T}px, ${D}px)`;S<=1&&S>-1&&(_=I*90+S*90,d&&(_=-I*90-S*90)),x.style.transform=P,m.slideShadows&&n(x,S,f)}if(l.style.transformOrigin=`50% 50% -${A/2}px`,l.style["-webkit-transform-origin"]=`50% 50% -${A/2}px`,m.shadow)if(f)E.style.transform=`translate3d(0px, ${u/2+m.shadowOffset}px, ${-u/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${m.shadowScale})`;else{const C=Math.abs(_)-Math.floor(Math.abs(_)/90)*90,x=1.5-(Math.sin(C*2*Math.PI/360)/2+Math.cos(C*2*Math.PI/360)/2),I=m.shadowScale,b=m.shadowScale/x,w=m.shadowOffset;E.style.transform=`scale3d(${I}, 1, ${b}) translate3d(0px, ${h/2+w}px, ${-h/2/b}px) rotateX(-89.99deg)`}const v=(p.isSafari||p.isWebView)&&p.needPerspectiveFix?-A/2:0;l.style.transform=`translate3d(0px,0,${v}px) rotateX(${g(i.isHorizontal()?0:_)}deg) rotateY(${g(i.isHorizontal()?-_:0)}deg)`,l.style.setProperty("--swiper-cube-translate-z",`${v}px`)},setTransition:o=>{const{el:l,slides:c}=i;if(c.forEach(u=>{u.style.transitionDuration=`${o}ms`,u.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(h=>{h.style.transitionDuration=`${o}ms`})}),i.params.cubeEffect.shadow&&!i.isHorizontal()){const u=l.querySelector(".swiper-cube-shadow");u&&(u.style.transitionDuration=`${o}ms`)}},recreateShadows:()=>{const o=i.isHorizontal();i.slides.forEach(l=>{const c=Math.max(Math.min(l.progress,1),-1);n(l,c,o)})},getEffectParams:()=>i.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Zh(i,e,t){const n=`swiper-slide-shadow${t?`-${t}`:""}${i?` swiper-slide-shadow-${i}`:""}`,s=tc(e);let r=s.querySelector(`.${n.split(" ").join(".")}`);return r||(r=ys("div",n.split(" ")),s.append(r)),r}function Cq({swiper:i,extendParams:e,on:t}){e({flipEffect:{slideShadows:!0,limitRotation:!0}});const n=(o,l)=>{let c=i.isHorizontal()?o.querySelector(".swiper-slide-shadow-left"):o.querySelector(".swiper-slide-shadow-top"),u=i.isHorizontal()?o.querySelector(".swiper-slide-shadow-right"):o.querySelector(".swiper-slide-shadow-bottom");c||(c=Zh("flip",o,i.isHorizontal()?"left":"top")),u||(u=Zh("flip",o,i.isHorizontal()?"right":"bottom")),c&&(c.style.opacity=Math.max(-l,0)),u&&(u.style.opacity=Math.max(l,0))};gu({effect:"flip",swiper:i,on:t,setTranslate:()=>{const{slides:o,rtlTranslate:l}=i,c=i.params.flipEffect,u=Bm(i);for(let h=0;h<o.length;h+=1){const d=o[h];let A=d.progress;i.params.flipEffect.limitRotation&&(A=Math.max(Math.min(d.progress,1),-1));const p=d.swiperSlideOffset;let m=-180*A,f=0,y=i.params.cssMode?-p-i.translate:-p,_=0;i.isHorizontal()?l&&(m=-m):(_=y,y=0,f=-m,m=0),d.style.zIndex=-Math.abs(Math.round(A))+o.length,c.slideShadows&&n(d,A);const E=`translate3d(${y}px, ${_}px, 0px) rotateX(${u(f)}deg) rotateY(${u(m)}deg)`,v=JA(c,d);v.style.transform=E}},setTransition:o=>{const l=i.slides.map(c=>tc(c));l.forEach(c=>{c.style.transitionDuration=`${o}ms`,c.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(u=>{u.style.transitionDuration=`${o}ms`})}),Tm({swiper:i,duration:o,transformElements:l})},recreateShadows:()=>{i.params.flipEffect,i.slides.forEach(o=>{let l=o.progress;i.params.flipEffect.limitRotation&&(l=Math.max(Math.min(o.progress,1),-1)),n(o,l)})},getEffectParams:()=>i.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!i.params.cssMode})})}function Iq({swiper:i,extendParams:e,on:t}){e({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),gu({effect:"coverflow",swiper:i,on:t,setTranslate:()=>{const{width:r,height:a,slides:o,slidesSizesGrid:l}=i,c=i.params.coverflowEffect,u=i.isHorizontal(),h=i.translate,d=u?-h+r/2:-h+a/2,A=u?c.rotate:-c.rotate,p=c.depth,g=Bm(i);for(let m=0,f=o.length;m<f;m+=1){const y=o[m],_=l[m],E=y.swiperSlideOffset,v=(d-E-_/2)/_,C=typeof c.modifier=="function"?c.modifier(v):v*c.modifier;let x=u?A*C:0,I=u?0:A*C,b=-p*Math.abs(C),w=c.stretch;typeof w=="string"&&w.indexOf("%")!==-1&&(w=parseFloat(c.stretch)/100*_);let S=u?0:w*C,B=u?w*C:0,T=1-(1-c.scale)*Math.abs(C);Math.abs(B)<.001&&(B=0),Math.abs(S)<.001&&(S=0),Math.abs(b)<.001&&(b=0),Math.abs(x)<.001&&(x=0),Math.abs(I)<.001&&(I=0),Math.abs(T)<.001&&(T=0);const D=`translate3d(${B}px,${S}px,${b}px) rotateX(${g(I)}deg) rotateY(${g(x)}deg) scale(${T})`,P=JA(c,y);if(P.style.transform=D,y.style.zIndex=-Math.abs(Math.round(C))+1,c.slideShadows){let R=u?y.querySelector(".swiper-slide-shadow-left"):y.querySelector(".swiper-slide-shadow-top"),L=u?y.querySelector(".swiper-slide-shadow-right"):y.querySelector(".swiper-slide-shadow-bottom");R||(R=Zh("coverflow",y,u?"left":"top")),L||(L=Zh("coverflow",y,u?"right":"bottom")),R&&(R.style.opacity=C>0?C:0),L&&(L.style.opacity=-C>0?-C:0)}}},setTransition:r=>{i.slides.map(o=>tc(o)).forEach(o=>{o.style.transitionDuration=`${r}ms`,o.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(l=>{l.style.transitionDuration=`${r}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function wq({swiper:i,extendParams:e,on:t}){e({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const n=a=>typeof a=="string"?a:`${a}px`;gu({effect:"creative",swiper:i,on:t,setTranslate:()=>{const{slides:a,wrapperEl:o,slidesSizesGrid:l}=i,c=i.params.creativeEffect,{progressMultiplier:u}=c,h=i.params.centeredSlides,d=Bm(i);if(h){const A=l[0]/2-i.params.slidesOffsetBefore||0;o.style.transform=`translateX(calc(50% - ${A}px))`}for(let A=0;A<a.length;A+=1){const p=a[A],g=p.progress,m=Math.min(Math.max(p.progress,-c.limitProgress),c.limitProgress);let f=m;h||(f=Math.min(Math.max(p.originalProgress,-c.limitProgress),c.limitProgress));const y=p.swiperSlideOffset,_=[i.params.cssMode?-y-i.translate:-y,0,0],E=[0,0,0];let v=!1;i.isHorizontal()||(_[1]=_[0],_[0]=0);let C={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};m<0?(C=c.next,v=!0):m>0&&(C=c.prev,v=!0),_.forEach((T,D)=>{_[D]=`calc(${T}px + (${n(C.translate[D])} * ${Math.abs(m*u)}))`}),E.forEach((T,D)=>{let P=C.rotate[D]*Math.abs(m*u);E[D]=P}),p.style.zIndex=-Math.abs(Math.round(g))+a.length;const x=_.join(", "),I=`rotateX(${d(E[0])}deg) rotateY(${d(E[1])}deg) rotateZ(${d(E[2])}deg)`,b=f<0?`scale(${1+(1-C.scale)*f*u})`:`scale(${1-(1-C.scale)*f*u})`,w=f<0?1+(1-C.opacity)*f*u:1-(1-C.opacity)*f*u,S=`translate3d(${x}) ${I} ${b}`;if(v&&C.shadow||!v){let T=p.querySelector(".swiper-slide-shadow");if(!T&&C.shadow&&(T=Zh("creative",p)),T){const D=c.shadowPerProgress?m*(1/c.limitProgress):m;T.style.opacity=Math.min(Math.max(Math.abs(D),0),1)}}const B=JA(c,p);B.style.transform=S,B.style.opacity=w,C.origin&&(B.style.transformOrigin=C.origin)}},setTransition:a=>{const o=i.slides.map(l=>tc(l));o.forEach(l=>{l.style.transitionDuration=`${a}ms`,l.querySelectorAll(".swiper-slide-shadow").forEach(c=>{c.style.transitionDuration=`${a}ms`})}),Tm({swiper:i,duration:a,transformElements:o,allSlides:!0})},perspective:()=>i.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!i.params.cssMode})})}function Sq({swiper:i,extendParams:e,on:t}){e({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),gu({effect:"cards",swiper:i,on:t,setTranslate:()=>{const{slides:r,activeIndex:a,rtlTranslate:o}=i,l=i.params.cardsEffect,{startTranslate:c,isTouched:u}=i.touchEventsData,h=o?-i.translate:i.translate;for(let d=0;d<r.length;d+=1){const A=r[d],p=A.progress,g=Math.min(Math.max(p,-4),4);let m=A.swiperSlideOffset;i.params.centeredSlides&&!i.params.cssMode&&(i.wrapperEl.style.transform=`translateX(${i.minTranslate()}px)`),i.params.centeredSlides&&i.params.cssMode&&(m-=r[0].swiperSlideOffset);let f=i.params.cssMode?-m-i.translate:-m,y=0;const _=-100*Math.abs(g);let E=1,v=-l.perSlideRotate*g,C=l.perSlideOffset-Math.abs(g)*.75;const x=i.virtual&&i.params.virtual.enabled?i.virtual.from+d:d,I=(x===a||x===a-1)&&g>0&&g<1&&(u||i.params.cssMode)&&h<c,b=(x===a||x===a+1)&&g<0&&g>-1&&(u||i.params.cssMode)&&h>c;if(I||b){const T=(1-Math.abs((Math.abs(g)-.5)/.5))**.5;v+=-28*g*T,E+=-.5*T,C+=96*T,y=`${(l.rotate||i.isHorizontal()?-25:0)*T*Math.abs(g)}%`}if(g<0?f=`calc(${f}px ${o?"-":"+"} (${C*Math.abs(g)}%))`:g>0?f=`calc(${f}px ${o?"-":"+"} (-${C*Math.abs(g)}%))`:f=`${f}px`,!i.isHorizontal()){const T=y;y=f,f=T}const w=g<0?`${1+(1-E)*g}`:`${1-(1-E)*g}`,S=`
|
|
14311
14311
|
translate3d(${f}, ${y}, ${_}px)
|
|
14312
14312
|
rotateZ(${l.rotate?o?-v:v:0}deg)
|
|
14313
14313
|
scale(${w})
|
|
@@ -14634,7 +14634,7 @@ ${r.join(`
|
|
|
14634
14634
|
|
|
14635
14635
|
<slot></slot>
|
|
14636
14636
|
<div class="expand-button">EXPAND</div>
|
|
14637
|
-
`}}ex([H({attribute:kA.label.name})],KA.prototype,"label");ex([H({attribute:kA.imgSrc.name})],KA.prototype,"imgSrc");ex([H({attribute:kA.state.name})],KA.prototype,"state");window.customElements.get(rS)||window.customElements.define(rS,KA);/*! @license DOMPurify 3.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.1/LICENSE */const{entries:BD,setPrototypeOf:aS,isFrozen:$q,getPrototypeOf:Vq,getOwnPropertyDescriptor:Yq}=Object;let{freeze:$i,seal:Ys,create:Zc}=Object,{apply:yv,construct:_v}=typeof Reflect<"u"&&Reflect;$i||($i=function(e){return e});Ys||(Ys=function(e){return e});yv||(yv=function(e,t){for(var n=arguments.length,s=new Array(n>2?n-2:0),r=2;r<n;r++)s[r-2]=arguments[r];return e.apply(t,s)});_v||(_v=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return new e(...n)});const Ku=Yn(Array.prototype.forEach),qq=Yn(Array.prototype.lastIndexOf),oS=Yn(Array.prototype.pop),Zu=Yn(Array.prototype.push),Wq=Yn(Array.prototype.splice),ki=Array.isArray,Dd=Yn(String.prototype.toLowerCase),R_=Yn(String.prototype.toString),lS=Yn(String.prototype.match),Fc=Yn(String.prototype.replace),cS=Yn(String.prototype.indexOf),jq=Yn(String.prototype.trim),Xq=Yn(Number.prototype.toString),Jq=Yn(Boolean.prototype.toString),hS=typeof BigInt>"u"?null:Yn(BigInt.prototype.toString),uS=typeof Symbol>"u"?null:Yn(Symbol.prototype.toString),Pn=Yn(Object.prototype.hasOwnProperty),ed=Yn(Object.prototype.toString),di=Yn(RegExp.prototype.test),nf=Kq(TypeError);function Yn(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return yv(i,e,n)}}function Kq(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _v(i,t)}}function Et(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dd;if(aS&&aS(i,null),!ki(e))return i;let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const r=t(s);r!==s&&($q(e)||(e[n]=r),s=r)}i[s]=!0}return i}function Zq(i){for(let e=0;e<i.length;e++)Pn(i,e)||(i[e]=null);return i}function Xi(i){const e=Zc(null);for(const[t,n]of BD(i))Pn(i,t)&&(ki(n)?e[t]=Zq(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=Xi(n):e[t]=n);return e}function eW(i){switch(typeof i){case"string":return i;case"number":return Xq(i);case"boolean":return Jq(i);case"bigint":return hS?hS(i):"0";case"symbol":return uS?uS(i):"Symbol()";case"undefined":return ed(i);case"function":case"object":{if(i===null)return ed(i);const e=i,t=eh(e,"toString");if(typeof t=="function"){const n=t(e);return typeof n=="string"?n:ed(n)}return ed(i)}default:return ed(i)}}function eh(i,e){for(;i!==null;){const n=Yq(i,e);if(n){if(n.get)return Yn(n.get);if(typeof n.value=="function")return Yn(n.value)}i=Vq(i)}function t(){return null}return t}function tW(i){try{return di(i,""),!0}catch{return!1}}const dS=$i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D_=$i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Q_=$i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),nW=$i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L_=$i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iW=$i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),AS=$i(["#text"]),pS=$i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),N_=$i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fS=$i(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),sf=$i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sW=Ys(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rW=Ys(/<%[\w\W]*|[\w\W]*%>/gm),aW=Ys(/\$\{[\w\W]*/gm),oW=Ys(/^data-[\-\w.\u00B7-\uFFFF]+$/),lW=Ys(/^aria-[\-\w]+$/),TD=Ys(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cW=Ys(/^(?:\w+script|data):/i),hW=Ys(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),MD=Ys(/^html$/i),uW=Ys(/^[a-z][.\w]*(-[.\w]+)+$/i);var gS=Object.freeze({__proto__:null,ARIA_ATTR:lW,ATTR_WHITESPACE:hW,CUSTOM_ELEMENT:uW,DATA_ATTR:oW,DOCTYPE_NAME:MD,ERB_EXPR:rW,IS_ALLOWED_URI:TD,IS_SCRIPT_OR_DATA:cW,MUSTACHE_EXPR:sW,TMPLIT_EXPR:aW});const td={element:1,text:3,progressingInstruction:7,comment:8,document:9},dW=function(){return typeof window>"u"?null:window},AW=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";t&&t.hasAttribute(s)&&(n=t.getAttribute(s));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},mS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function RD(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dW();const e=et=>RD(et);if(e.version="3.4.1",e.removed=[],!i||!i.document||i.document.nodeType!==td.document||!i.Element)return e.isSupported=!1,e;let{document:t}=i;const n=t,s=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:A}=i,p=l.prototype,g=eh(p,"cloneNode"),m=eh(p,"remove"),f=eh(p,"nextSibling"),y=eh(p,"childNodes"),_=eh(p,"parentNode");if(typeof a=="function"){const et=t.createElement("template");et.content&&et.content.ownerDocument&&(t=et.content.ownerDocument)}let E,v="";const{implementation:C,createNodeIterator:x,createDocumentFragment:I,getElementsByTagName:b}=t,{importNode:w}=n;let S=mS();e.isSupported=typeof BD=="function"&&typeof _=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:T,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:$}=gS;let{IS_ALLOWED_URI:J}=gS,W=null;const he=Et({},[...dS,...D_,...Q_,...L_,...AS]);let le=null;const Z=Et({},[...pS,...N_,...fS,...sf]);let ne=Object.seal(Zc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,z=null;const ae=Object.seal(Zc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,fe=!0,De=!1,ut=!0,Qe=!1,Ye=!0,ot=!1,Ke=!1,Ct=!1,U=!1,yt=!1,je=!1,Dt=!0,Fe=!1;const k="user-content-";let M=!0,Y=!1,se={},ce=null;const ie=Et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const be=Et({},["audio","video","img","source","image","track"]);let Ge=null;const it=Et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",xe="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml";let ke=Le,Ce=!1,gt=null;const q=Et({},[me,xe,Le],R_);let Te=Et({},["mi","mo","mn","ms","mtext"]),Ee=Et({},["annotation-xml"]);const Ne=Et({},["title","style","font","a","script"]);let ge=null;const ue=["application/xhtml+xml","text/html"],Ie="text/html";let ze=null,Lt=null;const Ht=t.createElement("form"),ns=function(O){return O instanceof RegExp||O instanceof Function},is=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Lt&&Lt===O)return;(!O||typeof O!="object")&&(O={}),O=Xi(O),ge=ue.indexOf(O.PARSER_MEDIA_TYPE)===-1?Ie:O.PARSER_MEDIA_TYPE,ze=ge==="application/xhtml+xml"?R_:Dd,W=Pn(O,"ALLOWED_TAGS")&&ki(O.ALLOWED_TAGS)?Et({},O.ALLOWED_TAGS,ze):he,le=Pn(O,"ALLOWED_ATTR")&&ki(O.ALLOWED_ATTR)?Et({},O.ALLOWED_ATTR,ze):Z,gt=Pn(O,"ALLOWED_NAMESPACES")&&ki(O.ALLOWED_NAMESPACES)?Et({},O.ALLOWED_NAMESPACES,R_):q,Ge=Pn(O,"ADD_URI_SAFE_ATTR")&&ki(O.ADD_URI_SAFE_ATTR)?Et(Xi(it),O.ADD_URI_SAFE_ATTR,ze):it,Ve=Pn(O,"ADD_DATA_URI_TAGS")&&ki(O.ADD_DATA_URI_TAGS)?Et(Xi(be),O.ADD_DATA_URI_TAGS,ze):be,ce=Pn(O,"FORBID_CONTENTS")&&ki(O.FORBID_CONTENTS)?Et({},O.FORBID_CONTENTS,ze):ie,G=Pn(O,"FORBID_TAGS")&&ki(O.FORBID_TAGS)?Et({},O.FORBID_TAGS,ze):Xi({}),z=Pn(O,"FORBID_ATTR")&&ki(O.FORBID_ATTR)?Et({},O.FORBID_ATTR,ze):Xi({}),se=Pn(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?Xi(O.USE_PROFILES):O.USE_PROFILES:!1,Be=O.ALLOW_ARIA_ATTR!==!1,fe=O.ALLOW_DATA_ATTR!==!1,De=O.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=O.SAFE_FOR_TEMPLATES||!1,Ye=O.SAFE_FOR_XML!==!1,ot=O.WHOLE_DOCUMENT||!1,U=O.RETURN_DOM||!1,yt=O.RETURN_DOM_FRAGMENT||!1,je=O.RETURN_TRUSTED_TYPE||!1,Ct=O.FORCE_BODY||!1,Dt=O.SANITIZE_DOM!==!1,Fe=O.SANITIZE_NAMED_PROPS||!1,M=O.KEEP_CONTENT!==!1,Y=O.IN_PLACE||!1,J=tW(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:TD,ke=typeof O.NAMESPACE=="string"?O.NAMESPACE:Le,Te=Pn(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?Xi(O.MATHML_TEXT_INTEGRATION_POINTS):Et({},["mi","mo","mn","ms","mtext"]),Ee=Pn(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?Xi(O.HTML_INTEGRATION_POINTS):Et({},["annotation-xml"]);const Ae=Pn(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?Xi(O.CUSTOM_ELEMENT_HANDLING):Zc(null);if(ne=Zc(null),Pn(Ae,"tagNameCheck")&&ns(Ae.tagNameCheck)&&(ne.tagNameCheck=Ae.tagNameCheck),Pn(Ae,"attributeNameCheck")&&ns(Ae.attributeNameCheck)&&(ne.attributeNameCheck=Ae.attributeNameCheck),Pn(Ae,"allowCustomizedBuiltInElements")&&typeof Ae.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=Ae.allowCustomizedBuiltInElements),Qe&&(fe=!1),yt&&(U=!0),se&&(W=Et({},AS),le=Zc(null),se.html===!0&&(Et(W,dS),Et(le,pS)),se.svg===!0&&(Et(W,D_),Et(le,N_),Et(le,sf)),se.svgFilters===!0&&(Et(W,Q_),Et(le,N_),Et(le,sf)),se.mathMl===!0&&(Et(W,L_),Et(le,fS),Et(le,sf))),ae.tagCheck=null,ae.attributeCheck=null,Pn(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?ae.tagCheck=O.ADD_TAGS:ki(O.ADD_TAGS)&&(W===he&&(W=Xi(W)),Et(W,O.ADD_TAGS,ze))),Pn(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?ae.attributeCheck=O.ADD_ATTR:ki(O.ADD_ATTR)&&(le===Z&&(le=Xi(le)),Et(le,O.ADD_ATTR,ze))),Pn(O,"ADD_URI_SAFE_ATTR")&&ki(O.ADD_URI_SAFE_ATTR)&&Et(Ge,O.ADD_URI_SAFE_ATTR,ze),Pn(O,"FORBID_CONTENTS")&&ki(O.FORBID_CONTENTS)&&(ce===ie&&(ce=Xi(ce)),Et(ce,O.FORBID_CONTENTS,ze)),Pn(O,"ADD_FORBID_CONTENTS")&&ki(O.ADD_FORBID_CONTENTS)&&(ce===ie&&(ce=Xi(ce)),Et(ce,O.ADD_FORBID_CONTENTS,ze)),M&&(W["#text"]=!0),ot&&Et(W,["html","head","body"]),W.table&&(Et(W,["tbody"]),delete G.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw nf('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nf('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=O.TRUSTED_TYPES_POLICY,v=E.createHTML("")}else E===void 0&&(E=AW(A,s)),E!==null&&typeof v=="string"&&(v=E.createHTML(""));$i&&$i(O),Lt=O},rp=Et({},[...D_,...Q_,...nW]),Cu=Et({},[...L_,...iW]),Iu=function(O){let Ae=_(O);(!Ae||!Ae.tagName)&&(Ae={namespaceURI:ke,tagName:"template"});const He=Dd(O.tagName),cn=Dd(Ae.tagName);return gt[O.namespaceURI]?O.namespaceURI===xe?Ae.namespaceURI===Le?He==="svg":Ae.namespaceURI===me?He==="svg"&&(cn==="annotation-xml"||Te[cn]):!!rp[He]:O.namespaceURI===me?Ae.namespaceURI===Le?He==="math":Ae.namespaceURI===xe?He==="math"&&Ee[cn]:!!Cu[He]:O.namespaceURI===Le?Ae.namespaceURI===xe&&!Ee[cn]||Ae.namespaceURI===me&&!Te[cn]?!1:!Cu[He]&&(Ne[He]||!rp[He]):!!(ge==="application/xhtml+xml"&>[O.namespaceURI]):!1},ss=function(O){Zu(e.removed,{element:O});try{_(O).removeChild(O)}catch{m(O)}},pr=function(O,Ae){try{Zu(e.removed,{attribute:Ae.getAttributeNode(O),from:Ae})}catch{Zu(e.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(O),O==="is")if(U||yt)try{ss(Ae)}catch{}else try{Ae.setAttribute(O,"")}catch{}},wu=function(O){let Ae=null,He=null;if(Ct)O="<remove></remove>"+O;else{const V=lS(O,/^[\r\n\t ]+/);He=V&&V[0]}ge==="application/xhtml+xml"&&ke===Le&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const cn=E?E.createHTML(O):O;if(ke===Le)try{Ae=new d().parseFromString(cn,ge)}catch{}if(!Ae||!Ae.documentElement){Ae=C.createDocument(ke,"template",null);try{Ae.documentElement.innerHTML=Ce?v:cn}catch{}}const N=Ae.body||Ae.documentElement;return O&&He&&N.insertBefore(t.createTextNode(He),N.childNodes[0]||null),ke===Le?b.call(Ae,ot?"html":"body")[0]:ot?Ae.documentElement:N},fr=function(O){return x.call(O.ownerDocument||O,O,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ko=function(O){return O instanceof h&&(typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||!(O.attributes instanceof u)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function")},oc=function(O){return typeof o=="function"&&O instanceof o};function Cs(et,O,Ae){Ku(et,He=>{He.call(e,O,Ae,Lt)})}const Uo=function(O){let Ae=null;if(Cs(S.beforeSanitizeElements,O,null),ko(O))return ss(O),!0;const He=ze(O.nodeName);if(Cs(S.uponSanitizeElement,O,{tagName:He,allowedTags:W}),Ye&&O.hasChildNodes()&&!oc(O.firstElementChild)&&di(/<[/\w!]/g,O.innerHTML)&&di(/<[/\w!]/g,O.textContent)||Ye&&O.namespaceURI===Le&&He==="style"&&oc(O.firstElementChild)||O.nodeType===td.progressingInstruction||Ye&&O.nodeType===td.comment&&di(/<[/\w]/g,O.data))return ss(O),!0;if(G[He]||!(ae.tagCheck instanceof Function&&ae.tagCheck(He))&&!W[He]){if(!G[He]&&Bu(He)&&(ne.tagNameCheck instanceof RegExp&&di(ne.tagNameCheck,He)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(He)))return!1;if(M&&!ce[He]){const cn=_(O)||O.parentNode,N=y(O)||O.childNodes;if(N&&cn){const V=N.length;for(let ee=V-1;ee>=0;--ee){const K=g(N[ee],!0);cn.insertBefore(K,f(O))}}}return ss(O),!0}return O instanceof l&&!Iu(O)||(He==="noscript"||He==="noembed"||He==="noframes")&&di(/<\/no(script|embed|frames)/i,O.innerHTML)?(ss(O),!0):(Qe&&O.nodeType===td.text&&(Ae=O.textContent,Ku([B,T,D],cn=>{Ae=Fc(Ae,cn," ")}),O.textContent!==Ae&&(Zu(e.removed,{element:O.cloneNode()}),O.textContent=Ae)),Cs(S.afterSanitizeElements,O,null),!1)},Su=function(O,Ae,He){if(z[Ae]||Dt&&(Ae==="id"||Ae==="name")&&(He in t||He in Ht))return!1;if(!(fe&&!z[Ae]&&di(P,Ae))){if(!(Be&&di(R,Ae))){if(!(ae.attributeCheck instanceof Function&&ae.attributeCheck(Ae,O))){if(!le[Ae]||z[Ae]){if(!(Bu(O)&&(ne.tagNameCheck instanceof RegExp&&di(ne.tagNameCheck,O)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(O))&&(ne.attributeNameCheck instanceof RegExp&&di(ne.attributeNameCheck,Ae)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(Ae,O))||Ae==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&di(ne.tagNameCheck,He)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(He))))return!1}else if(!Ge[Ae]){if(!di(J,Fc(He,F,""))){if(!((Ae==="src"||Ae==="xlink:href"||Ae==="href")&&O!=="script"&&cS(He,"data:")===0&&Ve[O])){if(!(De&&!di(L,Fc(He,F,"")))){if(He)return!1}}}}}}}return!0},lc=Et({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bu=function(O){return!lc[Dd(O)]&&di($,O)},Tu=function(O){Cs(S.beforeSanitizeAttributes,O,null);const{attributes:Ae}=O;if(!Ae||ko(O))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0};let cn=Ae.length;for(;cn--;){const N=Ae[cn],{name:V,namespaceURI:ee,value:K}=N,X=ze(V),Se=K;let ve=V==="value"?Se:jq(Se);if(He.attrName=X,He.attrValue=ve,He.keepAttr=!0,He.forceKeepAttr=void 0,Cs(S.uponSanitizeAttribute,O,He),ve=He.attrValue,Fe&&(X==="id"||X==="name")&&cS(ve,k)!==0&&(pr(V,O),ve=k+ve),Ye&&di(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ve)){pr(V,O);continue}if(X==="attributename"&&lS(ve,"href")){pr(V,O);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){pr(V,O);continue}if(!ut&&di(/\/>/i,ve)){pr(V,O);continue}Qe&&Ku([B,T,D],Ue=>{ve=Fc(ve,Ue," ")});const Me=ze(O.nodeName);if(!Su(Me,X,ve)){pr(V,O);continue}if(E&&typeof A=="object"&&typeof A.getAttributeType=="function"&&!ee)switch(A.getAttributeType(Me,X)){case"TrustedHTML":{ve=E.createHTML(ve);break}case"TrustedScriptURL":{ve=E.createScriptURL(ve);break}}if(ve!==Se)try{ee?O.setAttributeNS(ee,V,ve):O.setAttribute(V,ve),ko(O)?ss(O):oS(e.removed)}catch{pr(V,O)}}Cs(S.afterSanitizeAttributes,O,null)},ap=function(O){let Ae=null;const He=fr(O);for(Cs(S.beforeSanitizeShadowDOM,O,null);Ae=He.nextNode();)Cs(S.uponSanitizeShadowNode,Ae,null),Uo(Ae),Tu(Ae),Ae.content instanceof r&&ap(Ae.content);Cs(S.afterSanitizeShadowDOM,O,null)};return e.sanitize=function(et){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=null,He=null,cn=null,N=null;if(Ce=!et,Ce&&(et="<!-->"),typeof et!="string"&&!oc(et)&&(et=eW(et),typeof et!="string"))throw nf("dirty is not a string, aborting");if(!e.isSupported)return et;if(Ke||is(O),e.removed=[],typeof et=="string"&&(Y=!1),Y){const K=et.nodeName;if(typeof K=="string"){const X=ze(K);if(!W[X]||G[X])throw nf("root node is forbidden and cannot be sanitized in-place")}}else if(et instanceof o)Ae=wu("<!---->"),He=Ae.ownerDocument.importNode(et,!0),He.nodeType===td.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?Ae=He:Ae.appendChild(He);else{if(!U&&!Qe&&!ot&&et.indexOf("<")===-1)return E&&je?E.createHTML(et):et;if(Ae=wu(et),!Ae)return U?null:je?v:""}Ae&&Ct&&ss(Ae.firstChild);const V=fr(Y?et:Ae);for(;cn=V.nextNode();)Uo(cn),Tu(cn),cn.content instanceof r&&ap(cn.content);if(Y)return et;if(U){if(Qe){Ae.normalize();let K=Ae.innerHTML;Ku([B,T,D],X=>{K=Fc(K,X," ")}),Ae.innerHTML=K}if(yt)for(N=I.call(Ae.ownerDocument);Ae.firstChild;)N.appendChild(Ae.firstChild);else N=Ae;return(le.shadowroot||le.shadowrootmode)&&(N=w.call(n,N,!0)),N}let ee=ot?Ae.outerHTML:Ae.innerHTML;return ot&&W["!doctype"]&&Ae.ownerDocument&&Ae.ownerDocument.doctype&&Ae.ownerDocument.doctype.name&&di(MD,Ae.ownerDocument.doctype.name)&&(ee="<!DOCTYPE "+Ae.ownerDocument.doctype.name+`>
|
|
14637
|
+
`}}ex([H({attribute:kA.label.name})],KA.prototype,"label");ex([H({attribute:kA.imgSrc.name})],KA.prototype,"imgSrc");ex([H({attribute:kA.state.name})],KA.prototype,"state");window.customElements.get(rS)||window.customElements.define(rS,KA);/*! @license DOMPurify 3.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.1/LICENSE */const{entries:BD,setPrototypeOf:aS,isFrozen:$q,getPrototypeOf:Vq,getOwnPropertyDescriptor:Yq}=Object;let{freeze:$i,seal:Ys,create:Zc}=Object,{apply:yv,construct:_v}=typeof Reflect<"u"&&Reflect;$i||($i=function(e){return e});Ys||(Ys=function(e){return e});yv||(yv=function(e,t){for(var n=arguments.length,s=new Array(n>2?n-2:0),r=2;r<n;r++)s[r-2]=arguments[r];return e.apply(t,s)});_v||(_v=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return new e(...n)});const Ku=Yn(Array.prototype.forEach),qq=Yn(Array.prototype.lastIndexOf),oS=Yn(Array.prototype.pop),Zu=Yn(Array.prototype.push),Wq=Yn(Array.prototype.splice),ki=Array.isArray,Dd=Yn(String.prototype.toLowerCase),R0=Yn(String.prototype.toString),lS=Yn(String.prototype.match),Fc=Yn(String.prototype.replace),cS=Yn(String.prototype.indexOf),jq=Yn(String.prototype.trim),Xq=Yn(Number.prototype.toString),Jq=Yn(Boolean.prototype.toString),hS=typeof BigInt>"u"?null:Yn(BigInt.prototype.toString),uS=typeof Symbol>"u"?null:Yn(Symbol.prototype.toString),Pn=Yn(Object.prototype.hasOwnProperty),ed=Yn(Object.prototype.toString),di=Yn(RegExp.prototype.test),nf=Kq(TypeError);function Yn(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return yv(i,e,n)}}function Kq(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _v(i,t)}}function Et(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dd;if(aS&&aS(i,null),!ki(e))return i;let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const r=t(s);r!==s&&($q(e)||(e[n]=r),s=r)}i[s]=!0}return i}function Zq(i){for(let e=0;e<i.length;e++)Pn(i,e)||(i[e]=null);return i}function Xi(i){const e=Zc(null);for(const[t,n]of BD(i))Pn(i,t)&&(ki(n)?e[t]=Zq(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=Xi(n):e[t]=n);return e}function eW(i){switch(typeof i){case"string":return i;case"number":return Xq(i);case"boolean":return Jq(i);case"bigint":return hS?hS(i):"0";case"symbol":return uS?uS(i):"Symbol()";case"undefined":return ed(i);case"function":case"object":{if(i===null)return ed(i);const e=i,t=eh(e,"toString");if(typeof t=="function"){const n=t(e);return typeof n=="string"?n:ed(n)}return ed(i)}default:return ed(i)}}function eh(i,e){for(;i!==null;){const n=Yq(i,e);if(n){if(n.get)return Yn(n.get);if(typeof n.value=="function")return Yn(n.value)}i=Vq(i)}function t(){return null}return t}function tW(i){try{return di(i,""),!0}catch{return!1}}const dS=$i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D0=$i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Q0=$i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),nW=$i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L0=$i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iW=$i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),AS=$i(["#text"]),pS=$i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),N0=$i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fS=$i(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),sf=$i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sW=Ys(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rW=Ys(/<%[\w\W]*|[\w\W]*%>/gm),aW=Ys(/\$\{[\w\W]*/gm),oW=Ys(/^data-[\-\w.\u00B7-\uFFFF]+$/),lW=Ys(/^aria-[\-\w]+$/),TD=Ys(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cW=Ys(/^(?:\w+script|data):/i),hW=Ys(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),MD=Ys(/^html$/i),uW=Ys(/^[a-z][.\w]*(-[.\w]+)+$/i);var gS=Object.freeze({__proto__:null,ARIA_ATTR:lW,ATTR_WHITESPACE:hW,CUSTOM_ELEMENT:uW,DATA_ATTR:oW,DOCTYPE_NAME:MD,ERB_EXPR:rW,IS_ALLOWED_URI:TD,IS_SCRIPT_OR_DATA:cW,MUSTACHE_EXPR:sW,TMPLIT_EXPR:aW});const td={element:1,text:3,progressingInstruction:7,comment:8,document:9},dW=function(){return typeof window>"u"?null:window},AW=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";t&&t.hasAttribute(s)&&(n=t.getAttribute(s));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},mS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function RD(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dW();const e=et=>RD(et);if(e.version="3.4.1",e.removed=[],!i||!i.document||i.document.nodeType!==td.document||!i.Element)return e.isSupported=!1,e;let{document:t}=i;const n=t,s=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:A}=i,p=l.prototype,g=eh(p,"cloneNode"),m=eh(p,"remove"),f=eh(p,"nextSibling"),y=eh(p,"childNodes"),_=eh(p,"parentNode");if(typeof a=="function"){const et=t.createElement("template");et.content&&et.content.ownerDocument&&(t=et.content.ownerDocument)}let E,v="";const{implementation:C,createNodeIterator:x,createDocumentFragment:I,getElementsByTagName:b}=t,{importNode:w}=n;let S=mS();e.isSupported=typeof BD=="function"&&typeof _=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:T,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:$}=gS;let{IS_ALLOWED_URI:J}=gS,W=null;const he=Et({},[...dS,...D0,...Q0,...L0,...AS]);let le=null;const Z=Et({},[...pS,...N0,...fS,...sf]);let ne=Object.seal(Zc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,z=null;const ae=Object.seal(Zc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,fe=!0,De=!1,ut=!0,Qe=!1,Ye=!0,ot=!1,Ke=!1,Ct=!1,U=!1,yt=!1,je=!1,Dt=!0,Fe=!1;const k="user-content-";let M=!0,Y=!1,se={},ce=null;const ie=Et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const be=Et({},["audio","video","img","source","image","track"]);let Ge=null;const it=Et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",xe="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml";let ke=Le,Ce=!1,gt=null;const q=Et({},[me,xe,Le],R0);let Te=Et({},["mi","mo","mn","ms","mtext"]),Ee=Et({},["annotation-xml"]);const Ne=Et({},["title","style","font","a","script"]);let ge=null;const ue=["application/xhtml+xml","text/html"],Ie="text/html";let ze=null,Lt=null;const Ht=t.createElement("form"),ns=function(O){return O instanceof RegExp||O instanceof Function},is=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Lt&&Lt===O)return;(!O||typeof O!="object")&&(O={}),O=Xi(O),ge=ue.indexOf(O.PARSER_MEDIA_TYPE)===-1?Ie:O.PARSER_MEDIA_TYPE,ze=ge==="application/xhtml+xml"?R0:Dd,W=Pn(O,"ALLOWED_TAGS")&&ki(O.ALLOWED_TAGS)?Et({},O.ALLOWED_TAGS,ze):he,le=Pn(O,"ALLOWED_ATTR")&&ki(O.ALLOWED_ATTR)?Et({},O.ALLOWED_ATTR,ze):Z,gt=Pn(O,"ALLOWED_NAMESPACES")&&ki(O.ALLOWED_NAMESPACES)?Et({},O.ALLOWED_NAMESPACES,R0):q,Ge=Pn(O,"ADD_URI_SAFE_ATTR")&&ki(O.ADD_URI_SAFE_ATTR)?Et(Xi(it),O.ADD_URI_SAFE_ATTR,ze):it,Ve=Pn(O,"ADD_DATA_URI_TAGS")&&ki(O.ADD_DATA_URI_TAGS)?Et(Xi(be),O.ADD_DATA_URI_TAGS,ze):be,ce=Pn(O,"FORBID_CONTENTS")&&ki(O.FORBID_CONTENTS)?Et({},O.FORBID_CONTENTS,ze):ie,G=Pn(O,"FORBID_TAGS")&&ki(O.FORBID_TAGS)?Et({},O.FORBID_TAGS,ze):Xi({}),z=Pn(O,"FORBID_ATTR")&&ki(O.FORBID_ATTR)?Et({},O.FORBID_ATTR,ze):Xi({}),se=Pn(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?Xi(O.USE_PROFILES):O.USE_PROFILES:!1,Be=O.ALLOW_ARIA_ATTR!==!1,fe=O.ALLOW_DATA_ATTR!==!1,De=O.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=O.SAFE_FOR_TEMPLATES||!1,Ye=O.SAFE_FOR_XML!==!1,ot=O.WHOLE_DOCUMENT||!1,U=O.RETURN_DOM||!1,yt=O.RETURN_DOM_FRAGMENT||!1,je=O.RETURN_TRUSTED_TYPE||!1,Ct=O.FORCE_BODY||!1,Dt=O.SANITIZE_DOM!==!1,Fe=O.SANITIZE_NAMED_PROPS||!1,M=O.KEEP_CONTENT!==!1,Y=O.IN_PLACE||!1,J=tW(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:TD,ke=typeof O.NAMESPACE=="string"?O.NAMESPACE:Le,Te=Pn(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?Xi(O.MATHML_TEXT_INTEGRATION_POINTS):Et({},["mi","mo","mn","ms","mtext"]),Ee=Pn(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?Xi(O.HTML_INTEGRATION_POINTS):Et({},["annotation-xml"]);const Ae=Pn(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?Xi(O.CUSTOM_ELEMENT_HANDLING):Zc(null);if(ne=Zc(null),Pn(Ae,"tagNameCheck")&&ns(Ae.tagNameCheck)&&(ne.tagNameCheck=Ae.tagNameCheck),Pn(Ae,"attributeNameCheck")&&ns(Ae.attributeNameCheck)&&(ne.attributeNameCheck=Ae.attributeNameCheck),Pn(Ae,"allowCustomizedBuiltInElements")&&typeof Ae.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=Ae.allowCustomizedBuiltInElements),Qe&&(fe=!1),yt&&(U=!0),se&&(W=Et({},AS),le=Zc(null),se.html===!0&&(Et(W,dS),Et(le,pS)),se.svg===!0&&(Et(W,D0),Et(le,N0),Et(le,sf)),se.svgFilters===!0&&(Et(W,Q0),Et(le,N0),Et(le,sf)),se.mathMl===!0&&(Et(W,L0),Et(le,fS),Et(le,sf))),ae.tagCheck=null,ae.attributeCheck=null,Pn(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?ae.tagCheck=O.ADD_TAGS:ki(O.ADD_TAGS)&&(W===he&&(W=Xi(W)),Et(W,O.ADD_TAGS,ze))),Pn(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?ae.attributeCheck=O.ADD_ATTR:ki(O.ADD_ATTR)&&(le===Z&&(le=Xi(le)),Et(le,O.ADD_ATTR,ze))),Pn(O,"ADD_URI_SAFE_ATTR")&&ki(O.ADD_URI_SAFE_ATTR)&&Et(Ge,O.ADD_URI_SAFE_ATTR,ze),Pn(O,"FORBID_CONTENTS")&&ki(O.FORBID_CONTENTS)&&(ce===ie&&(ce=Xi(ce)),Et(ce,O.FORBID_CONTENTS,ze)),Pn(O,"ADD_FORBID_CONTENTS")&&ki(O.ADD_FORBID_CONTENTS)&&(ce===ie&&(ce=Xi(ce)),Et(ce,O.ADD_FORBID_CONTENTS,ze)),M&&(W["#text"]=!0),ot&&Et(W,["html","head","body"]),W.table&&(Et(W,["tbody"]),delete G.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw nf('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nf('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=O.TRUSTED_TYPES_POLICY,v=E.createHTML("")}else E===void 0&&(E=AW(A,s)),E!==null&&typeof v=="string"&&(v=E.createHTML(""));$i&&$i(O),Lt=O},rp=Et({},[...D0,...Q0,...nW]),Cu=Et({},[...L0,...iW]),Iu=function(O){let Ae=_(O);(!Ae||!Ae.tagName)&&(Ae={namespaceURI:ke,tagName:"template"});const He=Dd(O.tagName),cn=Dd(Ae.tagName);return gt[O.namespaceURI]?O.namespaceURI===xe?Ae.namespaceURI===Le?He==="svg":Ae.namespaceURI===me?He==="svg"&&(cn==="annotation-xml"||Te[cn]):!!rp[He]:O.namespaceURI===me?Ae.namespaceURI===Le?He==="math":Ae.namespaceURI===xe?He==="math"&&Ee[cn]:!!Cu[He]:O.namespaceURI===Le?Ae.namespaceURI===xe&&!Ee[cn]||Ae.namespaceURI===me&&!Te[cn]?!1:!Cu[He]&&(Ne[He]||!rp[He]):!!(ge==="application/xhtml+xml"&>[O.namespaceURI]):!1},ss=function(O){Zu(e.removed,{element:O});try{_(O).removeChild(O)}catch{m(O)}},pr=function(O,Ae){try{Zu(e.removed,{attribute:Ae.getAttributeNode(O),from:Ae})}catch{Zu(e.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(O),O==="is")if(U||yt)try{ss(Ae)}catch{}else try{Ae.setAttribute(O,"")}catch{}},wu=function(O){let Ae=null,He=null;if(Ct)O="<remove></remove>"+O;else{const V=lS(O,/^[\r\n\t ]+/);He=V&&V[0]}ge==="application/xhtml+xml"&&ke===Le&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const cn=E?E.createHTML(O):O;if(ke===Le)try{Ae=new d().parseFromString(cn,ge)}catch{}if(!Ae||!Ae.documentElement){Ae=C.createDocument(ke,"template",null);try{Ae.documentElement.innerHTML=Ce?v:cn}catch{}}const N=Ae.body||Ae.documentElement;return O&&He&&N.insertBefore(t.createTextNode(He),N.childNodes[0]||null),ke===Le?b.call(Ae,ot?"html":"body")[0]:ot?Ae.documentElement:N},fr=function(O){return x.call(O.ownerDocument||O,O,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ko=function(O){return O instanceof h&&(typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||!(O.attributes instanceof u)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function")},oc=function(O){return typeof o=="function"&&O instanceof o};function Cs(et,O,Ae){Ku(et,He=>{He.call(e,O,Ae,Lt)})}const Uo=function(O){let Ae=null;if(Cs(S.beforeSanitizeElements,O,null),ko(O))return ss(O),!0;const He=ze(O.nodeName);if(Cs(S.uponSanitizeElement,O,{tagName:He,allowedTags:W}),Ye&&O.hasChildNodes()&&!oc(O.firstElementChild)&&di(/<[/\w!]/g,O.innerHTML)&&di(/<[/\w!]/g,O.textContent)||Ye&&O.namespaceURI===Le&&He==="style"&&oc(O.firstElementChild)||O.nodeType===td.progressingInstruction||Ye&&O.nodeType===td.comment&&di(/<[/\w]/g,O.data))return ss(O),!0;if(G[He]||!(ae.tagCheck instanceof Function&&ae.tagCheck(He))&&!W[He]){if(!G[He]&&Bu(He)&&(ne.tagNameCheck instanceof RegExp&&di(ne.tagNameCheck,He)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(He)))return!1;if(M&&!ce[He]){const cn=_(O)||O.parentNode,N=y(O)||O.childNodes;if(N&&cn){const V=N.length;for(let ee=V-1;ee>=0;--ee){const K=g(N[ee],!0);cn.insertBefore(K,f(O))}}}return ss(O),!0}return O instanceof l&&!Iu(O)||(He==="noscript"||He==="noembed"||He==="noframes")&&di(/<\/no(script|embed|frames)/i,O.innerHTML)?(ss(O),!0):(Qe&&O.nodeType===td.text&&(Ae=O.textContent,Ku([B,T,D],cn=>{Ae=Fc(Ae,cn," ")}),O.textContent!==Ae&&(Zu(e.removed,{element:O.cloneNode()}),O.textContent=Ae)),Cs(S.afterSanitizeElements,O,null),!1)},Su=function(O,Ae,He){if(z[Ae]||Dt&&(Ae==="id"||Ae==="name")&&(He in t||He in Ht))return!1;if(!(fe&&!z[Ae]&&di(P,Ae))){if(!(Be&&di(R,Ae))){if(!(ae.attributeCheck instanceof Function&&ae.attributeCheck(Ae,O))){if(!le[Ae]||z[Ae]){if(!(Bu(O)&&(ne.tagNameCheck instanceof RegExp&&di(ne.tagNameCheck,O)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(O))&&(ne.attributeNameCheck instanceof RegExp&&di(ne.attributeNameCheck,Ae)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(Ae,O))||Ae==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&di(ne.tagNameCheck,He)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(He))))return!1}else if(!Ge[Ae]){if(!di(J,Fc(He,F,""))){if(!((Ae==="src"||Ae==="xlink:href"||Ae==="href")&&O!=="script"&&cS(He,"data:")===0&&Ve[O])){if(!(De&&!di(L,Fc(He,F,"")))){if(He)return!1}}}}}}}return!0},lc=Et({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bu=function(O){return!lc[Dd(O)]&&di($,O)},Tu=function(O){Cs(S.beforeSanitizeAttributes,O,null);const{attributes:Ae}=O;if(!Ae||ko(O))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0};let cn=Ae.length;for(;cn--;){const N=Ae[cn],{name:V,namespaceURI:ee,value:K}=N,X=ze(V),Se=K;let ve=V==="value"?Se:jq(Se);if(He.attrName=X,He.attrValue=ve,He.keepAttr=!0,He.forceKeepAttr=void 0,Cs(S.uponSanitizeAttribute,O,He),ve=He.attrValue,Fe&&(X==="id"||X==="name")&&cS(ve,k)!==0&&(pr(V,O),ve=k+ve),Ye&&di(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ve)){pr(V,O);continue}if(X==="attributename"&&lS(ve,"href")){pr(V,O);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){pr(V,O);continue}if(!ut&&di(/\/>/i,ve)){pr(V,O);continue}Qe&&Ku([B,T,D],Ue=>{ve=Fc(ve,Ue," ")});const Me=ze(O.nodeName);if(!Su(Me,X,ve)){pr(V,O);continue}if(E&&typeof A=="object"&&typeof A.getAttributeType=="function"&&!ee)switch(A.getAttributeType(Me,X)){case"TrustedHTML":{ve=E.createHTML(ve);break}case"TrustedScriptURL":{ve=E.createScriptURL(ve);break}}if(ve!==Se)try{ee?O.setAttributeNS(ee,V,ve):O.setAttribute(V,ve),ko(O)?ss(O):oS(e.removed)}catch{pr(V,O)}}Cs(S.afterSanitizeAttributes,O,null)},ap=function(O){let Ae=null;const He=fr(O);for(Cs(S.beforeSanitizeShadowDOM,O,null);Ae=He.nextNode();)Cs(S.uponSanitizeShadowNode,Ae,null),Uo(Ae),Tu(Ae),Ae.content instanceof r&&ap(Ae.content);Cs(S.afterSanitizeShadowDOM,O,null)};return e.sanitize=function(et){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=null,He=null,cn=null,N=null;if(Ce=!et,Ce&&(et="<!-->"),typeof et!="string"&&!oc(et)&&(et=eW(et),typeof et!="string"))throw nf("dirty is not a string, aborting");if(!e.isSupported)return et;if(Ke||is(O),e.removed=[],typeof et=="string"&&(Y=!1),Y){const K=et.nodeName;if(typeof K=="string"){const X=ze(K);if(!W[X]||G[X])throw nf("root node is forbidden and cannot be sanitized in-place")}}else if(et instanceof o)Ae=wu("<!---->"),He=Ae.ownerDocument.importNode(et,!0),He.nodeType===td.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?Ae=He:Ae.appendChild(He);else{if(!U&&!Qe&&!ot&&et.indexOf("<")===-1)return E&&je?E.createHTML(et):et;if(Ae=wu(et),!Ae)return U?null:je?v:""}Ae&&Ct&&ss(Ae.firstChild);const V=fr(Y?et:Ae);for(;cn=V.nextNode();)Uo(cn),Tu(cn),cn.content instanceof r&&ap(cn.content);if(Y)return et;if(U){if(Qe){Ae.normalize();let K=Ae.innerHTML;Ku([B,T,D],X=>{K=Fc(K,X," ")}),Ae.innerHTML=K}if(yt)for(N=I.call(Ae.ownerDocument);Ae.firstChild;)N.appendChild(Ae.firstChild);else N=Ae;return(le.shadowroot||le.shadowrootmode)&&(N=w.call(n,N,!0)),N}let ee=ot?Ae.outerHTML:Ae.innerHTML;return ot&&W["!doctype"]&&Ae.ownerDocument&&Ae.ownerDocument.doctype&&Ae.ownerDocument.doctype.name&&di(MD,Ae.ownerDocument.doctype.name)&&(ee="<!DOCTYPE "+Ae.ownerDocument.doctype.name+`>
|
|
14638
14638
|
`+ee),Qe&&Ku([B,T,D],K=>{ee=Fc(ee,K," ")}),E&&je?E.createHTML(ee):ee},e.setConfig=function(){let et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};is(et),Ke=!0},e.clearConfig=function(){Lt=null,Ke=!1},e.isValidAttribute=function(et,O,Ae){Lt||is({});const He=ze(et),cn=ze(O);return Su(He,cn,Ae)},e.addHook=function(et,O){typeof O=="function"&&Zu(S[et],O)},e.removeHook=function(et,O){if(O!==void 0){const Ae=qq(S[et],O);return Ae===-1?void 0:Wq(S[et],Ae,1)[0]}return oS(S[et])},e.removeHooks=function(et){S[et]=[]},e.removeAllHooks=function(){S=mS()},e}var pW=RD();/**
|
|
14639
14639
|
* @license
|
|
14640
14640
|
* Copyright 2017 Google LLC
|
|
@@ -15112,7 +15112,7 @@ ${r.join(`
|
|
|
15112
15112
|
${this._renderLoaderByType()}
|
|
15113
15113
|
${this._renderLabel()}
|
|
15114
15114
|
</slot>
|
|
15115
|
-
`}}ZA([H({type:String,attribute:Eo.loadingLabel.name})],_u.prototype,"loadingLabel");ZA([H({type:String,attribute:Eo.loadingLogoSrc.name})],_u.prototype,"loadingLogoSrc");ZA([H({type:Number,attribute:Eo.currentProgress.name})],_u.prototype,"currentProgress");ZA([H({type:String,attribute:Eo.loaderType.name})],_u.prototype,"loaderType");ZA([zt("#loadingLogoParent")],_u.prototype,"__loadingLogoParent");window.customElements.get(_S)||window.customElements.define(_S,_u);const vS="epg-modal",Rm={open:{name:"open"},poweredByEpigraph:{name:"powered-by-epigraph"},poweredByEpigraphHref:{name:"powered-by-epigraph-href",defaultValue:"https://www.epigraph.us"}},bW={modalContents:{name:"modal-contents"}},jf={SCREEN:{WIDTH:{MAX:{$value:"479px"}}},MODAL:{WIDTH:{MIN:{$value:"280px"},MAX:{$value:"380px"}}}},rf={SCREEN:{WIDTH:{MIN:{$value:"480px"},MAX:{$value:"1023px"}}},MODAL:{WIDTH:{MIN:{$value:"424px"},MAX:{$value:"578px"}}}},af={SCREEN:{WIDTH:{MIN:{$value:"1024px"},MAX:{$value:"1439px"}}},MODAL:{WIDTH:{MIN:{$value:"532px"},MAX:{$value:"616px"}}}},
|
|
15115
|
+
`}}ZA([H({type:String,attribute:Eo.loadingLabel.name})],_u.prototype,"loadingLabel");ZA([H({type:String,attribute:Eo.loadingLogoSrc.name})],_u.prototype,"loadingLogoSrc");ZA([H({type:Number,attribute:Eo.currentProgress.name})],_u.prototype,"currentProgress");ZA([H({type:String,attribute:Eo.loaderType.name})],_u.prototype,"loaderType");ZA([zt("#loadingLogoParent")],_u.prototype,"__loadingLogoParent");window.customElements.get(_S)||window.customElements.define(_S,_u);const vS="epg-modal",Rm={open:{name:"open"},poweredByEpigraph:{name:"powered-by-epigraph"},poweredByEpigraphHref:{name:"powered-by-epigraph-href",defaultValue:"https://www.epigraph.us"}},bW={modalContents:{name:"modal-contents"}},jf={SCREEN:{WIDTH:{MAX:{$value:"479px"}}},MODAL:{WIDTH:{MIN:{$value:"280px"},MAX:{$value:"380px"}}}},rf={SCREEN:{WIDTH:{MIN:{$value:"480px"},MAX:{$value:"1023px"}}},MODAL:{WIDTH:{MIN:{$value:"424px"},MAX:{$value:"578px"}}}},af={SCREEN:{WIDTH:{MIN:{$value:"1024px"},MAX:{$value:"1439px"}}},MODAL:{WIDTH:{MIN:{$value:"532px"},MAX:{$value:"616px"}}}},P0={SCREEN:{WIDTH:{MIN:{$value:"1440px"}}},MODAL:{WIDTH:{MIN:{$value:"532px"},MAX:{$value:"648px"}}}};/**
|
|
15116
15116
|
* @license
|
|
15117
15117
|
* Copyright 2018 Google LLC
|
|
15118
15118
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -15201,10 +15201,10 @@ ${r.join(`
|
|
|
15201
15201
|
}
|
|
15202
15202
|
|
|
15203
15203
|
/* Extra Large Screens */
|
|
15204
|
-
@media (min-width: ${oe(
|
|
15204
|
+
@media (min-width: ${oe(P0.SCREEN.WIDTH.MIN.$value)}) {
|
|
15205
15205
|
.dialog {
|
|
15206
|
-
min-width: ${oe(
|
|
15207
|
-
max-width: ${oe(
|
|
15206
|
+
min-width: ${oe(P0.MODAL.WIDTH.MIN.$value)};
|
|
15207
|
+
max-width: ${oe(P0.MODAL.WIDTH.MAX.$value)};
|
|
15208
15208
|
}
|
|
15209
15209
|
}
|
|
15210
15210
|
|
|
@@ -16333,7 +16333,7 @@ ${r.join(`
|
|
|
16333
16333
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16334
16334
|
* See the License for the specific language governing permissions and
|
|
16335
16335
|
* limitations under the License.
|
|
16336
|
-
*/const OD=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null,GD=OD&&self.XRSession.prototype.requestHitTestSource!=null,
|
|
16336
|
+
*/const OD=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null,GD=OD&&self.XRSession.prototype.requestHitTestSource!=null,F0=self.ResizeObserver!=null,k0=self.IntersectionObserver!=null,ix=GD,YW=(()=>{const i=navigator.userAgent||navigator.vendor||self.opera;let e=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(i)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(i.substr(0,4)))&&(e=!0),e})(),zD=/android/i.test(navigator.userAgent),HD=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,qW=/firefox/i.test(navigator.userAgent),WW=/OculusBrowser/.test(navigator.userAgent),jW=zD&&!qW&&!WW,XW=!!(window.webkit&&window.webkit.messageHandlers),vv=(()=>{if(HD){if(XW)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{const i=document.createElement("a");return!!(i.relList&&i.relList.supports&&i.relList.supports("ar"))}}else return!1})();/* @license
|
|
16337
16337
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16338
16338
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16339
16339
|
* you may not use this file except in compliance with the License.
|
|
@@ -16830,7 +16830,7 @@ canvas {
|
|
|
16830
16830
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16831
16831
|
* See the License for the specific language governing permissions and
|
|
16832
16832
|
* limitations under the License.
|
|
16833
|
-
*/var OS,GS;const Ks=Symbol("retainerCount"),Kr=Symbol("recentlyUsed"),lf=Symbol("evict"),nd=Symbol("evictionThreshold"),
|
|
16833
|
+
*/var OS,GS;const Ks=Symbol("retainerCount"),Kr=Symbol("recentlyUsed"),lf=Symbol("evict"),nd=Symbol("evictionThreshold"),U0=Symbol("cache");class uj{constructor(e,t=5){this[OS]=new Map,this[GS]=[],this[U0]=e,this[nd]=t}set evictionThreshold(e){this[nd]=e,this[lf]()}get evictionThreshold(){return this[nd]}get cache(){return this[U0]}retainerCount(e){return this[Ks].get(e)||0}reset(){this[Ks].clear(),this[Kr]=[]}retain(e){this[Ks].has(e)||this[Ks].set(e,0),this[Ks].set(e,this[Ks].get(e)+1);const t=this[Kr].indexOf(e);t!==-1&&this[Kr].splice(t,1),this[Kr].unshift(e),this[lf]()}release(e){this[Ks].has(e)&&this[Ks].set(e,Math.max(this[Ks].get(e)-1,0)),this[lf]()}[(OS=Ks,GS=Kr,lf)](){if(!(this[Kr].length<this[nd]))for(let e=this[Kr].length-1;e>=this[nd];--e){const t=this[Kr][e];this[Ks].get(t)===0&&(this[U0].delete(t),this[Kr].splice(e,1))}}}/* @license
|
|
16834
16834
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
16835
16835
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16836
16836
|
* you may not use this file except in compliance with the License.
|
|
@@ -16856,7 +16856,7 @@ canvas {
|
|
|
16856
16856
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16857
16857
|
* See the License for the specific language governing permissions and
|
|
16858
16858
|
* limitations under the License.
|
|
16859
|
-
*/var VD,zS;ln.DEFAULT_ANISOTROPY=4;const fj=(i,e,t=()=>{})=>{const n=s=>{const r=s.loaded/s.total;t(Math.max(0,Math.min(1,isFinite(r)?r:1)))};return new Promise((s,r)=>{e.load(i,s,n,r)})},gj=i=>new Promise((e,t)=>{const n=document.createElement("script");document.body.appendChild(n),n.onload=e,n.onerror=t,n.async=!0,n.src=i}),Zr=new Map,
|
|
16859
|
+
*/var VD,zS;ln.DEFAULT_ANISOTROPY=4;const fj=(i,e,t=()=>{})=>{const n=s=>{const r=s.loaded/s.total;t(Math.max(0,Math.min(1,isFinite(r)?r:1)))};return new Promise((s,r)=>{e.load(i,s,n,r)})},gj=i=>new Promise((e,t)=>{const n=document.createElement("script");document.body.appendChild(n),n.onload=e,n.onerror=t,n.async=!0,n.src=i}),Zr=new Map,O0=new Map;let HS;const $S=new i2;let VS;const G0=new Ns;let z0,H0;const ol=Symbol("loader"),oo=Symbol("evictionPolicy"),YS=Symbol("GLTFInstance");class Ui extends hr{static setDRACODecoderLocation(e){HS=e,$S.setDecoderPath(e)}static getDRACODecoderLocation(){return HS}static setKTX2TranscoderLocation(e){VS=e,G0.setTranscoderPath(e)}static getKTX2TranscoderLocation(){return VS}static setMeshoptDecoderLocation(e){z0!==e&&(z0=e,H0=gj(e).then(()=>US.ready).then(()=>US))}static getMeshoptDecoderLocation(){return z0}static initializeKTX2Loader(e){G0.detectSupport(e)}static get cache(){return Zr}static clearCache(){Zr.forEach((e,t)=>{this.delete(t)}),this[oo].reset()}static has(e){return Zr.has(e)}static async delete(e){if(!this.has(e))return;const t=Zr.get(e);O0.delete(e),Zr.delete(e),(await t).dispose()}static hasFinishedLoading(e){return!!O0.get(e)}constructor(e){super(),this[zS]=new s2().register(t=>new pj(t)),this[YS]=e,this[ol].setDRACOLoader($S),this[ol].setKTX2Loader(G0)}get[(VD=oo,zS=ol,oo)](){return this.constructor[oo]}async preload(e,t,n=()=>{}){if(this[ol].setWithCredentials(t.withCredentials),this.dispatchEvent({type:"preload",element:t,src:e}),!Zr.has(e)){H0!=null&&this[ol].setMeshoptDecoder(await H0);const s=fj(e,this[ol],o=>{n(o*.8)}),r=this[YS],a=s.then(o=>r.prepare(o)).then(o=>(n(.9),new r(o))).catch((o=>(console.error(o),new r)));Zr.set(e,a)}await Zr.get(e),O0.set(e,!0),n&&n(1)}async load(e,t,n=()=>{}){await this.preload(e,t,n);const r=await(await Zr.get(e)).clone();return this[oo].retain(e),r.dispose=()=>{this[oo].release(e)},r}}Ui[VD]=new uj(Ui);/* @license
|
|
16860
16860
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
16861
16861
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16862
16862
|
* you may not use this file except in compliance with the License.
|
|
@@ -16895,7 +16895,7 @@ canvas {
|
|
|
16895
16895
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16896
16896
|
* See the License for the specific language governing permissions and
|
|
16897
16897
|
* limitations under the License.
|
|
16898
|
-
*/const kt={MIN_TOUCH_AREA:.05,BASE_RADIUS:.15,LINE_WIDTH:.02,SEGMENTS:16,DELTA_PHI:Math.PI/32,COLORS:{EDGE_FALLOFF:new we(.98,.98,.98),EDGE_CUTOFF:new we(.8,.8,.8),FILL_FALLOFF:new we(.4,.4,.4),FILL_CUTOFF:new we(.4,.4,.4),ACTIVE_EDGE:new we(1,1,1),ACTIVE_FILL:new we(.6,.6,.6)},MAX_OPACITY:.75,FILL_OPACITY_MULTIPLIER:.5,INTERACTIVE_OPACITY_MULTIPLIER:1.2,MIN_DISTANCE:.5,MAX_DISTANCE:10,BASE_SCALE:1,DISTANCE_SCALE_FACTOR:.3,COLOR_LERP_FACTOR:.15,SCREEN_SPACE_SCALE:1.2,SIZE_UPDATE_THRESHOLD:.001,GEOMETRY_UPDATE_DEBOUNCE:100},WS=new pe,cf=(i,e,t,n,s)=>{let r=e>0?t>0?0:-Math.PI/2:t>0?Math.PI/2:Math.PI;for(let a=0;a<=kt.SEGMENTS;++a)i.push(e+(n-s)*Math.cos(r),t+(n-s)*Math.sin(r),0,e+n*Math.cos(r),t+n*Math.sin(r),0),r+=kt.DELTA_PHI};class _j extends Je{constructor(e,t){const n=new fn;super(n),this.shadowHeight=0,this.isActive=!1,this.isHovered=!1,this.lastGeometryUpdateTime=0,this.needsGeometryUpdate=!1,this.scene=e,this.side=t,this.currentSize=new Q,this.goalSize=new Q,this.sizeDamper=new mi,this.updateSizeFromScene(),this.edgeMaterial=new Xn({color:kt.COLORS.EDGE_FALLOFF,transparent:!0,opacity:0,side:On,depthWrite:!1,blending:
|
|
16898
|
+
*/const kt={MIN_TOUCH_AREA:.05,BASE_RADIUS:.15,LINE_WIDTH:.02,SEGMENTS:16,DELTA_PHI:Math.PI/32,COLORS:{EDGE_FALLOFF:new we(.98,.98,.98),EDGE_CUTOFF:new we(.8,.8,.8),FILL_FALLOFF:new we(.4,.4,.4),FILL_CUTOFF:new we(.4,.4,.4),ACTIVE_EDGE:new we(1,1,1),ACTIVE_FILL:new we(.6,.6,.6)},MAX_OPACITY:.75,FILL_OPACITY_MULTIPLIER:.5,INTERACTIVE_OPACITY_MULTIPLIER:1.2,MIN_DISTANCE:.5,MAX_DISTANCE:10,BASE_SCALE:1,DISTANCE_SCALE_FACTOR:.3,COLOR_LERP_FACTOR:.15,SCREEN_SPACE_SCALE:1.2,SIZE_UPDATE_THRESHOLD:.001,GEOMETRY_UPDATE_DEBOUNCE:100},WS=new pe,cf=(i,e,t,n,s)=>{let r=e>0?t>0?0:-Math.PI/2:t>0?Math.PI/2:Math.PI;for(let a=0;a<=kt.SEGMENTS;++a)i.push(e+(n-s)*Math.cos(r),t+(n-s)*Math.sin(r),0,e+n*Math.cos(r),t+n*Math.sin(r),0),r+=kt.DELTA_PHI};class _j extends Je{constructor(e,t){const n=new fn;super(n),this.shadowHeight=0,this.isActive=!1,this.isHovered=!1,this.lastGeometryUpdateTime=0,this.needsGeometryUpdate=!1,this.scene=e,this.side=t,this.currentSize=new Q,this.goalSize=new Q,this.sizeDamper=new mi,this.updateSizeFromScene(),this.edgeMaterial=new Xn({color:kt.COLORS.EDGE_FALLOFF,transparent:!0,opacity:0,side:On,depthWrite:!1,blending:j_}),this.fillMaterial=new Xn({color:kt.COLORS.FILL_FALLOFF,transparent:!0,opacity:0,side:On,depthWrite:!1,blending:Bl}),this.material=this.edgeMaterial,this.goalOpacity=0,this.opacityDamper=new mi,this.createHitMeshes(),this.updatePositionFromScene(),e.target.add(this),e.target.add(this.hitBox),this.offsetHeight=0}updateSizeFromScene(){const{size:e}=this.scene;this.goalSize.copy(e);const t=Math.sqrt(e.x*e.x+e.z*e.z),n=Math.max(kt.MIN_TOUCH_AREA,t*.4);this.goalSize.x<n&&(this.goalSize.x=n),this.goalSize.z<n&&(this.goalSize.z=n),this.updateGeometry()}updateGeometry(){const e=this.geometry,t=[],n=[],s=this.goalSize.x/2,r=(this.side==="back"?this.goalSize.y:this.goalSize.z)/2,a=Math.min(s,r),o=Math.max(kt.BASE_RADIUS*.7,a*.2),l=Math.max(kt.LINE_WIDTH*.7,a*.025);cf(n,s,r,o,l),cf(n,-s,r,o,l),cf(n,-s,-r,o,l),cf(n,s,-r,o,l);const c=n.length/3;for(let h=0;h<c-2;h+=2)t.push(h,h+1,h+3,h,h+3,h+2);const u=c-2;t.push(u,u+1,1,u,1,0),e.setAttribute("position",new en(n,3)),e.setIndex(t),e.computeBoundingSphere()}createHitMeshes(){const e=this.goalSize.x/2,t=(this.side==="back"?this.goalSize.y:this.goalSize.z)/2,n=Math.min(e,t),s=Math.max(kt.BASE_RADIUS*.7,n*.2);this.hitPlane=new Je(new Es(2*(e+s),2*(t+s))),this.hitPlane.visible=!1,this.hitPlane.material.side=On,this.add(this.hitPlane),this.hitBox=new Je(new Hs(this.goalSize.x+2*s,this.goalSize.y+s,this.goalSize.z+2*s)),this.hitBox.visible=!1,this.hitBox.material.side=On,this.add(this.hitBox)}updatePositionFromScene(){const{boundingBox:e}=this.scene;switch(e.getCenter(this.position),this.rotation.set(0,0,0),this.side){case"bottom":this.rotateX(-Math.PI/2),this.shadowHeight=e.min.y,this.position.y=this.shadowHeight;break;case"back":this.shadowHeight=e.min.z,this.position.z=this.shadowHeight;break}if(this.hitBox){const t=this.side==="back"?(this.goalSize.y+kt.BASE_RADIUS)/2:(this.goalSize.y+kt.BASE_RADIUS)/2;this.hitBox.position.y=t+e.min.y}}updateFromModelChanges(){this.updateSizeFromScene(),this.updatePositionFromScene(),this.updateGeometry(),this.updateHitMeshes(),this.ensureProperOrientation(),this.needsGeometryUpdate=!1,this.lastGeometryUpdateTime=performance.now()}ensureProperOrientation(){this.side==="bottom"?(this.rotation.x=-Math.PI/2,this.rotation.y=0,this.rotation.z=0):this.side==="back"&&(this.rotation.x=0,this.rotation.y=0,this.rotation.z=0)}setScreenSpaceMode(e){e?this.scale.set(kt.SCREEN_SPACE_SCALE,kt.SCREEN_SPACE_SCALE,kt.SCREEN_SPACE_SCALE):this.scale.set(1,1,1)}updateHitMeshes(){if(this.hitPlane&&this.hitBox){const e=this.goalSize.x/2,t=(this.side==="back"?this.goalSize.y:this.goalSize.z)/2,n=Math.min(e,t),s=Math.max(kt.BASE_RADIUS*.7,n*.2),r=new Es(2*(e+s),2*(t+s));this.hitPlane.geometry.dispose(),this.hitPlane.geometry=r;const a=new Hs(this.goalSize.x+2*s,this.goalSize.y+s,this.goalSize.z+2*s);this.hitBox.geometry.dispose(),this.hitBox.geometry=a}}setInteractionState(e,t=!1){this.isActive=e,this.isHovered=t,this.updateVisualState()}updateVisualState(){let e,t;this.isActive?(e=kt.COLORS.ACTIVE_EDGE,t=kt.COLORS.ACTIVE_FILL):this.isHovered?(e=kt.COLORS.EDGE_FALLOFF,t=kt.COLORS.FILL_FALLOFF):(e=kt.COLORS.EDGE_CUTOFF,t=kt.COLORS.FILL_CUTOFF),this.edgeMaterial.color.lerp(e,kt.COLOR_LERP_FACTOR),this.fillMaterial.color.lerp(t,kt.COLOR_LERP_FACTOR)}applyDistanceScaling(e){const t=e.distanceTo(this.position),n=Math.max(kt.MIN_DISTANCE,Math.min(kt.MAX_DISTANCE,t)),s=kt.BASE_SCALE+(n-kt.MIN_DISTANCE)*kt.DISTANCE_SCALE_FACTOR;this.scale.set(s,s,s)}getHit(e,t,n){WS.set(t,-n),this.hitPlane.visible=!0;const s=e.positionAndNormalFromPoint(WS,this.hitPlane);return this.hitPlane.visible=!1,s==null?null:s.position}getExpandedHit(e,t,n){this.hitPlane.scale.set(1e3,1e3,1e3),this.hitPlane.updateMatrixWorld();const s=this.getHit(e,t,n);return this.hitPlane.scale.set(1,1,1),s}controllerIntersection(e,t){this.hitBox.visible=!0;const n=e.hitFromController(t,this.hitBox);return this.hitBox.visible=!1,n}set offsetHeight(e){e-=.001,this.side==="back"?this.position.z=this.shadowHeight+e:this.position.y=this.shadowHeight+e}get offsetHeight(){return this.side==="back"?this.position.z-this.shadowHeight:this.position.y-this.shadowHeight}set show(e){this.goalOpacity=e?kt.MAX_OPACITY:0}updateOpacity(e){const t=this.material,n=this.opacityDamper.update(t.opacity,this.goalOpacity,e,1);this.edgeMaterial.opacity=n,this.fillMaterial.opacity=n*kt.FILL_OPACITY_MULTIPLIER,(this.isActive||this.isHovered)&&(this.edgeMaterial.opacity=n*kt.INTERACTIVE_OPACITY_MULTIPLIER),this.visible=n>0}update(e,t){if(this.updateOpacity(e),!this.currentSize.equals(this.goalSize)){const s=new Q;s.x=this.sizeDamper.update(this.currentSize.x,this.goalSize.x,e,1),s.y=this.sizeDamper.update(this.currentSize.y,this.goalSize.y,e,1),s.z=this.sizeDamper.update(this.currentSize.z,this.goalSize.z,e,1),s.distanceTo(this.currentSize)>kt.SIZE_UPDATE_THRESHOLD&&(this.currentSize.copy(s),this.needsGeometryUpdate=!0)}const n=performance.now();this.needsGeometryUpdate&&n-this.lastGeometryUpdateTime>kt.GEOMETRY_UPDATE_DEBOUNCE&&(this.updateGeometry(),this.updateHitMeshes(),this.needsGeometryUpdate=!1,this.lastGeometryUpdateTime=n),t&&this.applyDistanceScaling(t),this.updateVisualState()}getSize(){return this.goalSize.clone()}dispose(){const{geometry:e,material:t}=this.hitPlane;e.dispose(),t.dispose(),this.hitBox.geometry.dispose(),this.hitBox.material.dispose(),this.geometry.dispose(),this.edgeMaterial.dispose(),this.fillMaterial.dispose(),this.hitBox.removeFromParent(),this.removeFromParent()}}/* @license
|
|
16899
16899
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16900
16900
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16901
16901
|
* you may not use this file except in compliance with the License.
|
|
@@ -16934,7 +16934,7 @@ canvas {
|
|
|
16934
16934
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16935
16935
|
* See the License for the specific language governing permissions and
|
|
16936
16936
|
* limitations under the License.
|
|
16937
|
-
*/var jD,KS,ZS;const bu=Symbol("evaluate"),tg=Symbol("lastValue");class bn{constructor(){this[jD]=null}static evaluatableFor(e,t=Do){if(e instanceof bn)return e;if(e.type==="number")return e.unit==="%"?new Cj(e,t):e;switch(e.name.value){case"calc":return new Sj(e,t);case"env":return new Ij(e)}return Do}static evaluate(e){return e instanceof bn?e.evaluate():e}static isConstant(e){return e instanceof bn?e.isConstant:!0}static applyIntrinsics(e,t){const{basis:n,keywords:s}=t,{auto:r}=s;return n.map((a,o)=>{const l=r[o]==null?a:r[o];let c=e[o]?e[o]:l;if(c.type==="ident"){const u=c.value;u in s&&(c=s[u][o])}return(c==null||c.type==="ident")&&(c=l),c.unit==="%"?Bi(c.number/100*a.number,a.unit):(c=Sr(c,a),c.unit!==a.unit?a:c)})}get isConstant(){return!1}evaluate(){return(!this.isConstant||this[tg]==null)&&(this[tg]=this[bu]()),this[tg]}}jD=tg;const eB=Symbol("percentage"),$
|
|
16937
|
+
*/var jD,KS,ZS;const bu=Symbol("evaluate"),tg=Symbol("lastValue");class bn{constructor(){this[jD]=null}static evaluatableFor(e,t=Do){if(e instanceof bn)return e;if(e.type==="number")return e.unit==="%"?new Cj(e,t):e;switch(e.name.value){case"calc":return new Sj(e,t);case"env":return new Ij(e)}return Do}static evaluate(e){return e instanceof bn?e.evaluate():e}static isConstant(e){return e instanceof bn?e.isConstant:!0}static applyIntrinsics(e,t){const{basis:n,keywords:s}=t,{auto:r}=s;return n.map((a,o)=>{const l=r[o]==null?a:r[o];let c=e[o]?e[o]:l;if(c.type==="ident"){const u=c.value;u in s&&(c=s[u][o])}return(c==null||c.type==="ident")&&(c=l),c.unit==="%"?Bi(c.number/100*a.number,a.unit):(c=Sr(c,a),c.unit!==a.unit?a:c)})}get isConstant(){return!1}evaluate(){return(!this.isConstant||this[tg]==null)&&(this[tg]=this[bu]()),this[tg]}}jD=tg;const eB=Symbol("percentage"),$0=Symbol("basis");class Cj extends bn{constructor(e,t){super(),this[eB]=e,this[$0]=t}get isConstant(){return!0}[bu](){return Bi(this[eB].number/100*this[$0].number,this[$0].unit)}}const hf=Symbol("identNode");class Ij extends bn{constructor(e){super(),this[KS]=null;const t=e.arguments.length?e.arguments[0].terms[0]:null;t!=null&&t.type==="ident"&&(this[hf]=t)}get isConstant(){return!1}[(KS=hf,bu)](){if(this[hf]!=null)switch(this[hf].value){case"window-scroll-y":const e=window.pageYOffset,t=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight);return{type:"number",number:e/(t-window.innerHeight)||0,unit:null}}return Do}}const wj=/[\*\/]/,kc=Symbol("evaluator");class Sj extends bn{constructor(e,t=Do){if(super(),this[ZS]=null,e.arguments.length!==1)return;const n=e.arguments[0].terms.slice(),s=[];for(;n.length;){const r=n.shift();if(s.length>0){const a=s[s.length-1];if(a.type==="operator"&&wj.test(a.value)){const o=s.pop(),l=s.pop();if(l==null)return;s.push(new nB(o,bn.evaluatableFor(l,t),bn.evaluatableFor(r,t)));continue}}s.push(r.type==="operator"?r:bn.evaluatableFor(r,t))}for(;s.length>2;){const[r,a,o]=s.splice(0,3);if(a.type!=="operator")return;s.unshift(new nB(a,bn.evaluatableFor(r,t),bn.evaluatableFor(o,t)))}s.length===1&&(this[kc]=s[0])}get isConstant(){return this[kc]==null||bn.isConstant(this[kc])}[(ZS=kc,bu)](){return this[kc]!=null?bn.evaluate(this[kc]):Do}}const tB=Symbol("operator"),V0=Symbol("left"),Y0=Symbol("right");class nB extends bn{constructor(e,t,n){super(),this[tB]=e,this[V0]=t,this[Y0]=n}get isConstant(){return bn.isConstant(this[V0])&&bn.isConstant(this[Y0])}[bu](){const e=Sr(bn.evaluate(this[V0])),t=Sr(bn.evaluate(this[Y0])),{number:n,unit:s}=e,{number:r,unit:a}=t;if(a!=null&&s!=null&&a!=s)return Do;const o=s||a;let l;switch(this[tB].value){case"+":l=n+r;break;case"-":l=n-r;break;case"/":l=n/r;break;case"*":l=n*r;break;default:return Do}return{type:"number",number:l,unit:o}}}const q0=Symbol("evaluatables"),iB=Symbol("intrinsics");class XD extends bn{constructor(e,t){super(),this[iB]=t;const n=e[0],s=n!=null?n.terms:[];this[q0]=t.basis.map((r,a)=>{const o=s[a];return o==null?{type:"ident",value:"auto"}:o.type==="ident"?o:bn.evaluatableFor(o,r)})}get isConstant(){for(const e of this[q0])if(!bn.isConstant(e))return!1;return!0}[bu](){const e=this[q0].map(t=>bn.evaluate(t));return bn.applyIntrinsics(e,this[iB]).map(t=>t.number)}}/* @license
|
|
16938
16938
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16939
16939
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16940
16940
|
* you may not use this file except in compliance with the License.
|
|
@@ -16947,7 +16947,7 @@ canvas {
|
|
|
16947
16947
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16948
16948
|
* See the License for the specific language governing permissions and
|
|
16949
16949
|
* limitations under the License.
|
|
16950
|
-
*/var JD,KD,ZD,eQ;const Uc=Symbol("instances"),sB=Symbol("activateListener"),rB=Symbol("deactivateListener"),
|
|
16950
|
+
*/var JD,KD,ZD,eQ;const Uc=Symbol("instances"),sB=Symbol("activateListener"),rB=Symbol("deactivateListener"),W0=Symbol("notifyInstances"),aB=Symbol("notify"),oB=Symbol("callback");class br{static[W0](){for(const e of br[Uc])e[aB]()}static[(JD=Uc,sB)](){window.addEventListener("scroll",this[W0],{passive:!0})}static[rB](){window.removeEventListener("scroll",this[W0])}constructor(e){this[oB]=e}observe(){br[Uc].size===0&&br[sB](),br[Uc].add(this)}disconnect(){br[Uc].delete(this),br[Uc].size===0&&br[rB]()}[aB](){this[oB]()}}br[JD]=new Set;const lB=Symbol("computeStyleCallback"),tQ=Symbol("astWalker"),Nd=Symbol("dependencies"),nQ=Symbol("onScroll");class Bj{constructor(e){this[KD]={},this[ZD]=new xj(["function"]),this[eQ]=()=>{this[lB]({relatedState:"window-scroll"})},this[lB]=e}observeEffectsFor(e){const t={},n=this[Nd];this[tQ].walk(e,s=>{const{name:r}=s,o=s.arguments[0].terms[0];if(!(r.value!=="env"||o==null||o.type!=="ident"))switch(o.value){case"window-scroll-y":if(t["window-scroll"]==null){const l="window-scroll"in n?n["window-scroll"]:new br(this[nQ]);l.observe(),delete n["window-scroll"],t["window-scroll"]=l}break}});for(const s in n)n[s].disconnect();this[Nd]=t}dispose(){for(const e in this[Nd])this[Nd][e].disconnect()}}KD=Nd,ZD=tQ,eQ=nQ;/* @license
|
|
16951
16951
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16952
16952
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16953
16953
|
* you may not use this file except in compliance with the License.
|
|
@@ -16986,7 +16986,7 @@ canvas {
|
|
|
16986
16986
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16987
16987
|
* See the License for the specific language governing permissions and
|
|
16988
16988
|
* limitations under the License.
|
|
16989
|
-
*/var Hn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const Rj=5e3,Dj=ch({initialValue:0,keyframes:[{frames:5,value:-1},{frames:1,value:-1},{frames:8,value:1},{frames:1,value:1},{frames:5,value:0},{frames:18,value:0}]}),Qj=ch({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),Lj=30,Nj=12,sQ="0deg 75deg 105%",Pj="auto auto auto",Fj="auto",kj=2.2,Uj=["front","right","back","left"],Oj=["upper-","","lower-"],Gj=3e3,zj=". Use mouse, touch or arrow keys to move.",uf={AUTO:"auto"},j_={BASIC:"basic",WIGGLE:"wiggle"},Hj={NONE:"none"},cB=()=>({basis:[Fm(Bi(Lj,"deg"))],keywords:{auto:[null]}}),$j=()=>({basis:[Fm(Bi(Nj,"deg"))],keywords:{auto:[null]}}),rQ=(()=>{const i=Ma(sQ)[0].terms,e=Sr(i[0]),t=Sr(i[1]);return n=>{const s=n[ye].idealCameraDistance();return{basis:[e,t,Bi(s,"m")],keywords:{auto:[null,null,Bi(105,"%")]}}}})(),Vj=i=>{const e=kj*i[ye].boundingSphere.radius;return{basis:[Bi(-1/0,"rad"),Bi(0,"rad"),Bi(e,"m")],keywords:{auto:[null,null,null]}}},Yj=i=>{const e=rQ(i),n=new XD([],e).evaluate()[2];return{basis:[Bi(1/0,"rad"),Bi(Math.PI,"rad"),Bi(n,"m")],keywords:{auto:[null,null,null]}}},qj=i=>{const e=i[ye].boundingBox.getCenter(new Q);return{basis:[Bi(e.x,"m"),Bi(e.y,"m"),Bi(e.z,"m")],keywords:{auto:[null,null,null]}}},aQ=Math.PI/2,Wj=Math.PI/3,jj=aQ/2,Xj=2*Math.PI,Jt=Symbol("controls"),ng=Symbol("panElement"),X_=Symbol("promptElement"),df=Symbol("promptAnimatedContainer"),J_=Symbol("fingerAnimatedContainers"),Af=Symbol("deferInteractionPrompt"),hB=Symbol("updateAria"),ea=Symbol("a11y"),uB=Symbol("updateA11y"),dB=Symbol("updateCameraForRadius"),Oc=Symbol("cancelPrompts"),K_=Symbol("onChange"),id=Symbol("onPointerChange"),Zo=Symbol("waitingToPromptUser"),pf=Symbol("userHasInteracted"),Gc=Symbol("promptElementVisibleTime"),sd=Symbol("lastPromptOffset"),ff=Symbol("cancellationSource"),Z_=Symbol("lastSpherical"),rd=Symbol("jumpCamera"),e0=Symbol("initialized"),ad=Symbol("maintainThetaPhi"),AB=Symbol("syncCameraOrbit"),pB=Symbol("syncFieldOfView"),fB=Symbol("syncCameraTarget"),gB=Symbol("syncMinCameraOrbit"),mB=Symbol("syncMaxCameraOrbit"),yB=Symbol("syncMinFieldOfView"),_B=Symbol("syncMaxFieldOfView"),Jj=i=>{var e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m,f,y;class _ extends i{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=sQ,this.cameraTarget=Pj,this.fieldOfView=Fj,this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=Gj,this.interactionPrompt=uf.AUTO,this.interactionPromptStyle=j_.WIGGLE,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=Hj.NONE,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=qD,this.a11y=null,this[e]=this.shadowRoot.querySelector(".interaction-prompt"),this[t]=this.shadowRoot.querySelector("#prompt"),this[n]=[this.shadowRoot.querySelector("#finger0"),this.shadowRoot.querySelector("#finger1")],this[s]=this.shadowRoot.querySelector(".pan-target"),this[r]=0,this[a]=1/0,this[o]=!1,this[l]=!1,this[c]=Mn.AUTOMATIC,this[u]=new tX(this[ye].camera,this[ir],this[ye]),this[h]=new Ll,this[d]=!1,this[A]=!1,this[p]=!1,this[g]={},this[m]=()=>{const v=this[Jt].changeSource;this[ff]=v,v===Mn.USER_INTERACTION&&(this[pf]=!0,this[Af]())},this[f]=()=>{this[hB](),this[li]();const v=this[Jt].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:v}}))},this[y]=v=>{this[rg].classList.toggle("pointer-tumbling",v.type==="pointer-change-start")}}get inputSensitivity(){return this[Jt].inputSensitivity}set inputSensitivity(v){this[Jt].inputSensitivity=v}getCameraOrbit(){const{theta:v,phi:C,radius:x}=this[Z_];return{theta:v,phi:C,radius:x,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return po(this[Vt].isPresenting?this[Vt].arRenderer.target:this[ye].getDynamicTarget())}getFieldOfView(){return this[Jt].getFieldOfView()}getMinimumFieldOfView(){return this[Jt].options.minimumFieldOfView}getMaximumFieldOfView(){return this[Jt].options.maximumFieldOfView}getIdealAspect(){return this[ye].idealAspect}jumpCameraToGoal(){this[rd]=!0,this.requestUpdate(rd,!1)}resetInteractionPrompt(){this[sd]=0,this[Gc]=1/0,this[pf]=!1,this[Zo]=this.interactionPrompt===uf.AUTO&&this.cameraControls}zoom(v){const C=new WheelEvent("wheel",{deltaY:-30*v});this[ir].dispatchEvent(C)}connectedCallback(){super.connectedCallback(),this[Jt].addEventListener("user-interaction",this[Oc]),this[Jt].addEventListener("pointer-change-start",this[id]),this[Jt].addEventListener("pointer-change-end",this[id])}disconnectedCallback(){super.disconnectedCallback(),this[Jt].removeEventListener("user-interaction",this[Oc]),this[Jt].removeEventListener("pointer-change-start",this[id]),this[Jt].removeEventListener("pointer-change-end",this[id])}updated(v){super.updated(v);const C=this[Jt],x=this[ye];if(v.has("cameraControls")&&(this.cameraControls?(C.enableInteraction(),this.interactionPrompt===uf.AUTO&&(this[Zo]=!0)):(C.disableInteraction(),this[Af]()),this[ir].setAttribute("aria-label",this[uh])),v.has("disableZoom")&&(C.disableZoom=this.disableZoom),v.has("disablePan")&&(C.enablePan=!this.disablePan),v.has("disableTap")&&(C.enableTap=!this.disableTap),(v.has("interactionPrompt")||v.has("cameraControls")||v.has("src"))&&(this.interactionPrompt===uf.AUTO&&this.cameraControls&&!this[pf]?this[Zo]=!0:this[Af]()),v.has("interactionPromptStyle")&&(this[df].style.opacity=this.interactionPromptStyle==j_.BASIC?"1":"0"),v.has("touchAction")){const I=this.touchAction;C.applyOptions({touchAction:I}),C.updateTouchActionStyle()}v.has("orbitSensitivity")&&(C.orbitSensitivity=this.orbitSensitivity),v.has("zoomSensitivity")&&(C.zoomSensitivity=this.zoomSensitivity),v.has("panSensitivity")&&(C.panSensitivity=this.panSensitivity),v.has("interpolationDecay")&&(C.setDamperDecayTime(this.interpolationDecay),x.setTargetDamperDecayTime(this.interpolationDecay)),v.has("a11y")&&this[uB](),this[rd]===!0&&Promise.resolve().then(()=>{C.jumpToGoal(),x.jumpToGoal(),this[K_](),this[rd]=!1})}async updateFraming(){const v=this[ye],C=v.adjustedFoV(v.framedFoVDeg);await v.updateFraming();const x=v.adjustedFoV(v.framedFoVDeg),I=this[Jt].getFieldOfView()/C;this[Jt].setFieldOfView(x*I),this[ad]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(v,C,x){const I=this[ir],b=this[J_];if(b[0].style.opacity==="1"){console.warn("interact() failed because an existing interaction is running.");return}const w=new Array;w.push({x:ch(C.x),y:ch(C.y)});const S=[{x:w[0].x(0),y:w[0].y(0)}];x!=null&&(w.push({x:ch(x.x),y:ch(x.y)}),S.push({x:w[1].x(0),y:w[1].y(0)}));let B=performance.now();const{width:T,height:D}=this[ye],P=this.getBoundingClientRect(),R=$=>{for(const[J,W]of S.entries()){const{style:he}=b[J];he.transform=`translateX(${T*W.x}px) translateY(${D*W.y}px)`,$==="pointerdown"?he.opacity="1":$==="pointerup"&&(he.opacity="0");const le={pointerId:J-5678,pointerType:"touch",target:I,clientX:T*W.x+P.x,clientY:D*W.y+P.y,altKey:!0};I.dispatchEvent(new PointerEvent($,le))}},L=()=>{const $=this[ff];if($!==Mn.AUTOMATIC||!I.isConnected){for(const W of this[J_])W.style.opacity="0";R("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:$}})),document.removeEventListener("visibilitychange",F);return}const J=Math.min(1,(performance.now()-B)/v);for(const[W,he]of S.entries())he.x=w[W].x(J),he.y=w[W].y(J);R("pointermove"),J<1?requestAnimationFrame(L):(R("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:Mn.AUTOMATIC}})),document.removeEventListener("visibilitychange",F))},F=()=>{let $=0;document.visibilityState==="hidden"?$=performance.now()-B:B=performance.now()-$};document.addEventListener("visibilitychange",F),R("pointerdown"),this[ff]=Mn.AUTOMATIC,requestAnimationFrame(L)}[(e=X_,t=df,n=J_,s=ng,r=sd,a=Gc,o=pf,l=Zo,c=ff,u=Jt,h=Z_,d=rd,A=e0,p=ad,g=ea,pB)](v){const C=this[Jt],x=this[ye];x.framedFoVDeg=v[0]*180/Math.PI,C.changeSource=Mn.NONE,C.setFieldOfView(x.adjustedFoV(x.framedFoVDeg)),this[Oc]()}[AB](v){const C=this[Jt];if(this[ad]){const{theta:x,phi:I}=this.getCameraOrbit();v[0]=x,v[1]=I,this[ad]=!1}C.changeSource=Mn.NONE,C.setOrbit(v[0],v[1],v[2]),this[Oc]()}[gB](v){this[Jt].applyOptions({minimumAzimuthalAngle:v[0],minimumPolarAngle:v[1],minimumRadius:v[2]}),this.jumpCameraToGoal()}[mB](v){this[Jt].applyOptions({maximumAzimuthalAngle:v[0],maximumPolarAngle:v[1],maximumRadius:v[2]}),this[dB](v[2]),this.jumpCameraToGoal()}[yB](v){this[Jt].applyOptions({minimumFieldOfView:v[0]*180/Math.PI}),this.jumpCameraToGoal()}[_B](v){const C=this[ye].adjustedFoV(v[0]*180/Math.PI);this[Jt].applyOptions({maximumFieldOfView:C}),this.jumpCameraToGoal()}[fB](v){const[C,x,I]=v;this[Vt].arRenderer.isPresenting||this[ye].setTarget(C,x,I),this[Jt].changeSource=Mn.NONE,this[Vt].arRenderer.updateTarget(),this[Oc]()}[Nr](v,C){if(super[Nr](v,C),this[Vt].isPresenting||!this[Wl]())return;const x=this[Jt],I=this[ye],b=performance.now();if(this[Zo]&&this.loaded&&b>this[kd]+this.interactionPromptThreshold&&(this[Zo]=!1,this[Gc]=b,this[X_].classList.add("visible")),isFinite(this[Gc])&&this.interactionPromptStyle===j_.WIGGLE){const B=(b-this[Gc])/Rj%1,T=Dj(B),D=Qj(B);if(this[df].style.opacity=`${D}`,T!==this[sd]){const P=T*I.width*.05,R=(T-this[sd])*Math.PI/16;this[df].style.transform=`translateX(${P}px)`,x.changeSource=Mn.AUTOMATIC,x.adjustOrbit(R,0,0),this[sd]=T}}const w=x.update(v,C),S=I.updateTarget(C);(w||S)&&this[K_]()}[Af](){this[Zo]=!1,this[X_].classList.remove("visible"),this[Gc]=1/0}[dB](v){const C=Math.max(this[ye].farRadius(),v),x=0,I=Math.abs(2*C);this[Jt].updateNearFar(x,I)}[hB](){const{theta:v,phi:C}=this[Jt].getCameraSpherical(this[Z_]),x=(4+Math.floor((v%Xj+jj)/aQ))%4,I=Math.floor(C/Wj),b=Uj[x],S=`${Oj[I]}${b}`,B=S;B in this[ea]?this[Kg](this[ea][B]):this[Kg](`View from stage ${S}`)}get[uh](){let v=zj;return"interaction-prompt"in this[ea]&&(v=`. ${this[ea]["interaction-prompt"]}`),super[uh].replace(/\.$/,"")+(this.cameraControls?v:"")}async[Zg](v){const C=this[Jt],x=this[ye],I=x.adjustedFoV(x.framedFoVDeg);super[Zg](v);const b=x.adjustedFoV(x.framedFoVDeg)/I,w=C.getFieldOfView()*(isFinite(b)?b:1);C.updateAspect(this[ye].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[Jt].setFieldOfView(w),this.jumpCameraToGoal()}[Pr](){super[Pr](),this[e0]?this[ad]=!0:this[e0]=!0,this.requestUpdate("maxFieldOfView",this.maxFieldOfView),this.requestUpdate("fieldOfView",this.fieldOfView),this.requestUpdate("minCameraOrbit",this.minCameraOrbit),this.requestUpdate("maxCameraOrbit",this.maxCameraOrbit),this.requestUpdate("cameraOrbit",this.cameraOrbit),this.requestUpdate("cameraTarget",this.cameraTarget),this.jumpCameraToGoal()}[(m=Oc,f=K_,y=id,uB)](){if(typeof this.a11y=="string")if(this.a11y.startsWith("{"))try{this[ea]=JSON.parse(this.a11y)}catch(v){console.warn("Error parsing a11y JSON:",v)}else this.a11y.length>0?console.warn("Error not supported format, should be a JSON string:",this.a11y):this[ea]={};else typeof this.a11y=="object"&&this.a11y!=null?this[ea]=Object.assign({},this.a11y):this[ea]={};this[ir].setAttribute("aria-label",this[uh])}}return Hn([H({type:Boolean,attribute:"camera-controls"})],_.prototype,"cameraControls",void 0),Hn([ro({intrinsics:rQ,observeEffects:!0,updateHandler:AB}),H({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],_.prototype,"cameraOrbit",void 0),Hn([ro({intrinsics:qj,observeEffects:!0,updateHandler:fB}),H({type:String,attribute:"camera-target",hasChanged:()=>!0})],_.prototype,"cameraTarget",void 0),Hn([ro({intrinsics:cB,observeEffects:!0,updateHandler:pB}),H({type:String,attribute:"field-of-view",hasChanged:()=>!0})],_.prototype,"fieldOfView",void 0),Hn([ro({intrinsics:Vj,updateHandler:gB}),H({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],_.prototype,"minCameraOrbit",void 0),Hn([ro({intrinsics:Yj,updateHandler:mB}),H({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],_.prototype,"maxCameraOrbit",void 0),Hn([ro({intrinsics:$j,updateHandler:yB}),H({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],_.prototype,"minFieldOfView",void 0),Hn([ro({intrinsics:cB,updateHandler:_B}),H({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],_.prototype,"maxFieldOfView",void 0),Hn([H({type:Number,attribute:"interaction-prompt-threshold"})],_.prototype,"interactionPromptThreshold",void 0),Hn([H({type:String,attribute:"interaction-prompt"})],_.prototype,"interactionPrompt",void 0),Hn([H({type:String,attribute:"interaction-prompt-style"})],_.prototype,"interactionPromptStyle",void 0),Hn([H({type:Number,attribute:"orbit-sensitivity"})],_.prototype,"orbitSensitivity",void 0),Hn([H({type:Number,attribute:"zoom-sensitivity"})],_.prototype,"zoomSensitivity",void 0),Hn([H({type:Number,attribute:"pan-sensitivity"})],_.prototype,"panSensitivity",void 0),Hn([H({type:String,attribute:"touch-action"})],_.prototype,"touchAction",void 0),Hn([H({type:Boolean,attribute:"disable-zoom"})],_.prototype,"disableZoom",void 0),Hn([H({type:Boolean,attribute:"disable-pan"})],_.prototype,"disablePan",void 0),Hn([H({type:Boolean,attribute:"disable-tap"})],_.prototype,"disableTap",void 0),Hn([H({type:Number,attribute:"interpolation-decay"})],_.prototype,"interpolationDecay",void 0),Hn([H()],_.prototype,"a11y",void 0),_};/* @license
|
|
16989
|
+
*/var Hn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const Rj=5e3,Dj=ch({initialValue:0,keyframes:[{frames:5,value:-1},{frames:1,value:-1},{frames:8,value:1},{frames:1,value:1},{frames:5,value:0},{frames:18,value:0}]}),Qj=ch({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),Lj=30,Nj=12,sQ="0deg 75deg 105%",Pj="auto auto auto",Fj="auto",kj=2.2,Uj=["front","right","back","left"],Oj=["upper-","","lower-"],Gj=3e3,zj=". Use mouse, touch or arrow keys to move.",uf={AUTO:"auto"},j0={BASIC:"basic",WIGGLE:"wiggle"},Hj={NONE:"none"},cB=()=>({basis:[Fm(Bi(Lj,"deg"))],keywords:{auto:[null]}}),$j=()=>({basis:[Fm(Bi(Nj,"deg"))],keywords:{auto:[null]}}),rQ=(()=>{const i=Ma(sQ)[0].terms,e=Sr(i[0]),t=Sr(i[1]);return n=>{const s=n[ye].idealCameraDistance();return{basis:[e,t,Bi(s,"m")],keywords:{auto:[null,null,Bi(105,"%")]}}}})(),Vj=i=>{const e=kj*i[ye].boundingSphere.radius;return{basis:[Bi(-1/0,"rad"),Bi(0,"rad"),Bi(e,"m")],keywords:{auto:[null,null,null]}}},Yj=i=>{const e=rQ(i),n=new XD([],e).evaluate()[2];return{basis:[Bi(1/0,"rad"),Bi(Math.PI,"rad"),Bi(n,"m")],keywords:{auto:[null,null,null]}}},qj=i=>{const e=i[ye].boundingBox.getCenter(new Q);return{basis:[Bi(e.x,"m"),Bi(e.y,"m"),Bi(e.z,"m")],keywords:{auto:[null,null,null]}}},aQ=Math.PI/2,Wj=Math.PI/3,jj=aQ/2,Xj=2*Math.PI,Jt=Symbol("controls"),ng=Symbol("panElement"),X0=Symbol("promptElement"),df=Symbol("promptAnimatedContainer"),J0=Symbol("fingerAnimatedContainers"),Af=Symbol("deferInteractionPrompt"),hB=Symbol("updateAria"),ea=Symbol("a11y"),uB=Symbol("updateA11y"),dB=Symbol("updateCameraForRadius"),Oc=Symbol("cancelPrompts"),K0=Symbol("onChange"),id=Symbol("onPointerChange"),Zo=Symbol("waitingToPromptUser"),pf=Symbol("userHasInteracted"),Gc=Symbol("promptElementVisibleTime"),sd=Symbol("lastPromptOffset"),ff=Symbol("cancellationSource"),Z0=Symbol("lastSpherical"),rd=Symbol("jumpCamera"),e_=Symbol("initialized"),ad=Symbol("maintainThetaPhi"),AB=Symbol("syncCameraOrbit"),pB=Symbol("syncFieldOfView"),fB=Symbol("syncCameraTarget"),gB=Symbol("syncMinCameraOrbit"),mB=Symbol("syncMaxCameraOrbit"),yB=Symbol("syncMinFieldOfView"),_B=Symbol("syncMaxFieldOfView"),Jj=i=>{var e,t,n,s,r,a,o,l,c,u,h,d,A,p,g,m,f,y;class _ extends i{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=sQ,this.cameraTarget=Pj,this.fieldOfView=Fj,this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=Gj,this.interactionPrompt=uf.AUTO,this.interactionPromptStyle=j0.WIGGLE,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=Hj.NONE,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=qD,this.a11y=null,this[e]=this.shadowRoot.querySelector(".interaction-prompt"),this[t]=this.shadowRoot.querySelector("#prompt"),this[n]=[this.shadowRoot.querySelector("#finger0"),this.shadowRoot.querySelector("#finger1")],this[s]=this.shadowRoot.querySelector(".pan-target"),this[r]=0,this[a]=1/0,this[o]=!1,this[l]=!1,this[c]=Mn.AUTOMATIC,this[u]=new tX(this[ye].camera,this[ir],this[ye]),this[h]=new Ll,this[d]=!1,this[A]=!1,this[p]=!1,this[g]={},this[m]=()=>{const v=this[Jt].changeSource;this[ff]=v,v===Mn.USER_INTERACTION&&(this[pf]=!0,this[Af]())},this[f]=()=>{this[hB](),this[li]();const v=this[Jt].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:v}}))},this[y]=v=>{this[rg].classList.toggle("pointer-tumbling",v.type==="pointer-change-start")}}get inputSensitivity(){return this[Jt].inputSensitivity}set inputSensitivity(v){this[Jt].inputSensitivity=v}getCameraOrbit(){const{theta:v,phi:C,radius:x}=this[Z0];return{theta:v,phi:C,radius:x,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return po(this[Vt].isPresenting?this[Vt].arRenderer.target:this[ye].getDynamicTarget())}getFieldOfView(){return this[Jt].getFieldOfView()}getMinimumFieldOfView(){return this[Jt].options.minimumFieldOfView}getMaximumFieldOfView(){return this[Jt].options.maximumFieldOfView}getIdealAspect(){return this[ye].idealAspect}jumpCameraToGoal(){this[rd]=!0,this.requestUpdate(rd,!1)}resetInteractionPrompt(){this[sd]=0,this[Gc]=1/0,this[pf]=!1,this[Zo]=this.interactionPrompt===uf.AUTO&&this.cameraControls}zoom(v){const C=new WheelEvent("wheel",{deltaY:-30*v});this[ir].dispatchEvent(C)}connectedCallback(){super.connectedCallback(),this[Jt].addEventListener("user-interaction",this[Oc]),this[Jt].addEventListener("pointer-change-start",this[id]),this[Jt].addEventListener("pointer-change-end",this[id])}disconnectedCallback(){super.disconnectedCallback(),this[Jt].removeEventListener("user-interaction",this[Oc]),this[Jt].removeEventListener("pointer-change-start",this[id]),this[Jt].removeEventListener("pointer-change-end",this[id])}updated(v){super.updated(v);const C=this[Jt],x=this[ye];if(v.has("cameraControls")&&(this.cameraControls?(C.enableInteraction(),this.interactionPrompt===uf.AUTO&&(this[Zo]=!0)):(C.disableInteraction(),this[Af]()),this[ir].setAttribute("aria-label",this[uh])),v.has("disableZoom")&&(C.disableZoom=this.disableZoom),v.has("disablePan")&&(C.enablePan=!this.disablePan),v.has("disableTap")&&(C.enableTap=!this.disableTap),(v.has("interactionPrompt")||v.has("cameraControls")||v.has("src"))&&(this.interactionPrompt===uf.AUTO&&this.cameraControls&&!this[pf]?this[Zo]=!0:this[Af]()),v.has("interactionPromptStyle")&&(this[df].style.opacity=this.interactionPromptStyle==j0.BASIC?"1":"0"),v.has("touchAction")){const I=this.touchAction;C.applyOptions({touchAction:I}),C.updateTouchActionStyle()}v.has("orbitSensitivity")&&(C.orbitSensitivity=this.orbitSensitivity),v.has("zoomSensitivity")&&(C.zoomSensitivity=this.zoomSensitivity),v.has("panSensitivity")&&(C.panSensitivity=this.panSensitivity),v.has("interpolationDecay")&&(C.setDamperDecayTime(this.interpolationDecay),x.setTargetDamperDecayTime(this.interpolationDecay)),v.has("a11y")&&this[uB](),this[rd]===!0&&Promise.resolve().then(()=>{C.jumpToGoal(),x.jumpToGoal(),this[K0](),this[rd]=!1})}async updateFraming(){const v=this[ye],C=v.adjustedFoV(v.framedFoVDeg);await v.updateFraming();const x=v.adjustedFoV(v.framedFoVDeg),I=this[Jt].getFieldOfView()/C;this[Jt].setFieldOfView(x*I),this[ad]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(v,C,x){const I=this[ir],b=this[J0];if(b[0].style.opacity==="1"){console.warn("interact() failed because an existing interaction is running.");return}const w=new Array;w.push({x:ch(C.x),y:ch(C.y)});const S=[{x:w[0].x(0),y:w[0].y(0)}];x!=null&&(w.push({x:ch(x.x),y:ch(x.y)}),S.push({x:w[1].x(0),y:w[1].y(0)}));let B=performance.now();const{width:T,height:D}=this[ye],P=this.getBoundingClientRect(),R=$=>{for(const[J,W]of S.entries()){const{style:he}=b[J];he.transform=`translateX(${T*W.x}px) translateY(${D*W.y}px)`,$==="pointerdown"?he.opacity="1":$==="pointerup"&&(he.opacity="0");const le={pointerId:J-5678,pointerType:"touch",target:I,clientX:T*W.x+P.x,clientY:D*W.y+P.y,altKey:!0};I.dispatchEvent(new PointerEvent($,le))}},L=()=>{const $=this[ff];if($!==Mn.AUTOMATIC||!I.isConnected){for(const W of this[J0])W.style.opacity="0";R("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:$}})),document.removeEventListener("visibilitychange",F);return}const J=Math.min(1,(performance.now()-B)/v);for(const[W,he]of S.entries())he.x=w[W].x(J),he.y=w[W].y(J);R("pointermove"),J<1?requestAnimationFrame(L):(R("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:Mn.AUTOMATIC}})),document.removeEventListener("visibilitychange",F))},F=()=>{let $=0;document.visibilityState==="hidden"?$=performance.now()-B:B=performance.now()-$};document.addEventListener("visibilitychange",F),R("pointerdown"),this[ff]=Mn.AUTOMATIC,requestAnimationFrame(L)}[(e=X0,t=df,n=J0,s=ng,r=sd,a=Gc,o=pf,l=Zo,c=ff,u=Jt,h=Z0,d=rd,A=e_,p=ad,g=ea,pB)](v){const C=this[Jt],x=this[ye];x.framedFoVDeg=v[0]*180/Math.PI,C.changeSource=Mn.NONE,C.setFieldOfView(x.adjustedFoV(x.framedFoVDeg)),this[Oc]()}[AB](v){const C=this[Jt];if(this[ad]){const{theta:x,phi:I}=this.getCameraOrbit();v[0]=x,v[1]=I,this[ad]=!1}C.changeSource=Mn.NONE,C.setOrbit(v[0],v[1],v[2]),this[Oc]()}[gB](v){this[Jt].applyOptions({minimumAzimuthalAngle:v[0],minimumPolarAngle:v[1],minimumRadius:v[2]}),this.jumpCameraToGoal()}[mB](v){this[Jt].applyOptions({maximumAzimuthalAngle:v[0],maximumPolarAngle:v[1],maximumRadius:v[2]}),this[dB](v[2]),this.jumpCameraToGoal()}[yB](v){this[Jt].applyOptions({minimumFieldOfView:v[0]*180/Math.PI}),this.jumpCameraToGoal()}[_B](v){const C=this[ye].adjustedFoV(v[0]*180/Math.PI);this[Jt].applyOptions({maximumFieldOfView:C}),this.jumpCameraToGoal()}[fB](v){const[C,x,I]=v;this[Vt].arRenderer.isPresenting||this[ye].setTarget(C,x,I),this[Jt].changeSource=Mn.NONE,this[Vt].arRenderer.updateTarget(),this[Oc]()}[Nr](v,C){if(super[Nr](v,C),this[Vt].isPresenting||!this[Wl]())return;const x=this[Jt],I=this[ye],b=performance.now();if(this[Zo]&&this.loaded&&b>this[kd]+this.interactionPromptThreshold&&(this[Zo]=!1,this[Gc]=b,this[X0].classList.add("visible")),isFinite(this[Gc])&&this.interactionPromptStyle===j0.WIGGLE){const B=(b-this[Gc])/Rj%1,T=Dj(B),D=Qj(B);if(this[df].style.opacity=`${D}`,T!==this[sd]){const P=T*I.width*.05,R=(T-this[sd])*Math.PI/16;this[df].style.transform=`translateX(${P}px)`,x.changeSource=Mn.AUTOMATIC,x.adjustOrbit(R,0,0),this[sd]=T}}const w=x.update(v,C),S=I.updateTarget(C);(w||S)&&this[K0]()}[Af](){this[Zo]=!1,this[X0].classList.remove("visible"),this[Gc]=1/0}[dB](v){const C=Math.max(this[ye].farRadius(),v),x=0,I=Math.abs(2*C);this[Jt].updateNearFar(x,I)}[hB](){const{theta:v,phi:C}=this[Jt].getCameraSpherical(this[Z0]),x=(4+Math.floor((v%Xj+jj)/aQ))%4,I=Math.floor(C/Wj),b=Uj[x],S=`${Oj[I]}${b}`,B=S;B in this[ea]?this[Kg](this[ea][B]):this[Kg](`View from stage ${S}`)}get[uh](){let v=zj;return"interaction-prompt"in this[ea]&&(v=`. ${this[ea]["interaction-prompt"]}`),super[uh].replace(/\.$/,"")+(this.cameraControls?v:"")}async[Zg](v){const C=this[Jt],x=this[ye],I=x.adjustedFoV(x.framedFoVDeg);super[Zg](v);const b=x.adjustedFoV(x.framedFoVDeg)/I,w=C.getFieldOfView()*(isFinite(b)?b:1);C.updateAspect(this[ye].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[Jt].setFieldOfView(w),this.jumpCameraToGoal()}[Pr](){super[Pr](),this[e_]?this[ad]=!0:this[e_]=!0,this.requestUpdate("maxFieldOfView",this.maxFieldOfView),this.requestUpdate("fieldOfView",this.fieldOfView),this.requestUpdate("minCameraOrbit",this.minCameraOrbit),this.requestUpdate("maxCameraOrbit",this.maxCameraOrbit),this.requestUpdate("cameraOrbit",this.cameraOrbit),this.requestUpdate("cameraTarget",this.cameraTarget),this.jumpCameraToGoal()}[(m=Oc,f=K0,y=id,uB)](){if(typeof this.a11y=="string")if(this.a11y.startsWith("{"))try{this[ea]=JSON.parse(this.a11y)}catch(v){console.warn("Error parsing a11y JSON:",v)}else this.a11y.length>0?console.warn("Error not supported format, should be a JSON string:",this.a11y):this[ea]={};else typeof this.a11y=="object"&&this.a11y!=null?this[ea]=Object.assign({},this.a11y):this[ea]={};this[ir].setAttribute("aria-label",this[uh])}}return Hn([H({type:Boolean,attribute:"camera-controls"})],_.prototype,"cameraControls",void 0),Hn([ro({intrinsics:rQ,observeEffects:!0,updateHandler:AB}),H({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],_.prototype,"cameraOrbit",void 0),Hn([ro({intrinsics:qj,observeEffects:!0,updateHandler:fB}),H({type:String,attribute:"camera-target",hasChanged:()=>!0})],_.prototype,"cameraTarget",void 0),Hn([ro({intrinsics:cB,observeEffects:!0,updateHandler:pB}),H({type:String,attribute:"field-of-view",hasChanged:()=>!0})],_.prototype,"fieldOfView",void 0),Hn([ro({intrinsics:Vj,updateHandler:gB}),H({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],_.prototype,"minCameraOrbit",void 0),Hn([ro({intrinsics:Yj,updateHandler:mB}),H({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],_.prototype,"maxCameraOrbit",void 0),Hn([ro({intrinsics:$j,updateHandler:yB}),H({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],_.prototype,"minFieldOfView",void 0),Hn([ro({intrinsics:cB,updateHandler:_B}),H({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],_.prototype,"maxFieldOfView",void 0),Hn([H({type:Number,attribute:"interaction-prompt-threshold"})],_.prototype,"interactionPromptThreshold",void 0),Hn([H({type:String,attribute:"interaction-prompt"})],_.prototype,"interactionPrompt",void 0),Hn([H({type:String,attribute:"interaction-prompt-style"})],_.prototype,"interactionPromptStyle",void 0),Hn([H({type:Number,attribute:"orbit-sensitivity"})],_.prototype,"orbitSensitivity",void 0),Hn([H({type:Number,attribute:"zoom-sensitivity"})],_.prototype,"zoomSensitivity",void 0),Hn([H({type:Number,attribute:"pan-sensitivity"})],_.prototype,"panSensitivity",void 0),Hn([H({type:String,attribute:"touch-action"})],_.prototype,"touchAction",void 0),Hn([H({type:Boolean,attribute:"disable-zoom"})],_.prototype,"disableZoom",void 0),Hn([H({type:Boolean,attribute:"disable-pan"})],_.prototype,"disablePan",void 0),Hn([H({type:Boolean,attribute:"disable-tap"})],_.prototype,"disableTap",void 0),Hn([H({type:Number,attribute:"interpolation-decay"})],_.prototype,"interpolationDecay",void 0),Hn([H()],_.prototype,"a11y",void 0),_};/* @license
|
|
16990
16990
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16991
16991
|
* you may not use this file except in compliance with the License.
|
|
16992
16992
|
* You may obtain a copy of the License at
|
|
@@ -17024,7 +17024,7 @@ canvas {
|
|
|
17024
17024
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17025
17025
|
* See the License for the specific language governing permissions and
|
|
17026
17026
|
* limitations under the License.
|
|
17027
|
-
*/const nX=30,_f=.8,wB=1.5,iX=20,sX=.2,rX=.25,aX=10,el=150,SB=5,oX=new Q(0,1,0),lX=.3,cX=1.5,hX=15,BB=.3,t0=.01,uX=.15,dX=70,n0=.001,AX=.2,wa={NOT_PRESENTING:"not-presenting",SESSION_STARTED:"session-started",OBJECT_PLACED:"object-placed",FAILED:"failed"},bv={TRACKING:"tracking",NOT_TRACKING:"not-tracking"},cd=new Q,i0=new Yt,pX=new We,fX=new Q,gX=new $n(45,1,.1,100),TB=new fn().setFromPoints([new Q(0,0,0),new Q(0,0,-1)]),ti={SCREEN_SPACE:"screen-space",WORLD_SPACE:"world-space"};class mX extends hr{isWorldSpaceReady(){return this.xrMode===ti.WORLD_SPACE&&this.worldSpaceInitialPlacementDone}constructor(e){super(),this.renderer=e,this.currentSession=null,this.placeOnWall=!1,this.placementBox=null,this.menuPanel=null,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.initialHitSource=null,this.transientHitTestSource=null,this.inputSource=null,this._presentedScene=null,this.resolveCleanup=null,this.exitWebXRButtonContainer=null,this.overlay=null,this.xrLight=null,this.xrMode=null,this.xrController1=null,this.xrController2=null,this.selectedXRController=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new Q,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.lastDragPosition=new Q,this.deltaRotation=new Yt,this.scaleLine=new Gl(TB),this.firstRatio=0,this.lastAngle=0,this.goalPosition=new Q,this.goalYaw=0,this.goalScale=1,this.xDamper=new mi,this.yDamper=new mi,this.zDamper=new mi,this.yawDamper=new mi,this.pitchDamper=new mi,this.rollDamper=new mi,this.scaleDamper=new mi,this.wasTwoFingering=!1,this.worldSpaceInitialPlacementDone=!1,this.initialModelScale=1,this.minScale=1,this.maxScale=1,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onControllerSelectStart=t=>{var n,s,r;const a=this.presentedScene,o=t.target,l=this.menuPanel;if(this.menuPanel.exitButtonControllerIntersection(a,o)!=null){(n=this.menuPanel)===null||n===void 0||n.dispose(),this.stopPresenting();return}if(this.menuPanel.scaleModeButtonControllerIntersection(a,o)!=null){const d=this.menuPanel.handleScaleToggle(this.worldSpaceInitialPlacementDone,this.initialModelScale,this.minScale,this.maxScale);d!==null&&(this.goalScale=d);return}l&&(l.show=!1);const h=this.placementBox.controllerIntersection(a,o);if(h!=null){const A=new Rn().setFromObject(a.pivot).min.y+AX;if(h.point.y<=A)this.selectedXRController!=null?(this.selectedXRController.userData.line.visible=!1,a.canScale&&this.isWorldSpaceReady()&&(this.isTwoHandInteraction=!0,this.firstRatio=this.controllerSeparation()/a.pivot.scale.x,this.scaleLine.visible=!0)):o.attach(a.pivot),this.selectedXRController=o,a.setShadowIntensity(.01);else if(o==this.xrController1?this.xrController1.userData.isSelected=!0:o==this.xrController2&&(this.xrController2.userData.isSelected=!0),!((s=this.xrController1)===null||s===void 0)&&s.userData.isSelected&&(!((r=this.xrController2)===null||r===void 0)&&r.userData.isSelected))a.canScale&&this.isWorldSpaceReady()&&(this.isTwoHandInteraction=!0,this.firstRatio=this.controllerSeparation()/a.pivot.scale.x,this.scaleLine.visible=!0);else{const g=o===this.xrController1?this.xrController2:this.xrController1;o.userData.initialX=o.position.x,g.userData.turning=!1,o.userData.turning=!0,o.userData.line.visible=!1}}},this.onControllerSelectEnd=t=>{const n=t.target;if(n.userData.turning=!1,n.userData.line.visible=!0,this.isTwoHandInteraction=!1,this.scaleLine.visible=!1,n==this.xrController1?this.xrController1.userData.isSelected=!1:n==this.xrController2&&(this.xrController2.userData.isSelected=!1),this.selectedXRController!=null&&this.selectedXRController!=n)return;const s=this.presentedScene;s.attach(s.pivot),this.selectedXRController=null,this.goalYaw=Math.atan2(s.pivot.matrix.elements[8],s.pivot.matrix.elements[10]),this.goalPosition.x=s.pivot.position.x,this.goalPosition.z=s.pivot.position.z,this.isWorldSpaceReady()&&(this.goalPosition.y=s.pivot.position.y);const r=this.menuPanel;r.show=!0},this.onUpdateScene=()=>{this.placementBox!=null&&this.isPresenting&&(this.placementBox.updateFromModelChanges(),this.placementBox.setScreenSpaceMode(this.xrMode===ti.SCREEN_SPACE)),this.xrMode!==ti.SCREEN_SPACE&&(this.menuPanel&&(this.menuPanel.dispose(),this.menuPanel=null),this.menuPanel=new Ia,this.presentedScene.add(this.menuPanel),this.menuPanel.updatePosition(this.presentedScene.getCamera(),this.placementBox))},this.onSelectStart=t=>{const n=this.transientHitTestSource;if(n==null)return;const s=this.frame.getHitTestResultsForTransientInput(n),r=this.presentedScene,a=this.placementBox;if(s.length===1){this.inputSource=t.inputSource;const{axes:o}=this.inputSource.gamepad,l=a.getHit(this.presentedScene,o[0],o[1]);a.show=!0,l!=null?(this.isTranslating=!0,this.lastDragPosition.copy(l)):this.placeOnWall===!1&&(this.isRotating=!0,this.lastAngle=o[0]*wB)}else if(s.length===2){a.show=!0,this.isTwoHandInteraction=!0;const{separation:o,angle:l}=this.fingerPolar(s);this.lastAngle=l,this.firstRatio===0&&(this.firstRatio=o/r.pivot.scale.x),r.canScale&&this.setScale(o);return}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.inputSource=null,this.goalPosition.y+=this.placementBox.offsetHeight*this.presentedScene.scale.x,this.placementBox.show=!1},this.threeRenderer=e.threeRenderer,this.threeRenderer.xr.enabled=!0}async resolveARSession(){PS();const e=await navigator.xr.requestSession("immersive-ar",{requiredFeatures:[],optionalFeatures:["hit-test","dom-overlay","light-estimation"],domOverlay:this.overlay?{root:this.overlay}:void 0});return this.threeRenderer.xr.setReferenceSpaceType("local"),await this.threeRenderer.xr.setSession(e),this.threeRenderer.xr.cameraAutoUpdate=!1,e}get presentedScene(){return this._presentedScene}async supportsPresentation(){try{return PS(),await navigator.xr.isSessionSupported("immersive-ar")}catch(e){return console.warn("Request to present in WebXR denied:"),console.warn(e),console.warn("Falling back to next ar-mode"),!1}}async present(e,t=!1){this.isPresenting&&console.warn("Cannot present while a model is already presenting");let n=new Promise((c,u)=>{requestAnimationFrame(()=>c())});e.setHotspotsVisibility(!1),e.queueRender(),await n,this._presentedScene=e,this.overlay=e.element.shadowRoot.querySelector("div.default"),t===!0&&(this.xrLight=new L5(this.threeRenderer),this.xrLight.addEventListener("estimationstart",()=>{if(!this.isPresenting||this.xrLight==null)return;const c=this.presentedScene;c.add(this.xrLight),c.environment=this.xrLight.environment}));const s=await this.resolveARSession();s.addEventListener("end",()=>{this.postSessionCleanup()},{once:!0});const r=e.element.shadowRoot.querySelector(".slot.exit-webxr-ar-button");r.classList.add("enabled"),r.addEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=r;const a=await s.requestReferenceSpace("viewer");this.xrMode=s.interactionMode,this.tracking=!0,this.frames=0,this.initialized=!1,this.turntableRotation=e.yaw,this.goalYaw=e.yaw,this.goalScale=1,e.setBackground(null),this.oldShadowIntensity=e.shadowIntensity,e.setShadowIntensity(.01),this.oldTarget.copy(e.getTarget()),e.element.addEventListener("load",this.onUpdateScene);const o=iX*Math.PI/180,l=this.placeOnWall===!0?void 0:new XRRay(new DOMPoint(0,0,0),{x:0,y:-Math.sin(o),z:-Math.cos(o)});s.requestHitTestSource({space:a,offsetRay:l}).then(c=>{this.initialHitSource=c}),this.xrMode!==ti.SCREEN_SPACE&&(this.setupXRControllers(),this.xDamper.setDecayTime(el),this.yDamper.setDecayTime(el),this.zDamper.setDecayTime(el),this.yawDamper.setDecayTime(el),this.pitchDamper.setDecayTime(el),this.rollDamper.setDecayTime(el),this.scaleDamper.setDecayTime(el)),this.currentSession=s,this.placementBox=new _j(e,this.placeOnWall?"back":"bottom"),this.placementBox&&this.placementBox.setScreenSpaceMode(this.xrMode===ti.SCREEN_SPACE),this.placementComplete=!1,this.xrMode!==ti.SCREEN_SPACE&&(this.menuPanel=new Ia,e.add(this.menuPanel),this.menuPanel.updatePosition(e.getCamera(),this.placementBox)),this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:wa.SESSION_STARTED})}setupXRControllerLine(e){if(!e.userData.line){const t=new Gl(TB);t.name="line",t.scale.z=SB,e.userData.turning=!1,e.userData.line=t,e.add(t)}}setupController(e){this.setupXRControllerLine(e),e.addEventListener("selectstart",this.onControllerSelectStart),e.addEventListener("selectend",this.onControllerSelectEnd)}setupXRControllers(){this.xrController1=this.threeRenderer.xr.getController(0),this.xrController2=this.threeRenderer.xr.getController(1),this.setupController(this.xrController1),this.setupController(this.xrController2),this.scaleLine.name="scale line",this.scaleLine.visible=!1,this.xrController1.add(this.scaleLine);const e=this.presentedScene;e.add(this.xrController1),e.add(this.xrController2)}hover(e){if(this.xrMode===ti.SCREEN_SPACE||this.selectedXRController==e)return!1;const t=this.presentedScene,n=this.placementBox.controllerIntersection(t,e);return e.userData.line.scale.z=n==null?SB:n.distance,n!=null}controllerSeparation(){return this.xrController1.position.distanceTo(this.xrController2.position)}async stopPresenting(){if(!this.isPresenting)return;const e=new Promise(t=>{this.resolveCleanup=t});try{await this.currentSession.end(),await e}catch(t){console.warn("Error while trying to end WebXR AR session"),console.warn(t),this.postSessionCleanup()}}get isPresenting(){return this.presentedScene!=null}get target(){return this.oldTarget}updateTarget(){const e=this.presentedScene;if(e!=null){const t=e.getTarget();this.oldTarget.copy(t),this.placeOnWall?t.z=e.boundingBox.min.z:t.y=e.boundingBox.min.y,e.setTarget(t.x,t.y,t.z)}}cleanupXRController(e){e.userData.turning=!1,e.userData.line.visible=!0,e.removeEventListener("selectstart",this.onControllerSelectStart),e.removeEventListener("selectend",this.onControllerSelectEnd),e.removeFromParent()}postSessionCleanup(){const e=this.currentSession;e!=null&&(e.removeEventListener("selectstart",this.onSelectStart),e.removeEventListener("selectend",this.onSelectEnd),this.currentSession=null);const t=this.presentedScene;if(this._presentedScene=null,t!=null){const{element:a}=t;this.xrLight!=null&&(t.remove(this.xrLight),this.xrLight.dispose(),this.xrLight=null),this.menuPanel!=null&&(this.menuPanel.dispose(),this.menuPanel=null),t.add(t.pivot),t.pivot.quaternion.set(0,0,0,1),t.pivot.position.set(0,0,0),t.pivot.scale.set(1,1,1),t.setShadowOffset(0);const o=this.turntableRotation;o!=null&&(t.yaw=o);const l=this.oldShadowIntensity;l!=null&&t.setShadowIntensity(l),t.setEnvironmentAndSkybox(a[Qd],a[Ld]);const c=this.oldTarget;t.setTarget(c.x,c.y,c.z),t.xrCamera=null,t.element.removeEventListener("load",this.onUpdateScene),t.orientHotspots(0);const{width:u,height:h}=a.getBoundingClientRect();t.setSize(u,h),requestAnimationFrame(()=>{t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:Mn.NONE}}))})}this.renderer.height=0;const n=this.exitWebXRButtonContainer;n!=null&&(n.classList.remove("enabled"),n.removeEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=null);const s=this.transientHitTestSource;s!=null&&(s.cancel(),this.transientHitTestSource=null);const r=this.initialHitSource;r!=null&&(r.cancel(),this.initialHitSource=null),this.placementBox!=null&&(this.placementBox.dispose(),this.placementBox=null),this.xrMode!==ti.SCREEN_SPACE&&(this.xrController1!=null&&(this.cleanupXRController(this.xrController1),this.xrController1=null),this.xrController2!=null&&(this.cleanupXRController(this.xrController2),this.xrController2=null),this.selectedXRController=null,this.scaleLine.visible=!1),this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,this.worldSpaceInitialPlacementDone=!1,this.resolveCleanup!=null&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:wa.NOT_PRESENTING})}updateView(e){const t=this.presentedScene,n=this.threeRenderer.xr;n.updateCamera(gX),t.xrCamera=n.getCamera();const{elements:s}=t.getCamera().matrixWorld;if(t.orientHotspots(Math.atan2(s[1],s[5])),this.initialized||(this.placeInitially(),this.initialized=!0),e.requestViewportScale&&e.recommendedViewportScale){const a=e.recommendedViewportScale;e.requestViewportScale(Math.max(a,rX))}const r=n.getBaseLayer();if(r!=null){const a=r instanceof XRWebGLLayer?r.getViewport(e):n.getBinding().getViewSubImage(r,e).viewport;this.threeRenderer.setViewport(a.x,a.y,a.width,a.height)}}placeInitially(){const e=this.presentedScene,{pivot:t,element:n}=e,{position:s}=t,r=e.getCamera(),{width:a,height:o}=this.overlay.getBoundingClientRect();e.setSize(a,o),r.projectionMatrixInverse.copy(r.projectionMatrix).invert();const{theta:l}=n.getCameraOrbit(),c=r.getWorldDirection(cd);if(e.yaw=Math.atan2(-c.x,-c.z)-l,this.goalYaw=e.yaw,this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone){const{position:u,scale:h}=this.calculateWorldSpaceOptimalPlacement(e,r);this.goalPosition.copy(u),this.goalScale=h,this.initialModelScale=h,s.copy(u),t.scale.set(h,h,h),this.worldSpaceInitialPlacementDone=!0,this.calculateWorldSpaceScaleLimits(e),this.enableWorldSpaceUserInteraction()}else if(this.xrMode===ti.SCREEN_SPACE){const u=Math.max(1,2*e.boundingSphere.radius);s.copy(r.position).add(c.multiplyScalar(u)),this.updateTarget();const h=e.getTarget();s.add(h).sub(this.oldTarget),this.goalPosition.copy(s)}if(e.setHotspotsVisibility(!0),this.xrMode===ti.SCREEN_SPACE){const{session:u}=this.frame;u.addEventListener("selectstart",this.onSelectStart),u.addEventListener("selectend",this.onSelectEnd),u.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then(h=>{this.transientHitTestSource=h})}}getTouchLocation(){const{axes:e}=this.inputSource.gamepad;let t=this.placementBox.getExpandedHit(this.presentedScene,e[0],e[1]);return t!=null&&(cd.copy(t).sub(this.presentedScene.getCamera().position),cd.length()>aX)?null:t}getHitPoint(e){const t=this.threeRenderer.xr.getReferenceSpace(),n=e.getPose(t);if(n==null)return null;const s=pX.fromArray(n.transform.matrix);return this.placeOnWall===!0&&(this.goalYaw=Math.atan2(s.elements[4],s.elements[6])),s.elements[5]>.75!==this.placeOnWall?fX.setFromMatrixPosition(s):null}moveToFloor(e){if(this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone){this.placementBox.show=!1,this.dispatchEvent({type:"status",status:wa.OBJECT_PLACED});return}const t=this.initialHitSource;if(t==null)return;const n=e.getHitTestResults(t);if(n.length==0)return;const s=n[0],r=this.getHitPoint(s);r!=null&&(this.placementBox.show=!0,this.isTranslating||(this.placeOnWall?this.goalPosition.copy(r):this.goalPosition.y=r.y),t.cancel(),this.initialHitSource=null,this.dispatchEvent({type:"status",status:wa.OBJECT_PLACED}))}fingerPolar(e){const t=e[0].inputSource.gamepad.axes,n=e[1].inputSource.gamepad.axes,s=n[0]-t[0],r=n[1]-t[1],a=Math.atan2(r,s);let o=this.lastAngle-a;return o>Math.PI?o-=2*Math.PI:o<-Math.PI&&(o+=2*Math.PI),{separation:Math.sqrt(s*s+r*r),deltaYaw:o,angle:a}}setScale(e){let t=e/this.firstRatio;t=Math.abs(t-1)<sX?1:t,this.isWorldSpaceReady()&&(t=Math.max(this.minScale,Math.min(this.maxScale,t))),this.goalScale=t}processInput(e){const t=this.transientHitTestSource;if(t==null)return;const n=e.getHitTestResultsForTransientInput(t),s=this.presentedScene,r=s.pivot.scale.x;if(n.length===2){if(!this.wasTwoFingering){const{separation:c,angle:u}=this.fingerPolar(n);this.firstRatio=c/r,this.lastAngle=u,this.wasTwoFingering=!0,this.isTwoHandInteraction=!0;return}const{separation:a,deltaYaw:o,angle:l}=this.fingerPolar(n);this.goalYaw+=o,this.lastAngle=l,s.canScale&&this.setScale(a),this.isTwoHandInteraction=!0;return}else this.wasTwoFingering&&(this.wasTwoFingering=!1,this.isTwoHandInteraction=!1,this.firstRatio=0);if(!(!this.isTranslating&&!this.isTwoHandInteraction&&!this.isRotating))if(this.isRotating){const a=this.inputSource.gamepad.axes[0]*wB;this.goalYaw+=a-this.lastAngle,this.lastAngle=a}else this.isTranslating&&n.forEach(a=>{if(a.inputSource!==this.inputSource)return;let o=null;if(a.results.length>0&&(o=this.getHitPoint(a.results[0])),o==null&&(o=this.getTouchLocation()),o!=null){if(this.goalPosition.sub(this.lastDragPosition),this.isWorldSpaceReady())console.log("[processInput] Setting goalPosition.y to hit.y:",o.y),this.goalPosition.add(o);else if(this.placeOnWall===!1){const l=o.y-this.lastDragPosition.y;if(l<0){this.placementBox.offsetHeight=l/r,this.presentedScene.setShadowOffset(l);const c=cd.copy(s.getCamera().position),u=-l/(c.y-o.y);c.multiplyScalar(u),o.multiplyScalar(1-u).add(c)}this.goalPosition.add(o)}else this.goalPosition.add(o);this.lastDragPosition.copy(o)}})}applyXRControllerRotation(e,t){if(!e.userData.turning)return;const n=(e.position.x-e.userData.initialX)*lX;this.deltaRotation.setFromAxisAngle(oX,n),t.quaternion.multiplyQuaternions(this.deltaRotation,t.quaternion)}handleScalingInXR(e,t){if(this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone)return;if(this.xrController1&&this.xrController2&&this.isTwoHandInteraction){const s=this.controllerSeparation();this.setScale(s),this.scaleLine.scale.z=-s,this.scaleLine.lookAt(this.xrController2.position)}const n=e.pivot.scale.x;if(this.goalScale!==n){const s=this.scaleDamper.update(n,this.goalScale,t,1);e.pivot.scale.set(s,s,s)}}updatePivotPosition(e,t){const{pivot:n}=e,s=this.placementBox,r=e.boundingSphere.radius,a=this.goalPosition,o=n.position;let l=Mn.NONE;if(!a.equals(o)){l=Mn.USER_INTERACTION;let{x:c,y:u,z:h}=o;if(c=this.xDamper.update(c,a.x,t,r),u=this.yDamper.update(u,a.y,t,r),h=this.zDamper.update(h,a.z,t,r),o.set(c,u,h),this.xrMode===ti.SCREEN_SPACE&&!this.isTranslating){const d=a.y-u;this.placementComplete&&this.placeOnWall===!1?(s.offsetHeight=d/e.pivot.scale.x,e.setShadowOffset(d)):d===0&&(this.placementComplete=!0,s.show=!1,e.setShadowIntensity(_f))}this.xrMode!==ti.SCREEN_SPACE&&a.equals(o)&&e.setShadowIntensity(_f),this.isWorldSpaceReady()&&e.setShadowIntensity(_f)}if(this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone&&this.goalScale!==n.scale.x){const c=this.scaleDamper.update(n.scale.x,this.goalScale,t,1);n.scale.set(c,c,c)}return e.updateTarget(t),l}updateYaw(e,t){i0.setFromAxisAngle(cd.set(0,1,0),this.goalYaw);const n=e.pivot.quaternion.angleTo(i0),s=n-this.yawDamper.update(n,0,t,Math.PI);e.pivot.quaternion.rotateTowards(i0,s)}updateMenuPanel(e,t,n){this.menuPanel&&(this.menuPanel.updateOpacity(n),this.menuPanel.updatePosition(e.getCamera(),t))}applyXRInputToScene(e){const t=this.presentedScene,n=t.pivot,s=this.placementBox;if(this.updatePlacementBoxOpacity(s,e),this.updateTwoHandInteractionState(),this.applyXRControllerRotations(n),this.handleScalingInXR(t,e),n.parent!==t){this.updateMenuPanel(t,s,e);return}const r=this.updatePivotPosition(t,e);this.updateYaw(t,e),this.dispatchCameraChangeEvent(t,r),this.updateMenuPanel(t,s,e)}updatePlacementBoxOpacity(e,t){const n=this.presentedScene.getCamera();e.update(t,n.position);const s=this.hover(this.xrController1),r=this.hover(this.xrController2),a=(s||r)&&!this.isTwoHandInteraction;e.setInteractionState(this.isTranslating||this.isRotating,a)}updateTwoHandInteractionState(){var e,t;const n=((e=this.xrController1)===null||e===void 0?void 0:e.userData.isSelected)&&((t=this.xrController2)===null||t===void 0?void 0:t.userData.isSelected);this.isTwoHandInteraction=!!n}applyXRControllerRotations(e){this.isTwoHandInteraction||(this.xrController1&&this.applyXRControllerRotation(this.xrController1,e),this.xrController2&&this.applyXRControllerRotation(this.xrController2,e))}dispatchCameraChangeEvent(e,t){e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:t}}))}updateXRControllerHover(){const e=this.hover(this.xrController1),t=this.hover(this.xrController2),n=(e||t)&&!this.isTwoHandInteraction;this.placementBox&&(this.placementBox.setInteractionState(this.isTranslating||this.isRotating,n),this.placementBox.show=n)}enableWorldSpaceUserInteraction(){this.placementBox&&(this.placementBox.show=!0),this.presentedScene&&this.presentedScene.setShadowIntensity(_f)}handleFirstView(e,t){(this.xrMode!==ti.WORLD_SPACE||!this.worldSpaceInitialPlacementDone)&&this.moveToFloor(e),this.processInput(e);const n=t-this.lastTick;this.applyXRInputToScene(n),this.renderer.preRender(this.presentedScene,t,n),this.lastTick=t,this.presentedScene.renderShadow(this.threeRenderer)}onWebXRFrame(e,t){this.xrMode!==ti.SCREEN_SPACE&&this.updateXRControllerHover(),this.frame=t,++this.frames;const n=this.threeRenderer.xr.getReferenceSpace(),s=t.getViewerPose(n);s==null&&this.tracking===!0&&this.frames>nX&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:bv.NOT_TRACKING}));const r=this.presentedScene;if(s==null||r==null||!r.element.loaded){this.threeRenderer.clear();return}this.tracking===!1&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:bv.TRACKING}));let a=!0;for(const o of s.views)this.updateView(o),a&&(this.handleFirstView(t,e),a=!1),this.threeRenderer.render(r,r.getCamera())}calculateWorldSpaceOptimalPlacement(e,t){const n=e.boundingBox,s={x:(n.max.x-n.min.x)/2,y:(n.max.y-n.min.y)/2,z:(n.max.z-n.min.z)/2},r=uX,a=Math.max(cX+r,2*Math.max(s.x,s.z)+r),o=hX*Math.PI/180,l=new Q(0,-a*Math.sin(o),-a*Math.cos(o)),c=t.matrixWorld,u=l.clone().applyMatrix4(c),h=Math.max(s.x,s.z)+r,d=s.y,A=a*BB,g=a*BB/Math.max(d,t0),m=A/Math.max(h,t0),f=Math.min(g,m);return{position:u.clone().sub(new Q(0,f*s.y,0)),scale:f}}calculateWorldSpaceScaleLimits(e){const t=e.size,n=Math.max(t.x,t.y,t.z),s=Math.max(Math.min(t.x,t.y,t.z),n0),r=t0/Math.max(n,n0),a=dX/Math.max(s,n0);this.minScale=Math.min(r,a,this.goalScale),this.maxScale=Math.max(r,a,this.goalScale)}}/* @license
|
|
17027
|
+
*/const nX=30,_f=.8,wB=1.5,iX=20,sX=.2,rX=.25,aX=10,el=150,SB=5,oX=new Q(0,1,0),lX=.3,cX=1.5,hX=15,BB=.3,t_=.01,uX=.15,dX=70,n_=.001,AX=.2,wa={NOT_PRESENTING:"not-presenting",SESSION_STARTED:"session-started",OBJECT_PLACED:"object-placed",FAILED:"failed"},bv={TRACKING:"tracking",NOT_TRACKING:"not-tracking"},cd=new Q,i_=new Yt,pX=new We,fX=new Q,gX=new $n(45,1,.1,100),TB=new fn().setFromPoints([new Q(0,0,0),new Q(0,0,-1)]),ti={SCREEN_SPACE:"screen-space",WORLD_SPACE:"world-space"};class mX extends hr{isWorldSpaceReady(){return this.xrMode===ti.WORLD_SPACE&&this.worldSpaceInitialPlacementDone}constructor(e){super(),this.renderer=e,this.currentSession=null,this.placeOnWall=!1,this.placementBox=null,this.menuPanel=null,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.initialHitSource=null,this.transientHitTestSource=null,this.inputSource=null,this._presentedScene=null,this.resolveCleanup=null,this.exitWebXRButtonContainer=null,this.overlay=null,this.xrLight=null,this.xrMode=null,this.xrController1=null,this.xrController2=null,this.selectedXRController=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new Q,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.lastDragPosition=new Q,this.deltaRotation=new Yt,this.scaleLine=new Gl(TB),this.firstRatio=0,this.lastAngle=0,this.goalPosition=new Q,this.goalYaw=0,this.goalScale=1,this.xDamper=new mi,this.yDamper=new mi,this.zDamper=new mi,this.yawDamper=new mi,this.pitchDamper=new mi,this.rollDamper=new mi,this.scaleDamper=new mi,this.wasTwoFingering=!1,this.worldSpaceInitialPlacementDone=!1,this.initialModelScale=1,this.minScale=1,this.maxScale=1,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onControllerSelectStart=t=>{var n,s,r;const a=this.presentedScene,o=t.target,l=this.menuPanel;if(this.menuPanel.exitButtonControllerIntersection(a,o)!=null){(n=this.menuPanel)===null||n===void 0||n.dispose(),this.stopPresenting();return}if(this.menuPanel.scaleModeButtonControllerIntersection(a,o)!=null){const d=this.menuPanel.handleScaleToggle(this.worldSpaceInitialPlacementDone,this.initialModelScale,this.minScale,this.maxScale);d!==null&&(this.goalScale=d);return}l&&(l.show=!1);const h=this.placementBox.controllerIntersection(a,o);if(h!=null){const A=new Rn().setFromObject(a.pivot).min.y+AX;if(h.point.y<=A)this.selectedXRController!=null?(this.selectedXRController.userData.line.visible=!1,a.canScale&&this.isWorldSpaceReady()&&(this.isTwoHandInteraction=!0,this.firstRatio=this.controllerSeparation()/a.pivot.scale.x,this.scaleLine.visible=!0)):o.attach(a.pivot),this.selectedXRController=o,a.setShadowIntensity(.01);else if(o==this.xrController1?this.xrController1.userData.isSelected=!0:o==this.xrController2&&(this.xrController2.userData.isSelected=!0),!((s=this.xrController1)===null||s===void 0)&&s.userData.isSelected&&(!((r=this.xrController2)===null||r===void 0)&&r.userData.isSelected))a.canScale&&this.isWorldSpaceReady()&&(this.isTwoHandInteraction=!0,this.firstRatio=this.controllerSeparation()/a.pivot.scale.x,this.scaleLine.visible=!0);else{const g=o===this.xrController1?this.xrController2:this.xrController1;o.userData.initialX=o.position.x,g.userData.turning=!1,o.userData.turning=!0,o.userData.line.visible=!1}}},this.onControllerSelectEnd=t=>{const n=t.target;if(n.userData.turning=!1,n.userData.line.visible=!0,this.isTwoHandInteraction=!1,this.scaleLine.visible=!1,n==this.xrController1?this.xrController1.userData.isSelected=!1:n==this.xrController2&&(this.xrController2.userData.isSelected=!1),this.selectedXRController!=null&&this.selectedXRController!=n)return;const s=this.presentedScene;s.attach(s.pivot),this.selectedXRController=null,this.goalYaw=Math.atan2(s.pivot.matrix.elements[8],s.pivot.matrix.elements[10]),this.goalPosition.x=s.pivot.position.x,this.goalPosition.z=s.pivot.position.z,this.isWorldSpaceReady()&&(this.goalPosition.y=s.pivot.position.y);const r=this.menuPanel;r.show=!0},this.onUpdateScene=()=>{this.placementBox!=null&&this.isPresenting&&(this.placementBox.updateFromModelChanges(),this.placementBox.setScreenSpaceMode(this.xrMode===ti.SCREEN_SPACE)),this.xrMode!==ti.SCREEN_SPACE&&(this.menuPanel&&(this.menuPanel.dispose(),this.menuPanel=null),this.menuPanel=new Ia,this.presentedScene.add(this.menuPanel),this.menuPanel.updatePosition(this.presentedScene.getCamera(),this.placementBox))},this.onSelectStart=t=>{const n=this.transientHitTestSource;if(n==null)return;const s=this.frame.getHitTestResultsForTransientInput(n),r=this.presentedScene,a=this.placementBox;if(s.length===1){this.inputSource=t.inputSource;const{axes:o}=this.inputSource.gamepad,l=a.getHit(this.presentedScene,o[0],o[1]);a.show=!0,l!=null?(this.isTranslating=!0,this.lastDragPosition.copy(l)):this.placeOnWall===!1&&(this.isRotating=!0,this.lastAngle=o[0]*wB)}else if(s.length===2){a.show=!0,this.isTwoHandInteraction=!0;const{separation:o,angle:l}=this.fingerPolar(s);this.lastAngle=l,this.firstRatio===0&&(this.firstRatio=o/r.pivot.scale.x),r.canScale&&this.setScale(o);return}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.inputSource=null,this.goalPosition.y+=this.placementBox.offsetHeight*this.presentedScene.scale.x,this.placementBox.show=!1},this.threeRenderer=e.threeRenderer,this.threeRenderer.xr.enabled=!0}async resolveARSession(){PS();const e=await navigator.xr.requestSession("immersive-ar",{requiredFeatures:[],optionalFeatures:["hit-test","dom-overlay","light-estimation"],domOverlay:this.overlay?{root:this.overlay}:void 0});return this.threeRenderer.xr.setReferenceSpaceType("local"),await this.threeRenderer.xr.setSession(e),this.threeRenderer.xr.cameraAutoUpdate=!1,e}get presentedScene(){return this._presentedScene}async supportsPresentation(){try{return PS(),await navigator.xr.isSessionSupported("immersive-ar")}catch(e){return console.warn("Request to present in WebXR denied:"),console.warn(e),console.warn("Falling back to next ar-mode"),!1}}async present(e,t=!1){this.isPresenting&&console.warn("Cannot present while a model is already presenting");let n=new Promise((c,u)=>{requestAnimationFrame(()=>c())});e.setHotspotsVisibility(!1),e.queueRender(),await n,this._presentedScene=e,this.overlay=e.element.shadowRoot.querySelector("div.default"),t===!0&&(this.xrLight=new L5(this.threeRenderer),this.xrLight.addEventListener("estimationstart",()=>{if(!this.isPresenting||this.xrLight==null)return;const c=this.presentedScene;c.add(this.xrLight),c.environment=this.xrLight.environment}));const s=await this.resolveARSession();s.addEventListener("end",()=>{this.postSessionCleanup()},{once:!0});const r=e.element.shadowRoot.querySelector(".slot.exit-webxr-ar-button");r.classList.add("enabled"),r.addEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=r;const a=await s.requestReferenceSpace("viewer");this.xrMode=s.interactionMode,this.tracking=!0,this.frames=0,this.initialized=!1,this.turntableRotation=e.yaw,this.goalYaw=e.yaw,this.goalScale=1,e.setBackground(null),this.oldShadowIntensity=e.shadowIntensity,e.setShadowIntensity(.01),this.oldTarget.copy(e.getTarget()),e.element.addEventListener("load",this.onUpdateScene);const o=iX*Math.PI/180,l=this.placeOnWall===!0?void 0:new XRRay(new DOMPoint(0,0,0),{x:0,y:-Math.sin(o),z:-Math.cos(o)});s.requestHitTestSource({space:a,offsetRay:l}).then(c=>{this.initialHitSource=c}),this.xrMode!==ti.SCREEN_SPACE&&(this.setupXRControllers(),this.xDamper.setDecayTime(el),this.yDamper.setDecayTime(el),this.zDamper.setDecayTime(el),this.yawDamper.setDecayTime(el),this.pitchDamper.setDecayTime(el),this.rollDamper.setDecayTime(el),this.scaleDamper.setDecayTime(el)),this.currentSession=s,this.placementBox=new _j(e,this.placeOnWall?"back":"bottom"),this.placementBox&&this.placementBox.setScreenSpaceMode(this.xrMode===ti.SCREEN_SPACE),this.placementComplete=!1,this.xrMode!==ti.SCREEN_SPACE&&(this.menuPanel=new Ia,e.add(this.menuPanel),this.menuPanel.updatePosition(e.getCamera(),this.placementBox)),this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:wa.SESSION_STARTED})}setupXRControllerLine(e){if(!e.userData.line){const t=new Gl(TB);t.name="line",t.scale.z=SB,e.userData.turning=!1,e.userData.line=t,e.add(t)}}setupController(e){this.setupXRControllerLine(e),e.addEventListener("selectstart",this.onControllerSelectStart),e.addEventListener("selectend",this.onControllerSelectEnd)}setupXRControllers(){this.xrController1=this.threeRenderer.xr.getController(0),this.xrController2=this.threeRenderer.xr.getController(1),this.setupController(this.xrController1),this.setupController(this.xrController2),this.scaleLine.name="scale line",this.scaleLine.visible=!1,this.xrController1.add(this.scaleLine);const e=this.presentedScene;e.add(this.xrController1),e.add(this.xrController2)}hover(e){if(this.xrMode===ti.SCREEN_SPACE||this.selectedXRController==e)return!1;const t=this.presentedScene,n=this.placementBox.controllerIntersection(t,e);return e.userData.line.scale.z=n==null?SB:n.distance,n!=null}controllerSeparation(){return this.xrController1.position.distanceTo(this.xrController2.position)}async stopPresenting(){if(!this.isPresenting)return;const e=new Promise(t=>{this.resolveCleanup=t});try{await this.currentSession.end(),await e}catch(t){console.warn("Error while trying to end WebXR AR session"),console.warn(t),this.postSessionCleanup()}}get isPresenting(){return this.presentedScene!=null}get target(){return this.oldTarget}updateTarget(){const e=this.presentedScene;if(e!=null){const t=e.getTarget();this.oldTarget.copy(t),this.placeOnWall?t.z=e.boundingBox.min.z:t.y=e.boundingBox.min.y,e.setTarget(t.x,t.y,t.z)}}cleanupXRController(e){e.userData.turning=!1,e.userData.line.visible=!0,e.removeEventListener("selectstart",this.onControllerSelectStart),e.removeEventListener("selectend",this.onControllerSelectEnd),e.removeFromParent()}postSessionCleanup(){const e=this.currentSession;e!=null&&(e.removeEventListener("selectstart",this.onSelectStart),e.removeEventListener("selectend",this.onSelectEnd),this.currentSession=null);const t=this.presentedScene;if(this._presentedScene=null,t!=null){const{element:a}=t;this.xrLight!=null&&(t.remove(this.xrLight),this.xrLight.dispose(),this.xrLight=null),this.menuPanel!=null&&(this.menuPanel.dispose(),this.menuPanel=null),t.add(t.pivot),t.pivot.quaternion.set(0,0,0,1),t.pivot.position.set(0,0,0),t.pivot.scale.set(1,1,1),t.setShadowOffset(0);const o=this.turntableRotation;o!=null&&(t.yaw=o);const l=this.oldShadowIntensity;l!=null&&t.setShadowIntensity(l),t.setEnvironmentAndSkybox(a[Qd],a[Ld]);const c=this.oldTarget;t.setTarget(c.x,c.y,c.z),t.xrCamera=null,t.element.removeEventListener("load",this.onUpdateScene),t.orientHotspots(0);const{width:u,height:h}=a.getBoundingClientRect();t.setSize(u,h),requestAnimationFrame(()=>{t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:Mn.NONE}}))})}this.renderer.height=0;const n=this.exitWebXRButtonContainer;n!=null&&(n.classList.remove("enabled"),n.removeEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=null);const s=this.transientHitTestSource;s!=null&&(s.cancel(),this.transientHitTestSource=null);const r=this.initialHitSource;r!=null&&(r.cancel(),this.initialHitSource=null),this.placementBox!=null&&(this.placementBox.dispose(),this.placementBox=null),this.xrMode!==ti.SCREEN_SPACE&&(this.xrController1!=null&&(this.cleanupXRController(this.xrController1),this.xrController1=null),this.xrController2!=null&&(this.cleanupXRController(this.xrController2),this.xrController2=null),this.selectedXRController=null,this.scaleLine.visible=!1),this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,this.worldSpaceInitialPlacementDone=!1,this.resolveCleanup!=null&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:wa.NOT_PRESENTING})}updateView(e){const t=this.presentedScene,n=this.threeRenderer.xr;n.updateCamera(gX),t.xrCamera=n.getCamera();const{elements:s}=t.getCamera().matrixWorld;if(t.orientHotspots(Math.atan2(s[1],s[5])),this.initialized||(this.placeInitially(),this.initialized=!0),e.requestViewportScale&&e.recommendedViewportScale){const a=e.recommendedViewportScale;e.requestViewportScale(Math.max(a,rX))}const r=n.getBaseLayer();if(r!=null){const a=r instanceof XRWebGLLayer?r.getViewport(e):n.getBinding().getViewSubImage(r,e).viewport;this.threeRenderer.setViewport(a.x,a.y,a.width,a.height)}}placeInitially(){const e=this.presentedScene,{pivot:t,element:n}=e,{position:s}=t,r=e.getCamera(),{width:a,height:o}=this.overlay.getBoundingClientRect();e.setSize(a,o),r.projectionMatrixInverse.copy(r.projectionMatrix).invert();const{theta:l}=n.getCameraOrbit(),c=r.getWorldDirection(cd);if(e.yaw=Math.atan2(-c.x,-c.z)-l,this.goalYaw=e.yaw,this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone){const{position:u,scale:h}=this.calculateWorldSpaceOptimalPlacement(e,r);this.goalPosition.copy(u),this.goalScale=h,this.initialModelScale=h,s.copy(u),t.scale.set(h,h,h),this.worldSpaceInitialPlacementDone=!0,this.calculateWorldSpaceScaleLimits(e),this.enableWorldSpaceUserInteraction()}else if(this.xrMode===ti.SCREEN_SPACE){const u=Math.max(1,2*e.boundingSphere.radius);s.copy(r.position).add(c.multiplyScalar(u)),this.updateTarget();const h=e.getTarget();s.add(h).sub(this.oldTarget),this.goalPosition.copy(s)}if(e.setHotspotsVisibility(!0),this.xrMode===ti.SCREEN_SPACE){const{session:u}=this.frame;u.addEventListener("selectstart",this.onSelectStart),u.addEventListener("selectend",this.onSelectEnd),u.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then(h=>{this.transientHitTestSource=h})}}getTouchLocation(){const{axes:e}=this.inputSource.gamepad;let t=this.placementBox.getExpandedHit(this.presentedScene,e[0],e[1]);return t!=null&&(cd.copy(t).sub(this.presentedScene.getCamera().position),cd.length()>aX)?null:t}getHitPoint(e){const t=this.threeRenderer.xr.getReferenceSpace(),n=e.getPose(t);if(n==null)return null;const s=pX.fromArray(n.transform.matrix);return this.placeOnWall===!0&&(this.goalYaw=Math.atan2(s.elements[4],s.elements[6])),s.elements[5]>.75!==this.placeOnWall?fX.setFromMatrixPosition(s):null}moveToFloor(e){if(this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone){this.placementBox.show=!1,this.dispatchEvent({type:"status",status:wa.OBJECT_PLACED});return}const t=this.initialHitSource;if(t==null)return;const n=e.getHitTestResults(t);if(n.length==0)return;const s=n[0],r=this.getHitPoint(s);r!=null&&(this.placementBox.show=!0,this.isTranslating||(this.placeOnWall?this.goalPosition.copy(r):this.goalPosition.y=r.y),t.cancel(),this.initialHitSource=null,this.dispatchEvent({type:"status",status:wa.OBJECT_PLACED}))}fingerPolar(e){const t=e[0].inputSource.gamepad.axes,n=e[1].inputSource.gamepad.axes,s=n[0]-t[0],r=n[1]-t[1],a=Math.atan2(r,s);let o=this.lastAngle-a;return o>Math.PI?o-=2*Math.PI:o<-Math.PI&&(o+=2*Math.PI),{separation:Math.sqrt(s*s+r*r),deltaYaw:o,angle:a}}setScale(e){let t=e/this.firstRatio;t=Math.abs(t-1)<sX?1:t,this.isWorldSpaceReady()&&(t=Math.max(this.minScale,Math.min(this.maxScale,t))),this.goalScale=t}processInput(e){const t=this.transientHitTestSource;if(t==null)return;const n=e.getHitTestResultsForTransientInput(t),s=this.presentedScene,r=s.pivot.scale.x;if(n.length===2){if(!this.wasTwoFingering){const{separation:c,angle:u}=this.fingerPolar(n);this.firstRatio=c/r,this.lastAngle=u,this.wasTwoFingering=!0,this.isTwoHandInteraction=!0;return}const{separation:a,deltaYaw:o,angle:l}=this.fingerPolar(n);this.goalYaw+=o,this.lastAngle=l,s.canScale&&this.setScale(a),this.isTwoHandInteraction=!0;return}else this.wasTwoFingering&&(this.wasTwoFingering=!1,this.isTwoHandInteraction=!1,this.firstRatio=0);if(!(!this.isTranslating&&!this.isTwoHandInteraction&&!this.isRotating))if(this.isRotating){const a=this.inputSource.gamepad.axes[0]*wB;this.goalYaw+=a-this.lastAngle,this.lastAngle=a}else this.isTranslating&&n.forEach(a=>{if(a.inputSource!==this.inputSource)return;let o=null;if(a.results.length>0&&(o=this.getHitPoint(a.results[0])),o==null&&(o=this.getTouchLocation()),o!=null){if(this.goalPosition.sub(this.lastDragPosition),this.isWorldSpaceReady())console.log("[processInput] Setting goalPosition.y to hit.y:",o.y),this.goalPosition.add(o);else if(this.placeOnWall===!1){const l=o.y-this.lastDragPosition.y;if(l<0){this.placementBox.offsetHeight=l/r,this.presentedScene.setShadowOffset(l);const c=cd.copy(s.getCamera().position),u=-l/(c.y-o.y);c.multiplyScalar(u),o.multiplyScalar(1-u).add(c)}this.goalPosition.add(o)}else this.goalPosition.add(o);this.lastDragPosition.copy(o)}})}applyXRControllerRotation(e,t){if(!e.userData.turning)return;const n=(e.position.x-e.userData.initialX)*lX;this.deltaRotation.setFromAxisAngle(oX,n),t.quaternion.multiplyQuaternions(this.deltaRotation,t.quaternion)}handleScalingInXR(e,t){if(this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone)return;if(this.xrController1&&this.xrController2&&this.isTwoHandInteraction){const s=this.controllerSeparation();this.setScale(s),this.scaleLine.scale.z=-s,this.scaleLine.lookAt(this.xrController2.position)}const n=e.pivot.scale.x;if(this.goalScale!==n){const s=this.scaleDamper.update(n,this.goalScale,t,1);e.pivot.scale.set(s,s,s)}}updatePivotPosition(e,t){const{pivot:n}=e,s=this.placementBox,r=e.boundingSphere.radius,a=this.goalPosition,o=n.position;let l=Mn.NONE;if(!a.equals(o)){l=Mn.USER_INTERACTION;let{x:c,y:u,z:h}=o;if(c=this.xDamper.update(c,a.x,t,r),u=this.yDamper.update(u,a.y,t,r),h=this.zDamper.update(h,a.z,t,r),o.set(c,u,h),this.xrMode===ti.SCREEN_SPACE&&!this.isTranslating){const d=a.y-u;this.placementComplete&&this.placeOnWall===!1?(s.offsetHeight=d/e.pivot.scale.x,e.setShadowOffset(d)):d===0&&(this.placementComplete=!0,s.show=!1,e.setShadowIntensity(_f))}this.xrMode!==ti.SCREEN_SPACE&&a.equals(o)&&e.setShadowIntensity(_f),this.isWorldSpaceReady()&&e.setShadowIntensity(_f)}if(this.xrMode===ti.WORLD_SPACE&&!this.worldSpaceInitialPlacementDone&&this.goalScale!==n.scale.x){const c=this.scaleDamper.update(n.scale.x,this.goalScale,t,1);n.scale.set(c,c,c)}return e.updateTarget(t),l}updateYaw(e,t){i_.setFromAxisAngle(cd.set(0,1,0),this.goalYaw);const n=e.pivot.quaternion.angleTo(i_),s=n-this.yawDamper.update(n,0,t,Math.PI);e.pivot.quaternion.rotateTowards(i_,s)}updateMenuPanel(e,t,n){this.menuPanel&&(this.menuPanel.updateOpacity(n),this.menuPanel.updatePosition(e.getCamera(),t))}applyXRInputToScene(e){const t=this.presentedScene,n=t.pivot,s=this.placementBox;if(this.updatePlacementBoxOpacity(s,e),this.updateTwoHandInteractionState(),this.applyXRControllerRotations(n),this.handleScalingInXR(t,e),n.parent!==t){this.updateMenuPanel(t,s,e);return}const r=this.updatePivotPosition(t,e);this.updateYaw(t,e),this.dispatchCameraChangeEvent(t,r),this.updateMenuPanel(t,s,e)}updatePlacementBoxOpacity(e,t){const n=this.presentedScene.getCamera();e.update(t,n.position);const s=this.hover(this.xrController1),r=this.hover(this.xrController2),a=(s||r)&&!this.isTwoHandInteraction;e.setInteractionState(this.isTranslating||this.isRotating,a)}updateTwoHandInteractionState(){var e,t;const n=((e=this.xrController1)===null||e===void 0?void 0:e.userData.isSelected)&&((t=this.xrController2)===null||t===void 0?void 0:t.userData.isSelected);this.isTwoHandInteraction=!!n}applyXRControllerRotations(e){this.isTwoHandInteraction||(this.xrController1&&this.applyXRControllerRotation(this.xrController1,e),this.xrController2&&this.applyXRControllerRotation(this.xrController2,e))}dispatchCameraChangeEvent(e,t){e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:t}}))}updateXRControllerHover(){const e=this.hover(this.xrController1),t=this.hover(this.xrController2),n=(e||t)&&!this.isTwoHandInteraction;this.placementBox&&(this.placementBox.setInteractionState(this.isTranslating||this.isRotating,n),this.placementBox.show=n)}enableWorldSpaceUserInteraction(){this.placementBox&&(this.placementBox.show=!0),this.presentedScene&&this.presentedScene.setShadowIntensity(_f)}handleFirstView(e,t){(this.xrMode!==ti.WORLD_SPACE||!this.worldSpaceInitialPlacementDone)&&this.moveToFloor(e),this.processInput(e);const n=t-this.lastTick;this.applyXRInputToScene(n),this.renderer.preRender(this.presentedScene,t,n),this.lastTick=t,this.presentedScene.renderShadow(this.threeRenderer)}onWebXRFrame(e,t){this.xrMode!==ti.SCREEN_SPACE&&this.updateXRControllerHover(),this.frame=t,++this.frames;const n=this.threeRenderer.xr.getReferenceSpace(),s=t.getViewerPose(n);s==null&&this.tracking===!0&&this.frames>nX&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:bv.NOT_TRACKING}));const r=this.presentedScene;if(s==null||r==null||!r.element.loaded){this.threeRenderer.clear();return}this.tracking===!1&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:bv.TRACKING}));let a=!0;for(const o of s.views)this.updateView(o),a&&(this.handleFirstView(t,e),a=!1),this.threeRenderer.render(r,r.getCamera())}calculateWorldSpaceOptimalPlacement(e,t){const n=e.boundingBox,s={x:(n.max.x-n.min.x)/2,y:(n.max.y-n.min.y)/2,z:(n.max.z-n.min.z)/2},r=uX,a=Math.max(cX+r,2*Math.max(s.x,s.z)+r),o=hX*Math.PI/180,l=new Q(0,-a*Math.sin(o),-a*Math.cos(o)),c=t.matrixWorld,u=l.clone().applyMatrix4(c),h=Math.max(s.x,s.z)+r,d=s.y,A=a*BB,g=a*BB/Math.max(d,t_),m=A/Math.max(h,t_),f=Math.min(g,m);return{position:u.clone().sub(new Q(0,f*s.y,0)),scale:f}}calculateWorldSpaceScaleLimits(e){const t=e.size,n=Math.max(t.x,t.y,t.z),s=Math.max(Math.min(t.x,t.y,t.z),n_),r=t_/Math.max(n,n_),a=dX/Math.max(s,n_);this.minScale=Math.min(r,a,this.goalScale),this.maxScale=Math.max(r,a,this.goalScale)}}/* @license
|
|
17028
17028
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17029
17029
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17030
17030
|
* you may not use this file except in compliance with the License.
|
|
@@ -17183,7 +17183,7 @@ void main() {
|
|
|
17183
17183
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17184
17184
|
* See the License for the specific language governing permissions and
|
|
17185
17185
|
* limitations under the License.
|
|
17186
|
-
*/const NX=.2,
|
|
17186
|
+
*/const NX=.2,s_=40,r_=60,GB=5,Hc=[1,.79,.62,.5,.4,.31,.25],PX=3,zB="high-performance",FX=1.3;class ks extends hr{static get singleton(){return this._singleton||(this._singleton=new ks({powerPreference:(self.ModelViewerElement||{}).powerPreference||zB,debug:kS()})),this._singleton}static resetSingleton(){const e=this._singleton.dispose();for(const t of e)t.disconnectedCallback();this._singleton=new ks({powerPreference:(self.ModelViewerElement||{}).powerPreference||zB,debug:kS()});for(const t of e)t.connectedCallback()}get canRender(){return this.threeRenderer!=null}get scaleFactor(){return Hc[this.scaleStep]}set minScale(e){let t=1;for(;t<Hc.length&&!(Hc[t]<e);)++t;this.lastStep=t-1}constructor(e){super(),this.loader=new Ui(EX),this.width=0,this.height=0,this.dpr=1,this.scenes=new Set,this.multipleScenesVisible=!1,this.lastTick=performance.now(),this.renderedLastFrame=!1,this.scaleStep=0,this.lastStep=PX,this.avgFrameDuration=(r_+s_)/2,this.onWebGLContextLost=t=>{this.dispatchEvent({type:"contextlost",sourceEvent:t})},this.onWebGLContextRestored=()=>{var t;(t=this.textureUtils)===null||t===void 0||t.dispose(),this.textureUtils=this.canRender?new OB(this.threeRenderer):null;for(const n of this.scenes)n.element[Wg]()},this.dpr=window.devicePixelRatio,this.canvas3D=document.createElement("canvas"),this.canvas3D.id="webgl-canvas",this.canvas3D.classList.add("show");try{this.threeRenderer=new xb({canvas:this.canvas3D,alpha:!0,antialias:!0,powerPreference:e.powerPreference,preserveDrawingBuffer:!0}),this.threeRenderer.autoClear=!0,this.threeRenderer.setPixelRatio(1),this.threeRenderer.debug={checkShaderErrors:!!e.debug,onShaderError:null},this.threeRenderer.toneMapping=Bh}catch(t){console.warn(t)}this.arRenderer=this.canRender?new mX(this):null,this.textureUtils=this.canRender?new OB(this.threeRenderer):null,this.canRender&&Ui.initializeKTX2Loader(this.threeRenderer),this.canvas3D.addEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.addEventListener("webglcontextrestored",this.onWebGLContextRestored),this.updateRendererSize()}registerScene(e){if(this.scenes.add(e),e.forceRescale(),this.canRender){const t=new pe;this.threeRenderer.getSize(t),e.canvas.width=t.x,e.canvas.height=t.y,this.scenes.size>0&&this.threeRenderer.setAnimationLoop((n,s)=>this.render(n,s))}}unregisterScene(e){this.scenes.delete(e),this.canvas3D.parentElement===e.canvas.parentElement&&e.canvas.parentElement.removeChild(this.canvas3D),this.canRender&&this.scenes.size===0&&this.threeRenderer.setAnimationLoop(null)}displayCanvas(e){return e.element.modelIsVisible&&!this.multipleScenesVisible?this.canvas3D:e.element[Bv]}countVisibleScenes(){const{canvas3D:e}=this;let t=0,n=null;for(const r of this.scenes){const{element:a}=r;a.modelIsVisible&&r.externalRenderer==null&&++t,e.parentElement===r.canvas.parentElement&&(n=r)}const s=t>1;if(n!=null){const r=s&&!this.multipleScenesVisible,a=!n.element.modelIsVisible;if(r||a){const{width:o,height:l}=this.sceneSize(n);this.copyPixels(n,o,l),e.parentElement.removeChild(e)}}this.multipleScenesVisible=s}updateRendererSize(){var e;const t=window.devicePixelRatio;if(t!==this.dpr)for(const r of this.scenes){const{element:a}=r;a[th](a.getBoundingClientRect())}let n=0,s=0;for(const r of this.scenes)n=Math.max(n,r.width),s=Math.max(s,r.height);if(!(n===this.width&&s===this.height&&t===this.dpr)){this.width=n,this.height=s,this.dpr=t,n=Math.ceil(n*t),s=Math.ceil(s*t),this.canRender&&this.threeRenderer.setSize(n,s,!1);for(const r of this.scenes){const{canvas:a}=r;a.width=n,a.height=s,r.forceRescale(),(e=r.effectRenderer)===null||e===void 0||e.setSize(n,s)}}}updateRendererScale(e){const t=this.scaleStep;this.avgFrameDuration+=Ir(NX*(e-this.avgFrameDuration),-GB,GB),this.avgFrameDuration>r_?++this.scaleStep:this.avgFrameDuration<s_&&this.scaleStep>0&&--this.scaleStep,this.scaleStep=Math.min(this.scaleStep,this.lastStep),t!==this.scaleStep&&(this.avgFrameDuration=(r_+s_)/2)}shouldRender(e){if(e.shouldRender())e.scaleStep!=this.scaleStep&&(e.scaleStep=this.scaleStep,this.rescaleCanvas(e));else if(e.scaleStep!=0)e.scaleStep=0,this.rescaleCanvas(e);else return!1;return!0}rescaleCanvas(e){const t=Hc[e.scaleStep],n=Math.ceil(this.width/t),s=Math.ceil(this.height/t),{style:r}=e.canvas;r.width=`${n}px`,r.height=`${s}px`,this.canvas3D.style.width=`${n}px`,this.canvas3D.style.height=`${s}px`;const a=this.dpr*t,o=t<1?"GPU throttling":this.dpr!==window.devicePixelRatio?"No meta viewport tag":"";e.element.dispatchEvent(new CustomEvent("render-scale",{detail:{reportedDpr:window.devicePixelRatio,renderedDpr:a,minimumDpr:this.dpr*Hc[this.lastStep],pixelWidth:Math.ceil(e.width*a),pixelHeight:Math.ceil(e.height*a),reason:o}}))}sceneSize(e){const{dpr:t}=this,n=Hc[e.scaleStep],s=Math.min(Math.ceil(e.width*n*t),this.canvas3D.width),r=Math.min(Math.ceil(e.height*n*t),this.canvas3D.height);return{width:s,height:r}}copyPixels(e,t,n){const s=e.context;if(s==null){console.log("could not acquire 2d context");return}s.clearRect(0,0,t,n),s.drawImage(this.canvas3D,0,0,t,n,0,0,t,n),e.canvas.classList.add("show")}orderedScenes(){const e=[];for(const t of[!1,!0])for(const n of this.scenes)n.element.modelIsVisible===t&&e.push(n);return e}get isPresenting(){var e;return((e=this.arRenderer)===null||e===void 0?void 0:e.isPresenting)===!0}preRender(e,t,n){const{element:s,exposure:r,toneMapping:a}=e;s[Nr](t,n);const o=typeof r=="number"&&!Number.isNaN(r),l=s.environmentImage,c=s.skyboxImage,u=a===Bh&&(l==="neutral"||l==="legacy"||!l&&!c);this.threeRenderer.toneMappingExposure=(o?r:1)*(u?FX:1)}render(e,t){if(t!=null){this.arRenderer!=null&&this.arRenderer.onWebXRFrame(e,t);return}const n=e-this.lastTick;if(this.lastTick=e,!this.canRender||this.isPresenting)return;this.countVisibleScenes(),this.updateRendererSize(),this.renderedLastFrame&&(this.updateRendererScale(n),this.renderedLastFrame=!1);const{canvas3D:s}=this;for(const r of this.orderedScenes()){const{element:a}=r;if(!a.loaded||!a.modelIsVisible&&r.renderCount>0||(this.preRender(r,e,n),!this.shouldRender(r)))continue;if(r.externalRenderer!=null){const c=r.getCamera();c.updateMatrix();const{matrix:u,projectionMatrix:h}=c,d=u.elements.slice(),A=r.getTarget();d[12]+=A.x,d[13]+=A.y,d[14]+=A.z,r.externalRenderer.render({viewMatrix:d,projectionMatrix:h.elements});continue}if(!a.modelIsVisible&&!this.multipleScenesVisible)for(const c of this.scenes)c.element.modelIsVisible&&c.queueRender();const{width:o,height:l}=this.sceneSize(r);r.renderShadow(this.threeRenderer),this.threeRenderer.setRenderTarget(null),this.threeRenderer.setViewport(0,Math.ceil(this.height*this.dpr)-l,o,l),r.effectRenderer!=null?r.effectRenderer.render(n):(this.threeRenderer.autoClear=!0,this.threeRenderer.toneMapping=r.toneMapping,this.threeRenderer.render(r,r.camera)),this.multipleScenesVisible||!r.element.modelIsVisible&&r.renderCount===0?this.copyPixels(r,o,l):s.parentElement!==r.canvas.parentElement&&(r.canvas.parentElement.appendChild(s),r.canvas.classList.remove("show")),r.hasRendered(),++r.renderCount,this.renderedLastFrame=!0}}dispose(){this.textureUtils!=null&&this.textureUtils.dispose(),this.threeRenderer!=null&&this.threeRenderer.dispose(),this.textureUtils=null,this.threeRenderer=null;const e=[];for(const t of this.scenes)e.push(t.element);return this.canvas3D.removeEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.removeEventListener("webglcontextrestored",this.onWebGLContextRestored),e}}/* @license
|
|
17187
17187
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17188
17188
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17189
17189
|
* you may not use this file except in compliance with the License.
|
|
@@ -17248,7 +17248,7 @@ void main() {
|
|
|
17248
17248
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17249
17249
|
* See the License for the specific language governing permissions and
|
|
17250
17250
|
* limitations under the License.
|
|
17251
|
-
*/var pQ,fQ,gQ;const ll=Symbol("texture"),cl=Symbol("transform"),
|
|
17251
|
+
*/var pQ,fQ,gQ;const ll=Symbol("texture"),cl=Symbol("transform"),a_=Symbol("materials"),XB=Symbol("usage"),$c=Symbol("onUpdate"),Pd=Symbol("activeVideo");var ct;(function(i){i[i.Base=0]="Base",i[i.MetallicRoughness=1]="MetallicRoughness",i[i.Normal=2]="Normal",i[i.Occlusion=3]="Occlusion",i[i.Emissive=4]="Emissive",i[i.Clearcoat=5]="Clearcoat",i[i.ClearcoatRoughness=6]="ClearcoatRoughness",i[i.ClearcoatNormal=7]="ClearcoatNormal",i[i.SheenColor=8]="SheenColor",i[i.SheenRoughness=9]="SheenRoughness",i[i.Transmission=10]="Transmission",i[i.Thickness=11]="Thickness",i[i.Specular=12]="Specular",i[i.SpecularColor=13]="SpecularColor",i[i.Iridescence=14]="Iridescence",i[i.IridescenceThickness=15]="IridescenceThickness",i[i.Anisotropy=16]="Anisotropy"})(ct||(ct={}));class hh{constructor(e,t,n,s){this[pQ]=null,this[fQ]={rotation:0,scale:new pe(1,1),offset:new pe(0,0)},this[gQ]=!1,n&&(this[cl].rotation=n.rotation,this[cl].scale.copy(n.repeat),this[cl].offset.copy(n.offset),this[ll]=new AQ(e,n)),this[$c]=e,this[a_]=s,this[XB]=t}get texture(){return this[ll]}setTexture(e){var t,n;const s=e!=null?e.source[Ms]:null,r=(t=this[ll])===null||t===void 0?void 0:t.source[Ms];if(r!=null&&r.isVideoTexture?this[Pd]=!1:!((n=this[ll])===null||n===void 0)&&n.source.animation&&this[ll].source.animation.removeEventListener("enterFrame",this[$c]),this[ll]=e,s!=null&&s.isVideoTexture){const o=s.image;if(this[Pd]=!0,o.requestVideoFrameCallback!=null){const l=()=>{this[Pd]&&(this[$c](),o.requestVideoFrameCallback(l))};o.requestVideoFrameCallback(l)}else{const l=()=>{this[Pd]&&(this[$c](),requestAnimationFrame(l))};requestAnimationFrame(l)}}else e?.source.animation!=null&&e.source.animation.addEventListener("enterFrame",this[$c]);let a=Ot;if(this[a_])for(const o of this[a_]){switch(this[XB]){case ct.Base:o.map=s;break;case ct.MetallicRoughness:a=pn,o.metalnessMap=s,o.roughnessMap=s;break;case ct.Normal:a=pn,o.normalMap=s;break;case ct.Occlusion:a=pn,o.aoMap=s;break;case ct.Emissive:o.emissiveMap=s;break;case ct.Clearcoat:o.clearcoatMap=s;break;case ct.ClearcoatRoughness:o.clearcoatRoughnessMap=s;break;case ct.ClearcoatNormal:o.clearcoatNormalMap=s;break;case ct.SheenColor:o.sheenColorMap=s;break;case ct.SheenRoughness:o.sheenRoughnessMap=s;break;case ct.Transmission:o.transmissionMap=s;break;case ct.Thickness:o.thicknessMap=s;break;case ct.Specular:o.specularIntensityMap=s;break;case ct.SpecularColor:o.specularColorMap=s;break;case ct.Iridescence:o.iridescenceMap=s;break;case ct.IridescenceThickness:o.iridescenceThicknessMap=s;break;case ct.Anisotropy:o.anisotropyMap=s;break}o.needsUpdate=!0}s&&(s.colorSpace=a,s.rotation=this[cl].rotation,s.repeat=this[cl].scale,s.offset=this[cl].offset),this[$c]()}}pQ=ll,fQ=cl,gQ=Pd;/* @license
|
|
17252
17252
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17253
17253
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17254
17254
|
* you may not use this file except in compliance with the License.
|
|
@@ -17274,8 +17274,8 @@ void main() {
|
|
|
17274
17274
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17275
17275
|
* See the License for the specific language governing permissions and
|
|
17276
17276
|
* limitations under the License.
|
|
17277
|
-
*/var ZB,eT;const tT=Symbol("pbrMetallicRoughness"),nT=Symbol("normalTexture"),iT=Symbol("occlusionTexture"),sT=Symbol("emissiveTexture"),mn=Symbol("backingThreeMaterial"),rT=Symbol("applyAlphaCutoff"),
|
|
17278
|
-
myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[Cv]()}get isLoaded(){return this[Vc]==null}get isActive(){return this[
|
|
17277
|
+
*/var ZB,eT;const tT=Symbol("pbrMetallicRoughness"),nT=Symbol("normalTexture"),iT=Symbol("occlusionTexture"),sT=Symbol("emissiveTexture"),mn=Symbol("backingThreeMaterial"),rT=Symbol("applyAlphaCutoff"),o_=Symbol("getAlphaMode"),Vc=Symbol("lazyLoadGLTFInfo"),l_=Symbol("initialize"),Cv=Symbol("getLoadedMaterial"),$e=Symbol("ensureMaterialIsLoaded"),aT=Symbol("gltfIndex"),Fd=Symbol("setActive"),xh=Symbol("variantIndices"),c_=Symbol("isActive"),oT=Symbol("modelVariants"),h_=Symbol("name"),ji=Symbol("pbrTextures");class u_ extends np{get[(ZB=xh,eT=ji,mn)](){return this[bt].values().next().value}constructor(e,t,n,s,r,a,o=void 0){super(e,r),this[ZB]=new Set,this[eT]=new Map,this[aT]=t,this[c_]=n,this[oT]=s,this[h_]=a,o==null?this[l_]():this[Vc]=o}[l_](){const e=this[Wt],t=this[bt];this[tT]=new WX(e,t);const{normalMap:n,aoMap:s,emissiveMap:r}=t.values().next().value;this[nT]=new hh(e,ct.Normal,n,t),this[iT]=new hh(e,ct.Occlusion,s,t),this[sT]=new hh(e,ct.Emissive,r,t);const a=o=>{this[ji].set(o,new hh(e,o,null,t))};a(ct.Clearcoat),a(ct.ClearcoatRoughness),a(ct.ClearcoatNormal),a(ct.SheenColor),a(ct.SheenRoughness),a(ct.Transmission),a(ct.Thickness),a(ct.Specular),a(ct.SpecularColor),a(ct.Iridescence),a(ct.IridescenceThickness),a(ct.Anisotropy)}async[Cv](){if(this[Vc]!=null){const e=await this[Vc].doLazyLoad();return this[l_](),this[Vc]=void 0,this.ensureLoaded=async()=>{},e}return null}colorFromRgb(e){const t=new we;return e instanceof Array?t.fromArray(e):t.set(e),t}[$e](){if(this[Vc]!=null)throw new Error(`Material "${this.name}" has not been loaded, call 'await
|
|
17278
|
+
myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[Cv]()}get isLoaded(){return this[Vc]==null}get isActive(){return this[c_]}[Fd](e){this[c_]=e}get name(){return this[h_]||""}set name(e){if(this[h_]=e,this[bt]!=null)for(const t of this[bt])t.name=e}get pbrMetallicRoughness(){return this[$e](),this[tT]}get normalTexture(){return this[$e](),this[nT]}get occlusionTexture(){return this[$e](),this[iT]}get emissiveTexture(){return this[$e](),this[sT]}get emissiveFactor(){return this[$e](),this[mn].emissive.toArray()}get index(){return this[aT]}hasVariant(e){const t=this[oT].get(e);return t!=null&&this[xh].has(t.index)}setEmissiveFactor(e){this[$e]();const t=this.colorFromRgb(e);for(const n of this[bt])n.emissive.set(t);this[Wt]()}[o_](){return this[mn].transparent?"BLEND":this[mn].alphaTest>0?"MASK":"OPAQUE"}[rT](){this[$e]();for(const e of this[bt])this[o_]()==="MASK"?e.alphaTest==null&&(e.alphaTest=.5):e.alphaTest=void 0,e.needsUpdate=!0}setAlphaCutoff(e){this[$e]();for(const t of this[bt])t.alphaTest=e,t.needsUpdate=!0;this[rT](),this[Wt]()}getAlphaCutoff(){return this[$e](),this[mn].alphaTest}setDoubleSided(e){this[$e]();for(const t of this[bt])t.side=e?On:or,t.needsUpdate=!0;this[Wt]()}getDoubleSided(){return this[$e](),this[mn].side==On}setAlphaMode(e){this[$e]();const t=(n,s)=>{n.transparent=s,n.depthWrite=!s};for(const n of this[bt])t(n,e==="BLEND"),e==="MASK"?n.alphaTest=.5:n.alphaTest=void 0,n.needsUpdate=!0;this[Wt]()}getAlphaMode(){return this[$e](),this[o_]()}get emissiveStrength(){return this[$e](),this[mn].emissiveIntensity}setEmissiveStrength(e){this[$e]();for(const t of this[bt])t.emissiveIntensity=e;this[Wt]()}get clearcoatFactor(){return this[$e](),this[mn].clearcoat}get clearcoatRoughnessFactor(){return this[$e](),this[mn].clearcoatRoughness}get clearcoatTexture(){return this[$e](),this[ji].get(ct.Clearcoat)}get clearcoatRoughnessTexture(){return this[$e](),this[ji].get(ct.ClearcoatRoughness)}get clearcoatNormalTexture(){return this[$e](),this[ji].get(ct.ClearcoatNormal)}get clearcoatNormalScale(){return this[$e](),this[mn].clearcoatNormalScale.x}setClearcoatFactor(e){this[$e]();for(const t of this[bt])t.clearcoat=e;this[Wt]()}setClearcoatRoughnessFactor(e){this[$e]();for(const t of this[bt])t.clearcoatRoughness=e;this[Wt]()}setClearcoatNormalScale(e){this[$e]();for(const t of this[bt])t.clearcoatNormalScale=new pe(e,e);this[Wt]()}get ior(){return this[$e](),this[mn].ior}setIor(e){this[$e]();for(const t of this[bt])t.ior=e;this[Wt]()}get sheenColorFactor(){return this[$e](),this[mn].sheenColor.toArray()}get sheenColorTexture(){return this[$e](),this[ji].get(ct.SheenColor)}get sheenRoughnessFactor(){return this[$e](),this[mn].sheenRoughness}get sheenRoughnessTexture(){return this[$e](),this[ji].get(ct.SheenRoughness)}setSheenColorFactor(e){this[$e]();const t=this.colorFromRgb(e);for(const n of this[bt])n.sheenColor.set(t),n.sheen=1;this[Wt]()}setSheenRoughnessFactor(e){this[$e]();for(const t of this[bt])t.sheenRoughness=e,t.sheen=1;this[Wt]()}get transmissionFactor(){return this[$e](),this[mn].transmission}get transmissionTexture(){return this[$e](),this[ji].get(ct.Transmission)}setTransmissionFactor(e){this[$e]();for(const t of this[bt])t.transmission=e;this[Wt]()}get thicknessFactor(){return this[$e](),this[mn].thickness}get thicknessTexture(){return this[$e](),this[ji].get(ct.Thickness)}get attenuationDistance(){return this[$e](),this[mn].attenuationDistance}get attenuationColor(){return this[$e](),this[mn].attenuationColor.toArray()}setThicknessFactor(e){this[$e]();for(const t of this[bt])t.thickness=e;this[Wt]()}setAttenuationDistance(e){this[$e]();for(const t of this[bt])t.attenuationDistance=e;this[Wt]()}setAttenuationColor(e){this[$e]();const t=this.colorFromRgb(e);for(const n of this[bt])n.attenuationColor.set(t);this[Wt]()}get specularFactor(){return this[$e](),this[mn].specularIntensity}get specularTexture(){return this[$e](),this[ji].get(ct.Specular)}get specularColorFactor(){return this[$e](),this[mn].specularColor.toArray()}get specularColorTexture(){return this[$e](),this[ji].get(ct.SheenColor)}setSpecularFactor(e){this[$e]();for(const t of this[bt])t.specularIntensity=e;this[Wt]()}setSpecularColorFactor(e){this[$e]();const t=this.colorFromRgb(e);for(const n of this[bt])n.specularColor.set(t);this[Wt]()}get iridescenceFactor(){return this[$e](),this[mn].iridescence}get iridescenceTexture(){return this[$e](),this[ji].get(ct.Iridescence)}get iridescenceIor(){return this[$e](),this[mn].iridescenceIOR}get iridescenceThicknessMinimum(){return this[$e](),this[mn].iridescenceThicknessRange[0]}get iridescenceThicknessMaximum(){return this[$e](),this[mn].iridescenceThicknessRange[1]}get iridescenceThicknessTexture(){return this[$e](),this[ji].get(ct.IridescenceThickness)}setIridescenceFactor(e){this[$e]();for(const t of this[bt])t.iridescence=e;this[Wt]()}setIridescenceIor(e){this[$e]();for(const t of this[bt])t.iridescenceIOR=e;this[Wt]()}setIridescenceThicknessMinimum(e){this[$e]();for(const t of this[bt])t.iridescenceThicknessRange[0]=e;this[Wt]()}setIridescenceThicknessMaximum(e){this[$e]();for(const t of this[bt])t.iridescenceThicknessRange[1]=e;this[Wt]()}get anisotropyStrength(){return this[$e](),this[mn].anisotropy}get anisotropyRotation(){return this[$e](),this[mn].anisotropyRotation}get anisotropyTexture(){return this[$e](),this[ji].get(ct.Anisotropy)}setAnisotropyStrength(e){this[$e]();for(const t of this[bt])t.anisotropy=e;this[Wt]()}setAnisotropyRotation(e){this[$e]();for(const t of this[bt])t.anisotropyRotation=e;this[Wt]()}}let mQ=class{constructor(e){this.name="",this.children=new Array,this.name=e}};class d_ extends mQ{constructor(e,t,n,s){super(e.name),this.materials=new Map,this.variantToMaterialMap=new Map,this.initialMaterialIdx=0,this.activeMaterialIdx=0,this.mesh=e;const{gltf:r,threeGLTF:a,threeObjectMap:o}=s;this.parser=a.parser,this.modelVariants=n,this.mesh.userData.variantData=n;const l=o.get(e.material);l.materials!=null?this.initialMaterialIdx=this.activeMaterialIdx=l.materials:console.error(`Primitive (${e.name}) missing initial material reference.`);const c=e.userData.associations||{};if(c.meshes==null){console.error("Mesh is missing primitive index association");return}const d=((r.meshes||[])[c.meshes].primitives||[])[c.primitives];if(d==null){console.error("Mesh primitive definition is missing.");return}if(d.material!=null)this.materials.set(d.material,t[d.material]);else{const A=t.findIndex(p=>p.name==="Default");A>=0?this.materials.set(A,t[A]):console.warn("gltfPrimitive has no material!")}if(d.extensions&&d.extensions.KHR_materials_variants){const A=d.extensions.KHR_materials_variants,g=a.parser.json.extensions.KHR_materials_variants.variants;for(const m of A.mappings){const f=t[m.material];this.materials.set(m.material,f);for(const y of m.variants){const{name:_}=g[y];this.variantToMaterialMap.set(y,f),f[xh].add(y),n.has(_)||n.set(_,{name:_,index:y})}}}}async setActiveMaterial(e){const t=this.materials.get(e);if(e!==this.activeMaterialIdx){const n=t[bt],s=await t[Cv]();s!=null?this.mesh.material=s:this.mesh.material=n.values().next().value,this.parser.assignFinalMaterial(this.mesh),n.add(this.mesh.material),this.activeMaterialIdx=e}return this.mesh.material}getActiveMaterial(){return this.materials.get(this.activeMaterialIdx)}getMaterial(e){return this.materials.get(e)}async enableVariant(e){if(e==null)return this.setActiveMaterial(this.initialMaterialIdx);if(this.variantToMaterialMap!=null&&this.modelVariants.has(e)){const t=this.modelVariants.get(e);return this.enableVariantHelper(t.index)}return null}async enableVariantHelper(e){if(this.variantToMaterialMap!=null&&e!=null){const t=this.variantToMaterialMap.get(e);if(t!=null)return this.setActiveMaterial(t.index)}return null}async instantiateVariants(){if(this.variantToMaterialMap!=null)for(const e of this.variantToMaterialMap.keys()){const t=this.mesh.userData.variantMaterials.get(e);if(t.material!=null)continue;const n=await this.enableVariantHelper(e);n!=null&&(t.material=n)}}get variantInfo(){return this.variantToMaterialMap}addVariant(e,t){if(!this.ensureVariantIsUnused(t))return!1;this.modelVariants.has(t)||this.modelVariants.set(t,{name:t,index:this.modelVariants.size});const s=this.modelVariants.get(t).index;return e[xh].add(s),this.variantToMaterialMap.set(s,e),this.materials.set(e.index,e),this.updateVariantUserData(s,e),!0}deleteVariant(e){if(this.variantInfo.has(e)){this.variantInfo.delete(e);const t=this.mesh.userData.variantMaterials;t?.delete(e)}}updateVariantUserData(e,t){t[xh].add(e),this.mesh.userData.variantData=this.modelVariants,this.mesh.userData.variantMaterials=this.mesh.userData.variantMaterials||new Map,this.mesh.userData.variantMaterials.set(e,{material:t[bt].values().next().value,gltfMaterialIndex:t.index})}ensureVariantIsUnused(e){const t=this.modelVariants.get(e);return t!=null&&this.variantInfo.has(t.index)?(console.warn(`Primitive cannot add variant '${e}' for this material, it already exists.`),!1):!0}}/* @license
|
|
17279
17279
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17280
17280
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17281
17281
|
* you may not use this file except in compliance with the License.
|
|
@@ -17288,8 +17288,8 @@ void main() {
|
|
|
17288
17288
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17289
17289
|
* See the License for the specific language governing permissions and
|
|
17290
17290
|
* limitations under the License.
|
|
17291
|
-
*/var lT,cT,hT,uT,dT,AT;const tl=Symbol("materials"),bf=Symbol("hierarchy"),pT=Symbol("roots"),na=Symbol("primitives"),yQ=Symbol("prepareVariantsForExport"),_Q=Symbol("switchVariant"),EQ=Symbol("materialFromPoint"),Iv=Symbol("nodeFromPoint"),vQ=Symbol("nodeFromIndex"),xi=Symbol("variantData"),wv=Symbol("availableVariants"),
|
|
17292
|
-
call 'material.ensureLoaded() before cloning the material.`);const s=n[bt],r=new Set;for(const[o,l]of s.entries()){const c=l.clone();c.name=t+(s.size>1?"_inst"+o:""),r.add(c)}const a=new
|
|
17291
|
+
*/var lT,cT,hT,uT,dT,AT;const tl=Symbol("materials"),bf=Symbol("hierarchy"),pT=Symbol("roots"),na=Symbol("primitives"),yQ=Symbol("prepareVariantsForExport"),_Q=Symbol("switchVariant"),EQ=Symbol("materialFromPoint"),Iv=Symbol("nodeFromPoint"),vQ=Symbol("nodeFromIndex"),xi=Symbol("variantData"),wv=Symbol("availableVariants"),A_=Symbol("modelOnUpdate"),fT=Symbol("cloneMaterial");class jX{constructor(e,t,n,s){this.gltf=e,this.gltfElementMap=t,this.mapKey=n,this.doLazyLoad=s}}class XX{constructor(e,t=()=>{}){this[lT]=new Array,this[cT]=new Array,this[hT]=new Array,this[uT]=new Array,this[dT]=()=>{},this[AT]=new Map,this[A_]=t;const{gltf:n,threeGLTF:s,gltfElementMap:r}=e;for(const[l,c]of n.materials.entries()){const u=r.get(c);if(u!=null)this[tl].push(new u_(t,l,!0,this[xi],u,c.name));else{const d=(n.materials||[])[l],A=new Set;r.set(d,A);const p=async()=>{const g=await s.parser.getDependency("material",l);return A.add(g),g};this[tl].push(new u_(t,l,!1,this[xi],A,c.name,new jX(n,r,d,p)))}}const a=new Map,o=new Array;for(const l of s.scene.children)o.push(l);for(;o.length>0;){const l=o.pop();let c=null;l instanceof Je?(c=new d_(l,this.materials,this[xi],e),this[na].push(c)):c=new mQ(l.name);const u=a.get(l);u!=null?u.children.push(c):this[pT].push(c),this[bf].push(c);for(const h of l.children)o.push(h),a.set(l,c)}}get materials(){return this[tl]}[(lT=tl,cT=bf,hT=pT,uT=na,dT=A_,AT=xi,wv)](){const e=Array.from(this[xi].values());return e.sort((t,n)=>t.index-n.index),e.map(t=>t.name)}getMaterialByName(e){const t=this[tl].filter(n=>n.name===e);return t.length>0?t[0]:null}[vQ](e,t){const n=this[bf].find(s=>{if(s instanceof d_){const{meshes:r,primitives:a}=s.mesh.userData.associations;if(r==e&&a==t)return!0}return!1});return n??null}[Iv](e){return this[bf].find(t=>t instanceof d_&&t.mesh===e.object)}[EQ](e){return this[Iv](e).getActiveMaterial()}async[_Q](e){for(const t of this[na])await t.enableVariant(e);for(const t of this.materials)t[Fd](!1);for(const t of this[na])this.materials[t.getActiveMaterial().index][Fd](!0)}async[yQ](){const e=new Array;for(const t of this[na])e.push(t.instantiateVariants());await Promise.all(e)}[fT](e,t){const n=this.materials[e];n.isLoaded||console.error(`Cloning an unloaded material,
|
|
17292
|
+
call 'material.ensureLoaded() before cloning the material.`);const s=n[bt],r=new Set;for(const[o,l]of s.entries()){const c=l.clone();c.name=t+(s.size>1?"_inst"+o:""),r.add(c)}const a=new u_(this[A_],this[tl].length,!1,this[xi],r,t);return this[tl].push(a),a}createMaterialInstanceForVariant(e,t,n,s=!0){let r=null;for(const a of this[na]){const o=this[xi].get(n);o!=null&&a.variantInfo.has(o.index)||a.getMaterial(e)!=null&&(this.hasVariant(n)||this.createVariant(n),r==null&&(r=this[fT](e,t)),a.addVariant(r,n))}if(s&&r!=null){r[Fd](!0),this.materials[e][Fd](!1);for(const a of this[na])a.enableVariant(n)}return r}createVariant(e){this[xi].has(e)?console.warn(`Variant '${e}'' already exists`):this[xi].set(e,{name:e,index:this[xi].size})}hasVariant(e){return this[xi].has(e)}setMaterialToVariant(e,t){if(this[wv]().find(n=>n===t)==null){console.warn(`Can't add material to '${t}', the variant does not exist.'`);return}if(e<0||e>=this.materials.length){console.error("setMaterialToVariant(): materialIndex is out of bounds.");return}for(const n of this[na]){const s=n.getMaterial(e);s!=null&&n.addVariant(s,t)}}updateVariantName(e,t){const n=this[xi].get(e);n!=null&&(n.name=t,this[xi].set(t,n),this[xi].delete(e))}deleteVariant(e){const t=this[xi].get(e);if(t!=null){for(const n of this.materials)n.hasVariant(e)&&n[xh].delete(t.index);for(const n of this[na])n.deleteVariant(t.index);this[xi].delete(e)}}}/* @license
|
|
17293
17293
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17294
17294
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17295
17295
|
* you may not use this file except in compliance with the License.
|
|
@@ -17302,7 +17302,7 @@ void main() {
|
|
|
17302
17302
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17303
17303
|
* See the License for the specific language governing permissions and
|
|
17304
17304
|
* limitations under the License.
|
|
17305
|
-
*/var
|
|
17305
|
+
*/var p_=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const ig=Symbol("currentGLTF"),sg=Symbol("originalGltfJson"),hl=Symbol("model"),f_=Symbol("getOnUpdateMethod"),Ad=Symbol("buildTexture"),JX=i=>{var e,t,n;class s extends i{constructor(){super(...arguments),this[e]=void 0,this[t]=null,this[n]=null,this.variantName=null,this.orientation="0 0 0",this.scale="1 1 1"}get model(){return this[hl]}get availableVariants(){return this.model?this.model[wv]():[]}get originalGltfJson(){return this[sg]}[(e=hl,t=ig,n=sg,f_)](){return()=>{this[li]()}}[Ad](a){return a.colorSpace=Ot,a.wrapS=lr,a.wrapT=lr,new AQ(this[f_](),a)}async createTexture(a,o="image/png"){const{textureUtils:l}=this[Vt],c=await l.loadImage(a,this.withCredentials);return c.userData.mimeType=o,this[Ad](c)}async createLottieTexture(a,o=1){const{textureUtils:l}=this[Vt],c=await l.loadLottie(a,o,this.withCredentials);return this[Ad](c)}createVideoTexture(a){const o=document.createElement("video");o.crossOrigin=this.withCredentials?"use-credentials":"anonymous",o.src=a,o.muted=!0,o.playsInline=!0,o.loop=!0,o.play();const l=new oP(o);return this[Ad](l)}createCanvasTexture(){const a=document.createElement("canvas"),o=new CE(a);return this[Ad](o)}async updated(a){if(super.updated(a),a.has("variantName")){const o=this[ql].beginActivity("variant-update");o(.1);const l=this[hl],{variantName:c}=this;l!=null&&(await l[_Q](c),this[li](),this.dispatchEvent(new CustomEvent("variant-applied"))),o(1)}if(a.has("orientation")||a.has("scale")){if(!this.loaded)return;const o=this[ye];o.applyTransform(),o.updateBoundingBox(),o.updateShadow(),this[Vt].arRenderer.onUpdateScene(),this[li]()}}[Pr](){super[Pr]();const{currentGLTF:a}=this[ye];if(a!=null){const{correlatedSceneGraph:o}=a;o!=null&&a!==this[ig]&&(this[hl]=new XX(o,this[f_]()),this[sg]=JSON.parse(JSON.stringify(o.gltf))),"variants"in a.userData&&this.requestUpdate("variantName")}this[ig]=a}async exportScene(a){const o=this[ye];return new Promise(async(l,c)=>{const u={binary:!0,onlyVisible:!0,maxTextureSize:1/0,includeCustomExtensions:!1,forceIndices:!1};Object.assign(u,a),u.animations=o.animations,u.truncateDrawRange=!0;const h=o.shadow;let d=!1;h!=null&&(d=h.visible,h.visible=!1),await this[hl][yQ](),new DA().register(p=>new mj(p)).parse(o.model,p=>l(new Blob([u.binary?p:JSON.stringify(p)],{type:u.binary?"application/octet-stream":"application/json"})),()=>c("glTF export failed"),u),h!=null&&(h.visible=d)})}materialFromPoint(a,o){const l=this[hl];if(l==null)return null;const c=this[ye],u=c.getNDC(a,o),h=c.hitFromPoint(u);return h==null||h.face==null?null:l[EQ](h)}}return p_([H({type:String,attribute:"variant-name"})],s.prototype,"variantName",void 0),p_([H({type:String,attribute:"orientation"})],s.prototype,"orientation",void 0),p_([H({type:String,attribute:"scale"})],s.prototype,"scale",void 0),s};/* @license
|
|
17306
17306
|
* Copyright 2023 Google LLC. All Rights Reserved.
|
|
17307
17307
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17308
17308
|
* you may not use this file except in compliance with the License.
|
|
@@ -17328,7 +17328,7 @@ void main() {
|
|
|
17328
17328
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17329
17329
|
* See the License for the specific language governing permissions and
|
|
17330
17330
|
* limitations under the License.
|
|
17331
|
-
*/const xf=new Q,
|
|
17331
|
+
*/const xf=new Q,g_=new Q,m_=new Q,Cf=new pt,gT=new ps,mT=new Yt;class bQ extends Nb{constructor(e){super(document.createElement("div")),this.normal=new Q(0,1,0),this.initialized=!1,this.referenceCount=1,this.pivot=document.createElement("div"),this.slot=document.createElement("slot"),this.element.classList.add("annotation-wrapper"),this.slot.name=e.name,this.element.appendChild(this.pivot),this.pivot.appendChild(this.slot),this.updatePosition(e.position),this.updateNormal(e.normal),this.surface=e.surface}get facingCamera(){return!this.element.classList.contains("hide")}show(){(!this.facingCamera||!this.initialized)&&this.updateVisibility(!0)}hide(){(this.facingCamera||!this.initialized)&&this.updateVisibility(!1)}increment(){this.referenceCount++}decrement(){return this.referenceCount>0&&--this.referenceCount,this.referenceCount===0}updatePosition(e){if(e==null)return;const t=Ma(e)[0].terms;for(let n=0;n<3;++n)this.position.setComponent(n,Sr(t[n]).number);this.updateMatrixWorld()}updateNormal(e){if(e==null)return;const t=Ma(e)[0].terms;for(let n=0;n<3;++n)this.normal.setComponent(n,t[n].number)}updateSurface(){const{mesh:e,tri:t,bary:n}=this;if(e==null||t==null||n==null)return;e.getVertexPosition(t.x,xf),e.getVertexPosition(t.y,g_),e.getVertexPosition(t.z,m_),xf.toArray(Cf.elements,0),g_.toArray(Cf.elements,3),m_.toArray(Cf.elements,6),this.position.copy(n).applyMatrix3(Cf);const s=this.parent;s.worldToLocal(e.localToWorld(this.position)),gT.set(xf,g_,m_),gT.getNormal(this.normal).transformDirection(e.matrixWorld);const r=s.parent;mT.setFromAxisAngle(xf.set(0,1,0),-r.rotation.y),this.normal.applyQuaternion(mT)}orient(e){this.pivot.style.transform=`rotate(${e}rad)`}updateVisibility(e){this.element.classList.toggle("hide",!e),this.slot.assignedNodes().forEach(t=>{if(t.nodeType!==Node.ELEMENT_NODE)return;const n=t,s=n.dataset.visibilityAttribute;if(s!=null){const r=`data-${s}`;n.toggleAttribute(r,e)}n.dispatchEvent(new CustomEvent("hotspot-visibility",{detail:{visible:e}}))}),this.initialized=!0}}/* @license
|
|
17332
17332
|
* Copyright 2022 Google LLC. All Rights Reserved.
|
|
17333
17333
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17334
17334
|
* you may not use this file except in compliance with the License.
|
|
@@ -17341,7 +17341,7 @@ void main() {
|
|
|
17341
17341
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17342
17342
|
* See the License for the specific language governing permissions and
|
|
17343
17343
|
* limitations under the License.
|
|
17344
|
-
*/const yT=9,eJ=6,
|
|
17344
|
+
*/const yT=9,eJ=6,y_=2,tJ=.3;class nJ extends Rt{constructor(e,t,n){super(),this.camera=new Ur,this.renderTarget=null,this.renderTargetBlur=null,this.depthMaterial=new gb,this.horizontalBlurMaterial=new kn(h2),this.verticalBlurMaterial=new kn(u2),this.intensity=0,this.softness=1,this.boundingBox=new Rn,this.size=new Q,this.maxDimension=0,this.isAnimated=!1,this.needsUpdate=!1;const{camera:s}=this;s.rotation.x=Math.PI/2,s.left=-.5,s.right=.5,s.bottom=-.5,s.top=.5,this.add(s);const r=new Es,a=new Xn({opacity:1,transparent:!0,side:_i});this.floor=new Je(r,a),this.floor.userData.noHit=!0,s.add(this.floor),this.blurPlane=new Je(r),this.blurPlane.visible=!1,s.add(this.blurPlane),e.target.add(this),this.depthMaterial.onBeforeCompile=function(o){o.fragmentShader=o.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * opacity );")},this.depthMaterial.side=On,this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1,this.setScene(e,t,n)}setScene(e,t,n){const{boundingBox:s,size:r,rotation:a,position:o}=this;if(this.isAnimated=e.animationNames.length>0,this.boundingBox.copy(e.boundingBox),this.size.copy(e.size),this.maxDimension=Math.max(r.x,r.y,r.z)*(this.isAnimated?y_:1),this.boundingBox.getCenter(o),n==="back"){const{min:l,max:c}=s;[l.y,l.z]=[l.z,l.y],[c.y,c.z]=[c.z,c.y],[r.y,r.z]=[r.z,r.y],a.x=Math.PI/2,a.y=Math.PI}else a.x=0,a.y=0;if(this.isAnimated){const l=s.min.y,c=s.max.y;r.y=this.maxDimension,s.expandByVector(r.subScalar(this.maxDimension).multiplyScalar(-.5)),s.min.y=l,s.max.y=c,r.set(this.maxDimension,c-l,this.maxDimension)}n==="bottom"?o.y=s.min.y:o.z=s.min.y,this.setSoftness(t)}setSoftness(e){this.softness=e;const{size:t,camera:n}=this,s=this.isAnimated?y_:1,r=s*Math.pow(2,yT-e*(yT-eJ));this.setMapSize(r);const a=t.y/2,o=t.y*s;n.near=0,n.far=Ew(o,a,e),this.depthMaterial.opacity=1/e,n.updateProjectionMatrix(),this.setIntensity(this.intensity),this.setOffset(0)}setMapSize(e){const{size:t}=this;this.isAnimated&&(e*=y_);const n=Math.floor(t.x>t.z?e:e*t.x/t.z),s=Math.floor(t.x>t.z?e*t.z/t.x:e),r=10,a=r+n,o=r+s;if(this.renderTarget!=null&&(this.renderTarget.width!==a||this.renderTarget.height!==o)&&(this.renderTarget.dispose(),this.renderTarget=null,this.renderTargetBlur.dispose(),this.renderTargetBlur=null),this.renderTarget==null){const l={format:Gt};this.renderTarget=new Sn(a,o,l),this.renderTargetBlur=new Sn(a,o,l),this.floor.material.map=this.renderTarget.texture}this.camera.scale.set(t.x*(1+r/n),t.z*(1+r/s),1),this.needsUpdate=!0}setIntensity(e){this.intensity=e,e>0?(this.visible=!0,this.floor.visible=!0,this.floor.material.opacity=e*Ew(tJ,1,this.softness*this.softness)):(this.visible=!1,this.floor.visible=!1)}getIntensity(){return this.intensity}setOffset(e){this.floor.position.z=-e+this.gap()}gap(){return .001*this.maxDimension}render(e,t){t.overrideMaterial=this.depthMaterial;const n=e.getClearAlpha();e.setClearAlpha(0),this.floor.visible=!1;const s=e.xr.enabled;e.xr.enabled=!1;const r=e.getRenderTarget();e.setRenderTarget(this.renderTarget),e.render(t,this.camera),t.overrideMaterial=null,this.floor.visible=!0,this.blurShadow(e),e.xr.enabled=s,e.setRenderTarget(r),e.setClearAlpha(n)}blurShadow(e){const{camera:t,horizontalBlurMaterial:n,verticalBlurMaterial:s,renderTarget:r,renderTargetBlur:a,blurPlane:o}=this;o.visible=!0,o.material=n,n.uniforms.h.value=1/this.renderTarget.width,n.uniforms.tDiffuse.value=this.renderTarget.texture,e.setRenderTarget(a),e.render(o,t),o.material=s,s.uniforms.v.value=1/this.renderTarget.height,s.uniforms.tDiffuse.value=this.renderTargetBlur.texture,e.setRenderTarget(r),e.render(o,t),o.visible=!1}dispose(){this.renderTarget!=null&&this.renderTarget.dispose(),this.renderTargetBlur!=null&&this.renderTargetBlur.dispose(),this.depthMaterial.dispose(),this.horizontalBlurMaterial.dispose(),this.verticalBlurMaterial.dispose(),this.floor.material.dispose(),this.floor.geometry.dispose(),this.blurPlane.geometry.dispose(),this.removeFromParent()}}/* @license
|
|
17345
17345
|
* Copyright 2025 Google LLC. All Rights Reserved.
|
|
17346
17346
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17347
17347
|
* you may not use this file except in compliance with the License.
|
|
@@ -17354,7 +17354,7 @@ void main() {
|
|
|
17354
17354
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17355
17355
|
* See the License for the specific language governing permissions and
|
|
17356
17356
|
* limitations under the License.
|
|
17357
|
-
*/const _T=10,_0=100,E0=new Q,ET=new Q,vT=new Q,If=new bb,iJ=new Q,pd=new pe;class sJ extends Bo{constructor({canvas:e,element:t,width:n,height:s}){super(),this.annotationRenderer=new c2,this.effectRenderer=null,this.schemaElement=document.createElement("script"),this.width=1,this.height=1,this.aspect=1,this.scaleStep=0,this.renderCount=0,this.externalRenderer=null,this.appendedAnimations=[],this.markedAnimations=[],this.camera=new $n(45,1,.1,100),this.xrCamera=null,this.url=null,this.pivot=new Rt,this.target=new Rt,this.animationNames=[],this.boundingBox=new Rn,this.boundingSphere=new es,this.size=new Q,this.idealAspect=0,this.framedFoVDeg=0,this.shadow=null,this.shadowIntensity=0,this.shadowSoftness=1,this.bakedShadows=new Set,this.exposure=1,this.toneMapping=Bh,this.canScale=!0,this.isDirty=!1,this.goalTarget=new Q,this.targetDamperX=new mi,this.targetDamperY=new mi,this.targetDamperZ=new mi,this._currentGLTF=null,this._model=null,this.cancelPendingSourceChange=null,this.animationsByName=new Map,this.currentAnimationAction=null,this.groundedSkybox=new KX,this.name="ModelScene",this.element=t,this.canvas=e,this.camera=new $n(45,1,.1,100),this.camera.name="MainCamera",this.add(this.pivot),this.pivot.name="Pivot",this.pivot.add(this.target),this.setSize(n,s),this.target.name="Target",this.mixer=new XM(this.target);const{domElement:r}=this.annotationRenderer,{style:a}=r;a.display="none",a.pointerEvents="none",a.position="absolute",a.top="0",this.element.shadowRoot.querySelector(".default").appendChild(r),this.schemaElement.setAttribute("type","application/ld+json")}get context(){return this.canvas.getContext("2d")}getCamera(){return this.xrCamera!=null?this.xrCamera:this.camera}queueRender(){this.isDirty=!0}shouldRender(){return this.isDirty}hasRendered(){this.isDirty=!1}forceRescale(){this.scaleStep=-1,this.queueRender()}async setObject(e){this.reset(),this._model=e,this.target.add(e),await this.setupScene()}async setSource(e,t=()=>{}){if(!e||e===this.url){t(1);return}if(this.reset(),this.url=e,this.externalRenderer!=null){const o=await this.externalRenderer.load(t);this.boundingSphere.radius=o.framedRadius,this.idealAspect=o.fieldOfViewAspect;return}this.cancelPendingSourceChange!=null&&(this.cancelPendingSourceChange(),this.cancelPendingSourceChange=null);let n;try{n=await new Promise((o,l)=>{this.cancelPendingSourceChange=()=>l(),(async()=>{try{const c=await this.element[Vt].loader.load(e,this.element,t);o(c)}catch(c){l(c)}})()})}catch(o){if(o==null)return;throw o}this.cancelPendingSourceChange=null,this.reset(),this.url=e,this._currentGLTF=n,n!=null&&(this._model=n.scene,this.target.add(n.scene));const{animations:s}=n,r=new Map,a=[];for(const o of s)r.set(o.name,o),a.push(o.name);this.animations=s,this.animationsByName=r,this.animationNames=a,await this.setupScene()}async setupScene(){this.applyTransform(),this.updateBoundingBox(),await this.updateFraming(),this.updateShadow(),this.setShadowIntensity(this.shadowIntensity),this.setGroundedSkybox()}reset(){this.url=null,this.renderCount=0,this.queueRender(),this.shadow!=null&&this.shadow.setIntensity(0),this.bakedShadows.clear();const{_model:e}=this;e!=null&&(e.removeFromParent(),this._model=null);const t=this._currentGLTF;t!=null&&(t.dispose(),this._currentGLTF=null),this.currentAnimationAction!=null&&(this.currentAnimationAction.stop(),this.currentAnimationAction=null),this.mixer.stopAllAction(),this.mixer.uncacheRoot(this)}dispose(){this.reset(),this.shadow!=null&&(this.shadow.dispose(),this.shadow=null),this.element[ig]=null,this.element[sg]=null,this.element[hl]=null}get currentGLTF(){return this._currentGLTF}setSize(e,t){if(!(this.width===e&&this.height===t)){if(this.width=Math.max(e,1),this.height=Math.max(t,1),this.annotationRenderer.setSize(e,t),this.aspect=this.width/this.height,this.externalRenderer!=null){const n=window.devicePixelRatio;this.externalRenderer.resize(e*n,t*n)}this.queueRender()}}markBakedShadow(e){e.userData.noHit=!0,this.bakedShadows.add(e)}unmarkBakedShadow(e){e.userData.noHit=!1,e.visible=!0,this.bakedShadows.delete(e),this.boundingBox.expandByObject(e)}findBakedShadows(e){const t=new Rn;e.traverse(n=>{const s=n;if(!s.material||!s.material.transparent)return;t.setFromObject(s);const a=t.getSize(iJ),o=Math.min(a.x,a.y,a.z);Math.max(a.x,a.y,a.z)<_0*o||this.markBakedShadow(s)})}checkBakedShadows(){const{min:e,max:t}=this.boundingBox,n=new Rn;this.boundingBox.getSize(this.size);for(const s of this.bakedShadows)n.setFromObject(s),!(n.min.y<e.y+this.size.y/_0&&n.min.x<=e.x&&n.max.x>=t.x&&n.min.z<=e.z&&n.max.z>=t.z)&&(n.min.z<e.z+this.size.z/_0&&n.min.x<=e.x&&n.max.x>=t.x&&n.min.y<=e.y&&n.max.y>=t.y||this.unmarkBakedShadow(s))}applyTransform(){const{model:e}=this;if(e==null)return;const t=Ma(this.element.orientation)[0].terms,n=Sr(t[0]).number,s=Sr(t[1]).number,r=Sr(t[2]).number;e.quaternion.setFromEuler(new Zi(s,r,n,"YXZ"));const a=Ma(this.element.scale)[0].terms;e.scale.set(a[0].number,a[1].number,a[2].number)}updateBoundingBox(){const{model:e}=this;if(e==null)return;this.target.remove(e),this.findBakedShadows(e);const t=(n,s)=>n.expandByPoint(s);this.setBakedShadowVisibility(!1),this.boundingBox=$p(e,t,new Rn),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach(n=>this.unmarkBakedShadow(n)),this.boundingBox=$p(e,t,new Rn)),this.checkBakedShadows(),this.setBakedShadowVisibility(),this.boundingBox.getSize(this.size),this.target.add(e)}async updateFraming(){const{model:e}=this;if(e==null)return;this.target.remove(e),this.setBakedShadowVisibility(!1);const{center:t}=this.boundingSphere;this.element.requestUpdate("cameraTarget"),await this.element.updateComplete,t.copy(this.getTarget());const n=(r,a)=>Math.max(r,t.distanceToSquared(a));this.boundingSphere.radius=Math.sqrt($p(e,n,0));const s=(r,a)=>{a.sub(t);const o=Math.sqrt(a.x*a.x+a.z*a.z);return Math.max(r,o/(this.idealCameraDistance()-Math.abs(a.y)))};this.idealAspect=$p(e,s,0)/Math.tan(this.framedFoVDeg/2*Math.PI/180),this.setBakedShadowVisibility(),this.target.add(e)}setBakedShadowVisibility(e=this.shadowIntensity<=0){for(const t of this.bakedShadows)t.visible=e}idealCameraDistance(){const e=this.framedFoVDeg/2*Math.PI/180;return this.boundingSphere.radius/Math.sin(e)}adjustedFoV(e){const t=Math.tan(e/2*Math.PI/180)*Math.max(1,this.idealAspect/this.aspect);return 2*Math.atan(t)*180/Math.PI}getNDC(e,t){if(this.xrCamera!=null)pd.set(e/window.screen.width,t/window.screen.height);else{const n=this.element.getBoundingClientRect();pd.set((e-n.x)/this.width,(t-n.y)/this.height)}return pd.multiplyScalar(2).subScalar(1),pd.y*=-1,pd}getSize(){return{width:this.width,height:this.height}}setEnvironmentAndSkybox(e,t){this.element[Vt].arRenderer.presentedScene!==this&&(this.environment=e,this.setBackground(t),this.queueRender())}setBackground(e){this.groundedSkybox.map=e,this.groundedSkybox.isUsable()?(this.target.add(this.groundedSkybox),this.background=null):(this.target.remove(this.groundedSkybox),this.background=e)}farRadius(){return this.boundingSphere.radius*(this.groundedSkybox.parent!=null?_T:1)}setGroundedSkybox(){const e=Ma(this.element.skyboxHeight)[0].terms[0],t=Sr(e).number,n=_T*this.boundingSphere.radius;this.groundedSkybox.updateGeometry(t,n),this.groundedSkybox.position.y=t-(this.shadow?2*this.shadow.gap():0),this.setBackground(this.groundedSkybox.map)}setTarget(e,t,n){this.goalTarget.set(-e,-t,-n)}setTargetDamperDecayTime(e){this.targetDamperX.setDecayTime(e),this.targetDamperY.setDecayTime(e),this.targetDamperZ.setDecayTime(e)}getTarget(){return this.goalTarget.clone().multiplyScalar(-1)}getDynamicTarget(){return this.target.position.clone().multiplyScalar(-1)}jumpToGoal(){this.updateTarget(YD)}updateTarget(e){const t=this.goalTarget,n=this.target.position;if(t.equals(n))return!1;{const s=this.boundingSphere.radius/10;let{x:r,y:a,z:o}=n;return r=this.targetDamperX.update(r,t.x,e,s),a=this.targetDamperY.update(a,t.y,e,s),o=this.targetDamperZ.update(o,t.z,e,s),this.groundedSkybox.position.x=-r,this.groundedSkybox.position.z=-o,this.target.position.set(r,a,o),this.target.updateMatrixWorld(),this.queueRender(),!0}}pointTowards(e,t){const{x:n,z:s}=this.position;this.yaw=Math.atan2(e-n,t-s)}get model(){return this._model}set yaw(e){this.pivot.rotation.y=e,this.groundedSkybox.rotation.y=-e,this.queueRender()}get yaw(){return this.pivot.rotation.y}set animationTime(e){this.mixer.setTime(e),this.queueShadowRender()}get animationTime(){if(this.currentAnimationAction!=null){const e=Math.max(this.currentAnimationAction._loopCount,0);return this.currentAnimationAction.loop===vg&&(e&1)===1?this.duration-this.currentAnimationAction.time:this.currentAnimationAction.time}return 0}set animationTimeScale(e){this.mixer.timeScale=e}get animationTimeScale(){return this.mixer.timeScale}get duration(){return this.currentAnimationAction!=null&&this.currentAnimationAction.getClip()?this.currentAnimationAction.getClip().duration:0}get hasActiveAnimation(){return this.currentAnimationAction!=null}playAnimation(e=null,t=0,n=Dl,s=1/0){if(this._currentGLTF==null)return;const{animations:r}=this;if(r==null||r.length===0)return;let a=null;if(e!=null&&(a=this.animationsByName.get(e),a==null)){const o=parseInt(e);!isNaN(o)&&o>=0&&o<r.length&&(a=r[o])}a==null&&(a=r[0]);try{const{currentAnimationAction:o}=this,l=this.mixer.clipAction(a,this);this.currentAnimationAction=l,this.element.paused?this.mixer.stopAllAction():(l.paused=!1,o!=null&&l!==o?l.crossFadeFrom(o,t,!1):this.animationTimeScale>0&&this.animationTime==this.duration&&(this.animationTime=0)),l.setLoop(n,s),l.enabled=!0,l.clampWhenFinished=!0,l.play()}catch(o){console.error(o)}}appendAnimation(e="",t=Dl,n=1/0,s=1,r=1,a=!1,o=!1,l=!0,c=null,u=!1){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:h}=this;if(h==null||h.length===0)return;const d=e?this.animationsByName.get(e):null;if(d==null)return;if(typeof n=="string"?isNaN(parseFloat(n))?(n=1/0,console.warn(`Invalid repetitionCount value: ${n}. Using default: Infinity`)):(parseInt(n)<1&&console.warn(`Invalid repetitionCount value: ${n}. Using 1 as minimum.`),n=Math.max(parseInt(n),1)):typeof n=="number"&&n<1?(n=1,console.warn(`Invalid repetitionCount value: ${n}. Using 1 value as minimum.`)):console.warn(`Invalid repetitionCount value: ${n}. Using default: Infinity`),n===1&&t!==Qh&&(t=Qh),typeof s=="string"){const y=parseFloat(s);isNaN(y)||y<0||y>1?(s=1,console.warn(`Invalid weight value: ${s}. Using default: 1`)):s=y}if(typeof r=="string"){const y=parseFloat(r);isNaN(y)||y<0?(r=1,console.warn(`Invalid timeScale value: ${r}. Using default: 1`)):r=y}if(typeof c=="string"){const y=parseFloat(c);isNaN(y)?(c=null,console.warn(`Invalid time value: ${c}. Using default: 0 or previous time`)):c=y}const{shouldFade:A,duration:p}=this.parseFadeValue(a,!1,1.25),g=1.25;let m=!1,f=0;typeof o=="boolean"?(m=o,f=o?g:0):typeof o=="number"?(m=o>0,f=Math.max(o,0),o<0&&console.warn(`Invalid warp value: ${o}. Using default: false`)):typeof o=="string"&&(o.toLowerCase().trim()==="true"?(m=!0,f=g):o.toLowerCase().trim()==="false"?m=!1:isNaN(parseFloat(o))?console.warn(`Invalid warp value: ${o}. Using default: false`):(f=Math.max(parseFloat(o),0),m=f>0,f<=0&&console.warn(`Invalid warp value: ${o}. Using default: false`)));try{const y=this.mixer.existingAction(d)||this.mixer.clipAction(d,this),_=y.timeScale;u&&this.appendedAnimations.includes(e)&&(this.markedAnimations.map(E=>E.name).includes(e)||this.markedAnimations.push({name:e,loopMode:t,repetitionCount:n})),typeof c=="number"&&(y.time=Math.min(Math.max(c,0),d.duration)),A?y.fadeIn(p):s>=0&&(y.weight=Math.min(Math.max(s,0),1)),m?y.warp(l?_:0,r,f):y.timeScale=r,y.isRunning()||(y.time==d.duration&&y.stop(),y.setLoop(t,n),y.paused=!1,y.enabled=!0,y.clampWhenFinished=!0,y.play()),this.appendedAnimations.includes(e)||this.element[ye].appendedAnimations.push(e)}catch(y){console.error(y)}}parseFadeValue(e,t=!0,n=1.5){const s=r=>r.toLowerCase().trim();if(typeof e=="boolean")return{shouldFade:e,duration:e?n:0};if(typeof e=="number"){const r=Math.max(e,0);return{shouldFade:r>0,duration:r}}if(typeof e=="string"){const r=s(e);if(r==="true")return{shouldFade:!0,duration:n};if(r==="false")return{shouldFade:!1,duration:0};const a=parseFloat(r);if(!isNaN(a)){const o=Math.max(a,0);return{shouldFade:o>0,duration:o}}}return console.warn(`Invalid fade value: ${e}. Using default: ${t}`),{shouldFade:t,duration:t?n:0}}detachAnimation(e="",t=!0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:n}=this;if(n==null||n.length===0)return;const s=e?this.animationsByName.get(e):null;if(s==null)return;const{shouldFade:r,duration:a}=this.parseFadeValue(t,!0,1.5);try{const o=this.mixer.existingAction(s)||this.mixer.clipAction(s,this);r?o.fadeOut(a):o.stop(),this.element[ye].appendedAnimations=this.element[ye].appendedAnimations.filter(l=>l!==e)}catch(o){console.error(o)}}updateAnimationLoop(e="",t=Dl,n=1/0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:s}=this;if(s==null||s.length===0)return;let r=null;if(e&&(r=this.animationsByName.get(e)),r!=null)try{const a=this.mixer.existingAction(r)||this.mixer.clipAction(r,this);a.stop(),a.setLoop(t,n),a.play()}catch(a){console.error(a)}}stopAnimation(){this.currentAnimationAction=null,this.mixer.stopAllAction()}updateAnimation(e){this.mixer.update(e),this.queueShadowRender()}subscribeMixerEvent(e,t){this.mixer.addEventListener(e,t)}updateShadow(){const e=this.shadow;if(e!=null){const t=this.element.arPlacement==="wall"?"back":"bottom";e.setScene(this,this.shadowSoftness,t),e.needsUpdate=!0}}renderShadow(e){const t=this.shadow;t!=null&&t.needsUpdate==!0&&(t.render(e,this),t.needsUpdate=!1)}queueShadowRender(){this.shadow!=null&&(this.shadow.needsUpdate=!0)}setShadowIntensity(e){if(this.shadowIntensity=e,this._currentGLTF!=null&&(this.setBakedShadowVisibility(),!(e<=0&&this.shadow==null))){if(this.shadow==null){const t=this.element.arPlacement==="wall"?"back":"bottom";this.shadow=new nJ(this,this.shadowSoftness,t)}this.shadow.setIntensity(e)}}setShadowSoftness(e){this.shadowSoftness=e;const t=this.shadow;t?.setSoftness(e)}setShadowOffset(e){const t=this.shadow;t?.setOffset(e)}getHit(e=this){return If.intersectObject(e,!0).find(n=>n.object.visible&&!n.object.userData.noHit)}hitFromController(e,t=this){return If.setFromXRController(e),this.getHit(t)}hitFromPoint(e,t=this){return If.setFromCamera(e,this.getCamera()),this.getHit(t)}positionAndNormalFromPoint(e,t=this){var n;const s=this.hitFromPoint(e,t);if(s==null)return null;const r=s.point,a=s.face!=null?s.face.normal.clone().applyNormalMatrix(new pt().getNormalMatrix(s.object.matrixWorld)):If.ray.direction.clone().multiplyScalar(-1),o=(n=s.uv)!==null&&n!==void 0?n:null;return{position:r,normal:a,uv:o}}surfaceFromPoint(e,t=this){const n=this.element.model;if(n==null)return null;const s=this.hitFromPoint(e,t);if(s==null||s.face==null)return null;const r=n[Iv](s),{meshes:a,primitives:o}=r.mesh.userData.associations,l=new Q,c=new Q,u=new Q,{a:h,b:d,c:A}=s.face,p=s.object;p.getVertexPosition(h,l),p.getVertexPosition(d,c),p.getVertexPosition(A,u);const g=new ps(l,c,u),m=new Q;return g.getBarycoord(p.worldToLocal(s.point),m),`${a} ${o} ${h} ${d} ${A} ${m.x.toFixed(3)} ${m.y.toFixed(3)} ${m.z.toFixed(3)}`}addHotspot(e){this.target.add(e),this.annotationRenderer.domElement.appendChild(e.element),this.updateSurfaceHotspot(e)}removeHotspot(e){this.target.remove(e)}forHotspots(e){const{children:t}=this.target;for(let n=0,s=t.length;n<s;n++){const r=t[n];r instanceof bQ&&e(r)}}updateSurfaceHotspot(e){if(e.surface==null||this.element.model==null)return;const t=Ma(e.surface)[0].terms;if(t.length!=8){console.warn(e.surface+" does not have exactly 8 numbers.");return}const n=this.element.model[vQ](t[0].number,t[1].number);if(n==null){console.warn(e.surface+" does not match a node/primitive in this glTF! Skipping this hotspot.");return}const s=n.mesh.geometry.attributes.position.count,r=new Q(t[2].number,t[3].number,t[4].number);if(r.x>=s||r.y>=s||r.z>=s){console.warn(e.surface+" vertex indices out of range in this glTF! Skipping this hotspot.");return}const a=new Q(t[5].number,t[6].number,t[7].number);e.mesh=n.mesh,e.tri=r,e.bary=a,e.updateSurface()}animateSurfaceHotspots(){this.element.paused||this.forHotspots(e=>{e.updateSurface()})}updateHotspotsVisibility(e){this.forHotspots(t=>{E0.copy(e),ET.setFromMatrixPosition(t.matrixWorld),E0.sub(ET),vT.copy(t.normal).transformDirection(this.target.matrixWorld),E0.dot(vT)<0?t.hide():t.show()})}orientHotspots(e){this.forHotspots(t=>{t.orient(e)})}setHotspotsVisibility(e){this.forHotspots(t=>{t.visible=e})}updateSchema(e){var t;const{schemaElement:n,element:s}=this,{alt:r,poster:a,iosSrc:o}=s;if(e!=null){const l=[{"@type":"MediaObject",contentUrl:e,encodingFormat:((t=e.split(".").pop())===null||t===void 0?void 0:t.toLowerCase())==="gltf"?"model/gltf+json":"model/gltf-binary"}];o&&l.push({"@type":"MediaObject",contentUrl:o,encodingFormat:"model/vnd.usdz+zip"});const c={"@context":"http://schema.org/","@type":"3DModel",image:a??void 0,name:r??void 0,encoding:l};n.textContent=JSON.stringify(c),document.head.appendChild(n)}else n.parentElement!=null&&n.parentElement.removeChild(n)}}/* @license
|
|
17357
|
+
*/const _T=10,__=100,E_=new Q,ET=new Q,vT=new Q,If=new bb,iJ=new Q,pd=new pe;class sJ extends Bo{constructor({canvas:e,element:t,width:n,height:s}){super(),this.annotationRenderer=new c2,this.effectRenderer=null,this.schemaElement=document.createElement("script"),this.width=1,this.height=1,this.aspect=1,this.scaleStep=0,this.renderCount=0,this.externalRenderer=null,this.appendedAnimations=[],this.markedAnimations=[],this.camera=new $n(45,1,.1,100),this.xrCamera=null,this.url=null,this.pivot=new Rt,this.target=new Rt,this.animationNames=[],this.boundingBox=new Rn,this.boundingSphere=new es,this.size=new Q,this.idealAspect=0,this.framedFoVDeg=0,this.shadow=null,this.shadowIntensity=0,this.shadowSoftness=1,this.bakedShadows=new Set,this.exposure=1,this.toneMapping=Bh,this.canScale=!0,this.isDirty=!1,this.goalTarget=new Q,this.targetDamperX=new mi,this.targetDamperY=new mi,this.targetDamperZ=new mi,this._currentGLTF=null,this._model=null,this.cancelPendingSourceChange=null,this.animationsByName=new Map,this.currentAnimationAction=null,this.groundedSkybox=new KX,this.name="ModelScene",this.element=t,this.canvas=e,this.camera=new $n(45,1,.1,100),this.camera.name="MainCamera",this.add(this.pivot),this.pivot.name="Pivot",this.pivot.add(this.target),this.setSize(n,s),this.target.name="Target",this.mixer=new XM(this.target);const{domElement:r}=this.annotationRenderer,{style:a}=r;a.display="none",a.pointerEvents="none",a.position="absolute",a.top="0",this.element.shadowRoot.querySelector(".default").appendChild(r),this.schemaElement.setAttribute("type","application/ld+json")}get context(){return this.canvas.getContext("2d")}getCamera(){return this.xrCamera!=null?this.xrCamera:this.camera}queueRender(){this.isDirty=!0}shouldRender(){return this.isDirty}hasRendered(){this.isDirty=!1}forceRescale(){this.scaleStep=-1,this.queueRender()}async setObject(e){this.reset(),this._model=e,this.target.add(e),await this.setupScene()}async setSource(e,t=()=>{}){if(!e||e===this.url){t(1);return}if(this.reset(),this.url=e,this.externalRenderer!=null){const o=await this.externalRenderer.load(t);this.boundingSphere.radius=o.framedRadius,this.idealAspect=o.fieldOfViewAspect;return}this.cancelPendingSourceChange!=null&&(this.cancelPendingSourceChange(),this.cancelPendingSourceChange=null);let n;try{n=await new Promise((o,l)=>{this.cancelPendingSourceChange=()=>l(),(async()=>{try{const c=await this.element[Vt].loader.load(e,this.element,t);o(c)}catch(c){l(c)}})()})}catch(o){if(o==null)return;throw o}this.cancelPendingSourceChange=null,this.reset(),this.url=e,this._currentGLTF=n,n!=null&&(this._model=n.scene,this.target.add(n.scene));const{animations:s}=n,r=new Map,a=[];for(const o of s)r.set(o.name,o),a.push(o.name);this.animations=s,this.animationsByName=r,this.animationNames=a,await this.setupScene()}async setupScene(){this.applyTransform(),this.updateBoundingBox(),await this.updateFraming(),this.updateShadow(),this.setShadowIntensity(this.shadowIntensity),this.setGroundedSkybox()}reset(){this.url=null,this.renderCount=0,this.queueRender(),this.shadow!=null&&this.shadow.setIntensity(0),this.bakedShadows.clear();const{_model:e}=this;e!=null&&(e.removeFromParent(),this._model=null);const t=this._currentGLTF;t!=null&&(t.dispose(),this._currentGLTF=null),this.currentAnimationAction!=null&&(this.currentAnimationAction.stop(),this.currentAnimationAction=null),this.mixer.stopAllAction(),this.mixer.uncacheRoot(this)}dispose(){this.reset(),this.shadow!=null&&(this.shadow.dispose(),this.shadow=null),this.element[ig]=null,this.element[sg]=null,this.element[hl]=null}get currentGLTF(){return this._currentGLTF}setSize(e,t){if(!(this.width===e&&this.height===t)){if(this.width=Math.max(e,1),this.height=Math.max(t,1),this.annotationRenderer.setSize(e,t),this.aspect=this.width/this.height,this.externalRenderer!=null){const n=window.devicePixelRatio;this.externalRenderer.resize(e*n,t*n)}this.queueRender()}}markBakedShadow(e){e.userData.noHit=!0,this.bakedShadows.add(e)}unmarkBakedShadow(e){e.userData.noHit=!1,e.visible=!0,this.bakedShadows.delete(e),this.boundingBox.expandByObject(e)}findBakedShadows(e){const t=new Rn;e.traverse(n=>{const s=n;if(!s.material||!s.material.transparent)return;t.setFromObject(s);const a=t.getSize(iJ),o=Math.min(a.x,a.y,a.z);Math.max(a.x,a.y,a.z)<__*o||this.markBakedShadow(s)})}checkBakedShadows(){const{min:e,max:t}=this.boundingBox,n=new Rn;this.boundingBox.getSize(this.size);for(const s of this.bakedShadows)n.setFromObject(s),!(n.min.y<e.y+this.size.y/__&&n.min.x<=e.x&&n.max.x>=t.x&&n.min.z<=e.z&&n.max.z>=t.z)&&(n.min.z<e.z+this.size.z/__&&n.min.x<=e.x&&n.max.x>=t.x&&n.min.y<=e.y&&n.max.y>=t.y||this.unmarkBakedShadow(s))}applyTransform(){const{model:e}=this;if(e==null)return;const t=Ma(this.element.orientation)[0].terms,n=Sr(t[0]).number,s=Sr(t[1]).number,r=Sr(t[2]).number;e.quaternion.setFromEuler(new Zi(s,r,n,"YXZ"));const a=Ma(this.element.scale)[0].terms;e.scale.set(a[0].number,a[1].number,a[2].number)}updateBoundingBox(){const{model:e}=this;if(e==null)return;this.target.remove(e),this.findBakedShadows(e);const t=(n,s)=>n.expandByPoint(s);this.setBakedShadowVisibility(!1),this.boundingBox=$p(e,t,new Rn),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach(n=>this.unmarkBakedShadow(n)),this.boundingBox=$p(e,t,new Rn)),this.checkBakedShadows(),this.setBakedShadowVisibility(),this.boundingBox.getSize(this.size),this.target.add(e)}async updateFraming(){const{model:e}=this;if(e==null)return;this.target.remove(e),this.setBakedShadowVisibility(!1);const{center:t}=this.boundingSphere;this.element.requestUpdate("cameraTarget"),await this.element.updateComplete,t.copy(this.getTarget());const n=(r,a)=>Math.max(r,t.distanceToSquared(a));this.boundingSphere.radius=Math.sqrt($p(e,n,0));const s=(r,a)=>{a.sub(t);const o=Math.sqrt(a.x*a.x+a.z*a.z);return Math.max(r,o/(this.idealCameraDistance()-Math.abs(a.y)))};this.idealAspect=$p(e,s,0)/Math.tan(this.framedFoVDeg/2*Math.PI/180),this.setBakedShadowVisibility(),this.target.add(e)}setBakedShadowVisibility(e=this.shadowIntensity<=0){for(const t of this.bakedShadows)t.visible=e}idealCameraDistance(){const e=this.framedFoVDeg/2*Math.PI/180;return this.boundingSphere.radius/Math.sin(e)}adjustedFoV(e){const t=Math.tan(e/2*Math.PI/180)*Math.max(1,this.idealAspect/this.aspect);return 2*Math.atan(t)*180/Math.PI}getNDC(e,t){if(this.xrCamera!=null)pd.set(e/window.screen.width,t/window.screen.height);else{const n=this.element.getBoundingClientRect();pd.set((e-n.x)/this.width,(t-n.y)/this.height)}return pd.multiplyScalar(2).subScalar(1),pd.y*=-1,pd}getSize(){return{width:this.width,height:this.height}}setEnvironmentAndSkybox(e,t){this.element[Vt].arRenderer.presentedScene!==this&&(this.environment=e,this.setBackground(t),this.queueRender())}setBackground(e){this.groundedSkybox.map=e,this.groundedSkybox.isUsable()?(this.target.add(this.groundedSkybox),this.background=null):(this.target.remove(this.groundedSkybox),this.background=e)}farRadius(){return this.boundingSphere.radius*(this.groundedSkybox.parent!=null?_T:1)}setGroundedSkybox(){const e=Ma(this.element.skyboxHeight)[0].terms[0],t=Sr(e).number,n=_T*this.boundingSphere.radius;this.groundedSkybox.updateGeometry(t,n),this.groundedSkybox.position.y=t-(this.shadow?2*this.shadow.gap():0),this.setBackground(this.groundedSkybox.map)}setTarget(e,t,n){this.goalTarget.set(-e,-t,-n)}setTargetDamperDecayTime(e){this.targetDamperX.setDecayTime(e),this.targetDamperY.setDecayTime(e),this.targetDamperZ.setDecayTime(e)}getTarget(){return this.goalTarget.clone().multiplyScalar(-1)}getDynamicTarget(){return this.target.position.clone().multiplyScalar(-1)}jumpToGoal(){this.updateTarget(YD)}updateTarget(e){const t=this.goalTarget,n=this.target.position;if(t.equals(n))return!1;{const s=this.boundingSphere.radius/10;let{x:r,y:a,z:o}=n;return r=this.targetDamperX.update(r,t.x,e,s),a=this.targetDamperY.update(a,t.y,e,s),o=this.targetDamperZ.update(o,t.z,e,s),this.groundedSkybox.position.x=-r,this.groundedSkybox.position.z=-o,this.target.position.set(r,a,o),this.target.updateMatrixWorld(),this.queueRender(),!0}}pointTowards(e,t){const{x:n,z:s}=this.position;this.yaw=Math.atan2(e-n,t-s)}get model(){return this._model}set yaw(e){this.pivot.rotation.y=e,this.groundedSkybox.rotation.y=-e,this.queueRender()}get yaw(){return this.pivot.rotation.y}set animationTime(e){this.mixer.setTime(e),this.queueShadowRender()}get animationTime(){if(this.currentAnimationAction!=null){const e=Math.max(this.currentAnimationAction._loopCount,0);return this.currentAnimationAction.loop===vg&&(e&1)===1?this.duration-this.currentAnimationAction.time:this.currentAnimationAction.time}return 0}set animationTimeScale(e){this.mixer.timeScale=e}get animationTimeScale(){return this.mixer.timeScale}get duration(){return this.currentAnimationAction!=null&&this.currentAnimationAction.getClip()?this.currentAnimationAction.getClip().duration:0}get hasActiveAnimation(){return this.currentAnimationAction!=null}playAnimation(e=null,t=0,n=Dl,s=1/0){if(this._currentGLTF==null)return;const{animations:r}=this;if(r==null||r.length===0)return;let a=null;if(e!=null&&(a=this.animationsByName.get(e),a==null)){const o=parseInt(e);!isNaN(o)&&o>=0&&o<r.length&&(a=r[o])}a==null&&(a=r[0]);try{const{currentAnimationAction:o}=this,l=this.mixer.clipAction(a,this);this.currentAnimationAction=l,this.element.paused?this.mixer.stopAllAction():(l.paused=!1,o!=null&&l!==o?l.crossFadeFrom(o,t,!1):this.animationTimeScale>0&&this.animationTime==this.duration&&(this.animationTime=0)),l.setLoop(n,s),l.enabled=!0,l.clampWhenFinished=!0,l.play()}catch(o){console.error(o)}}appendAnimation(e="",t=Dl,n=1/0,s=1,r=1,a=!1,o=!1,l=!0,c=null,u=!1){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:h}=this;if(h==null||h.length===0)return;const d=e?this.animationsByName.get(e):null;if(d==null)return;if(typeof n=="string"?isNaN(parseFloat(n))?(n=1/0,console.warn(`Invalid repetitionCount value: ${n}. Using default: Infinity`)):(parseInt(n)<1&&console.warn(`Invalid repetitionCount value: ${n}. Using 1 as minimum.`),n=Math.max(parseInt(n),1)):typeof n=="number"&&n<1?(n=1,console.warn(`Invalid repetitionCount value: ${n}. Using 1 value as minimum.`)):console.warn(`Invalid repetitionCount value: ${n}. Using default: Infinity`),n===1&&t!==Qh&&(t=Qh),typeof s=="string"){const y=parseFloat(s);isNaN(y)||y<0||y>1?(s=1,console.warn(`Invalid weight value: ${s}. Using default: 1`)):s=y}if(typeof r=="string"){const y=parseFloat(r);isNaN(y)||y<0?(r=1,console.warn(`Invalid timeScale value: ${r}. Using default: 1`)):r=y}if(typeof c=="string"){const y=parseFloat(c);isNaN(y)?(c=null,console.warn(`Invalid time value: ${c}. Using default: 0 or previous time`)):c=y}const{shouldFade:A,duration:p}=this.parseFadeValue(a,!1,1.25),g=1.25;let m=!1,f=0;typeof o=="boolean"?(m=o,f=o?g:0):typeof o=="number"?(m=o>0,f=Math.max(o,0),o<0&&console.warn(`Invalid warp value: ${o}. Using default: false`)):typeof o=="string"&&(o.toLowerCase().trim()==="true"?(m=!0,f=g):o.toLowerCase().trim()==="false"?m=!1:isNaN(parseFloat(o))?console.warn(`Invalid warp value: ${o}. Using default: false`):(f=Math.max(parseFloat(o),0),m=f>0,f<=0&&console.warn(`Invalid warp value: ${o}. Using default: false`)));try{const y=this.mixer.existingAction(d)||this.mixer.clipAction(d,this),_=y.timeScale;u&&this.appendedAnimations.includes(e)&&(this.markedAnimations.map(E=>E.name).includes(e)||this.markedAnimations.push({name:e,loopMode:t,repetitionCount:n})),typeof c=="number"&&(y.time=Math.min(Math.max(c,0),d.duration)),A?y.fadeIn(p):s>=0&&(y.weight=Math.min(Math.max(s,0),1)),m?y.warp(l?_:0,r,f):y.timeScale=r,y.isRunning()||(y.time==d.duration&&y.stop(),y.setLoop(t,n),y.paused=!1,y.enabled=!0,y.clampWhenFinished=!0,y.play()),this.appendedAnimations.includes(e)||this.element[ye].appendedAnimations.push(e)}catch(y){console.error(y)}}parseFadeValue(e,t=!0,n=1.5){const s=r=>r.toLowerCase().trim();if(typeof e=="boolean")return{shouldFade:e,duration:e?n:0};if(typeof e=="number"){const r=Math.max(e,0);return{shouldFade:r>0,duration:r}}if(typeof e=="string"){const r=s(e);if(r==="true")return{shouldFade:!0,duration:n};if(r==="false")return{shouldFade:!1,duration:0};const a=parseFloat(r);if(!isNaN(a)){const o=Math.max(a,0);return{shouldFade:o>0,duration:o}}}return console.warn(`Invalid fade value: ${e}. Using default: ${t}`),{shouldFade:t,duration:t?n:0}}detachAnimation(e="",t=!0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:n}=this;if(n==null||n.length===0)return;const s=e?this.animationsByName.get(e):null;if(s==null)return;const{shouldFade:r,duration:a}=this.parseFadeValue(t,!0,1.5);try{const o=this.mixer.existingAction(s)||this.mixer.clipAction(s,this);r?o.fadeOut(a):o.stop(),this.element[ye].appendedAnimations=this.element[ye].appendedAnimations.filter(l=>l!==e)}catch(o){console.error(o)}}updateAnimationLoop(e="",t=Dl,n=1/0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:s}=this;if(s==null||s.length===0)return;let r=null;if(e&&(r=this.animationsByName.get(e)),r!=null)try{const a=this.mixer.existingAction(r)||this.mixer.clipAction(r,this);a.stop(),a.setLoop(t,n),a.play()}catch(a){console.error(a)}}stopAnimation(){this.currentAnimationAction=null,this.mixer.stopAllAction()}updateAnimation(e){this.mixer.update(e),this.queueShadowRender()}subscribeMixerEvent(e,t){this.mixer.addEventListener(e,t)}updateShadow(){const e=this.shadow;if(e!=null){const t=this.element.arPlacement==="wall"?"back":"bottom";e.setScene(this,this.shadowSoftness,t),e.needsUpdate=!0}}renderShadow(e){const t=this.shadow;t!=null&&t.needsUpdate==!0&&(t.render(e,this),t.needsUpdate=!1)}queueShadowRender(){this.shadow!=null&&(this.shadow.needsUpdate=!0)}setShadowIntensity(e){if(this.shadowIntensity=e,this._currentGLTF!=null&&(this.setBakedShadowVisibility(),!(e<=0&&this.shadow==null))){if(this.shadow==null){const t=this.element.arPlacement==="wall"?"back":"bottom";this.shadow=new nJ(this,this.shadowSoftness,t)}this.shadow.setIntensity(e)}}setShadowSoftness(e){this.shadowSoftness=e;const t=this.shadow;t?.setSoftness(e)}setShadowOffset(e){const t=this.shadow;t?.setOffset(e)}getHit(e=this){return If.intersectObject(e,!0).find(n=>n.object.visible&&!n.object.userData.noHit)}hitFromController(e,t=this){return If.setFromXRController(e),this.getHit(t)}hitFromPoint(e,t=this){return If.setFromCamera(e,this.getCamera()),this.getHit(t)}positionAndNormalFromPoint(e,t=this){var n;const s=this.hitFromPoint(e,t);if(s==null)return null;const r=s.point,a=s.face!=null?s.face.normal.clone().applyNormalMatrix(new pt().getNormalMatrix(s.object.matrixWorld)):If.ray.direction.clone().multiplyScalar(-1),o=(n=s.uv)!==null&&n!==void 0?n:null;return{position:r,normal:a,uv:o}}surfaceFromPoint(e,t=this){const n=this.element.model;if(n==null)return null;const s=this.hitFromPoint(e,t);if(s==null||s.face==null)return null;const r=n[Iv](s),{meshes:a,primitives:o}=r.mesh.userData.associations,l=new Q,c=new Q,u=new Q,{a:h,b:d,c:A}=s.face,p=s.object;p.getVertexPosition(h,l),p.getVertexPosition(d,c),p.getVertexPosition(A,u);const g=new ps(l,c,u),m=new Q;return g.getBarycoord(p.worldToLocal(s.point),m),`${a} ${o} ${h} ${d} ${A} ${m.x.toFixed(3)} ${m.y.toFixed(3)} ${m.z.toFixed(3)}`}addHotspot(e){this.target.add(e),this.annotationRenderer.domElement.appendChild(e.element),this.updateSurfaceHotspot(e)}removeHotspot(e){this.target.remove(e)}forHotspots(e){const{children:t}=this.target;for(let n=0,s=t.length;n<s;n++){const r=t[n];r instanceof bQ&&e(r)}}updateSurfaceHotspot(e){if(e.surface==null||this.element.model==null)return;const t=Ma(e.surface)[0].terms;if(t.length!=8){console.warn(e.surface+" does not have exactly 8 numbers.");return}const n=this.element.model[vQ](t[0].number,t[1].number);if(n==null){console.warn(e.surface+" does not match a node/primitive in this glTF! Skipping this hotspot.");return}const s=n.mesh.geometry.attributes.position.count,r=new Q(t[2].number,t[3].number,t[4].number);if(r.x>=s||r.y>=s||r.z>=s){console.warn(e.surface+" vertex indices out of range in this glTF! Skipping this hotspot.");return}const a=new Q(t[5].number,t[6].number,t[7].number);e.mesh=n.mesh,e.tri=r,e.bary=a,e.updateSurface()}animateSurfaceHotspots(){this.element.paused||this.forHotspots(e=>{e.updateSurface()})}updateHotspotsVisibility(e){this.forHotspots(t=>{E_.copy(e),ET.setFromMatrixPosition(t.matrixWorld),E_.sub(ET),vT.copy(t.normal).transformDirection(this.target.matrixWorld),E_.dot(vT)<0?t.hide():t.show()})}orientHotspots(e){this.forHotspots(t=>{t.orient(e)})}setHotspotsVisibility(e){this.forHotspots(t=>{t.visible=e})}updateSchema(e){var t;const{schemaElement:n,element:s}=this,{alt:r,poster:a,iosSrc:o}=s;if(e!=null){const l=[{"@type":"MediaObject",contentUrl:e,encodingFormat:((t=e.split(".").pop())===null||t===void 0?void 0:t.toLowerCase())==="gltf"?"model/gltf+json":"model/gltf-binary"}];o&&l.push({"@type":"MediaObject",contentUrl:o,encodingFormat:"model/vnd.usdz+zip"});const c={"@context":"http://schema.org/","@type":"3DModel",image:a??void 0,name:r??void 0,encoding:l};n.textContent=JSON.stringify(c),document.head.appendChild(n)}else n.parentElement!=null&&n.parentElement.removeChild(n)}}/* @license
|
|
17358
17358
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17359
17359
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17360
17360
|
* you may not use this file except in compliance with the License.
|
|
@@ -17380,7 +17380,7 @@ void main() {
|
|
|
17380
17380
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17381
17381
|
* See the License for the specific language governing permissions and
|
|
17382
17382
|
* limitations under the License.
|
|
17383
|
-
*/var km=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},bT,xT,CT,IT,wT,ST,BT,TT,MT,RT,DT,QT,LT;const aJ=10,oJ=50,lJ=0,cJ=300,hJ=150,vo=document.createElement("canvas"),
|
|
17383
|
+
*/var km=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},bT,xT,CT,IT,wT,ST,BT,TT,MT,RT,DT,QT,LT;const aJ=10,oJ=50,lJ=0,cJ=300,hJ=150,vo=document.createElement("canvas"),v_=Symbol("fallbackResizeHandler"),NT=Symbol("defaultAriaLabel"),wf=Symbol("resizeObserver"),Yc=Symbol("clearModelTimeout"),b_=Symbol("onContextLost"),qc=Symbol("loaded"),x_=Symbol("status"),C_=Symbol("onFocus"),I_=Symbol("onBlur"),th=Symbol("updateSize"),Sf=Symbol("intersectionObserver"),ul=Symbol("isElementInViewport"),Jg=Symbol("announceModelVisibility"),uh=Symbol("ariaLabel"),Sv=Symbol("altDefaulted"),fd=Symbol("statusElement"),Kg=Symbol("updateStatus"),kd=Symbol("loadedTime"),Ch=Symbol("updateSource"),PT=Symbol("markLoaded"),rg=Symbol("container"),ir=Symbol("input"),Bv=Symbol("canvas"),ye=Symbol("scene"),li=Symbol("needsRender"),Nr=Symbol("tick"),Pr=Symbol("onModelLoad"),Zg=Symbol("onResize"),Vt=Symbol("renderer"),ql=Symbol("progressTracker"),FT=Symbol("getLoaded"),Wl=Symbol("getModelIsVisible"),iu=Symbol("shouldAttemptPreload"),po=i=>({x:i.x,y:i.y,z:i.z,toString(){return`${this.x}m ${this.y}m ${this.z}m`}}),Tv=i=>({u:i.x,v:i.y,toString(){return`${this.u} ${this.v}`}});class ip extends pl{static get is(){return"model-viewer"}static set modelCacheSize(e){Ui[oo].evictionThreshold=e}static get modelCacheSize(){return Ui[oo].evictionThreshold}static set minimumRenderScale(e){e>1&&console.warn("<model-viewer> minimumRenderScale has been clamped to a maximum value of 1."),e<=0&&console.warn("<model-viewer> minimumRenderScale has been clamped to a minimum value of 0.25."),ks.singleton.minScale=e}static get minimumRenderScale(){return ks.singleton.minScale}get loaded(){return this[FT]()}get[(bT=ul,xT=qc,CT=kd,IT=x_,wT=Yc,ST=v_,BT=Jg,TT=wf,MT=Sf,RT=ql,Vt)](){return ks.singleton}get modelIsVisible(){return this[Wl]()}constructor(){super(),this.alt=null,this.src=null,this.withCredentials=!1,this.generateSchema=!1,this[bT]=!1,this[xT]=!1,this[CT]=0,this[IT]="",this[wT]=null,this[ST]=FS(()=>{const s=this.getBoundingClientRect();this[th](s)},oJ),this[BT]=FS(s=>{const r=this.modelIsVisible;r!==s&&this.dispatchEvent(new CustomEvent("model-visibility",{detail:{visible:r}}))},lJ),this[TT]=null,this[MT]=null,this[RT]=new rJ,this[DT]=()=>{this[fd].textContent=this[x_]},this[QT]=()=>{this[fd].textContent=""},this[LT]=s=>{this.dispatchEvent(new CustomEvent("error",{detail:{type:"webglcontextlost",sourceError:s.sourceEvent}}))},this.attachShadow({mode:"open"});const e=this.shadowRoot;hj(e),this[rg]=e.querySelector(".container"),this[ir]=e.querySelector(".userInput"),this[Bv]=e.querySelector("canvas"),this[fd]=e.querySelector("#status"),this[NT]=this[ir].getAttribute("aria-label");let t,n;if(this.isConnected){const s=this.getBoundingClientRect();t=s.width,n=s.height}else t=cJ,n=hJ;this[ye]=new sJ({canvas:this[Bv],element:this,width:t,height:n}),Promise.resolve().then(()=>{this[th](this.getBoundingClientRect())}),F0&&(this[wf]=new ResizeObserver(s=>{if(!this[Vt].isPresenting)for(let r of s)r.target===this&&this[th](r.contentRect)})),k0?this[Sf]=new IntersectionObserver(s=>{for(let r of s)if(r.target===this){const a=this.modelIsVisible;this[ul]=r.isIntersecting,this[Jg](a),this[ul]&&!this.loaded&&this[Ch]()}},{root:null,rootMargin:"0px",threshold:1e-5}):this[ul]=!0}connectedCallback(){super.connectedCallback&&super.connectedCallback(),F0?this[wf].observe(this):self.addEventListener("resize",this[v_]),k0&&this[Sf].observe(this),this.addEventListener("focus",this[C_]),this.addEventListener("blur",this[I_]);const e=this[Vt];e.addEventListener("contextlost",this[b_]),e.registerScene(this[ye]),this[Yc]!=null&&(self.clearTimeout(this[Yc]),this[Yc]=null,this.requestUpdate("src",null))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),F0?this[wf].unobserve(this):self.removeEventListener("resize",this[v_]),k0&&this[Sf].unobserve(this),this.removeEventListener("focus",this[C_]),this.removeEventListener("blur",this[I_]);const e=this[Vt];e.removeEventListener("contextlost",this[b_]),e.unregisterScene(this[ye]),this[Yc]=self.setTimeout(()=>{this[ye].dispose(),this[Yc]=null},aJ)}updated(e){super.updated(e),e.has("src")&&(this.src==null?(this[qc]=!1,this[kd]=0,this[ye].reset()):this.src!==this[ye].url&&(this[qc]=!1,this[kd]=0,this[Ch]())),e.has("alt")&&this[ir].setAttribute("aria-label",this[uh]),e.has("generateSchema")&&(this.generateSchema?this[ye].updateSchema(this.src):this[ye].updateSchema(null))}toDataURL(e,t){return this[Vt].displayCanvas(this[ye]).toDataURL(e,t)}async toBlob(e){const t=e?e.mimeType:void 0,n=e?e.qualityArgument:void 0,s=e?e.idealAspect:void 0,{width:r,height:a,idealAspect:o,aspect:l}=this[ye],{dpr:c,scaleFactor:u}=this[Vt];let h=r*u*c,d=a*u*c,A=0,p=0;if(s===!0)if(o>l){const g=d;d=Math.round(h/o),p=(g-d)/2}else{const g=h;h=Math.round(d*o),A=(g-h)/2}vo.width=h,vo.height=d;try{return new Promise(async(g,m)=>{vo.getContext("2d").drawImage(this[Vt].displayCanvas(this[ye]),A,p,h,d,0,0,h,d),vo.toBlob(f=>{if(!f)return m(new Error("Unable to retrieve canvas blob"));g(f)},t,n)})}finally{this[th]({width:r,height:a})}}registerEffectComposer(e){e.setRenderer(this[Vt].threeRenderer),e.setMainCamera(this[ye].getCamera()),e.setMainScene(this[ye]),this[ye].effectRenderer=e}unregisterEffectComposer(){this[ye].effectRenderer=null}registerRenderer(e){this[ye].externalRenderer=e}unregisterRenderer(){this[ye].externalRenderer=null}get[uh](){return this[Sv]}get[Sv](){return this.alt==null||this.alt==="null"?this[NT]:this.alt}[FT](){return this[qc]}[Wl](){return this.loaded&&this[ul]}[iu](){return!!this.src&&this[ul]}[th]({width:e,height:t}){e===0||t===0||(this[rg].style.width=`${e}px`,this[rg].style.height=`${t}px`,this[Zg]({width:e,height:t}))}[Nr](e,t){var n;(n=this[ye].effectRenderer)===null||n===void 0||n.beforeRender(e,t)}[PT](){this[qc]||(this[qc]=!0,this[kd]=performance.now())}[li](){this[ye].queueRender()}[Pr](){}[Kg](e){this[x_]=e;const t=this.getRootNode();t!=null&&t.activeElement===this&&this[fd].textContent!=e&&(this[fd].textContent=e)}[(DT=C_,QT=I_,Zg)](e){this[ye].setSize(e.width,e.height)}async[(LT=b_,Ch)](){const e=this[ye];if(this.loaded||!this[iu]()||this.src===e.url)return;this.generateSchema&&e.updateSchema(this.src),this[Kg]("Loading"),e.stopAnimation();const t=this[ql].beginActivity("model-load"),n=this.src;try{const s=e.setSource(n,a=>t(Ir(a,0,1)*.95)),r=this[Wg]();await Promise.all([s,r]),this[PT](),this[Pr](),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent("before-render"))}),await new Promise(a=>{const o=setTimeout(()=>{console.warn("rAF timed out in updateSource"),a()},500);requestAnimationFrame(()=>{requestAnimationFrame(()=>{clearTimeout(o),a()})})}),this.dispatchEvent(new CustomEvent("load",{detail:{url:n}}))}catch(s){this.dispatchEvent(new CustomEvent("error",{detail:{type:"loadfailure",sourceError:s}}))}finally{t(1)}}}km([H({type:String})],ip.prototype,"alt",void 0);km([H({type:String})],ip.prototype,"src",void 0);km([H({type:Boolean,attribute:"with-credentials"})],ip.prototype,"withCredentials",void 0);km([H({type:Boolean,attribute:"generate-schema"})],ip.prototype,"generateSchema",void 0);/* @license
|
|
17384
17384
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17385
17385
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17386
17386
|
* you may not use this file except in compliance with the License.
|
|
@@ -17393,7 +17393,7 @@ void main() {
|
|
|
17393
17393
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17394
17394
|
* See the License for the specific language governing permissions and
|
|
17395
17395
|
* limitations under the License.
|
|
17396
|
-
*/var
|
|
17396
|
+
*/var w_=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const kT=1e3,Bf=Symbol("changeAnimation"),UT=Symbol("appendAnimation"),OT=Symbol("detachAnimation"),hs=Symbol("paused"),uJ={repetitions:1/0,pingpong:!1},dJ={pingpong:!1,repetitions:null,weight:1,timeScale:1,fade:!1,warp:!1,relativeWarp:!0,time:null},AJ={fade:!0},pJ=i=>{var e;class t extends i{constructor(...s){super(s),this.autoplay=!1,this.animationName=void 0,this.animationCrossfadeDuration=300,this[e]=!0,this[ye].subscribeMixerEvent("loop",r=>{const a=r.action._loopCount,o=r.action._clip.name,l=r.action._clip.uuid,c=this[ye].markedAnimations.find(u=>u.name===o);if(c){this[ye].updateAnimationLoop(c.name,c.loopMode,c.repetitionCount);const u=this[ye].markedAnimations.filter(h=>h.name!==o);this[ye].markedAnimations=u}this.dispatchEvent(new CustomEvent("loop",{detail:{count:a,name:o,uuid:l}}))}),this[ye].subscribeMixerEvent("finished",r=>{if(!this[ye].appendedAnimations.includes(r.action._clip.name))this[hs]=!0;else{const a=this[ye].appendedAnimations.filter(o=>o!==r.action._clip.name);this[ye].appendedAnimations=a}this.dispatchEvent(new CustomEvent("finished"))})}get availableAnimations(){return this.loaded?this[ye].animationNames:[]}get duration(){return this[ye].duration}get paused(){return this[hs]}get currentTime(){return this[ye].animationTime}get appendedAnimations(){return this[ye].appendedAnimations}set currentTime(s){this[ye].animationTime=s,this[li]()}get timeScale(){return this[ye].animationTimeScale}set timeScale(s){this[ye].animationTimeScale=s}pause(){this[hs]||(this[hs]=!0,this.dispatchEvent(new CustomEvent("pause")))}play(s){this.availableAnimations.length>0&&(this[hs]=!1,this[Bf](s),this.dispatchEvent(new CustomEvent("play")))}appendAnimation(s,r){this.availableAnimations.length>0&&(this[hs]=!1,this[UT](s,r),this.dispatchEvent(new CustomEvent("append-animation")))}detachAnimation(s,r){this.availableAnimations.length>0&&(this[hs]=!1,this[OT](s,r),this.dispatchEvent(new CustomEvent("detach-animation")))}[(e=hs,Pr)](){super[Pr](),this[hs]=!0,this.animationName!=null&&this[Bf](),this.autoplay&&this.play()}[Nr](s,r){super[Nr](s,r),!(this[hs]||!this[Wl]()&&!this[Vt].isPresenting)&&(this[ye].updateAnimation(r/kT),this[li]())}updated(s){super.updated(s),s.has("autoplay")&&this.autoplay&&this.play(),s.has("animationName")&&this[Bf]()}[Bf](s=uJ){var r;const a=(r=s.repetitions)!==null&&r!==void 0?r:1/0,o=s.pingpong?vg:a===1?Qh:Dl;this[ye].playAnimation(this.animationName,this.animationCrossfadeDuration/kT,o,a),this[hs]&&(this[ye].updateAnimation(0),this[li]())}[UT](s="",r=dJ){var a;const o=(a=r.repetitions)!==null&&a!==void 0?a:1/0,l=r.pingpong?vg:o===1?Qh:Dl,c=!!r.repetitions||"pingpong"in r;this[ye].appendAnimation(s||this.animationName,l,o,r.weight,r.timeScale,r.fade,r.warp,r.relativeWarp,r.time,c),this[hs]&&(this[ye].updateAnimation(0),this[li]())}[OT](s="",r=AJ){this[ye].detachAnimation(s||this.animationName,r.fade),this[hs]&&(this[ye].updateAnimation(0),this[li]())}}return w_([H({type:Boolean})],t.prototype,"autoplay",void 0),w_([H({type:String,attribute:"animation-name"})],t.prototype,"animationName",void 0),w_([H({type:Number,attribute:"animation-crossfade-duration"})],t.prototype,"animationCrossfadeDuration",void 0),t};/* @license
|
|
17397
17397
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17398
17398
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17399
17399
|
* you may not use this file except in compliance with the License.
|
|
@@ -17406,7 +17406,7 @@ void main() {
|
|
|
17406
17406
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17407
17407
|
* See the License for the specific language governing permissions and
|
|
17408
17408
|
* limitations under the License.
|
|
17409
|
-
*/const nl=Symbol("hotspotMap"),
|
|
17409
|
+
*/const nl=Symbol("hotspotMap"),S_=Symbol("mutationCallback"),gd=Symbol("observer"),B_=Symbol("addHotspot"),GT=Symbol("removeHotspot"),T_=new We,fJ=i=>{var e,t,n;class s extends i{constructor(){super(...arguments),this[e]=new Map,this[t]=a=>{a.forEach(o=>{(!(o instanceof MutationRecord)||o.type==="childList")&&(o.addedNodes.forEach(l=>{this[B_](l)}),o.removedNodes.forEach(l=>{this[GT](l)}),this[li]())})},this[n]=new MutationObserver(this[S_])}connectedCallback(){super.connectedCallback();for(let o=0;o<this.children.length;++o)this[B_](this.children[o]);const{ShadyDOM:a}=self;a==null?this[gd].observe(this,{childList:!0}):this[gd]=a.observeChildren(this,this[S_])}disconnectedCallback(){super.disconnectedCallback();const{ShadyDOM:a}=self;a==null?this[gd].disconnect():a.unobserveChildren(this[gd])}[(e=nl,t=S_,n=gd,Pr)](){super[Pr]();const a=this[ye];a.forHotspots(o=>{a.updateSurfaceHotspot(o)})}[Nr](a,o){super[Nr](a,o);const l=this[ye],{annotationRenderer:c}=l,u=l.getCamera();l.shouldRender()&&(l.animateSurfaceHotspots(),l.updateHotspotsVisibility(u.position),c.domElement.style.display="",c.render(l,u))}updateHotspot(a){const o=this[nl].get(a.name);o!=null&&(o.updatePosition(a.position),o.updateNormal(a.normal),o.surface=a.surface,this[ye].updateSurfaceHotspot(o),this[li]())}queryHotspot(a){const o=this[nl].get(a);if(o==null)return null;const l=po(o.position),c=po(o.normal),u=o.facingCamera,h=this[ye],d=h.getCamera(),A=new Q;A.setFromMatrixPosition(o.matrixWorld),A.project(d);const p=h.width/2,g=h.height/2;A.x=A.x*p+p,A.y=-(A.y*g)+g;const m=po(new Q(A.x,A.y,A.z));return!Number.isFinite(m.x)||!Number.isFinite(m.y)?null:{position:l,normal:c,canvasPosition:m,facingCamera:u}}positionAndNormalFromPoint(a,o){const l=this[ye],c=l.getNDC(a,o),u=l.positionAndNormalFromPoint(c);if(u==null)return null;T_.copy(l.target.matrixWorld).invert();const h=po(u.position.applyMatrix4(T_)),d=po(u.normal.transformDirection(T_));let A=null;return u.uv!=null&&(A=Tv(u.uv)),{position:h,normal:d,uv:A}}surfaceFromPoint(a,o){const l=this[ye],c=l.getNDC(a,o);return l.surfaceFromPoint(c)}[B_](a){if(!(a instanceof HTMLElement&&a.slot.indexOf("hotspot")===0))return;let o=this[nl].get(a.slot);o!=null?o.increment():(o=new bQ({name:a.slot,position:a.dataset.position,normal:a.dataset.normal,surface:a.dataset.surface}),this[nl].set(a.slot,o),this[ye].addHotspot(o)),this[ye].queueRender()}[GT](a){if(!(a instanceof HTMLElement))return;const o=this[nl].get(a.slot);o&&(o.decrement()&&(this[ye].removeHotspot(o),this[nl].delete(a.slot)),this[ye].queueRender())}}return s};/* @license
|
|
17410
17410
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17411
17411
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17412
17412
|
* you may not use this file except in compliance with the License.
|
|
@@ -17432,7 +17432,7 @@ void main() {
|
|
|
17432
17432
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17433
17433
|
* See the License for the specific language governing permissions and
|
|
17434
17434
|
* limitations under the License.
|
|
17435
|
-
*/var il=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};let zT=!1,HT=!1;const $T="#model-viewer-no-ar-fallback",mJ=gJ(["quick-look","scene-viewer","webxr","none"]),yJ="webxr scene-viewer quick-look",Ss={QUICK_LOOK:"quick-look",SCENE_VIEWER:"scene-viewer",WEBXR:"webxr",NONE:"none"},ia=Symbol("arButtonContainer"),VT=Symbol("enterARWithWebXR"),YT=Symbol("openSceneViewer"),qT=Symbol("openIOSARQuickLook"),_J=Symbol("canActivateAR"),Tf=Symbol("arMode"),
|
|
17435
|
+
*/var il=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};let zT=!1,HT=!1;const $T="#model-viewer-no-ar-fallback",mJ=gJ(["quick-look","scene-viewer","webxr","none"]),yJ="webxr scene-viewer quick-look",Ss={QUICK_LOOK:"quick-look",SCENE_VIEWER:"scene-viewer",WEBXR:"webxr",NONE:"none"},ia=Symbol("arButtonContainer"),VT=Symbol("enterARWithWebXR"),YT=Symbol("openSceneViewer"),qT=Symbol("openIOSARQuickLook"),_J=Symbol("canActivateAR"),Tf=Symbol("arMode"),M_=Symbol("arModes"),Wc=Symbol("arAnchor"),Mf=Symbol("preload"),Rf=Symbol("onARButtonContainerClick"),R_=Symbol("onARStatus"),D_=Symbol("onARTracking"),Q_=Symbol("onARTap"),md=Symbol("selectARMode"),L_=Symbol("triggerLoad"),EJ=i=>{var e,t,n,s,r,a,o,l,c,u;class h extends i{constructor(){super(...arguments),this.ar=!1,this.arScale="auto",this.arUsdzMaxTextureSize="auto",this.arPlacement="floor",this.arModes=yJ,this.iosSrc=null,this.xrEnvironment=!1,this[e]=!1,this[t]=this.shadowRoot.querySelector(".ar-button"),this[n]=document.createElement("a"),this[s]=new Set,this[r]=Ss.NONE,this[a]=!1,this[o]=A=>{A.preventDefault(),this.activateAR()},this[l]=({status:A})=>{(A===wa.NOT_PRESENTING||this[Vt].arRenderer.presentedScene===this[ye])&&(this.setAttribute("ar-status",A),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:A}})),A===wa.NOT_PRESENTING?this.removeAttribute("ar-tracking"):A===wa.SESSION_STARTED&&this.setAttribute("ar-tracking",bv.TRACKING))},this[c]=({status:A})=>{this.setAttribute("ar-tracking",A),this.dispatchEvent(new CustomEvent("ar-tracking",{detail:{status:A}}))},this[u]=A=>{A.data=="_apple_ar_quicklook_button_tapped"&&this.dispatchEvent(new CustomEvent("quick-look-button-tapped"))}}get canActivateAR(){return this[Tf]!==Ss.NONE}connectedCallback(){super.connectedCallback(),this[Vt].arRenderer!=null&&(this[Vt].arRenderer.addEventListener("status",this[R_]),this.setAttribute("ar-status",wa.NOT_PRESENTING),this[Vt].arRenderer.addEventListener("tracking",this[D_])),this[Wc].addEventListener("message",this[Q_])}disconnectedCallback(){super.disconnectedCallback(),this[Vt].arRenderer!=null&&(this[Vt].arRenderer.removeEventListener("status",this[R_]),this[Vt].arRenderer.removeEventListener("tracking",this[D_])),this[Wc].removeEventListener("message",this[Q_])}update(A){super.update(A),A.has("arScale")&&(this[ye].canScale=this.arScale!=="fixed"),A.has("arPlacement")&&(this[ye].updateShadow(),this[li]()),A.has("arModes")&&(this[M_]=mJ(this.arModes)),(A.has("ar")||A.has("arModes")||A.has("src")||A.has("iosSrc")||A.has("arUsdzMaxTextureSize"))&&this[md]()}async activateAR(){switch(this[Tf]){case Ss.QUICK_LOOK:await this[qT]();break;case Ss.WEBXR:await this[VT]();break;case Ss.SCENE_VIEWER:this[YT]();break;default:console.warn("No AR Mode can be activated. This is probably due to missing configuration or device capabilities");break}}async[(e=_J,t=ia,n=Wc,s=M_,r=Tf,a=Mf,o=Rf,l=R_,c=D_,u=Q_,md)](){var A;let p=Ss.NONE;if(this.ar){if(this.src!=null)for(const g of this[M_]){if(g==="webxr"&&ix&&!zT&&await this[Vt].arRenderer.supportsPresentation()){p=Ss.WEBXR;break}if(g==="scene-viewer"&&!HT&&(jW||navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&(!((A=(await navigator.userAgentData.getHighEntropyValues(["formFactor"])).formFactor)===null||A===void 0)&&A.includes("XR")))){p=Ss.SCENE_VIEWER;break}if(g==="quick-look"&&vv){p=Ss.QUICK_LOOK;break}}p===Ss.NONE&&this.iosSrc!=null&&vv&&(p=Ss.QUICK_LOOK)}if(p!==Ss.NONE)this[ia].classList.add("enabled"),this[ia].addEventListener("click",this[Rf]);else if(this[ia].classList.contains("enabled")){this[ia].removeEventListener("click",this[Rf]),this[ia].classList.remove("enabled");const g=wa.FAILED;this.setAttribute("ar-status",g),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:g}}))}this[Tf]=p}async[VT](){console.log("Attempting to present in AR with WebXR..."),await this[L_]();try{this[ia].removeEventListener("click",this[Rf]);const{arRenderer:A}=this[Vt];A.placeOnWall=this.arPlacement==="wall",await A.present(this[ye],this.xrEnvironment)}catch(A){console.warn("Error while trying to present in AR with WebXR"),console.error(A),await this[Vt].arRenderer.stopPresenting(),zT=!0,console.warn("Falling back to next ar-mode"),await this[md](),this.activateAR()}finally{this[md]()}}async[L_](){this.loaded||(this[Mf]=!0,this[Ch](),await ej(this,"load"),this[Mf]=!1)}[iu](){return super[iu]()||this[Mf]}[YT](){const A=self.location.toString(),p=new URL(A),g=new URL(this.src,A);g.hash&&(g.hash="");const m=new URLSearchParams(g.search);if(p.hash=$T,m.set("mode","ar_preferred"),m.has("disable_occlusion")||m.set("disable_occlusion","true"),this.arScale==="fixed"&&m.set("resizable","false"),this.arPlacement==="wall"&&m.set("enable_vertical_placement","true"),m.has("sound")){const _=new URL(m.get("sound"),A);m.set("sound",_.toString())}if(m.has("link")){const _=new URL(m.get("link"),A);m.set("link",_.toString())}const f=`intent://arvr.google.com/scene-viewer/1.2?${m.toString()+"&file="+encodeURIComponent(g.toString())}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(p.toString())};end;`,y=()=>{self.location.hash===$T&&(HT=!0,self.history.back(),console.warn("Error while trying to present in AR with Scene Viewer"),console.warn("Falling back to next ar-mode"),this[md]())};self.addEventListener("hashchange",y,{once:!0}),this[Wc].setAttribute("href",f),console.log("Attempting to present in AR with Scene Viewer..."),this[Wc].click()}async[qT](){const A=!this.iosSrc;this[ia].classList.remove("enabled");const p=A?await this.prepareUSDZ():this.iosSrc,g=new URL(p,self.location.toString());if(A){const y=self.location.toString(),_=new URL(y),E=new URL(this.src,_);E.hash&&(g.hash=E.hash)}this.arScale==="fixed"&&(g.hash&&(g.hash+="&"),g.hash+="allowsContentScaling=0");const m=this[Wc];m.setAttribute("rel","ar");const f=document.createElement("img");m.appendChild(f),m.setAttribute("href",g.toString()),A&&m.setAttribute("download","model.usdz"),m.style.display="none",m.isConnected||this.shadowRoot.appendChild(m),console.log("Attempting to present in AR with Quick Look..."),m.click(),m.removeChild(f),A&&URL.revokeObjectURL(p),this[ia].classList.add("enabled")}async prepareUSDZ(){const A=this[ql].beginActivity("usdz-conversion");await this[L_]();const{model:p,shadow:g,target:m}=this[ye];if(p==null)return"";let f=!1;g!=null&&(f=g.visible,g.visible=!1),A(.2);const y=new B$;m.remove(p),p.position.copy(m.position),p.updateWorldMatrix(!1,!0);const _=await y.parseAsync(p,{maxTextureSize:isNaN(this.arUsdzMaxTextureSize)?1/0:Math.max(parseInt(this.arUsdzMaxTextureSize),16)});p.position.set(0,0,0),m.add(p);const E=new Blob([_],{type:"model/vnd.usdz+zip"}),v=URL.createObjectURL(E);return A(1),g!=null&&(g.visible=f),v}}return il([H({type:Boolean,attribute:"ar"})],h.prototype,"ar",void 0),il([H({type:String,attribute:"ar-scale"})],h.prototype,"arScale",void 0),il([H({type:String,attribute:"ar-usdz-max-texture-size"})],h.prototype,"arUsdzMaxTextureSize",void 0),il([H({type:String,attribute:"ar-placement"})],h.prototype,"arPlacement",void 0),il([H({type:String,attribute:"ar-modes"})],h.prototype,"arModes",void 0),il([H({type:String,attribute:"ios-src"})],h.prototype,"iosSrc",void 0),il([H({type:Boolean,attribute:"xr-environment"})],h.prototype,"xrEnvironment",void 0),h};/* @license
|
|
17436
17436
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17437
17437
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17438
17438
|
* you may not use this file except in compliance with the License.
|
|
@@ -17445,7 +17445,7 @@ void main() {
|
|
|
17445
17445
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17446
17446
|
* See the License for the specific language governing permissions and
|
|
17447
17447
|
* limitations under the License.
|
|
17448
|
-
*/var
|
|
17448
|
+
*/var N_=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const vJ=100,bJ="https://www.gstatic.com/draco/versioned/decoders/1.5.6/",xJ="https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/",CJ="https://cdn.jsdelivr.net/npm/three@0.149.0/examples/jsm/loaders/LottieLoader.js",P_={AUTO:"auto"},WT={AUTO:"auto",EAGER:"eager"},jc=Symbol("defaultProgressBarElement"),F_=Symbol("posterContainerElement"),Xc=Symbol("defaultPosterElement"),yd=Symbol("shouldDismissPoster"),k_=Symbol("hidePoster"),Df=Symbol("modelIsRevealed"),U_=Symbol("updateProgressBar"),IJ=Symbol("ariaLabelCallToAction"),O_=Symbol("onProgress"),wJ=i=>{var e,t,n,s,r,a,o,l;class c extends i{static set dracoDecoderLocation(h){Ui.setDRACODecoderLocation(h)}static get dracoDecoderLocation(){return Ui.getDRACODecoderLocation()}static set ktx2TranscoderLocation(h){Ui.setKTX2TranscoderLocation(h)}static get ktx2TranscoderLocation(){return Ui.getKTX2TranscoderLocation()}static set meshoptDecoderLocation(h){Ui.setMeshoptDecoderLocation(h)}static get meshoptDecoderLocation(){return Ui.getMeshoptDecoderLocation()}static set lottieLoaderLocation(h){ks.singleton.textureUtils.lottieLoaderUrl=h}static get lottieLoaderLocation(){return ks.singleton.textureUtils.lottieLoaderUrl}static mapURLs(h){ks.singleton.loader[ol].manager.setURLModifier(h)}dismissPoster(){this.loaded?this[k_]():(this[yd]=!0,this[Ch]())}showPoster(){const h=this[F_];if(h.classList.contains("show"))return;h.classList.add("show"),this[ir].classList.remove("show");const d=this[Xc];d.removeAttribute("tabindex"),d.removeAttribute("aria-hidden");const A=this.modelIsVisible;this[Df]=!1,this[Jg](A)}getDimensions(){return po(this[ye].size)}getBoundingBoxCenter(){return po(this[ye].boundingBox.getCenter(new Q))}constructor(...h){super(...h),this.poster=null,this.reveal=P_.AUTO,this.loading=WT.AUTO,this[e]=!1,this[t]=!1,this[n]=this.shadowRoot.querySelector(".slot.poster"),this[s]=this.shadowRoot.querySelector("#default-poster"),this[r]=this.shadowRoot.querySelector("#default-progress-bar > .bar"),this[a]=this[Xc].getAttribute("aria-label"),this[o]=KW(m=>{const f=this[jc].parentNode;requestAnimationFrame(()=>{this[jc].style.transform=`scaleX(${m})`,m===0&&(f.removeChild(this[jc]),f.appendChild(this[jc])),this[jc].classList.toggle("hide",m===1)})},vJ),this[l]=m=>{const f=m.detail.totalProgress,y=m.detail.reason;f===1&&(this[U_].flush(),this.loaded&&(this[yd]||this.reveal===P_.AUTO)&&this[k_]()),this[U_](f),this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:f,reason:y}}))};const d=self.ModelViewerElement||{},A=d.dracoDecoderLocation||bJ;Ui.setDRACODecoderLocation(A);const p=d.ktx2TranscoderLocation||xJ;Ui.setKTX2TranscoderLocation(p),d.meshoptDecoderLocation&&Ui.setMeshoptDecoderLocation(d.meshoptDecoderLocation);const g=d.lottieLoaderLocation||CJ;ks.singleton.textureUtils!=null&&(ks.singleton.textureUtils.lottieLoaderUrl=g)}connectedCallback(){super.connectedCallback(),this.loaded||this.showPoster(),this[ql].addEventListener("progress",this[O_])}disconnectedCallback(){super.disconnectedCallback(),this[ql].removeEventListener("progress",this[O_])}async updated(h){super.updated(h),h.has("poster")&&this.poster!=null&&(this[Xc].style.backgroundImage=`url(${this.poster})`),h.has("alt")&&this[Xc].setAttribute("aria-label",this[Sv]),(h.has("reveal")||h.has("loading"))&&this[Ch]()}[(e=Df,t=yd,n=F_,s=Xc,r=jc,a=IJ,o=U_,l=O_,iu)](){return!!this.src&&(this[yd]||this.loading===WT.EAGER||this.reveal===P_.AUTO&&this[ul])}[k_](){this[yd]=!1;const h=this[F_];if(!h.classList.contains("show"))return;h.classList.remove("show"),this[ir].classList.add("show");const d=this.modelIsVisible;this[Df]=!0,this[Jg](d);const A=this.getRootNode();A&&A.activeElement===this&&this[ir].focus();const p=this[Xc];p.setAttribute("aria-hidden","true"),p.tabIndex=-1,this.dispatchEvent(new CustomEvent("poster-dismissed"))}[Wl](){return super[Wl]()&&this[Df]}}return N_([H({type:String})],c.prototype,"poster",void 0),N_([H({type:String})],c.prototype,"reveal",void 0),N_([H({type:String})],c.prototype,"loading",void 0),c};/* @license
|
|
17449
17449
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17450
17450
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17451
17451
|
* you may not use this file except in compliance with the License.
|
|
@@ -17458,7 +17458,7 @@ void main() {
|
|
|
17458
17458
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17459
17459
|
* See the License for the specific language governing permissions and
|
|
17460
17460
|
* limitations under the License.
|
|
17461
|
-
*/var
|
|
17461
|
+
*/var G_=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var o=i.length-1;o>=0;o--)(a=i[o])&&(r=(s<3?a(r):s>3?a(e,t,r):a(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const SJ=Math.PI/32,BJ=3e3,TJ={basis:[Fm(Bi(SJ,"rad"))],keywords:{auto:[null]}},Jc=Symbol("autoRotateStartTime"),z_=Symbol("radiansPerSecond"),jT=Symbol("syncRotationRate"),H_=Symbol("onCameraChange"),MJ=i=>{var e,t,n;class s extends i{constructor(){super(...arguments),this.autoRotate=!1,this.autoRotateDelay=BJ,this.rotationPerSecond="auto",this[e]=performance.now(),this[t]=0,this[n]=a=>{this.autoRotate&&a.detail.source==="user-interaction"&&(this[Jc]=performance.now())}}connectedCallback(){super.connectedCallback(),this.addEventListener("camera-change",this[H_]),this[Jc]=performance.now()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("camera-change",this[H_]),this[Jc]=performance.now()}updated(a){super.updated(a),a.has("autoRotate")&&(this[Jc]=performance.now())}[(e=Jc,t=z_,jT)](a){this[z_]=a[0]}[Nr](a,o){if(super[Nr](a,o),!this.autoRotate||!this[Wl]()||this[Vt].isPresenting)return;const l=Math.min(o,a-this[Jc]-this.autoRotateDelay);l>0&&(this[ye].yaw=this.turntableRotation+this[z_]*l*.001)}get turntableRotation(){return this[ye].yaw}resetTurntableRotation(a=0){this[ye].yaw=a}}return n=H_,G_([H({type:Boolean,attribute:"auto-rotate"})],s.prototype,"autoRotate",void 0),G_([H({type:Number,attribute:"auto-rotate-delay"})],s.prototype,"autoRotateDelay",void 0),G_([ro({intrinsics:TJ,updateHandler:jT}),H({type:String,attribute:"rotation-per-second"})],s.prototype,"rotationPerSecond",void 0),s};var RJ=Object.defineProperty,xu=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=a(e,t,s)||s);return s&&RJ(e,t,s),s};const DJ=fJ(JX(MJ(rj(Jj(EJ(wJ(pJ(ip)))))))),ac=class ag extends Qo{constructor(){super(),this.__arLink="",this.glbSrc="",this.usdzSrc="",this.debug=!1,this._loggerContext="VIEW IN YOUR SPACE MANAGER",this.__registerModelViewerWebComponent()}static{this.webComponentName="view-in-your-space-manager"}static{this.styles=[ht`
|
|
17462
17462
|
:host {
|
|
17463
17463
|
position: absolute;
|
|
17464
17464
|
top: 0;
|
|
@@ -17477,7 +17477,7 @@ void main() {
|
|
|
17477
17477
|
.model-viewer.hide {
|
|
17478
17478
|
visibility: hidden;
|
|
17479
17479
|
}
|
|
17480
|
-
`]}firstUpdated(e){super.firstUpdated(e),this.__createAndPortalArModal()}__createAndPortalArModal(){this.arModalElem=document.createElement("epg-modal-ar"),this.arModalElem.id="arModal",this.arModalElem.setAttribute("powered-by-epigraph",""),this.arModalElem.setAttribute("powered-by-epigraph-href",this.appWcRef.epigraphWebsiteRedirectUrls.modal),this.arModalElem.isLoading=!0,this.arModalElem.addEventListener("epgOnLaunchArClicked",()=>void this.presentAr()),this.arModalElem.addEventListener("epgOnModalHidden",()=>this.onArModalClose()),document.body.appendChild(this.arModalElem)}disconnectedCallback(){super.disconnectedCallback(),this.arModalElem?.remove()}__registerModelViewerWebComponent(){window.customElements.get("model-viewer")||window.customElements.define("model-viewer",DJ)}static setupWebComponent(){window.customElements.get(ag.webComponentName)||window.customElements.define(ag.webComponentName,ag)}get arLink(){return this.__arLink}showArModal(){this.arModalElem.showModal();const e=new aa(!0,aa.PANEL_TYPE.AR,aa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}showQr(){this.qrModalElem.showModal();const e=new aa(!0,aa.PANEL_TYPE.QR,aa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}async resolveSrcUrl(){if(this.glbSrc="",this.usdzSrc="",this.arModalElem.isLoading=!0,ix){const e=await this.appWcRef.getGlbUrlForAr();if(e===null){window.epigraph.logger.error({title:"Error getting the GLB for AR session",contextOverride:this._loggerContext});return}this.glbSrc=e}else vv&&(this.usdzSrc=await this.appWcRef.getUsdzUrlForAr(),this.glbSrc="https://asset.myepigraph.com/solutions-assets/__PIPELINE__/assets/3d-assets/proxyGeo/null-proxy.glb");this.arModalElem.isLoading=!1}getViewInYourSpaceUrl(){return yn.generateShareableUrl({baseUrl:this.appWcRef.baseUrlOverride,identifier:this.appWcRef.identifier,identifierType:this.appWcRef.identifierType,arCompatible:!0})}async getViewInYourSpaceQR(){const e=this.getViewInYourSpaceUrl();return this.appWcRef.qrCodeGenerator.generateQrCode({text:e.href})}async launchAR(){if(this.canLaunchAr()){const e=new cL([]);this.appWcRef.epigraphAnalytics.sendEvent(e),this.showArModal(),setTimeout(()=>{this.resolveSrcUrl()},1e3)}else{const e=await this.getViewInYourSpaceQR();this.qrModalElem.qrCodeImage=e,this.showQr()}return Promise.resolve(!0)}canLaunchAr(){return this.modelViewerElem.canActivateAR}async presentAr(){return this.modelViewerElem.activateAR()}isARSessionActive(){return this.modelViewerElem.getAttribute("ar-status")==="presenting"}getMinimumRequirementsString(){let e="";return YW&&(HD?e="iOS 16 and above":zD&&(e="Android 12 and above")),e}onArModalClose(){const e=new oa(!0,oa.PANEL_TYPE.AR,oa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}onQrModalClose(){const e=new oa(!0,oa.PANEL_TYPE.QR,oa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}__renderQrModal(){return re`<epg-modal-qr
|
|
17480
|
+
`]}firstUpdated(e){super.firstUpdated(e),this.__createAndPortalArModal()}__createAndPortalArModal(){this.arModalElem=document.createElement("epg-modal-ar"),this.arModalElem.id="arModal",this.arModalElem.setAttribute("powered-by-epigraph",""),this.arModalElem.setAttribute("powered-by-epigraph-href",this.appWcRef.epigraphWebsiteRedirectUrls.modal),this.arModalElem.style.zIndex="1001",this.arModalElem.isLoading=!0,this.arModalElem.addEventListener("epgOnLaunchArClicked",()=>void this.presentAr()),this.arModalElem.addEventListener("epgOnModalHidden",()=>this.onArModalClose()),document.body.appendChild(this.arModalElem)}disconnectedCallback(){super.disconnectedCallback(),this.arModalElem?.remove()}__registerModelViewerWebComponent(){window.customElements.get("model-viewer")||window.customElements.define("model-viewer",DJ)}static setupWebComponent(){window.customElements.get(ag.webComponentName)||window.customElements.define(ag.webComponentName,ag)}get arLink(){return this.__arLink}showArModal(){this.arModalElem.showModal();const e=new aa(!0,aa.PANEL_TYPE.AR,aa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}showQr(){this.qrModalElem.showModal();const e=new aa(!0,aa.PANEL_TYPE.QR,aa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}async resolveSrcUrl(){if(this.glbSrc="",this.usdzSrc="",this.arModalElem.isLoading=!0,ix){const e=await this.appWcRef.getGlbUrlForAr();if(e===null){window.epigraph.logger.error({title:"Error getting the GLB for AR session",contextOverride:this._loggerContext});return}this.glbSrc=e}else vv&&(this.usdzSrc=await this.appWcRef.getUsdzUrlForAr(),this.glbSrc="https://asset.myepigraph.com/solutions-assets/__PIPELINE__/assets/3d-assets/proxyGeo/null-proxy.glb");this.arModalElem.isLoading=!1}getViewInYourSpaceUrl(){return yn.generateShareableUrl({baseUrl:this.appWcRef.baseUrlOverride,identifier:this.appWcRef.identifier,identifierType:this.appWcRef.identifierType,arCompatible:!0})}async getViewInYourSpaceQR(){const e=this.getViewInYourSpaceUrl();return this.appWcRef.qrCodeGenerator.generateQrCode({text:e.href})}async launchAR(){if(this.canLaunchAr()){const e=new cL([]);this.appWcRef.epigraphAnalytics.sendEvent(e),this.showArModal(),setTimeout(()=>{this.resolveSrcUrl()},1e3)}else{const e=await this.getViewInYourSpaceQR();this.qrModalElem.qrCodeImage=e,this.showQr()}return Promise.resolve(!0)}canLaunchAr(){return this.modelViewerElem.canActivateAR}async presentAr(){return this.modelViewerElem.activateAR()}isARSessionActive(){return this.modelViewerElem.getAttribute("ar-status")==="presenting"}getMinimumRequirementsString(){let e="";return YW&&(HD?e="iOS 16 and above":zD&&(e="Android 12 and above")),e}onArModalClose(){const e=new oa(!0,oa.PANEL_TYPE.AR,oa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}onQrModalClose(){const e=new oa(!0,oa.PANEL_TYPE.QR,oa.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}__renderQrModal(){return re`<epg-modal-qr
|
|
17481
17481
|
id="qrModal"
|
|
17482
17482
|
powered-by-epigraph
|
|
17483
17483
|
powered-by-epigraph-href=${this.appWcRef.epigraphWebsiteRedirectUrls.modal}
|
|
@@ -17514,10 +17514,10 @@ void main() {
|
|
|
17514
17514
|
* @version 0.17.0
|
|
17515
17515
|
* @author George Michael Brower
|
|
17516
17516
|
* @license MIT
|
|
17517
|
-
*/class Qr{constructor(e,t,n,s,r="div"){this.parent=e,this.object=t,this.property=n,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(s),this.$name=document.createElement("div"),this.$name.classList.add("name"),Qr.nextNameID=Qr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++Qr.nextNameID,this.$widget=document.createElement(r),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(n)}name(e){return this._name=e,this.$name.innerHTML=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled||(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e)),this}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.object[this.property]=e,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class HJ extends Qr{constructor(e,t,n){super(e,t,n,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function Mv(i){let e,t;return(e=i.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!t&&"#"+t}const $J={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Mv,toHexString:Mv},OA={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},VJ={isPrimitive:!1,match:Array.isArray,fromHexString(i,e,t=1){const n=OA.fromHexString(i);e[0]=(n>>16&255)/255*t,e[1]=(n>>8&255)/255*t,e[2]=(255&n)/255*t},toHexString:([i,e,t],n=1)=>OA.toHexString(i*(n=255/n)<<16^e*n<<8^t*n<<0)},YJ={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,e,t=1){const n=OA.fromHexString(i);e.r=(n>>16&255)/255*t,e.g=(n>>8&255)/255*t,e.b=(255&n)/255*t},toHexString:({r:i,g:e,b:t},n=1)=>OA.toHexString(i*(n=255/n)<<16^e*n<<8^t*n<<0)},qJ=[$J,OA,VJ,YJ];class WJ extends Qr{constructor(e,t,n,s){var r;super(e,t,n,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,qJ.find(a=>a.match(r))),this._rgbScale=s,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const a=Mv(this.$text.value);a&&this._setValueFromHexString(a)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class $0 extends Qr{constructor(e,t,n){super(e,t,n,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",s=>{s.preventDefault(),this.getValue().call(this.object)}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class jJ extends Qr{constructor(e,t,n,s,r,a){super(e,t,n,"number"),this._initInput(),this.min(s),this.max(r);const o=a!==void 0;this.step(o?a:this._getImplicitStep(),o),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=100*t+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$disable=this.$input;const e=u=>{const h=parseFloat(this.$input.value);isNaN(h)||(this._snapClampSetValue(h+u),this.$input.value=this.getValue())};let t,n,s,r,a,o=!1;const l=u=>{if(o){const h=u.clientX-t,d=u.clientY-n;Math.abs(d)>5?(u.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(h)>5&&c()}if(!o){const h=u.clientY-s;a-=h*this._step*this._arrowKeyMultiplier(u),r+a>this._max?a=this._max-r:r+a<this._min&&(a=this._min-r),this._snapClampSetValue(r+a)}s=u.clientY},c=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",c)};this.$input.addEventListener("input",()=>{let u=parseFloat(this.$input.value);isNaN(u)||(this._stepExplicit&&(u=this._snap(u)),this.setValue(this._clamp(u)))}),this.$input.addEventListener("keydown",u=>{u.code==="Enter"&&this.$input.blur(),u.code==="ArrowUp"&&(u.preventDefault(),e(this._step*this._arrowKeyMultiplier(u))),u.code==="ArrowDown"&&(u.preventDefault(),e(this._step*this._arrowKeyMultiplier(u)*-1))}),this.$input.addEventListener("wheel",u=>{this._inputFocused&&(u.preventDefault(),e(this._step*this._normalizeMouseWheel(u)))},{passive:!1}),this.$input.addEventListener("mousedown",u=>{t=u.clientX,n=s=u.clientY,o=!0,r=this.getValue(),a=0,window.addEventListener("mousemove",l),window.addEventListener("mouseup",c)}),this.$input.addEventListener("focus",()=>{this._inputFocused=!0}),this.$input.addEventListener("blur",()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()})}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const e=d=>{const A=this.$slider.getBoundingClientRect();let p=(g=d,m=A.left,f=A.right,y=this._min,_=this._max,(g-m)/(f-m)*(_-y)+y);var g,m,f,y,_;this._snapClampSetValue(p)},t=d=>{e(d.clientX)},n=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};let s,r,a=!1;const o=d=>{d.preventDefault(),this._setDraggingStyle(!0),e(d.touches[0].clientX),a=!1},l=d=>{if(a){const A=d.touches[0].clientX-s,p=d.touches[0].clientY-r;Math.abs(A)>Math.abs(p)?o(d):(window.removeEventListener("touchmove",l),window.removeEventListener("touchend",c))}else d.preventDefault(),e(d.touches[0].clientX)},c=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",l),window.removeEventListener("touchend",c)},u=this._callOnFinishChange.bind(this);let h;this.$slider.addEventListener("mousedown",d=>{this._setDraggingStyle(!0),e(d.clientX),window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)}),this.$slider.addEventListener("touchstart",d=>{d.touches.length>1||(this._hasScrollBar?(s=d.touches[0].clientX,r=d.touches[0].clientY,a=!0):o(d),window.addEventListener("touchmove",l,{passive:!1}),window.addEventListener("touchend",c))},{passive:!1}),this.$slider.addEventListener("wheel",d=>{if(Math.abs(d.deltaX)<Math.abs(d.deltaY)&&this._hasScrollBar)return;d.preventDefault();const A=this._normalizeMouseWheel(d)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(h),h=setTimeout(u,400)},{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-"+t,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:n}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,n=-e.wheelDelta/120,n*=this._stepExplicit?1:10),t+-n}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){const t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class XJ extends Qr{constructor(e,t,n,s){super(e,t,n,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(s)?s:Object.values(s),this._names=Array.isArray(s)?s:Object.keys(s),this._names.forEach(r=>{const a=document.createElement("option");a.innerHTML=r,this.$select.appendChild(a)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.innerHTML=t===-1?e:this._names[t],this}}class JJ extends Qr{constructor(e,t,n){super(e,t,n,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",s=>{s.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let XT=!1;class rx{constructor({parent:e,autoPlace:t=e===void 0,container:n,width:s,title:r="Controls",injectStyles:a=!0,touchStyles:o=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",l=>{l.code!=="Enter"&&l.code!=="Space"||(l.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),o&&this.domElement.classList.add("allow-touch-styles"),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),!XT&&a&&((function(l){const c=document.createElement("style");c.innerHTML=l;const u=document.querySelector("head link[rel=stylesheet], head style");u?document.head.insertBefore(c,u):document.head.appendChild(c)})('.lil-gui{--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace;--padding:4px;--spacing:4px;--widget-height:20px;--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(var(--widget-height)*0.75);--scrollbar-width:5px;background-color:var(--background-color);color:var(--text-color);font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-weight:400;line-height:1;text-align:left;touch-action:manipulation;user-select:none;-webkit-user-select:none}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0;padding:0}.lil-gui.root{display:flex;flex-direction:column;width:var(--width,245px)}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow-x:hidden;overflow-y:auto}.lil-gui.root>.children::-webkit-scrollbar{background:var(--background-color);height:var(--scrollbar-width);width:var(--scrollbar-width)}.lil-gui.root>.children::-webkit-scrollbar-thumb{background:var(--focus-color);border-radius:var(--scrollbar-width)}.lil-gui.force-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}.lil-gui.autoPlace{max-height:100%;position:fixed;right:15px;top:0;z-index:1001}.lil-gui .controller{align-items:center;display:flex;margin:var(--spacing) 0;padding:0 var(--padding)}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none!important}.lil-gui .controller>.name{flex-shrink:0;line-height:var(--widget-height);min-width:var(--name-width);padding-right:var(--spacing);white-space:pre}.lil-gui .controller .widget{align-items:center;display:flex;min-height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean .widget{cursor:pointer}.lil-gui .controller.color .display{border-radius:var(--widget-border-radius);height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.color input[type=color]{cursor:pointer;height:100%;opacity:0;width:100%}.lil-gui .controller.color input[type=text]{flex-shrink:0;font-family:var(--font-family-mono);margin-left:var(--spacing);min-width:var(--color-input-min-width);width:var(--color-input-width)}.lil-gui .controller.option select{max-width:100%;opacity:0;position:absolute;width:100%}.lil-gui .controller.option .display{background:var(--widget-color);border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;padding-left:.55em;padding-right:1.75em;pointer-events:none;position:relative;word-break:break-all}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{bottom:0;content:"↕";font-family:lil-gui;padding-right:.375em;position:absolute;right:0;top:0}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{flex-shrink:0;margin-left:var(--spacing);min-width:var(--slider-input-min-width);width:var(--slider-input-width)}.lil-gui .controller.number .slider{background-color:var(--widget-color);border-radius:var(--widget-border-radius);cursor:ew-resize;height:var(--widget-height);overflow:hidden;padding-right:var(--slider-knob-width);touch-action:pan-y;width:100%}.lil-gui .controller.number .slider.active{background-color:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box;height:100%}.lil-gui-dragging .lil-gui{--hover-color:var(--widget-color)}.lil-gui-dragging *{cursor:ew-resize!important}.lil-gui-dragging.lil-gui-vertical *{cursor:ns-resize!important}.lil-gui .title{--title-height:calc(var(--widget-height) + var(--spacing)*1.25);-webkit-tap-highlight-color:transparent;text-decoration-skip:objects;cursor:pointer;font-weight:600;height:var(--title-height);line-height:calc(var(--title-height) - 4px);outline:none;padding:0 var(--padding)}.lil-gui .title:before{content:"▾";display:inline-block;font-family:lil-gui;padding-right:2px}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}.lil-gui.root>.title:focus{text-decoration:none!important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{opacity:0;transform:translateY(-7px)}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{overflow:hidden;pointer-events:none;transition-duration:.3s;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(.2,.6,.35,1)}.lil-gui .children:empty:before{content:"Empty";display:block;font-style:italic;height:var(--widget-height);line-height:var(--widget-height);margin:var(--spacing) 0;opacity:.5;padding:0 var(--padding)}.lil-gui.root>.children>.lil-gui>.title{border-width:0;border-bottom:1px solid var(--widget-color);border-left:0 solid var(--widget-color);border-right:0 solid var(--widget-color);border-top:1px solid var(--widget-color);transition:border-color .3s}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;border-left:2px solid var(--widget-color);margin-left:var(--folder-indent)}.lil-gui .lil-gui .controller{border:none}.lil-gui input{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:0;border-radius:var(--widget-border-radius);color:var(--text-color);font-family:var(--font-family);font-size:var(--input-font-size);height:var(--widget-height);outline:none;width:100%}.lil-gui input:disabled{opacity:1}.lil-gui input[type=number],.lil-gui input[type=text]{padding:var(--widget-padding)}.lil-gui input[type=number]:focus,.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input::-webkit-inner-spin-button,.lil-gui input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.lil-gui input[type=number]{-moz-appearance:textfield}.lil-gui input[type=checkbox]{appearance:none;-webkit-appearance:none;border-radius:var(--widget-border-radius);cursor:pointer;height:var(--checkbox-size);text-align:center;width:var(--checkbox-size)}.lil-gui input[type=checkbox]:checked:before{content:"✓";font-family:lil-gui;font-size:var(--checkbox-size);line-height:var(--checkbox-size)}.lil-gui button{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:1px solid var(--widget-color);border-radius:var(--widget-border-radius);color:var(--text-color);cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);height:var(--widget-height);line-height:calc(var(--widget-height) - 4px);outline:none;text-align:center;text-transform:none;width:100%}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:lil-gui;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMr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KCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}@media (pointer:coarse){.lil-gui.allow-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}}@media (hover:hover){.lil-gui .controller.color .display:hover:before{border:1px solid #fff9;border-radius:var(--widget-border-radius);bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0}.lil-gui .controller.option .display.focus{background:var(--focus-color)}.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}.lil-gui .controller.number .slider:hover{background-color:var(--hover-color)}body:not(.lil-gui-dragging) .lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}.lil-gui button:hover{background:var(--hover-color);border-color:var(--hover-color)}.lil-gui button:focus{border-color:var(--focus-color)}}'),XT=!0),n?n.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation())}add(e,t,n,s,r){if(Object(n)===n)return new XJ(this,e,t,n);const a=e[t];switch(typeof a){case"number":return new jJ(this,e,t,n,s,r);case"boolean":return new HJ(this,e,t);case"string":return new JJ(this,e,t);case"function":return new $0(this,e,t)}console.error(`gui.add failed
|
|
17517
|
+
*/class Qr{constructor(e,t,n,s,r="div"){this.parent=e,this.object=t,this.property=n,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(s),this.$name=document.createElement("div"),this.$name.classList.add("name"),Qr.nextNameID=Qr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++Qr.nextNameID,this.$widget=document.createElement(r),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(n)}name(e){return this._name=e,this.$name.innerHTML=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled||(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e)),this}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.object[this.property]=e,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class HJ extends Qr{constructor(e,t,n){super(e,t,n,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function Mv(i){let e,t;return(e=i.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!t&&"#"+t}const $J={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Mv,toHexString:Mv},OA={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},VJ={isPrimitive:!1,match:Array.isArray,fromHexString(i,e,t=1){const n=OA.fromHexString(i);e[0]=(n>>16&255)/255*t,e[1]=(n>>8&255)/255*t,e[2]=(255&n)/255*t},toHexString:([i,e,t],n=1)=>OA.toHexString(i*(n=255/n)<<16^e*n<<8^t*n<<0)},YJ={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,e,t=1){const n=OA.fromHexString(i);e.r=(n>>16&255)/255*t,e.g=(n>>8&255)/255*t,e.b=(255&n)/255*t},toHexString:({r:i,g:e,b:t},n=1)=>OA.toHexString(i*(n=255/n)<<16^e*n<<8^t*n<<0)},qJ=[$J,OA,VJ,YJ];class WJ extends Qr{constructor(e,t,n,s){var r;super(e,t,n,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,qJ.find(a=>a.match(r))),this._rgbScale=s,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const a=Mv(this.$text.value);a&&this._setValueFromHexString(a)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class $_ extends Qr{constructor(e,t,n){super(e,t,n,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",s=>{s.preventDefault(),this.getValue().call(this.object)}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class jJ extends Qr{constructor(e,t,n,s,r,a){super(e,t,n,"number"),this._initInput(),this.min(s),this.max(r);const o=a!==void 0;this.step(o?a:this._getImplicitStep(),o),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=100*t+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$disable=this.$input;const e=u=>{const h=parseFloat(this.$input.value);isNaN(h)||(this._snapClampSetValue(h+u),this.$input.value=this.getValue())};let t,n,s,r,a,o=!1;const l=u=>{if(o){const h=u.clientX-t,d=u.clientY-n;Math.abs(d)>5?(u.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(h)>5&&c()}if(!o){const h=u.clientY-s;a-=h*this._step*this._arrowKeyMultiplier(u),r+a>this._max?a=this._max-r:r+a<this._min&&(a=this._min-r),this._snapClampSetValue(r+a)}s=u.clientY},c=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",c)};this.$input.addEventListener("input",()=>{let u=parseFloat(this.$input.value);isNaN(u)||(this._stepExplicit&&(u=this._snap(u)),this.setValue(this._clamp(u)))}),this.$input.addEventListener("keydown",u=>{u.code==="Enter"&&this.$input.blur(),u.code==="ArrowUp"&&(u.preventDefault(),e(this._step*this._arrowKeyMultiplier(u))),u.code==="ArrowDown"&&(u.preventDefault(),e(this._step*this._arrowKeyMultiplier(u)*-1))}),this.$input.addEventListener("wheel",u=>{this._inputFocused&&(u.preventDefault(),e(this._step*this._normalizeMouseWheel(u)))},{passive:!1}),this.$input.addEventListener("mousedown",u=>{t=u.clientX,n=s=u.clientY,o=!0,r=this.getValue(),a=0,window.addEventListener("mousemove",l),window.addEventListener("mouseup",c)}),this.$input.addEventListener("focus",()=>{this._inputFocused=!0}),this.$input.addEventListener("blur",()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()})}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const e=d=>{const A=this.$slider.getBoundingClientRect();let p=(g=d,m=A.left,f=A.right,y=this._min,_=this._max,(g-m)/(f-m)*(_-y)+y);var g,m,f,y,_;this._snapClampSetValue(p)},t=d=>{e(d.clientX)},n=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};let s,r,a=!1;const o=d=>{d.preventDefault(),this._setDraggingStyle(!0),e(d.touches[0].clientX),a=!1},l=d=>{if(a){const A=d.touches[0].clientX-s,p=d.touches[0].clientY-r;Math.abs(A)>Math.abs(p)?o(d):(window.removeEventListener("touchmove",l),window.removeEventListener("touchend",c))}else d.preventDefault(),e(d.touches[0].clientX)},c=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",l),window.removeEventListener("touchend",c)},u=this._callOnFinishChange.bind(this);let h;this.$slider.addEventListener("mousedown",d=>{this._setDraggingStyle(!0),e(d.clientX),window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)}),this.$slider.addEventListener("touchstart",d=>{d.touches.length>1||(this._hasScrollBar?(s=d.touches[0].clientX,r=d.touches[0].clientY,a=!0):o(d),window.addEventListener("touchmove",l,{passive:!1}),window.addEventListener("touchend",c))},{passive:!1}),this.$slider.addEventListener("wheel",d=>{if(Math.abs(d.deltaX)<Math.abs(d.deltaY)&&this._hasScrollBar)return;d.preventDefault();const A=this._normalizeMouseWheel(d)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(h),h=setTimeout(u,400)},{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-"+t,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:n}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,n=-e.wheelDelta/120,n*=this._stepExplicit?1:10),t+-n}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){const t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class XJ extends Qr{constructor(e,t,n,s){super(e,t,n,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(s)?s:Object.values(s),this._names=Array.isArray(s)?s:Object.keys(s),this._names.forEach(r=>{const a=document.createElement("option");a.innerHTML=r,this.$select.appendChild(a)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.innerHTML=t===-1?e:this._names[t],this}}class JJ extends Qr{constructor(e,t,n){super(e,t,n,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",s=>{s.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let XT=!1;class rx{constructor({parent:e,autoPlace:t=e===void 0,container:n,width:s,title:r="Controls",injectStyles:a=!0,touchStyles:o=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",l=>{l.code!=="Enter"&&l.code!=="Space"||(l.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),o&&this.domElement.classList.add("allow-touch-styles"),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),!XT&&a&&((function(l){const c=document.createElement("style");c.innerHTML=l;const u=document.querySelector("head link[rel=stylesheet], head style");u?document.head.insertBefore(c,u):document.head.appendChild(c)})('.lil-gui{--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace;--padding:4px;--spacing:4px;--widget-height:20px;--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(var(--widget-height)*0.75);--scrollbar-width:5px;background-color:var(--background-color);color:var(--text-color);font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-weight:400;line-height:1;text-align:left;touch-action:manipulation;user-select:none;-webkit-user-select:none}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0;padding:0}.lil-gui.root{display:flex;flex-direction:column;width:var(--width,245px)}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow-x:hidden;overflow-y:auto}.lil-gui.root>.children::-webkit-scrollbar{background:var(--background-color);height:var(--scrollbar-width);width:var(--scrollbar-width)}.lil-gui.root>.children::-webkit-scrollbar-thumb{background:var(--focus-color);border-radius:var(--scrollbar-width)}.lil-gui.force-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}.lil-gui.autoPlace{max-height:100%;position:fixed;right:15px;top:0;z-index:1001}.lil-gui .controller{align-items:center;display:flex;margin:var(--spacing) 0;padding:0 var(--padding)}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none!important}.lil-gui .controller>.name{flex-shrink:0;line-height:var(--widget-height);min-width:var(--name-width);padding-right:var(--spacing);white-space:pre}.lil-gui .controller .widget{align-items:center;display:flex;min-height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean .widget{cursor:pointer}.lil-gui .controller.color .display{border-radius:var(--widget-border-radius);height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.color input[type=color]{cursor:pointer;height:100%;opacity:0;width:100%}.lil-gui .controller.color input[type=text]{flex-shrink:0;font-family:var(--font-family-mono);margin-left:var(--spacing);min-width:var(--color-input-min-width);width:var(--color-input-width)}.lil-gui .controller.option select{max-width:100%;opacity:0;position:absolute;width:100%}.lil-gui .controller.option .display{background:var(--widget-color);border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;padding-left:.55em;padding-right:1.75em;pointer-events:none;position:relative;word-break:break-all}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{bottom:0;content:"↕";font-family:lil-gui;padding-right:.375em;position:absolute;right:0;top:0}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{flex-shrink:0;margin-left:var(--spacing);min-width:var(--slider-input-min-width);width:var(--slider-input-width)}.lil-gui .controller.number .slider{background-color:var(--widget-color);border-radius:var(--widget-border-radius);cursor:ew-resize;height:var(--widget-height);overflow:hidden;padding-right:var(--slider-knob-width);touch-action:pan-y;width:100%}.lil-gui .controller.number .slider.active{background-color:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box;height:100%}.lil-gui-dragging .lil-gui{--hover-color:var(--widget-color)}.lil-gui-dragging *{cursor:ew-resize!important}.lil-gui-dragging.lil-gui-vertical *{cursor:ns-resize!important}.lil-gui .title{--title-height:calc(var(--widget-height) + var(--spacing)*1.25);-webkit-tap-highlight-color:transparent;text-decoration-skip:objects;cursor:pointer;font-weight:600;height:var(--title-height);line-height:calc(var(--title-height) - 4px);outline:none;padding:0 var(--padding)}.lil-gui .title:before{content:"▾";display:inline-block;font-family:lil-gui;padding-right:2px}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}.lil-gui.root>.title:focus{text-decoration:none!important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{opacity:0;transform:translateY(-7px)}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{overflow:hidden;pointer-events:none;transition-duration:.3s;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(.2,.6,.35,1)}.lil-gui .children:empty:before{content:"Empty";display:block;font-style:italic;height:var(--widget-height);line-height:var(--widget-height);margin:var(--spacing) 0;opacity:.5;padding:0 var(--padding)}.lil-gui.root>.children>.lil-gui>.title{border-width:0;border-bottom:1px solid var(--widget-color);border-left:0 solid var(--widget-color);border-right:0 solid var(--widget-color);border-top:1px solid var(--widget-color);transition:border-color .3s}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;border-left:2px solid var(--widget-color);margin-left:var(--folder-indent)}.lil-gui .lil-gui .controller{border:none}.lil-gui input{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:0;border-radius:var(--widget-border-radius);color:var(--text-color);font-family:var(--font-family);font-size:var(--input-font-size);height:var(--widget-height);outline:none;width:100%}.lil-gui input:disabled{opacity:1}.lil-gui input[type=number],.lil-gui input[type=text]{padding:var(--widget-padding)}.lil-gui input[type=number]:focus,.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input::-webkit-inner-spin-button,.lil-gui input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.lil-gui input[type=number]{-moz-appearance:textfield}.lil-gui input[type=checkbox]{appearance:none;-webkit-appearance:none;border-radius:var(--widget-border-radius);cursor:pointer;height:var(--checkbox-size);text-align:center;width:var(--checkbox-size)}.lil-gui input[type=checkbox]:checked:before{content:"✓";font-family:lil-gui;font-size:var(--checkbox-size);line-height:var(--checkbox-size)}.lil-gui button{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:1px solid var(--widget-color);border-radius:var(--widget-border-radius);color:var(--text-color);cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);height:var(--widget-height);line-height:calc(var(--widget-height) - 4px);outline:none;text-align:center;text-transform:none;width:100%}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:lil-gui;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}@media (pointer:coarse){.lil-gui.allow-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}}@media (hover:hover){.lil-gui .controller.color .display:hover:before{border:1px solid #fff9;border-radius:var(--widget-border-radius);bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0}.lil-gui .controller.option .display.focus{background:var(--focus-color)}.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}.lil-gui .controller.number .slider:hover{background-color:var(--hover-color)}body:not(.lil-gui-dragging) .lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}.lil-gui button:hover{background:var(--hover-color);border-color:var(--hover-color)}.lil-gui button:focus{border-color:var(--focus-color)}}'),XT=!0),n?n.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation())}add(e,t,n,s,r){if(Object(n)===n)return new XJ(this,e,t,n);const a=e[t];switch(typeof a){case"number":return new jJ(this,e,t,n,s,r);case"boolean":return new HJ(this,e,t);case"string":return new JJ(this,e,t);case"function":return new $_(this,e,t)}console.error(`gui.add failed
|
|
17518
17518
|
property:`,t,`
|
|
17519
17519
|
object:`,e,`
|
|
17520
|
-
value:`,a)}addColor(e,t,n=1){return new WJ(this,e,t,n)}addFolder(e){return new rx({parent:this,title:e})}load(e,t=!0){return e.controllers&&this.controllers.forEach(n=>{n instanceof $0||n._name in e.controllers&&n.load(e.controllers[n._name])}),t&&e.folders&&this.folders.forEach(n=>{n._title in e.folders&&n.load(e.folders[n._title])}),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach(n=>{if(!(n instanceof $0)){if(n._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${n._name}"`);t.controllers[n._name]=n.save()}}),e&&this.folders.forEach(n=>{if(n._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${n._title}"`);t.folders[n._title]=n.save()}),t}open(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");const n=r=>{r.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",n))};this.$children.addEventListener("transitionend",n);const s=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}}class cA extends Qo{constructor(){super(),this._onExperienceUpdatedHandler=()=>this.__rebuildGui(),this._isDirty=!1,this._saveSettingsController=null,this.__copySettingButton=null,this.settingsToImport="",this._confirmButton=null,this._loggerContext="SETTINGS MANAGER"}static{this.webComponentName="settings-manager"}static setupWebComponent(){window.customElements.get(cA.webComponentName)||window.customElements.define(cA.webComponentName,cA)}static{this.styles=ht``}firstUpdated(){this.appWcRef.addEventListener(this.events.experienceUpdatedEvent.name,this._onExperienceUpdatedHandler),this.__addGui()}get events(){return this.appWcRef.eventsManager}get productSettings(){return this.appWcRef.productSettings}__addCameraSettingsGui(e){const t=this.productSettings.camera;e.addColor(t,"backgroundColor").name("Background Color").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"backgroundAlpha",0,1).name("Background Alpha").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"focalLength",10,300).name("Focal Length").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"nearClip",0,3).name("Near Clip").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"farClip",0,1e4).name("Far Clip").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"canPan").name("Can Pan").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"canZoom").name("Can Zoom").onFinishChange(n=>{this.__onCanZoomChanged(n),this.__onSettingChanged()}),this.__minDistanceSetting=e.add(t,"minDistance",0,100).name("Min Distance").onFinishChange(()=>this.__onSettingChanged()),this.__maxDistanceSetting=e.add(t,"maxDistance",0,100).name("Max Distance").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"infinitePolarAngle").name("Infinite Polar Angle").onFinishChange(n=>{this.__onInfinitePolarAngleChanged(n),this.__onSettingChanged()}),this.__minPolarAngleSetting=e.add(t,"minPolarAngle",0,6.25).step(.01).name("Min Polar Angle").onFinishChange(()=>this.__onSettingChanged()),this.__maxPolarAngleSetting=e.add(t,"maxPolarAngle",0,6.25).step(.01).name("Max Polar Angle").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"infiniteAzimuthAngle").name("Infinite Azimuth Angle").onFinishChange(n=>{this.__onInfiniteAzimuthAngleChanged(n),this.__onSettingChanged()}),this.__minAzimuthAngleSetting=e.add(t,"minAzimuthAngle",0,6.25).name("Min Azimuth Angle").step(.01).onFinishChange(()=>this.__onSettingChanged()),this.__maxAzimuthAngleSetting=e.add(t,"maxAzimuthAngle",0,6.25).name("Max Azimuth Angle").step(.01).onFinishChange(()=>this.__onSettingChanged()),e.add(this,"startInitialCameraUpdate").name("Change Initial Camera")}__addRenderSettingsGui(e){const t=this.productSettings.render;e.add(t,"envMap").name("Env Map").onFinishChange(()=>this.__onSettingChanged());const n=e.addFolder("Env Map Rotation");n.add(t.envMapRotation,"x",0,360).name("X").onFinishChange(()=>this.__onSettingChanged()),n.add(t.envMapRotation,"y",0,360).name("Y").onFinishChange(()=>this.__onSettingChanged()),n.add(t.envMapRotation,"z",0,360).name("Z").onFinishChange(()=>this.__onSettingChanged())}__showCorrectShadowSettingsByType(e){switch(this.__accumulativeShadowSettingsFolder.hide(),this.__contactShadowSettingsFolder.hide(),e){case _l.ACCUMULATIVE:this.__accumulativeShadowSettingsFolder.show();break;case _l.CONTACT:this.__contactShadowSettingsFolder.show();break}}__addShadowTypeSettingsGui(e){e.add(this.productSettings.shadows,"shadowType",[_l.NONE,_l.ACCUMULATIVE,_l.CONTACT]).name("Shadow Type").onFinishChange(t=>{this.events.productSettingsShadowTypeUpdatedEvent.fire({shadowType:t}),this.__showCorrectShadowSettingsByType(t),this.__onSettingChanged()})}__addAcuumulativeShadowSettingsGui(e){this.__accumulativeShadowSettingsFolder=e.addFolder("Accumulative Shadow Settings");const t=this.productSettings.shadows.accumulativeShadows,n=t.shadowMaterial;this.__accumulativeShadowSettingsFolder.add(n,"opacity",0,1).name("Opacity").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(n,"alphaTest",0,1).name("Alpha Test").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.addColor(n,"color").name("Color").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(n,"blend",0,40).name("Blend").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"frames",2,100,1).name("Frames").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"scale",.5,30).name("Scale").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"radius",.1,5).name("Radius").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"ambient",0,1).name("Ambient").onFinishChange(()=>this.__onSettingChanged());const s=this.__accumulativeShadowSettingsFolder.addFolder("Light Direction");s.add(t.light.direction,"x",-10,10).name("X").onFinishChange(()=>this.__onSettingChanged()),s.add(t.light.direction,"y",-10,10).name("Y").onFinishChange(()=>this.__onSettingChanged()),s.add(t.light.direction,"z",-10,10).name("Z").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.close()}__addContactShadowSettingsGui(e){this.__contactShadowSettingsFolder=e.addFolder("Contact Shadow Settings");const t=this.productSettings.shadows.contactShadows;this.__contactShadowSettingsFolder.add(t,"planeLength",0,20).name("Plane Length").onFinishChange(n=>{t.planeLength=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"planeWidth",0,20).name("Plane Width").onFinishChange(n=>{t.planeWidth=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"cameraHeight",0,20).name("Camera Height").onFinishChange(n=>{t.cameraHeight=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"intensity",0,3).name("Intensity").onFinishChange(n=>{t.intensity=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"softness",0,3).name("Softness").onFinishChange(n=>{t.softness=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.close()}__onCanZoomChanged(e){e===!0?(this.__minDistanceSetting?.show(),this.__maxDistanceSetting?.show()):(this.__minDistanceSetting?.hide(),this.__maxDistanceSetting?.hide())}__onInfinitePolarAngleChanged(e){e===!0?(this.__minPolarAngleSetting?.hide(),this.__maxPolarAngleSetting?.hide()):(this.__minPolarAngleSetting?.show(),this.__maxPolarAngleSetting?.show())}__onInfiniteAzimuthAngleChanged(e){e===!0?(this.__minAzimuthAngleSetting?.hide(),this.__maxAzimuthAngleSetting?.hide()):(this.__minAzimuthAngleSetting?.show(),this.__maxAzimuthAngleSetting?.show())}__onSettingChanged(){this.events.productSettingUpdatedEvent.fire(),this._isDirty||(this._isDirty=!0,this._saveSettingsController&&this._saveSettingsController.disable(!1))}__rebuildGui(){this._isDirty=!1,this.gui&&this.gui.destroy(),this.__addGui()}async copySettings(){const e=JSON.stringify(this.productSettings.asJson(),null,2);if(await navigator.clipboard.writeText(e).catch(t=>{window.epigraph.logger.error({title:"Failed to copy settings",details:t,contextOverride:this._loggerContext})}),this.__copySettingButton){const t=this.__copySettingButton.$name.innerHTML;this.__copySettingButton.name("Copied!"),setTimeout(()=>{this.__copySettingButton?.name(t)},1500)}}importSettings(){if(!this.settingsToImport){window.epigraph.logger.warn({title:"Import failed",details:"Settings JSON is empty.",contextOverride:this._loggerContext});return}try{const e=JSON.parse(this.settingsToImport);this.productSettings.deepCopyProductSettings(e),this.__rebuildGui(),this.events.experienceUpdatedEvent.fire()}catch(e){window.epigraph.logger.error({title:"Failed to parse settings JSON",details:e,contextOverride:this._loggerContext})}}__addGui(){this.gui=new rx({autoPlace:!1,container:this.appWcRef.appUiContainerElemRef,injectStyles:!1,title:"Experience Settings"});const e=this.gui.addFolder("Import/Export");this.__copySettingButton=e.add(this,"copySettings").name("Copy Settings"),e.add(this,"settingsToImport").name("Paste JSON here"),e.add(this,"importSettings").name("Import Settings"),e.close(),this._saveSettingsController=this.gui.add(this,"saveSettings").name("Save Settings"),this._saveSettingsController?.$widget.classList.add("save-settings-button"),this._saveSettingsController?.disable(!0);const t=this.gui.addFolder("Camera");this.__addCameraSettingsGui(t),t.close();const n=this.gui.addFolder("Render");this.__addRenderSettingsGui(n),n.close();const s=this.gui.addFolder("Shadows");this.__addShadowTypeSettingsGui(s),this.__addAcuumulativeShadowSettingsGui(s),this.__addContactShadowSettingsGui(s),s.close(),this.__showCorrectShadowSettingsByType(this.productSettings.shadows.shadowType),this.__onCanZoomChanged(this.productSettings.camera.canZoom),this.__onInfinitePolarAngleChanged(this.productSettings.camera.infinitePolarAngle),this.__onInfiniteAzimuthAngleChanged(this.productSettings.camera.infiniteAzimuthAngle)}startInitialCameraUpdate(){this.appWcRef.enterViewState(),this.hide();const e=document.createElement("epg-button");e.setAttribute("label","Confirm View"),e.setAttribute("left-icon",""),e.setAttribute("right-icon",""),e.style.backgroundColor="#7fa66d",e.style.position="absolute",e.style.top="16px",e.style.right="16px",e.style.zIndex="100",e.style.pointerEvents="auto",e.addEventListener("click",()=>this.confirmInitialCameraUpdate()),this.appWcRef.appUiContainerElemRef.appendChild(e),this._confirmButton=e}confirmInitialCameraUpdate(){this.productSettings.camera.initial=this.appWcRef.cameraManager.getCurrentCameraTransforms(),this.appWcRef.enterDefaultState(),this._confirmButton&&(this._confirmButton.remove(),this._confirmButton=null),this.__onSettingChanged(),this.show()}saveSettings(){this.events.productSettingsSavedEvent.fire({updatedSettings:this.productSettings.asJson()}),this._isDirty=!1,this._saveSettingsController&&this._saveSettingsController.disable(!0)}show(){this.gui?.show()}hide(){this.gui?.hide()}connectedCallback(){super.connectedCallback(),this.show()}disconnectedCallback(){this.hide(),this.appWcRef.removeEventListener(this.events.experienceUpdatedEvent.name,this._onExperienceUpdatedHandler),super.disconnectedCallback()}}class JT{constructor({config:e,appWcRef:t,commentsManagerRef:n}){this.__cameraDirection=new Q,this.__localPosition=new Q,this.__worldPosition=new Q,this.__normals=new Q,this.__screenPosition=new pe,this.__camera={position:new Q,target:new Q,focalLength:35},this.entity=new Rt,this.visited=!1,this.__config=e,this.__appWcRef=t,this.__commentsManager=n,this.updateConfig(e)}static{this.styles=ht`
|
|
17520
|
+
value:`,a)}addColor(e,t,n=1){return new WJ(this,e,t,n)}addFolder(e){return new rx({parent:this,title:e})}load(e,t=!0){return e.controllers&&this.controllers.forEach(n=>{n instanceof $_||n._name in e.controllers&&n.load(e.controllers[n._name])}),t&&e.folders&&this.folders.forEach(n=>{n._title in e.folders&&n.load(e.folders[n._title])}),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach(n=>{if(!(n instanceof $_)){if(n._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${n._name}"`);t.controllers[n._name]=n.save()}}),e&&this.folders.forEach(n=>{if(n._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${n._title}"`);t.folders[n._title]=n.save()}),t}open(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");const n=r=>{r.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",n))};this.$children.addEventListener("transitionend",n);const s=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}}class cA extends Qo{constructor(){super(),this._onExperienceUpdatedHandler=()=>this.__rebuildGui(),this._isDirty=!1,this._saveSettingsController=null,this.__copySettingButton=null,this.settingsToImport="",this._confirmButton=null,this._loggerContext="SETTINGS MANAGER"}static{this.webComponentName="settings-manager"}static setupWebComponent(){window.customElements.get(cA.webComponentName)||window.customElements.define(cA.webComponentName,cA)}static{this.styles=ht``}firstUpdated(){this.appWcRef.addEventListener(this.events.experienceUpdatedEvent.name,this._onExperienceUpdatedHandler),this.__addGui()}get events(){return this.appWcRef.eventsManager}get productSettings(){return this.appWcRef.productSettings}__addCameraSettingsGui(e){const t=this.productSettings.camera;e.addColor(t,"backgroundColor").name("Background Color").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"backgroundAlpha",0,1).name("Background Alpha").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"focalLength",10,300).name("Focal Length").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"nearClip",0,3).name("Near Clip").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"farClip",0,1e4).name("Far Clip").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"canPan").name("Can Pan").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"canZoom").name("Can Zoom").onFinishChange(n=>{this.__onCanZoomChanged(n),this.__onSettingChanged()}),this.__minDistanceSetting=e.add(t,"minDistance",0,100).name("Min Distance").onFinishChange(()=>this.__onSettingChanged()),this.__maxDistanceSetting=e.add(t,"maxDistance",0,100).name("Max Distance").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"infinitePolarAngle").name("Infinite Polar Angle").onFinishChange(n=>{this.__onInfinitePolarAngleChanged(n),this.__onSettingChanged()}),this.__minPolarAngleSetting=e.add(t,"minPolarAngle",0,6.25).step(.01).name("Min Polar Angle").onFinishChange(()=>this.__onSettingChanged()),this.__maxPolarAngleSetting=e.add(t,"maxPolarAngle",0,6.25).step(.01).name("Max Polar Angle").onFinishChange(()=>this.__onSettingChanged()),e.add(t,"infiniteAzimuthAngle").name("Infinite Azimuth Angle").onFinishChange(n=>{this.__onInfiniteAzimuthAngleChanged(n),this.__onSettingChanged()}),this.__minAzimuthAngleSetting=e.add(t,"minAzimuthAngle",0,6.25).name("Min Azimuth Angle").step(.01).onFinishChange(()=>this.__onSettingChanged()),this.__maxAzimuthAngleSetting=e.add(t,"maxAzimuthAngle",0,6.25).name("Max Azimuth Angle").step(.01).onFinishChange(()=>this.__onSettingChanged()),e.add(this,"startInitialCameraUpdate").name("Change Initial Camera")}__addRenderSettingsGui(e){const t=this.productSettings.render;e.add(t,"envMap").name("Env Map").onFinishChange(()=>this.__onSettingChanged());const n=e.addFolder("Env Map Rotation");n.add(t.envMapRotation,"x",0,360).name("X").onFinishChange(()=>this.__onSettingChanged()),n.add(t.envMapRotation,"y",0,360).name("Y").onFinishChange(()=>this.__onSettingChanged()),n.add(t.envMapRotation,"z",0,360).name("Z").onFinishChange(()=>this.__onSettingChanged())}__showCorrectShadowSettingsByType(e){switch(this.__accumulativeShadowSettingsFolder.hide(),this.__contactShadowSettingsFolder.hide(),e){case _l.ACCUMULATIVE:this.__accumulativeShadowSettingsFolder.show();break;case _l.CONTACT:this.__contactShadowSettingsFolder.show();break}}__addShadowTypeSettingsGui(e){e.add(this.productSettings.shadows,"shadowType",[_l.NONE,_l.ACCUMULATIVE,_l.CONTACT]).name("Shadow Type").onFinishChange(t=>{this.events.productSettingsShadowTypeUpdatedEvent.fire({shadowType:t}),this.__showCorrectShadowSettingsByType(t),this.__onSettingChanged()})}__addAcuumulativeShadowSettingsGui(e){this.__accumulativeShadowSettingsFolder=e.addFolder("Accumulative Shadow Settings");const t=this.productSettings.shadows.accumulativeShadows,n=t.shadowMaterial;this.__accumulativeShadowSettingsFolder.add(n,"opacity",0,1).name("Opacity").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(n,"alphaTest",0,1).name("Alpha Test").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.addColor(n,"color").name("Color").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(n,"blend",0,40).name("Blend").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"frames",2,100,1).name("Frames").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"scale",.5,30).name("Scale").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"radius",.1,5).name("Radius").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.add(t.shadowParams,"ambient",0,1).name("Ambient").onFinishChange(()=>this.__onSettingChanged());const s=this.__accumulativeShadowSettingsFolder.addFolder("Light Direction");s.add(t.light.direction,"x",-10,10).name("X").onFinishChange(()=>this.__onSettingChanged()),s.add(t.light.direction,"y",-10,10).name("Y").onFinishChange(()=>this.__onSettingChanged()),s.add(t.light.direction,"z",-10,10).name("Z").onFinishChange(()=>this.__onSettingChanged()),this.__accumulativeShadowSettingsFolder.close()}__addContactShadowSettingsGui(e){this.__contactShadowSettingsFolder=e.addFolder("Contact Shadow Settings");const t=this.productSettings.shadows.contactShadows;this.__contactShadowSettingsFolder.add(t,"planeLength",0,20).name("Plane Length").onFinishChange(n=>{t.planeLength=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"planeWidth",0,20).name("Plane Width").onFinishChange(n=>{t.planeWidth=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"cameraHeight",0,20).name("Camera Height").onFinishChange(n=>{t.cameraHeight=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"intensity",0,3).name("Intensity").onFinishChange(n=>{t.intensity=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.add(t,"softness",0,3).name("Softness").onFinishChange(n=>{t.softness=n,this.__onSettingChanged()}),this.__contactShadowSettingsFolder.close()}__onCanZoomChanged(e){e===!0?(this.__minDistanceSetting?.show(),this.__maxDistanceSetting?.show()):(this.__minDistanceSetting?.hide(),this.__maxDistanceSetting?.hide())}__onInfinitePolarAngleChanged(e){e===!0?(this.__minPolarAngleSetting?.hide(),this.__maxPolarAngleSetting?.hide()):(this.__minPolarAngleSetting?.show(),this.__maxPolarAngleSetting?.show())}__onInfiniteAzimuthAngleChanged(e){e===!0?(this.__minAzimuthAngleSetting?.hide(),this.__maxAzimuthAngleSetting?.hide()):(this.__minAzimuthAngleSetting?.show(),this.__maxAzimuthAngleSetting?.show())}__onSettingChanged(){this.events.productSettingUpdatedEvent.fire(),this._isDirty||(this._isDirty=!0,this._saveSettingsController&&this._saveSettingsController.disable(!1))}__rebuildGui(){this._isDirty=!1,this.gui&&this.gui.destroy(),this.__addGui()}async copySettings(){const e=JSON.stringify(this.productSettings.asJson(),null,2);if(await navigator.clipboard.writeText(e).catch(t=>{window.epigraph.logger.error({title:"Failed to copy settings",details:t,contextOverride:this._loggerContext})}),this.__copySettingButton){const t=this.__copySettingButton.$name.innerHTML;this.__copySettingButton.name("Copied!"),setTimeout(()=>{this.__copySettingButton?.name(t)},1500)}}importSettings(){if(!this.settingsToImport){window.epigraph.logger.warn({title:"Import failed",details:"Settings JSON is empty.",contextOverride:this._loggerContext});return}try{const e=JSON.parse(this.settingsToImport);this.productSettings.deepCopyProductSettings(e),this.__rebuildGui(),this.events.experienceUpdatedEvent.fire()}catch(e){window.epigraph.logger.error({title:"Failed to parse settings JSON",details:e,contextOverride:this._loggerContext})}}__addGui(){this.gui=new rx({autoPlace:!1,container:this.appWcRef.appUiContainerElemRef,injectStyles:!1,title:"Experience Settings"});const e=this.gui.addFolder("Import/Export");this.__copySettingButton=e.add(this,"copySettings").name("Copy Settings"),e.add(this,"settingsToImport").name("Paste JSON here"),e.add(this,"importSettings").name("Import Settings"),e.close(),this._saveSettingsController=this.gui.add(this,"saveSettings").name("Save Settings"),this._saveSettingsController?.$widget.classList.add("save-settings-button"),this._saveSettingsController?.disable(!0);const t=this.gui.addFolder("Camera");this.__addCameraSettingsGui(t),t.close();const n=this.gui.addFolder("Render");this.__addRenderSettingsGui(n),n.close();const s=this.gui.addFolder("Shadows");this.__addShadowTypeSettingsGui(s),this.__addAcuumulativeShadowSettingsGui(s),this.__addContactShadowSettingsGui(s),s.close(),this.__showCorrectShadowSettingsByType(this.productSettings.shadows.shadowType),this.__onCanZoomChanged(this.productSettings.camera.canZoom),this.__onInfinitePolarAngleChanged(this.productSettings.camera.infinitePolarAngle),this.__onInfiniteAzimuthAngleChanged(this.productSettings.camera.infiniteAzimuthAngle)}startInitialCameraUpdate(){this.appWcRef.enterViewState(),this.hide();const e=document.createElement("epg-button");e.setAttribute("label","Confirm View"),e.setAttribute("left-icon",""),e.setAttribute("right-icon",""),e.style.backgroundColor="#7fa66d",e.style.position="absolute",e.style.top="16px",e.style.right="16px",e.style.zIndex="100",e.style.pointerEvents="auto",e.addEventListener("click",()=>this.confirmInitialCameraUpdate()),this.appWcRef.appUiContainerElemRef.appendChild(e),this._confirmButton=e}confirmInitialCameraUpdate(){this.productSettings.camera.initial=this.appWcRef.cameraManager.getCurrentCameraTransforms(),this.appWcRef.enterDefaultState(),this._confirmButton&&(this._confirmButton.remove(),this._confirmButton=null),this.__onSettingChanged(),this.show()}saveSettings(){this.events.productSettingsSavedEvent.fire({updatedSettings:this.productSettings.asJson()}),this._isDirty=!1,this._saveSettingsController&&this._saveSettingsController.disable(!0)}show(){this.gui?.show()}hide(){this.gui?.hide()}connectedCallback(){super.connectedCallback(),this.show()}disconnectedCallback(){this.hide(),this.appWcRef.removeEventListener(this.events.experienceUpdatedEvent.name,this._onExperienceUpdatedHandler),super.disconnectedCallback()}}class JT{constructor({config:e,appWcRef:t,commentsManagerRef:n}){this.__cameraDirection=new Q,this.__localPosition=new Q,this.__worldPosition=new Q,this.__normals=new Q,this.__screenPosition=new pe,this.__camera={position:new Q,target:new Q,focalLength:35},this.entity=new Rt,this.visited=!1,this.__config=e,this.__appWcRef=t,this.__commentsManager=n,this.updateConfig(e)}static{this.styles=ht`
|
|
17521
17521
|
:host {
|
|
17522
17522
|
* {
|
|
17523
17523
|
user-select: none;
|