@epigraph/solutions 1.0.22 → 1.0.23
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 +129 -129
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ var Pp=(s=>(s.Release="release",s.Staging="staging",s.Dev="dev",s))(Pp||{});let
|
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const S0=globalThis;let Gc=class extends Bc{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=iD(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Zc}};Gc._$litElement$=!0,Gc.finalized=!0,S0.litElementHydrateSupport?.({LitElement:Gc});const sD=S0.litElementPolyfillSupport;sD?.({LitElement:Gc});(S0.litElementVersions??=[]).push("4.2.0");let rD=class extends Gc{constructor(e,t){super(),this._isReady=!1,this._elementName="epigraph-base-solution-lit",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this._environment=t,this._solutionVersion=e,this._xPath=Og.generateXPath(this),this._uuid=Og.safeGenerateUuid()??this._xPath,new Og(this),this._isReady=!0,window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}};var so=(s=>(s.UNAVAILABLE="unavailable",s.AVAILABLE="available",s.RESTRICTED="restricted",s))(so||{});const tv=Symbol("data"),zg=Symbol("next"),aD=class FB{constructor(e){this[tv]=e,this[zg]=null}get data(){return this[tv]}set next(e){if(!(e instanceof FB)&&e!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[zg]=e}get next(){return this[zg]}};let nv=aD;const Hg=Symbol("head");let oD=class{constructor(){this[Hg]=null}set head(e){this[Hg]=e}get head(){return this[Hg]}addToTail(e){let t=this.head;if(t){for(;t.next!==null;)t=t?.next;return t.next=new nv(e)}return this.head=new nv(e)}removeHead(){const e=this.head;if(e)return this.head=e.next,e.data}};const iv=Symbol("queue"),pA=Symbol("size");let kB=class{constructor(){this[iv]=new oD,this[pA]=0}get queue(){return this[iv]}get size(){return this[pA]}enqueue(e){this.queue.addToTail(e),this[pA]++}dequeue(){const e=this.queue.removeHead();return this[pA]--,e}},Va=class{static{this.NOTIFICATION_NAME="epg-notification"}static{this.ACTION_SEND_EVENT="send-event"}static{this.ACTION_INITIALIZED="initialized"}static{this.ACTION_FAILED_INITIALIZATION="initialization-failed"}constructor(e,t,n,i,r,a){this._pluginName=e,this._trackingId=t,this._experienceId=n,this._solution=i,this._initializer=r,this._status=a}updateStatus(e){this._status=e}updateInitializer(e){this._initializer=e}notify(e,t){console.log("Notifying",e,t);const n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:e,eventDetails:t};window.dispatchEvent(new CustomEvent("epg-notification",{detail:n}))}},lD=class{constructor({trackingID:e,experienceID:t,solution:n,verboseLogging:i=!1}){this.__status=so.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod="NONE",this.__nexusFailureReported=!1,this.name=this.pluginName="GA4-PLUGIN",this.trackingID=e,this.experienceID=t,this.solution=n,this.verboseLogging=i,this.__queue=new kB,this.__epigraphNotifier=new Va(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(e,t){if(this.__queue.enqueue(e),!t){this.__status=so.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(Va.ACTION_FAILED_INITIALIZATION,{}));return}const e=performance.now();if(this.__initializationAttempts>0&&e-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=e,this.__initializationAttempts++;const t=this.detectAndSetupAnalytics();t.success?(this.__isInitialized=!0,this.__status=so.AVAILABLE,this.__initializationMethod=t.method,this.dataLayerName=t.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${t.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(Va.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${t.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){const e=this.detectGTM();if(e)return this.logger(`GTM detected with container ID: ${e.containerId}`),this.__epigraphNotifier.updateInitializer("GTM"),{success:!0,method:"GTM",dataLayerName:e.dataLayerName};const t=this.findGA4Info(this.trackingID);if(t){const n=t.l||"dataLayer";return this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.__epigraphNotifier.updateInitializer("GA4"),{success:!0,method:"GA4",dataLayerName:n}}return{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const e=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const t of Array.from(e)){const n=t.getAttribute("src");if(n){const i=n.match(/gtm\.js\?id=([^&]+)/);if(i&&i.length>0){const r=n.match(/&l=([^&]+)/),a=r?r[1]:"dataLayer";return{containerId:i[1],dataLayerName:a}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let e=this.__queue.size;for(let t=0;t<e;t++){const n=this.__queue.dequeue();try{this.__initializationMethod==="GTM"?(this.sendGTMEvent(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__initializationMethod==="GA4"?(this.sendGA4Event(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__queue.enqueue(n)}catch(i){this.logger(`Error sending event ${n.eventName}: ${i}`),this.__queue.enqueue(n)}}}async sendGTMEvent(e){let t=e.getGTMParameters(this.solution,this.experienceID,this.trackingID);const n=t;this.isValidPayload(t)||(t=await this.convertGTMParametersToEpgEventTag(e.eventName,t)),this.dataLayer&&(this.dataLayer.push(t),this.__epigraphNotifier.notify(Va.ACTION_SEND_EVENT,n))}async sendGA4Event(e){let t=e.getGa4Parameters(this.solution,this.experienceID,this.trackingID);const n=t;this.isValidPayload(t)||(t=await this.convertGA4ParametersToEpgEventTag(t)),window.gtag("event",e.eventName,t),this.__epigraphNotifier.notify(Va.ACTION_SEND_EVENT,n)}isValidPayload(e){if(Object.keys(e).length>=25)return!1;for(const[t,n]of Object.entries(e))if(t!=="items"&&(t.length>40||String(n).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(e,t){try{let n=await this.sendGA4LongParameters(t);return{event:e,epg_event_tag:n,send_to:this.trackingID}}catch{return t}}async convertGA4ParametersToEpgEventTag(e){try{return{epg_event_tag:await this.sendGA4LongParameters(e),send_to:this.trackingID}}catch{return e}}logger(e){this.verboseLogging&&console.warn(e)}async sendGA4LongParameters(e){const t="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:e};try{const i=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return i.ok?(await i.json())?.id??"":""}catch{return""}}async reportFailureToNexus(e,t){try{const n={plugin:"GA4",trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:e,errorMessage:t,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4Info(e){if(window.google_tag_manager&&window.google_tag_manager[e]){const n=window.google_tag_manager[e];if(n&&n.dataLayerName)return{fullSrc:"",id:e,l:n.dataLayerName}}const t=document.querySelectorAll("script[src]");for(const n of t){const i=n.getAttribute("src");if(i&&i.includes(e)){const r=new URL(i,location.href),a=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:a.id||void 0,l:a.l||void 0}}}return null}};class cD{constructor({trackingID:e,experienceID:t,solution:n,sessionId:i,xPath:r,verboseLogging:a=!1,sendToStaging:o=!1}){this.__status=so.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=i,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=e,this.experienceID=t,this.solution=n,this.verboseLogging=a,this.__queue=new kB,this.url=o?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=so.AVAILABLE,this.__epigraphNotifier=new Va(this.pluginName,this.trackingID,this.experienceID,this.solution,"NEXUS",this.__status),this.__epigraphNotifier.notify(Va.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+"-"+this.trackingID}setupPlugin(){}async sendEvent(e,t){if(this.__queue.enqueue(e),!t){this.__status=so.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let e=0;e<this.__queue.size;e++){const t=this.__queue.dequeue(),n={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:t.eventName,parameters:t.getNexusParameters()};try{return(await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<"u"?window.location.origin:""},body:JSON.stringify(n)})).ok&&this.__epigraphNotifier.notify(Va.ACTION_SEND_EVENT,n),""}catch{return""}this.__sentEventCount++}return""}}let hD=class{constructor(e){this.consentSet=!1,this.consent=!1,this.pluginName="OneTrustConsentPlugin",this.consentIdentifier=e,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let e=window.OnetrustActiveGroups;e!==void 0&&e.split(",").forEach(t=>{t===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener("load",()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust=="object"&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}};var UB=(s=>(s.OneTrust="onetrust",s))(UB||{});let gi=class{constructor({eventName:e,interactiveEvent:t,customParameters:n}){this.eventName=e,this.interactiveEvent=t,this.customParameters=n}getGa4Parameters(e,t,n){let i={solution:e,experience_id:t,interactive_event:this.interactiveEvent,send_to:n};return i=Object.assign(i,JSON.parse(JSON.stringify(this.customParameters))),i}getGTMParameters(e,t,n){let i={solution:e,experience_id:t,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return i=Object.assign(i,JSON.parse(JSON.stringify(this.customParameters))),i}getNexusParameters(){let e={interactive_event:this.interactiveEvent};return e=Object.assign(e,JSON.parse(JSON.stringify(this.customParameters))),e}};var OB=(s=>(s.VARIANT="variant",s.CATEGORY_VARIANT="category_variant",s.GEOMETRY="geometry",s.CATEGORY_GEOMETRY="category_geometry",s.GLOBAL="global",s))(OB||{}),B0=(s=>(s.AR="ar",s.QR="qr",s.INFO="info",s.INSTRUCTIONS="instructions",s.DOWNLOAD="download",s.PREVIEW_CART="preview_cart",s.HOTSPOT_PANEL="hotspot_panel",s.SHARE_MODAL="share_modal",s.RESTART_MODAL="restart_modal",s.REMOVE_MODAL="remove_modal",s.LOAD_PRECONFIG_MODAL="load_preconfig_modal",s.MOVE_MODAL="move_modal",s.OUT_OF_STOCK_MODAL="out_of_stock_modal",s))(B0||{}),T0=(s=>(s.NETWORK="network",s.EXPERIENCE_CONFIG_ERROR="experience-config-error",s.SCENE_LOAD_ERROR="scene-load-error",s.INITIAL_SCENE_LOAD_ERROR="initial-scene-load-error",s.AUTHENTICATION_FAILED="authentication-failed",s))(T0||{}),M0=(s=>(s.AUTO="auto",s.BUTTON="button",s.HOTSPOT="hotspot",s.GESTURE="gesture",s))(M0||{}),Wd=(s=>(s.USD="USD",s.EUR="EUR",s.GBP="GBP",s.CAD="CAD",s))(Wd||{}),GB=(s=>(s.AR="ar",s.QR="qr",s.AR_WEBGL2="ar-webgl2",s.QR_WEBGL2="qr-webgl2",s))(GB||{}),zB=(s=>(s.AR_VIEW="ar_view",s.DIMENSION_TOGGLE="dimension_toggle",s.HOTSPOTS_TOGGLE="hotspots_toggle",s.HELP_TOGGLE="help_toggle",s.UTILITY_MENU_TOGGLE="utility_menu_toggle",s.HOTSPOT_ENTER="hotspot_enter",s.HOTSPOT_EXIT="hotspot_exit",s.SHARE="share",s.PDF_DOWNLOAD="pdf_download",s.COPY="copy",s.RESTART="restart",s.INSTRUCTIONS_SHOW="show_instructions",s.REVIEW_CART="review_cart",s.SHOP_NOW="shop_now",s.SUB_CATEGORY="sub_category",s.NEXT_STEP="next_step",s.PREVIOUS_STEP="previous_step",s))(zB||{}),R0=(s=>(s.ZOOM="zoom",s.ROTATE="rotate",s.PAN="pan",s))(R0||{}),HB=(s=>(s.CONFIGURATION="configuration",s.SCENE="scene",s.PRODUCT="product",s))(HB||{}),$B=(s=>(s.FACEBOOK="facebook",s.TWITTER="twitter",s.EMAIL="email",s.COPY_LINK="copy_link",s.WHATSAPP="whatsapp",s.LINKEDIN="linkedin",s))($B||{});let uD=class extends gi{constructor(e){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:e}})}},dD=class extends gi{constructor(e){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:e}})}},AD=class extends gi{constructor(e,t){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t}})}},sv=class extends gi{static{this.MODULE_FAILED_ERRORS=T0}constructor(e,t,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t,error_type:n}})}};class Kh extends gi{static{this.SUPPORT_TYPE=GB}constructor(e){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:e}})}}class xa extends gi{static{this.BUTTON_TYPE=zB}constructor(e,t){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:e,button_name:t}})}}class Hr extends gi{static{this.PANEL_TYPE=B0}static{this.TRIGGER_SOURCE=M0}constructor(e,t,n,i){super({eventName:"epigraph_panel_opened",interactiveEvent:e,customParameters:{items:i,panel_type:t,trigger_source:n}})}}class $r extends gi{static{this.PANEL_TYPE=B0}static{this.TRIGGER_SOURCE=M0}constructor(e,t,n,i){super({eventName:"epigraph_panel_closed",interactiveEvent:e,customParameters:{items:i,panel_type:t,trigger_source:n}})}}let Bj=class extends gi{static{this.ACTION_PERFORMED=R0}constructor(e){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:e}})}};class Mj extends gi{static{this.INTERACTION_TYPE=R0}constructor(e){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:e}})}}class Rj extends gi{static{this.CURRENCY=Wd}constructor(e,t,n,i,r){super({eventName:"epigraph_item_added",interactiveEvent:e,customParameters:{items:r,value:t,currency:n,quantity:i}})}}let Dj=class extends gi{static{this.CURRENCY=Wd}constructor(e,t,n,i){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:i,value:e,currency:t,quantity:n}})}},Lj=class extends gi{static{this.VARIANT_CHANGE_TYPES=OB}constructor(e,t){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:t,change_type:e}})}};class Pj extends gi{static{this.CONTENT_TYPES=HB}static{this.SHARE_DESTINATIONS=$B}constructor(e,t,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:e,share_destination:t}})}}class Fj extends gi{static{this.CURRENCY=Wd}constructor(e,t,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}}let kj=class extends gi{static{this.CURRENCY=Wd}constructor(e,t,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}};/**
|
|
19
|
+
*/const S0=globalThis;let Gc=class extends Bc{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=iD(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Zc}};Gc._$litElement$=!0,Gc.finalized=!0,S0.litElementHydrateSupport?.({LitElement:Gc});const sD=S0.litElementPolyfillSupport;sD?.({LitElement:Gc});(S0.litElementVersions??=[]).push("4.2.0");let rD=class extends Gc{constructor(e,t){super(),this._isReady=!1,this._elementName="epigraph-base-solution-lit",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this._environment=t,this._solutionVersion=e,this._xPath=Og.generateXPath(this),this._uuid=Og.safeGenerateUuid()??this._xPath,new Og(this),this._isReady=!0,window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}};var so=(s=>(s.UNAVAILABLE="unavailable",s.AVAILABLE="available",s.RESTRICTED="restricted",s))(so||{});const tv=Symbol("data"),zg=Symbol("next"),aD=class FB{constructor(e){this[tv]=e,this[zg]=null}get data(){return this[tv]}set next(e){if(!(e instanceof FB)&&e!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[zg]=e}get next(){return this[zg]}};let nv=aD;const Hg=Symbol("head");let oD=class{constructor(){this[Hg]=null}set head(e){this[Hg]=e}get head(){return this[Hg]}addToTail(e){let t=this.head;if(t){for(;t.next!==null;)t=t?.next;return t.next=new nv(e)}return this.head=new nv(e)}removeHead(){const e=this.head;if(e)return this.head=e.next,e.data}};const iv=Symbol("queue"),pA=Symbol("size");let kB=class{constructor(){this[iv]=new oD,this[pA]=0}get queue(){return this[iv]}get size(){return this[pA]}enqueue(e){this.queue.addToTail(e),this[pA]++}dequeue(){const e=this.queue.removeHead();return this[pA]--,e}},Va=class{static{this.NOTIFICATION_NAME="epg-notification"}static{this.ACTION_SEND_EVENT="send-event"}static{this.ACTION_INITIALIZED="initialized"}static{this.ACTION_FAILED_INITIALIZATION="initialization-failed"}constructor(e,t,n,i,r,a){this._pluginName=e,this._trackingId=t,this._experienceId=n,this._solution=i,this._initializer=r,this._status=a}updateStatus(e){this._status=e}updateInitializer(e){this._initializer=e}notify(e,t){console.log("Notifying",e,t);const n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:e,eventDetails:t};window.dispatchEvent(new CustomEvent("epg-notification",{detail:n}))}},lD=class{constructor({trackingID:e,experienceID:t,solution:n,verboseLogging:i=!1}){this.__status=so.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod="NONE",this.__nexusFailureReported=!1,this.name=this.pluginName="GA4-PLUGIN",this.trackingID=e,this.experienceID=t,this.solution=n,this.verboseLogging=i,this.__queue=new kB,this.__epigraphNotifier=new Va(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(e,t){if(this.__queue.enqueue(e),!t){this.__status=so.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(Va.ACTION_FAILED_INITIALIZATION,{}));return}const e=performance.now();if(this.__initializationAttempts>0&&e-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=e,this.__initializationAttempts++;const t=this.detectAndSetupAnalytics();t.success?(this.__isInitialized=!0,this.__status=so.AVAILABLE,this.__initializationMethod=t.method,this.dataLayerName=t.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${t.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(Va.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${t.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){const e=this.detectGTM();if(e)return this.logger(`GTM detected with container ID: ${e.containerId}`),this.__epigraphNotifier.updateInitializer("GTM"),{success:!0,method:"GTM",dataLayerName:e.dataLayerName};const t=this.findGA4Info(this.trackingID);if(t){const n=t.l||"dataLayer";return this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.__epigraphNotifier.updateInitializer("GA4"),{success:!0,method:"GA4",dataLayerName:n}}return{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const e=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const t of Array.from(e)){const n=t.getAttribute("src");if(n){const i=n.match(/gtm\.js\?id=([^&]+)/);if(i&&i.length>0){const r=n.match(/&l=([^&]+)/),a=r?r[1]:"dataLayer";return{containerId:i[1],dataLayerName:a}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let e=this.__queue.size;for(let t=0;t<e;t++){const n=this.__queue.dequeue();try{this.__initializationMethod==="GTM"?(this.sendGTMEvent(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__initializationMethod==="GA4"?(this.sendGA4Event(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__queue.enqueue(n)}catch(i){this.logger(`Error sending event ${n.eventName}: ${i}`),this.__queue.enqueue(n)}}}async sendGTMEvent(e){let t=e.getGTMParameters(this.solution,this.experienceID,this.trackingID);const n=t;this.isValidPayload(t)||(t=await this.convertGTMParametersToEpgEventTag(e.eventName,t)),this.dataLayer&&(this.dataLayer.push(t),this.__epigraphNotifier.notify(Va.ACTION_SEND_EVENT,n))}async sendGA4Event(e){let t=e.getGa4Parameters(this.solution,this.experienceID,this.trackingID);const n=t;this.isValidPayload(t)||(t=await this.convertGA4ParametersToEpgEventTag(t)),window.gtag("event",e.eventName,t),this.__epigraphNotifier.notify(Va.ACTION_SEND_EVENT,n)}isValidPayload(e){if(Object.keys(e).length>=25)return!1;for(const[t,n]of Object.entries(e))if(t!=="items"&&(t.length>40||String(n).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(e,t){try{let n=await this.sendGA4LongParameters(t);return{event:e,epg_event_tag:n,send_to:this.trackingID}}catch{return t}}async convertGA4ParametersToEpgEventTag(e){try{return{epg_event_tag:await this.sendGA4LongParameters(e),send_to:this.trackingID}}catch{return e}}logger(e){this.verboseLogging&&console.warn(e)}async sendGA4LongParameters(e){const t="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:e};try{const i=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return i.ok?(await i.json())?.id??"":""}catch{return""}}async reportFailureToNexus(e,t){try{const n={plugin:"GA4",trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:e,errorMessage:t,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4Info(e){if(window.google_tag_manager&&window.google_tag_manager[e]){const n=window.google_tag_manager[e];if(n&&n.dataLayerName)return{fullSrc:"",id:e,l:n.dataLayerName}}const t=document.querySelectorAll("script[src]");for(const n of t){const i=n.getAttribute("src");if(i&&i.includes(e)){const r=new URL(i,location.href),a=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:a.id||void 0,l:a.l||void 0}}}return null}};class cD{constructor({trackingID:e,experienceID:t,solution:n,sessionId:i,xPath:r,verboseLogging:a=!1,sendToStaging:o=!1}){this.__status=so.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=i,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=e,this.experienceID=t,this.solution=n,this.verboseLogging=a,this.__queue=new kB,this.url=o?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=so.AVAILABLE,this.__epigraphNotifier=new Va(this.pluginName,this.trackingID,this.experienceID,this.solution,"NEXUS",this.__status),this.__epigraphNotifier.notify(Va.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+"-"+this.trackingID}setupPlugin(){}async sendEvent(e,t){if(this.__queue.enqueue(e),!t){this.__status=so.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let e=0;e<this.__queue.size;e++){const t=this.__queue.dequeue(),n={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:t.eventName,parameters:t.getNexusParameters()};try{return(await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<"u"?window.location.origin:""},body:JSON.stringify(n)})).ok&&this.__epigraphNotifier.notify(Va.ACTION_SEND_EVENT,n),""}catch{return""}this.__sentEventCount++}return""}}let hD=class{constructor(e){this.consentSet=!1,this.consent=!1,this.pluginName="OneTrustConsentPlugin",this.consentIdentifier=e,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let e=window.OnetrustActiveGroups;e!==void 0&&e.split(",").forEach(t=>{t===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener("load",()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust=="object"&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}};var UB=(s=>(s.OneTrust="onetrust",s))(UB||{});let gi=class{constructor({eventName:e,interactiveEvent:t,customParameters:n}){this.eventName=e,this.interactiveEvent=t,this.customParameters=n}getGa4Parameters(e,t,n){let i={solution:e,experience_id:t,interactive_event:this.interactiveEvent,send_to:n};return i=Object.assign(i,JSON.parse(JSON.stringify(this.customParameters))),i}getGTMParameters(e,t,n){let i={solution:e,experience_id:t,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return i=Object.assign(i,JSON.parse(JSON.stringify(this.customParameters))),i}getNexusParameters(){let e={interactive_event:this.interactiveEvent};return e=Object.assign(e,JSON.parse(JSON.stringify(this.customParameters))),e}};var OB=(s=>(s.VARIANT="variant",s.CATEGORY_VARIANT="category_variant",s.GEOMETRY="geometry",s.CATEGORY_GEOMETRY="category_geometry",s.GLOBAL="global",s))(OB||{}),B0=(s=>(s.AR="ar",s.QR="qr",s.INFO="info",s.INSTRUCTIONS="instructions",s.DOWNLOAD="download",s.PREVIEW_CART="preview_cart",s.HOTSPOT_PANEL="hotspot_panel",s.SHARE_MODAL="share_modal",s.RESTART_MODAL="restart_modal",s.REMOVE_MODAL="remove_modal",s.LOAD_PRECONFIG_MODAL="load_preconfig_modal",s.MOVE_MODAL="move_modal",s.OUT_OF_STOCK_MODAL="out_of_stock_modal",s))(B0||{}),T0=(s=>(s.NETWORK="network",s.EXPERIENCE_CONFIG_ERROR="experience-config-error",s.SCENE_LOAD_ERROR="scene-load-error",s.INITIAL_SCENE_LOAD_ERROR="initial-scene-load-error",s.AUTHENTICATION_FAILED="authentication-failed",s))(T0||{}),M0=(s=>(s.AUTO="auto",s.BUTTON="button",s.HOTSPOT="hotspot",s.GESTURE="gesture",s))(M0||{}),Wd=(s=>(s.USD="USD",s.EUR="EUR",s.GBP="GBP",s.CAD="CAD",s))(Wd||{}),GB=(s=>(s.AR="ar",s.QR="qr",s.AR_WEBGL2="ar-webgl2",s.QR_WEBGL2="qr-webgl2",s))(GB||{}),zB=(s=>(s.AR_VIEW="ar_view",s.DIMENSION_TOGGLE="dimension_toggle",s.HOTSPOTS_TOGGLE="hotspots_toggle",s.HELP_TOGGLE="help_toggle",s.UTILITY_MENU_TOGGLE="utility_menu_toggle",s.HOTSPOT_ENTER="hotspot_enter",s.HOTSPOT_EXIT="hotspot_exit",s.SHARE="share",s.PDF_DOWNLOAD="pdf_download",s.COPY="copy",s.RESTART="restart",s.INSTRUCTIONS_SHOW="show_instructions",s.REVIEW_CART="review_cart",s.SHOP_NOW="shop_now",s.SUB_CATEGORY="sub_category",s.NEXT_STEP="next_step",s.PREVIOUS_STEP="previous_step",s))(zB||{}),R0=(s=>(s.ZOOM="zoom",s.ROTATE="rotate",s.PAN="pan",s))(R0||{}),HB=(s=>(s.CONFIGURATION="configuration",s.SCENE="scene",s.PRODUCT="product",s))(HB||{}),$B=(s=>(s.FACEBOOK="facebook",s.TWITTER="twitter",s.EMAIL="email",s.COPY_LINK="copy_link",s.WHATSAPP="whatsapp",s.LINKEDIN="linkedin",s))($B||{});let uD=class extends gi{constructor(e){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:e}})}},dD=class extends gi{constructor(e){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:e}})}},AD=class extends gi{constructor(e,t){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t}})}},sv=class extends gi{static{this.MODULE_FAILED_ERRORS=T0}constructor(e,t,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t,error_type:n}})}};class Kh extends gi{static{this.SUPPORT_TYPE=GB}constructor(e){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:e}})}}class xa extends gi{static{this.BUTTON_TYPE=zB}constructor(e,t){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:e,button_name:t}})}}class Hr extends gi{static{this.PANEL_TYPE=B0}static{this.TRIGGER_SOURCE=M0}constructor(e,t,n,i){super({eventName:"epigraph_panel_opened",interactiveEvent:e,customParameters:{items:i,panel_type:t,trigger_source:n}})}}class $r extends gi{static{this.PANEL_TYPE=B0}static{this.TRIGGER_SOURCE=M0}constructor(e,t,n,i){super({eventName:"epigraph_panel_closed",interactiveEvent:e,customParameters:{items:i,panel_type:t,trigger_source:n}})}}let Tj=class extends gi{static{this.ACTION_PERFORMED=R0}constructor(e){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:e}})}};class Rj extends gi{static{this.INTERACTION_TYPE=R0}constructor(e){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:e}})}}class Dj extends gi{static{this.CURRENCY=Wd}constructor(e,t,n,i,r){super({eventName:"epigraph_item_added",interactiveEvent:e,customParameters:{items:r,value:t,currency:n,quantity:i}})}}let Qj=class extends gi{static{this.CURRENCY=Wd}constructor(e,t,n,i){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:i,value:e,currency:t,quantity:n}})}},Nj=class extends gi{static{this.VARIANT_CHANGE_TYPES=OB}constructor(e,t){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:t,change_type:e}})}};class Fj extends gi{static{this.CONTENT_TYPES=HB}static{this.SHARE_DESTINATIONS=$B}constructor(e,t,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:e,share_destination:t}})}}class kj extends gi{static{this.CURRENCY=Wd}constructor(e,t,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}}let Uj=class extends gi{static{this.CURRENCY=Wd}constructor(e,t,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}};/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright (c) 2023 Epigraph LLC. All Rights Reserved.
|
|
22
22
|
*
|
|
@@ -3916,7 +3916,7 @@ void main() {
|
|
|
3916
3916
|
`+n.join(`
|
|
3917
3917
|
`)+`
|
|
3918
3918
|
----------`);var A=new Function("compile",n.join(`
|
|
3919
|
-
`));return A(s.bind(void 0,t))}return Pm=e,Pm}var Fm,rC;function uG(){if(rC)return Fm;rC=1;var s=hG();function e(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function t(n){var i=new e;i.pre=n.pre,i.body=n.body,i.post=n.post;var r=n.args.slice(0);i.argTypes=r;for(var a=0;a<r.length;++a){var o=r[a];if(o==="array"||typeof o=="object"&&o.blockIndices){if(i.argTypes[a]="array",i.arrayArgs.push(a),i.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),i.shimArgs.push("array"+a),a<i.pre.args.length&&i.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array args");if(a<i.post.args.length&&i.post.args[a].count>0)throw new Error("cwise: post() block may not reference array args")}else if(o==="scalar")i.scalarArgs.push(a),i.shimArgs.push("scalar"+a);else if(o==="index"){if(i.indexArgs.push(a),a<i.pre.args.length&&i.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array index");if(a<i.body.args.length&&i.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array index");if(a<i.post.args.length&&i.post.args[a].count>0)throw new Error("cwise: post() block may not reference array index")}else if(o==="shape"){if(i.shapeArgs.push(a),a<i.pre.args.length&&i.pre.args[a].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(a<i.body.args.length&&i.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array shape");if(a<i.post.args.length&&i.post.args[a].lvalue)throw new Error("cwise: post() block may not write to array shape")}else if(typeof o=="object"&&o.offset)i.argTypes[a]="offset",i.offsetArgs.push({array:o.array,offset:o.offset}),i.offsetArgIndex.push(a);else throw new Error("cwise: Unknown argument type "+r[a])}if(i.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(i.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(i.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(i.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return i.debug=!!n.printCode||!!n.debug,i.funcName=n.funcName||"cwise",i.blockSize=n.blockSize||64,s(i)}return Fm=t,Fm}var aC;function dG(){return aC||(aC=1,(function(s){var e=uG(),t={body:"",args:[],thisVars:[],localVars:[]};function n(d){if(!d)return t;for(var A=0;A<d.args.length;++A){var p=d.args[A];A===0?d.args[A]={name:p,lvalue:!0,rvalue:!!d.rvalue,count:d.count||1}:d.args[A]={name:p,lvalue:!1,rvalue:!0,count:1}}return d.thisVars||(d.thisVars=[]),d.localVars||(d.localVars=[]),d}function i(d){return e({args:d.args,pre:n(d.pre),body:n(d.body),post:n(d.proc),funcName:d.funcName})}function r(d){for(var A=[],p=0;p<d.args.length;++p)A.push("a"+p);var g=new Function("P",["return function ",d.funcName,"_ndarrayops(",A.join(","),") {P(",A.join(","),");return a0}"].join(""));return g(i(d))}var a={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};(function(){for(var d in a){var A=a[d];s[d]=r({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+A+"c"},funcName:d}),s[d+"eq"]=r({args:["array","array"],body:{args:["a","b"],body:"a"+A+"=b"},funcName:d+"eq"}),s[d+"s"]=r({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+A+"s"},funcName:d+"s"}),s[d+"seq"]=r({args:["array","scalar"],body:{args:["a","s"],body:"a"+A+"=s"},funcName:d+"seq"})}})();var o={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var d in o){var A=o[d];s[d]=r({args:["array","array"],body:{args:["a","b"],body:"a="+A+"b"},funcName:d}),s[d+"eq"]=r({args:["array"],body:{args:["a"],body:"a="+A+"a"},funcName:d+"eq"})}})();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var d in l){var A=l[d];s[d]=r({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+A+"c"},funcName:d}),s[d+"s"]=r({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+A+"s"},funcName:d+"s"}),s[d+"eq"]=r({args:["array","array"],body:{args:["a","b"],body:"a=a"+A+"b"},funcName:d+"eq"}),s[d+"seq"]=r({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+A+"s"},funcName:d+"seq"})}})();var c=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var d=0;d<c.length;++d){var A=c[d];s[A]=r({args:["array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:A}),s[A+"eq"]=r({args:["array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},funcName:A+"eq"})}})();var h=["max","min","atan2","pow"];(function(){for(var d=0;d<h.length;++d){var A=h[d];s[A]=r({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:A}),s[A+"s"]=r({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:A+"s"}),s[A+"eq"]=r({args:["array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},funcName:A+"eq"}),s[A+"seq"]=r({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},funcName:A+"seq"})}})();var u=["atan2","pow"];(function(){for(var d=0;d<u.length;++d){var A=u[d];s[A+"op"]=r({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:A+"op"}),s[A+"ops"]=r({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:A+"ops"}),s[A+"opeq"]=r({args:["array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},funcName:A+"opeq"}),s[A+"opseq"]=r({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},funcName:A+"opseq"})}})(),s.any=e({args:["array"],pre:t,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),s.all=e({args:["array"],pre:t,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),s.sum=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),s.prod=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),s.norm2squared=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),s.norm2=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),s.norminf=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),s.norm1=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),s.sup=e({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),s.inf=e({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),s.argmin=e({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),s.argmax=e({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),s.random=r({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),s.assign=r({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),s.assigns=r({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),s.equals=e({args:["array","array"],pre:t,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})})(Qm)),Qm}dG();function AG(s,e){if(!(s instanceof Uint8Array))throw new Error("[ndarray-pixels] Input must be Uint8Array or Buffer.");const t=new Blob([s],{type:e});return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(n=>{const r=new OffscreenCanvas(n.width,n.height).getContext("2d");r.drawImage(n,0,0);const a=r.getImageData(0,0,n.width,n.height);return oG(new Uint8Array(a.data),[n.width,n.height,4],[4,4*n.width,1],0)})}async function pG(s,e){return AG(s,e)}function Pf(){return Pf=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(s[n]=t[n])}return s},Pf.apply(null,arguments)}const{POINTS:lX,LINES:cX,LINE_STRIP:hX,LINE_LOOP:uX,TRIANGLES:dX,TRIANGLE_STRIP:AX,TRIANGLE_FAN:pX}=as.Mode;function xM(s,e){return Object.defineProperty(e,"name",{value:s}),e}function wM(s,e){const t=Pf({},s);for(const n in e)e[n]!==void 0&&(t[n]=e[n]);return t}function fG(s,e){if(s==null&&e==null)return!0;if(s==null||e==null||s.length!==e.length)return!1;for(let t=0;t<s.length;t++)if(s[t]!==e[t])return!1;return!0}function SM(s){for(const e in s)return!1;return!0}var Ff=typeof Float32Array<"u"?Float32Array:Array,oC;(function(s){s.RENDER="render",s.RENDER_CACHED="render-cached",s.UPLOAD="upload",s.UPLOAD_NAIVE="upload-naive",s.DISTINCT="distinct",s.DISTINCT_POSITION="distinct-position",s.UNUSED="unused"})(oC||(oC={}));function gG(){var s=new Ff(3);return Ff!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0),s}function mG(s,e,t){return s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s}var EG=mG;(function(){var s=gG();return function(e,t,n,i,r,a){var o,l;for(t||(t=3),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;o<l;o+=t)s[0]=e[o],s[1]=e[o+1],s[2]=e[o+2],r(s,s,a),e[o]=s[0],e[o+1]=s[1],e[o+2]=s[2];return e}})();const{FLOAT:fX}=Le.ComponentType,{LINES:gX,LINE_STRIP:mX,LINE_LOOP:EX,TRIANGLES:yX,TRIANGLE_STRIP:_X,TRIANGLE_FAN:bX}=as.Mode,ao="dedup",km={keepUniqueNames:!1,propertyTypes:[j.ACCESSOR,j.MESH,j.TEXTURE,j.MATERIAL,j.SKIN]};function yG(s=km){const e=wM(km,s),t=new Set(e.propertyTypes);for(const n of e.propertyTypes)if(!km.propertyTypes.includes(n))throw new Error(`${ao}: Unsupported deduplication on type "${n}".`);return xM(ao,n=>{const i=n.getLogger();t.has(j.ACCESSOR)&&_G(n),t.has(j.TEXTURE)&&vG(n,e),t.has(j.MATERIAL)&&IG(n,e),t.has(j.MESH)&&bG(n,e),t.has(j.SKIN)&&CG(n,e),i.debug(`${ao}: Complete.`)})}function _G(s){const e=s.getLogger(),t=new Map,n=new Map,i=new Map,r=new Map,a=s.getRoot().listMeshes();a.forEach(u=>{u.listPrimitives().forEach(d=>{d.listAttributes().forEach(A=>o(A,n)),o(d.getIndices(),t)})});for(const u of s.getRoot().listAnimations())for(const d of u.listSamplers())o(d.getInput(),i),o(d.getOutput(),r);function o(u,d){if(!u)return;const A=[u.getCount(),u.getType(),u.getComponentType(),u.getNormalized(),u.getSparse()].join(":");let p=d.get(A);p||d.set(A,p=new Set),p.add(u)}function l(u,d){for(let A=0;A<u.length;A++){const p=u[A],g=nt.toView(p.getArray());if(!d.has(p))for(let m=A+1;m<u.length;m++){const f=u[m];d.has(f)||nt.equals(g,nt.toView(f.getArray()))&&d.set(f,p)}}}let c=0;const h=new Map;for(const u of[n,t,i,r])for(const d of u.values())c+=d.size,l(Array.from(d),h);e.debug(`${ao}: Merged ${h.size} of ${c} accessors.`),a.forEach(u=>{u.listPrimitives().forEach(d=>{d.listAttributes().forEach(p=>{h.has(p)&&d.swap(p,h.get(p))});const A=d.getIndices();A&&h.has(A)&&d.swap(A,h.get(A))})});for(const u of s.getRoot().listAnimations())for(const d of u.listSamplers()){const A=d.getInput(),p=d.getOutput();A&&h.has(A)&&d.swap(A,h.get(A)),p&&h.has(p)&&d.swap(p,h.get(p))}Array.from(h.keys()).forEach(u=>u.dispose())}function bG(s,e){const t=s.getLogger(),n=s.getRoot(),i=new Map;n.listAccessors().forEach((o,l)=>i.set(o,l)),n.listMaterials().forEach((o,l)=>i.set(o,l));const r=n.listMeshes().length,a=new Map;for(const o of n.listMeshes()){const l=[];for(const h of o.listPrimitives())l.push(BM(h,i));let c="";if(e.keepUniqueNames&&(c+=o.getName()+";"),c+=l.join(";"),a.has(c)){const h=a.get(c);o.listParents().forEach(u=>{u.propertyType!==j.ROOT&&u.swap(o,h)}),o.dispose()}else a.set(c,o)}t.debug(`${ao}: Merged ${r-a.size} of ${r} meshes.`)}function vG(s,e){const t=s.getLogger(),n=s.getRoot(),i=n.listTextures(),r=new Map;for(let a=0;a<i.length;a++){const o=i[a],l=o.getImage();if(!r.has(o))for(let c=a+1;c<i.length;c++){const h=i[c],u=h.getImage();if(r.has(h)||o.getMimeType()!==h.getMimeType()||e.keepUniqueNames&&o.getName()!==h.getName())continue;const d=o.getSize(),A=h.getSize();!d||!A||d[0]===A[0]&&d[1]===A[1]&&(!l||!u||nt.equals(l,u)&&r.set(h,o))}}t.debug(`${ao}: Merged ${r.size} of ${n.listTextures().length} textures.`),Array.from(r.entries()).forEach(([a,o])=>{a.listParents().forEach(l=>{l instanceof Nh||l.swap(a,o)}),a.dispose()})}function IG(s,e){const t=s.getLogger(),i=s.getRoot().listMaterials(),r=new Map,a=new Map,o=new Set;e.keepUniqueNames||o.add("name");for(let l=0;l<i.length;l++){const c=i[l];if(!r.has(c)&&!lC(c,a))for(let h=l+1;h<i.length;h++){const u=i[h];r.has(u)||lC(u,a)||c.equals(u,o)&&r.set(u,c)}}t.debug(`${ao}: Merged ${r.size} of ${i.length} materials.`),Array.from(r.entries()).forEach(([l,c])=>{l.listParents().forEach(h=>{h instanceof Nh||h.swap(l,c)}),l.dispose()})}function CG(s,e){const t=s.getLogger(),i=s.getRoot().listSkins(),r=new Map,a=new Set(["joints"]);e.keepUniqueNames||a.add("name");for(let o=0;o<i.length;o++){const l=i[o];if(!r.has(l))for(let c=o+1;c<i.length;c++){const h=i[c];r.has(h)||l.equals(h,a)&&fG(l.listJoints(),h.listJoints())&&r.set(h,l)}}t.debug(`${ao}: Merged ${r.size} of ${i.length} skins.`),Array.from(r.entries()).forEach(([o,l])=>{o.listParents().forEach(c=>{c instanceof Nh||c.swap(o,l)}),o.dispose()})}function BM(s,e){const t=[];for(const n of s.listSemantics()){const i=s.getAttribute(n);t.push(n+":"+e.get(i))}if(s instanceof as){const n=s.getIndices();n&&t.push("indices:"+e.get(n));const i=s.getMaterial();i&&t.push("material:"+e.get(i)),t.push("mode:"+s.getMode());for(const r of s.listTargets())t.push("target:"+BM(r,e))}return t.join(",")}function lC(s,e){if(e.has(s))return e.get(s);const t=s.getGraph(),n=new Set,i=t.listParentEdges(s);for(;i.length>0;){const r=i.pop();if(r.getAttributes().modifyChild===!0)return e.set(s,!0),!0;const a=r.getChild();if(!n.has(a))for(const o of t.listChildEdges(a))i.push(o)}return e.set(s,!1),!1}const{TEXTURE_INFO:vX,ROOT:IX}=j;function TM(){var s=new Ff(4);return Ff!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0),s}function xG(s,e,t){return s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s}function wG(s,e,t){return s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s}function SG(s,e,t){return s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s}function BG(s,e,t){return s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s}function TG(s){var e=s[0],t=s[1],n=s[2],i=s[3];return Math.sqrt(e*e+t*t+n*n+i*i)}var MM=wG,MG=SG,RM=TG;(function(){var s=TM();return function(e,t,n,i,r,a){var o,l;for(t||(t=4),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;o<l;o+=t)s[0]=e[o],s[1]=e[o+1],s[2]=e[o+2],s[3]=e[o+3],r(s,s,a),e[o]=s[0],e[o+1]=s[1],e[o+2]=s[2],e[o+3]=s[3];return e}})();const RG=/color|emissive|diffuse/i;function DG(s){return s.getGraph().listParentEdges(s).some(i=>i.getAttributes().isColor||RG.test(i.getName()))?"srgb":null}function QG(s){const e=s.getGraph(),t=new Set,n=new Set;function i(r){const a=new Set;for(const o of e.listChildEdges(r))o.getChild()instanceof Nd&&a.add(o.getName()+"Info");for(const o of e.listChildEdges(r)){const l=o.getChild();t.has(l)||(t.add(l),l instanceof en&&a.has(o.getName())?n.add(l):l instanceof ln&&i(l))}}return i(s),Array.from(n)}function LG(s){const t=fb.fromGraph(s.getGraph()).getRoot(),n=s.getGraph().listParentEdges(s).filter(i=>i.getParent()!==t).map(i=>i.getName());return Array.from(new Set(n))}const Pc="prune",L_=3/255,cC={propertyTypes:[j.NODE,j.SKIN,j.MESH,j.CAMERA,j.PRIMITIVE,j.PRIMITIVE_TARGET,j.ANIMATION,j.MATERIAL,j.TEXTURE,j.ACCESSOR,j.BUFFER],keepLeaves:!1,keepAttributes:!1,keepIndices:!1,keepSolidTextures:!1,keepExtras:!1};function NG(s=cC){const e=wM(cC,s),t=new Set(e.propertyTypes),n=e.keepExtras;return xM(Pc,async i=>{const r=i.getLogger(),a=i.getRoot(),o=i.getGraph(),l=new PG,c=h=>l.dispose(h.target);if(o.addEventListener("node:dispose",c),t.has(j.MESH))for(const h of a.listMeshes())h.listPrimitives().length>0||h.dispose();if(t.has(j.NODE)){if(!e.keepLeaves)for(const h of a.listScenes())DM(o,h,n);for(const h of a.listNodes())As(h,n)}if(t.has(j.SKIN))for(const h of a.listSkins())As(h,n);if(t.has(j.MESH))for(const h of a.listMeshes())As(h,n);if(t.has(j.CAMERA))for(const h of a.listCameras())As(h,n);if(t.has(j.PRIMITIVE)&&hC(o,j.PRIMITIVE,n),t.has(j.PRIMITIVE_TARGET)&&hC(o,j.PRIMITIVE_TARGET,n),!e.keepAttributes&&t.has(j.ACCESSOR)){const h=new Map;for(const u of a.listMeshes())for(const d of u.listPrimitives()){const A=d.getMaterial();if(!A)continue;const p=QM(i,d,A),g=FG(d,p);uC(d,g),d.listTargets().forEach(m=>uC(m,g)),h.has(A)?h.get(A).add(d):h.set(A,new Set([d]))}for(const[u,d]of h)kG(u,Array.from(d))}if(t.has(j.ANIMATION))for(const h of a.listAnimations()){for(const u of h.listChannels())u.getTargetNode()||u.dispose();if(h.listChannels().length)h.listSamplers().forEach(u=>As(u,n));else{const u=h.listSamplers();As(h,n),u.forEach(d=>As(d,n))}}if(t.has(j.MATERIAL)&&a.listMaterials().forEach(h=>As(h,n)),t.has(j.TEXTURE)&&(a.listTextures().forEach(h=>As(h,n)),e.keepSolidTextures||await UG(i)),t.has(j.ACCESSOR)&&a.listAccessors().forEach(h=>As(h,n)),t.has(j.BUFFER)&&a.listBuffers().forEach(h=>As(h,n)),o.removeEventListener("node:dispose",c),l.empty())r.debug(`${Pc}: No unused properties found.`);else{const h=l.entries().map(([u,d])=>`${u} (${d})`).join(", ");r.info(`${Pc}: Removed types... ${h}`)}r.debug(`${Pc}: Complete.`)})}class PG{constructor(){this.disposed={}}empty(){for(const e in this.disposed)return!1;return!0}entries(){return Object.entries(this.disposed)}dispose(e){this.disposed[e.propertyType]=this.disposed[e.propertyType]||0,this.disposed[e.propertyType]++}}function As(s,e){const t=s.listParents().filter(i=>!(i instanceof Nh||i instanceof Zd)),n=e&&!SM(s.getExtras());!t.length&&!n&&s.dispose()}function hC(s,e,t){for(const n of s.listEdges()){const i=n.getParent();i.propertyType===e&&As(i,t)}}function DM(s,e,t){if(e.listChildren().forEach(a=>DM(s,a,t)),e instanceof pb)return;const n=s.listParentEdges(e).some(a=>{const o=a.getParent().propertyType;return o!==j.ROOT&&o!==j.SCENE&&o!==j.NODE}),i=s.listChildren(e).length===0,r=t&&!SM(e.getExtras());i&&!n&&!r&&e.dispose()}function uC(s,e){for(const t of e)s.setAttribute(t,null)}function FG(s,e){const t=[];for(const n of s.listSemantics())(n==="NORMAL"&&!e.has(n)||n==="TANGENT"&&!e.has(n)||n.startsWith("TEXCOORD_")&&!e.has(n)||n.startsWith("COLOR_")&&n!=="COLOR_0")&&t.push(n);return t}function QM(s,e,t,n=new Set){const r=s.getGraph().listChildEdges(t),a=new Set;for(const c of r)c.getChild()instanceof Nd&&a.add(c.getName());for(const c of r){const h=c.getName(),u=c.getChild();u instanceof en&&a.has(h.replace(/Info$/,""))&&n.add(`TEXCOORD_${u.getTexCoord()}`),u instanceof Nd&&h.match(/normalTexture/i)&&n.add("TANGENT"),u instanceof ln&&QM(s,e,u,n)}const o=t instanceof Il&&!t.getExtension("KHR_materials_unlit"),l=e.getMode()===as.Mode.POINTS;return o&&!l&&n.add("NORMAL"),n}function kG(s,e){const t=QG(s),n=new Set(t.map(l=>l.getTexCoord())),i=Array.from(n).sort(),r=new Map(i.map((l,c)=>[l,c])),a=new Map(i.map((l,c)=>[`TEXCOORD_${l}`,`TEXCOORD_${c}`]));for(const l of t){const c=l.getTexCoord();l.setTexCoord(r.get(c))}for(const l of e){const c=l.listSemantics().filter(h=>h.startsWith("TEXCOORD_")).sort();o(l,c),l.listTargets().forEach(h=>o(h,c))}function o(l,c){for(const h of c){const u=l.getAttribute(h);if(!u)continue;const d=a.get(h);d!==h&&(l.setAttribute(d,u),l.setAttribute(h,null))}}}async function UG(s){const e=s.getRoot(),t=s.getGraph(),n=s.getLogger(),r=e.listTextures().map(async a=>{var o;const l=await GG(a);if(!l)return;DG(a)==="srgb"&&j3.convertSRGBToLinear(l,l);const c=a.getName()||a.getURI(),h=(o=a.getSize())==null?void 0:o.join("x"),u=LG(a);for(const d of t.listParentEdges(a)){const A=d.getParent();A!==e&&OG(A,l,d.getName(),n)&&d.dispose()}a.listParents().length===1&&(a.dispose(),n.debug(`${Pc}: Removed solid-color texture "${c}" (${h}px ${u.join(", ")})`))});await Promise.all(r)}function OG(s,e,t,n){if(s instanceof Il)switch(t){case"baseColorTexture":return s.setBaseColorFactor(MG(e,e,s.getBaseColorFactor())),!0;case"emissiveTexture":return s.setEmissiveFactor(EG([0,0,0],e.slice(0,3),s.getEmissiveFactor())),!0;case"occlusionTexture":return Math.abs(e[0]-1)<=L_;case"metallicRoughnessTexture":return s.setRoughnessFactor(e[1]*s.getRoughnessFactor()),s.setMetallicFactor(e[2]*s.getMetallicFactor()),!0;case"normalTexture":return RM(MM(TM(),e,[.5,.5,1,1]))<=L_}return n.warn(`${Pc}: Detected single-color ${t} texture. Pruning ${t} not yet supported.`),!1}async function GG(s){const e=await zG(s);if(!e)return null;const t=[1/0,1/0,1/0,1/0],n=[-1/0,-1/0,-1/0,-1/0],i=[0,0,0,0],[r,a]=e.shape;for(let o=0;o<r;o++){for(let l=0;l<a;l++)for(let c=0;c<4;c++)t[c]=Math.min(t[c],e.get(o,l,c)),n[c]=Math.max(n[c],e.get(o,l,c));if(RM(MM(i,n,t))/255>L_)return null}return BG(i,xG(i,n,t),.5/255)}async function zG(s){try{return await pG(s.getImage(),s.getMimeType())}catch{return null}}const{LINE_STRIP:CX,LINE_LOOP:xX,TRIANGLE_STRIP:wX,TRIANGLE_FAN:SX}=as.Mode,{ROOT:BX,NODE:TX,MESH:MX,PRIMITIVE:RX,ACCESSOR:DX}=j,{TRANSLATION:QX,ROTATION:LX,SCALE:NX,WEIGHTS:PX}=Zd.TargetPath,HG={pattern:/.*/,quantizationVolume:"mesh",quantizePosition:14,quantizeNormal:10,quantizeTexcoord:12,quantizeColor:8,quantizeWeight:8,quantizeGeneric:12,normalizeWeights:!0,cleanup:!0};Pf({level:"high"},HG);var dC;(function(s){s[s.STEP=0]="STEP",s[s.LERP=1]="LERP",s[s.SLERP=2]="SLERP"})(dC||(dC={}));Promise.resolve();const{POINTS:FX,LINES:kX,LINE_STRIP:UX,LINE_LOOP:OX,TRIANGLES:GX,TRIANGLE_STRIP:zX,TRIANGLE_FAN:HX}=as.Mode;var N_;(function(s){s.LANCZOS3="lanczos3",s.LANCZOS2="lanczos2"})(N_||(N_={}));N_.LANCZOS3;class gb{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const $G=new ba(-1,1,1,-1,0,1);let VG=class extends bn{constructor(){super(),this.setAttribute("position",new An([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new An([0,2,0,0,2,0],2))}};const YG=new VG;let qG=class{constructor(e){this._mesh=new je(YG,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,$G)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}};/*!
|
|
3919
|
+
`));return A(s.bind(void 0,t))}return Pm=e,Pm}var Fm,rC;function uG(){if(rC)return Fm;rC=1;var s=hG();function e(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function t(n){var i=new e;i.pre=n.pre,i.body=n.body,i.post=n.post;var r=n.args.slice(0);i.argTypes=r;for(var a=0;a<r.length;++a){var o=r[a];if(o==="array"||typeof o=="object"&&o.blockIndices){if(i.argTypes[a]="array",i.arrayArgs.push(a),i.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),i.shimArgs.push("array"+a),a<i.pre.args.length&&i.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array args");if(a<i.post.args.length&&i.post.args[a].count>0)throw new Error("cwise: post() block may not reference array args")}else if(o==="scalar")i.scalarArgs.push(a),i.shimArgs.push("scalar"+a);else if(o==="index"){if(i.indexArgs.push(a),a<i.pre.args.length&&i.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array index");if(a<i.body.args.length&&i.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array index");if(a<i.post.args.length&&i.post.args[a].count>0)throw new Error("cwise: post() block may not reference array index")}else if(o==="shape"){if(i.shapeArgs.push(a),a<i.pre.args.length&&i.pre.args[a].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(a<i.body.args.length&&i.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array shape");if(a<i.post.args.length&&i.post.args[a].lvalue)throw new Error("cwise: post() block may not write to array shape")}else if(typeof o=="object"&&o.offset)i.argTypes[a]="offset",i.offsetArgs.push({array:o.array,offset:o.offset}),i.offsetArgIndex.push(a);else throw new Error("cwise: Unknown argument type "+r[a])}if(i.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(i.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(i.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(i.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return i.debug=!!n.printCode||!!n.debug,i.funcName=n.funcName||"cwise",i.blockSize=n.blockSize||64,s(i)}return Fm=t,Fm}var aC;function dG(){return aC||(aC=1,(function(s){var e=uG(),t={body:"",args:[],thisVars:[],localVars:[]};function n(d){if(!d)return t;for(var A=0;A<d.args.length;++A){var p=d.args[A];A===0?d.args[A]={name:p,lvalue:!0,rvalue:!!d.rvalue,count:d.count||1}:d.args[A]={name:p,lvalue:!1,rvalue:!0,count:1}}return d.thisVars||(d.thisVars=[]),d.localVars||(d.localVars=[]),d}function i(d){return e({args:d.args,pre:n(d.pre),body:n(d.body),post:n(d.proc),funcName:d.funcName})}function r(d){for(var A=[],p=0;p<d.args.length;++p)A.push("a"+p);var g=new Function("P",["return function ",d.funcName,"_ndarrayops(",A.join(","),") {P(",A.join(","),");return a0}"].join(""));return g(i(d))}var a={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};(function(){for(var d in a){var A=a[d];s[d]=r({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+A+"c"},funcName:d}),s[d+"eq"]=r({args:["array","array"],body:{args:["a","b"],body:"a"+A+"=b"},funcName:d+"eq"}),s[d+"s"]=r({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+A+"s"},funcName:d+"s"}),s[d+"seq"]=r({args:["array","scalar"],body:{args:["a","s"],body:"a"+A+"=s"},funcName:d+"seq"})}})();var o={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var d in o){var A=o[d];s[d]=r({args:["array","array"],body:{args:["a","b"],body:"a="+A+"b"},funcName:d}),s[d+"eq"]=r({args:["array"],body:{args:["a"],body:"a="+A+"a"},funcName:d+"eq"})}})();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var d in l){var A=l[d];s[d]=r({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+A+"c"},funcName:d}),s[d+"s"]=r({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+A+"s"},funcName:d+"s"}),s[d+"eq"]=r({args:["array","array"],body:{args:["a","b"],body:"a=a"+A+"b"},funcName:d+"eq"}),s[d+"seq"]=r({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+A+"s"},funcName:d+"seq"})}})();var c=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var d=0;d<c.length;++d){var A=c[d];s[A]=r({args:["array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:A}),s[A+"eq"]=r({args:["array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},funcName:A+"eq"})}})();var h=["max","min","atan2","pow"];(function(){for(var d=0;d<h.length;++d){var A=h[d];s[A]=r({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:A}),s[A+"s"]=r({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:A+"s"}),s[A+"eq"]=r({args:["array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},funcName:A+"eq"}),s[A+"seq"]=r({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},funcName:A+"seq"})}})();var u=["atan2","pow"];(function(){for(var d=0;d<u.length;++d){var A=u[d];s[A+"op"]=r({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:A+"op"}),s[A+"ops"]=r({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:A+"ops"}),s[A+"opeq"]=r({args:["array","array"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},funcName:A+"opeq"}),s[A+"opseq"]=r({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+A,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},funcName:A+"opseq"})}})(),s.any=e({args:["array"],pre:t,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),s.all=e({args:["array"],pre:t,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),s.sum=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),s.prod=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),s.norm2squared=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),s.norm2=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),s.norminf=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),s.norm1=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),s.sup=e({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),s.inf=e({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),s.argmin=e({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),s.argmax=e({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),s.random=r({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),s.assign=r({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),s.assigns=r({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),s.equals=e({args:["array","array"],pre:t,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})})(Qm)),Qm}dG();function AG(s,e){if(!(s instanceof Uint8Array))throw new Error("[ndarray-pixels] Input must be Uint8Array or Buffer.");const t=new Blob([s],{type:e});return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(n=>{const r=new OffscreenCanvas(n.width,n.height).getContext("2d");r.drawImage(n,0,0);const a=r.getImageData(0,0,n.width,n.height);return oG(new Uint8Array(a.data),[n.width,n.height,4],[4,4*n.width,1],0)})}async function pG(s,e){return AG(s,e)}function Pf(){return Pf=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(s[n]=t[n])}return s},Pf.apply(null,arguments)}const{POINTS:cX,LINES:hX,LINE_STRIP:uX,LINE_LOOP:dX,TRIANGLES:AX,TRIANGLE_STRIP:pX,TRIANGLE_FAN:fX}=as.Mode;function xM(s,e){return Object.defineProperty(e,"name",{value:s}),e}function wM(s,e){const t=Pf({},s);for(const n in e)e[n]!==void 0&&(t[n]=e[n]);return t}function fG(s,e){if(s==null&&e==null)return!0;if(s==null||e==null||s.length!==e.length)return!1;for(let t=0;t<s.length;t++)if(s[t]!==e[t])return!1;return!0}function SM(s){for(const e in s)return!1;return!0}var Ff=typeof Float32Array<"u"?Float32Array:Array,oC;(function(s){s.RENDER="render",s.RENDER_CACHED="render-cached",s.UPLOAD="upload",s.UPLOAD_NAIVE="upload-naive",s.DISTINCT="distinct",s.DISTINCT_POSITION="distinct-position",s.UNUSED="unused"})(oC||(oC={}));function gG(){var s=new Ff(3);return Ff!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0),s}function mG(s,e,t){return s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s}var EG=mG;(function(){var s=gG();return function(e,t,n,i,r,a){var o,l;for(t||(t=3),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;o<l;o+=t)s[0]=e[o],s[1]=e[o+1],s[2]=e[o+2],r(s,s,a),e[o]=s[0],e[o+1]=s[1],e[o+2]=s[2];return e}})();const{FLOAT:gX}=Le.ComponentType,{LINES:mX,LINE_STRIP:EX,LINE_LOOP:yX,TRIANGLES:_X,TRIANGLE_STRIP:bX,TRIANGLE_FAN:vX}=as.Mode,ao="dedup",km={keepUniqueNames:!1,propertyTypes:[j.ACCESSOR,j.MESH,j.TEXTURE,j.MATERIAL,j.SKIN]};function yG(s=km){const e=wM(km,s),t=new Set(e.propertyTypes);for(const n of e.propertyTypes)if(!km.propertyTypes.includes(n))throw new Error(`${ao}: Unsupported deduplication on type "${n}".`);return xM(ao,n=>{const i=n.getLogger();t.has(j.ACCESSOR)&&_G(n),t.has(j.TEXTURE)&&vG(n,e),t.has(j.MATERIAL)&&IG(n,e),t.has(j.MESH)&&bG(n,e),t.has(j.SKIN)&&CG(n,e),i.debug(`${ao}: Complete.`)})}function _G(s){const e=s.getLogger(),t=new Map,n=new Map,i=new Map,r=new Map,a=s.getRoot().listMeshes();a.forEach(u=>{u.listPrimitives().forEach(d=>{d.listAttributes().forEach(A=>o(A,n)),o(d.getIndices(),t)})});for(const u of s.getRoot().listAnimations())for(const d of u.listSamplers())o(d.getInput(),i),o(d.getOutput(),r);function o(u,d){if(!u)return;const A=[u.getCount(),u.getType(),u.getComponentType(),u.getNormalized(),u.getSparse()].join(":");let p=d.get(A);p||d.set(A,p=new Set),p.add(u)}function l(u,d){for(let A=0;A<u.length;A++){const p=u[A],g=nt.toView(p.getArray());if(!d.has(p))for(let m=A+1;m<u.length;m++){const f=u[m];d.has(f)||nt.equals(g,nt.toView(f.getArray()))&&d.set(f,p)}}}let c=0;const h=new Map;for(const u of[n,t,i,r])for(const d of u.values())c+=d.size,l(Array.from(d),h);e.debug(`${ao}: Merged ${h.size} of ${c} accessors.`),a.forEach(u=>{u.listPrimitives().forEach(d=>{d.listAttributes().forEach(p=>{h.has(p)&&d.swap(p,h.get(p))});const A=d.getIndices();A&&h.has(A)&&d.swap(A,h.get(A))})});for(const u of s.getRoot().listAnimations())for(const d of u.listSamplers()){const A=d.getInput(),p=d.getOutput();A&&h.has(A)&&d.swap(A,h.get(A)),p&&h.has(p)&&d.swap(p,h.get(p))}Array.from(h.keys()).forEach(u=>u.dispose())}function bG(s,e){const t=s.getLogger(),n=s.getRoot(),i=new Map;n.listAccessors().forEach((o,l)=>i.set(o,l)),n.listMaterials().forEach((o,l)=>i.set(o,l));const r=n.listMeshes().length,a=new Map;for(const o of n.listMeshes()){const l=[];for(const h of o.listPrimitives())l.push(BM(h,i));let c="";if(e.keepUniqueNames&&(c+=o.getName()+";"),c+=l.join(";"),a.has(c)){const h=a.get(c);o.listParents().forEach(u=>{u.propertyType!==j.ROOT&&u.swap(o,h)}),o.dispose()}else a.set(c,o)}t.debug(`${ao}: Merged ${r-a.size} of ${r} meshes.`)}function vG(s,e){const t=s.getLogger(),n=s.getRoot(),i=n.listTextures(),r=new Map;for(let a=0;a<i.length;a++){const o=i[a],l=o.getImage();if(!r.has(o))for(let c=a+1;c<i.length;c++){const h=i[c],u=h.getImage();if(r.has(h)||o.getMimeType()!==h.getMimeType()||e.keepUniqueNames&&o.getName()!==h.getName())continue;const d=o.getSize(),A=h.getSize();!d||!A||d[0]===A[0]&&d[1]===A[1]&&(!l||!u||nt.equals(l,u)&&r.set(h,o))}}t.debug(`${ao}: Merged ${r.size} of ${n.listTextures().length} textures.`),Array.from(r.entries()).forEach(([a,o])=>{a.listParents().forEach(l=>{l instanceof Nh||l.swap(a,o)}),a.dispose()})}function IG(s,e){const t=s.getLogger(),i=s.getRoot().listMaterials(),r=new Map,a=new Map,o=new Set;e.keepUniqueNames||o.add("name");for(let l=0;l<i.length;l++){const c=i[l];if(!r.has(c)&&!lC(c,a))for(let h=l+1;h<i.length;h++){const u=i[h];r.has(u)||lC(u,a)||c.equals(u,o)&&r.set(u,c)}}t.debug(`${ao}: Merged ${r.size} of ${i.length} materials.`),Array.from(r.entries()).forEach(([l,c])=>{l.listParents().forEach(h=>{h instanceof Nh||h.swap(l,c)}),l.dispose()})}function CG(s,e){const t=s.getLogger(),i=s.getRoot().listSkins(),r=new Map,a=new Set(["joints"]);e.keepUniqueNames||a.add("name");for(let o=0;o<i.length;o++){const l=i[o];if(!r.has(l))for(let c=o+1;c<i.length;c++){const h=i[c];r.has(h)||l.equals(h,a)&&fG(l.listJoints(),h.listJoints())&&r.set(h,l)}}t.debug(`${ao}: Merged ${r.size} of ${i.length} skins.`),Array.from(r.entries()).forEach(([o,l])=>{o.listParents().forEach(c=>{c instanceof Nh||c.swap(o,l)}),o.dispose()})}function BM(s,e){const t=[];for(const n of s.listSemantics()){const i=s.getAttribute(n);t.push(n+":"+e.get(i))}if(s instanceof as){const n=s.getIndices();n&&t.push("indices:"+e.get(n));const i=s.getMaterial();i&&t.push("material:"+e.get(i)),t.push("mode:"+s.getMode());for(const r of s.listTargets())t.push("target:"+BM(r,e))}return t.join(",")}function lC(s,e){if(e.has(s))return e.get(s);const t=s.getGraph(),n=new Set,i=t.listParentEdges(s);for(;i.length>0;){const r=i.pop();if(r.getAttributes().modifyChild===!0)return e.set(s,!0),!0;const a=r.getChild();if(!n.has(a))for(const o of t.listChildEdges(a))i.push(o)}return e.set(s,!1),!1}const{TEXTURE_INFO:IX,ROOT:CX}=j;function TM(){var s=new Ff(4);return Ff!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0),s}function xG(s,e,t){return s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s}function wG(s,e,t){return s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s}function SG(s,e,t){return s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s}function BG(s,e,t){return s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s}function TG(s){var e=s[0],t=s[1],n=s[2],i=s[3];return Math.sqrt(e*e+t*t+n*n+i*i)}var MM=wG,MG=SG,RM=TG;(function(){var s=TM();return function(e,t,n,i,r,a){var o,l;for(t||(t=4),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;o<l;o+=t)s[0]=e[o],s[1]=e[o+1],s[2]=e[o+2],s[3]=e[o+3],r(s,s,a),e[o]=s[0],e[o+1]=s[1],e[o+2]=s[2],e[o+3]=s[3];return e}})();const RG=/color|emissive|diffuse/i;function DG(s){return s.getGraph().listParentEdges(s).some(i=>i.getAttributes().isColor||RG.test(i.getName()))?"srgb":null}function QG(s){const e=s.getGraph(),t=new Set,n=new Set;function i(r){const a=new Set;for(const o of e.listChildEdges(r))o.getChild()instanceof Nd&&a.add(o.getName()+"Info");for(const o of e.listChildEdges(r)){const l=o.getChild();t.has(l)||(t.add(l),l instanceof en&&a.has(o.getName())?n.add(l):l instanceof ln&&i(l))}}return i(s),Array.from(n)}function LG(s){const t=fb.fromGraph(s.getGraph()).getRoot(),n=s.getGraph().listParentEdges(s).filter(i=>i.getParent()!==t).map(i=>i.getName());return Array.from(new Set(n))}const Pc="prune",L_=3/255,cC={propertyTypes:[j.NODE,j.SKIN,j.MESH,j.CAMERA,j.PRIMITIVE,j.PRIMITIVE_TARGET,j.ANIMATION,j.MATERIAL,j.TEXTURE,j.ACCESSOR,j.BUFFER],keepLeaves:!1,keepAttributes:!1,keepIndices:!1,keepSolidTextures:!1,keepExtras:!1};function NG(s=cC){const e=wM(cC,s),t=new Set(e.propertyTypes),n=e.keepExtras;return xM(Pc,async i=>{const r=i.getLogger(),a=i.getRoot(),o=i.getGraph(),l=new PG,c=h=>l.dispose(h.target);if(o.addEventListener("node:dispose",c),t.has(j.MESH))for(const h of a.listMeshes())h.listPrimitives().length>0||h.dispose();if(t.has(j.NODE)){if(!e.keepLeaves)for(const h of a.listScenes())DM(o,h,n);for(const h of a.listNodes())As(h,n)}if(t.has(j.SKIN))for(const h of a.listSkins())As(h,n);if(t.has(j.MESH))for(const h of a.listMeshes())As(h,n);if(t.has(j.CAMERA))for(const h of a.listCameras())As(h,n);if(t.has(j.PRIMITIVE)&&hC(o,j.PRIMITIVE,n),t.has(j.PRIMITIVE_TARGET)&&hC(o,j.PRIMITIVE_TARGET,n),!e.keepAttributes&&t.has(j.ACCESSOR)){const h=new Map;for(const u of a.listMeshes())for(const d of u.listPrimitives()){const A=d.getMaterial();if(!A)continue;const p=QM(i,d,A),g=FG(d,p);uC(d,g),d.listTargets().forEach(m=>uC(m,g)),h.has(A)?h.get(A).add(d):h.set(A,new Set([d]))}for(const[u,d]of h)kG(u,Array.from(d))}if(t.has(j.ANIMATION))for(const h of a.listAnimations()){for(const u of h.listChannels())u.getTargetNode()||u.dispose();if(h.listChannels().length)h.listSamplers().forEach(u=>As(u,n));else{const u=h.listSamplers();As(h,n),u.forEach(d=>As(d,n))}}if(t.has(j.MATERIAL)&&a.listMaterials().forEach(h=>As(h,n)),t.has(j.TEXTURE)&&(a.listTextures().forEach(h=>As(h,n)),e.keepSolidTextures||await UG(i)),t.has(j.ACCESSOR)&&a.listAccessors().forEach(h=>As(h,n)),t.has(j.BUFFER)&&a.listBuffers().forEach(h=>As(h,n)),o.removeEventListener("node:dispose",c),l.empty())r.debug(`${Pc}: No unused properties found.`);else{const h=l.entries().map(([u,d])=>`${u} (${d})`).join(", ");r.info(`${Pc}: Removed types... ${h}`)}r.debug(`${Pc}: Complete.`)})}class PG{constructor(){this.disposed={}}empty(){for(const e in this.disposed)return!1;return!0}entries(){return Object.entries(this.disposed)}dispose(e){this.disposed[e.propertyType]=this.disposed[e.propertyType]||0,this.disposed[e.propertyType]++}}function As(s,e){const t=s.listParents().filter(i=>!(i instanceof Nh||i instanceof Zd)),n=e&&!SM(s.getExtras());!t.length&&!n&&s.dispose()}function hC(s,e,t){for(const n of s.listEdges()){const i=n.getParent();i.propertyType===e&&As(i,t)}}function DM(s,e,t){if(e.listChildren().forEach(a=>DM(s,a,t)),e instanceof pb)return;const n=s.listParentEdges(e).some(a=>{const o=a.getParent().propertyType;return o!==j.ROOT&&o!==j.SCENE&&o!==j.NODE}),i=s.listChildren(e).length===0,r=t&&!SM(e.getExtras());i&&!n&&!r&&e.dispose()}function uC(s,e){for(const t of e)s.setAttribute(t,null)}function FG(s,e){const t=[];for(const n of s.listSemantics())(n==="NORMAL"&&!e.has(n)||n==="TANGENT"&&!e.has(n)||n.startsWith("TEXCOORD_")&&!e.has(n)||n.startsWith("COLOR_")&&n!=="COLOR_0")&&t.push(n);return t}function QM(s,e,t,n=new Set){const r=s.getGraph().listChildEdges(t),a=new Set;for(const c of r)c.getChild()instanceof Nd&&a.add(c.getName());for(const c of r){const h=c.getName(),u=c.getChild();u instanceof en&&a.has(h.replace(/Info$/,""))&&n.add(`TEXCOORD_${u.getTexCoord()}`),u instanceof Nd&&h.match(/normalTexture/i)&&n.add("TANGENT"),u instanceof ln&&QM(s,e,u,n)}const o=t instanceof Il&&!t.getExtension("KHR_materials_unlit"),l=e.getMode()===as.Mode.POINTS;return o&&!l&&n.add("NORMAL"),n}function kG(s,e){const t=QG(s),n=new Set(t.map(l=>l.getTexCoord())),i=Array.from(n).sort(),r=new Map(i.map((l,c)=>[l,c])),a=new Map(i.map((l,c)=>[`TEXCOORD_${l}`,`TEXCOORD_${c}`]));for(const l of t){const c=l.getTexCoord();l.setTexCoord(r.get(c))}for(const l of e){const c=l.listSemantics().filter(h=>h.startsWith("TEXCOORD_")).sort();o(l,c),l.listTargets().forEach(h=>o(h,c))}function o(l,c){for(const h of c){const u=l.getAttribute(h);if(!u)continue;const d=a.get(h);d!==h&&(l.setAttribute(d,u),l.setAttribute(h,null))}}}async function UG(s){const e=s.getRoot(),t=s.getGraph(),n=s.getLogger(),r=e.listTextures().map(async a=>{var o;const l=await GG(a);if(!l)return;DG(a)==="srgb"&&j3.convertSRGBToLinear(l,l);const c=a.getName()||a.getURI(),h=(o=a.getSize())==null?void 0:o.join("x"),u=LG(a);for(const d of t.listParentEdges(a)){const A=d.getParent();A!==e&&OG(A,l,d.getName(),n)&&d.dispose()}a.listParents().length===1&&(a.dispose(),n.debug(`${Pc}: Removed solid-color texture "${c}" (${h}px ${u.join(", ")})`))});await Promise.all(r)}function OG(s,e,t,n){if(s instanceof Il)switch(t){case"baseColorTexture":return s.setBaseColorFactor(MG(e,e,s.getBaseColorFactor())),!0;case"emissiveTexture":return s.setEmissiveFactor(EG([0,0,0],e.slice(0,3),s.getEmissiveFactor())),!0;case"occlusionTexture":return Math.abs(e[0]-1)<=L_;case"metallicRoughnessTexture":return s.setRoughnessFactor(e[1]*s.getRoughnessFactor()),s.setMetallicFactor(e[2]*s.getMetallicFactor()),!0;case"normalTexture":return RM(MM(TM(),e,[.5,.5,1,1]))<=L_}return n.warn(`${Pc}: Detected single-color ${t} texture. Pruning ${t} not yet supported.`),!1}async function GG(s){const e=await zG(s);if(!e)return null;const t=[1/0,1/0,1/0,1/0],n=[-1/0,-1/0,-1/0,-1/0],i=[0,0,0,0],[r,a]=e.shape;for(let o=0;o<r;o++){for(let l=0;l<a;l++)for(let c=0;c<4;c++)t[c]=Math.min(t[c],e.get(o,l,c)),n[c]=Math.max(n[c],e.get(o,l,c));if(RM(MM(i,n,t))/255>L_)return null}return BG(i,xG(i,n,t),.5/255)}async function zG(s){try{return await pG(s.getImage(),s.getMimeType())}catch{return null}}const{LINE_STRIP:xX,LINE_LOOP:wX,TRIANGLE_STRIP:SX,TRIANGLE_FAN:BX}=as.Mode,{ROOT:TX,NODE:MX,MESH:RX,PRIMITIVE:DX,ACCESSOR:QX}=j,{TRANSLATION:LX,ROTATION:NX,SCALE:PX,WEIGHTS:FX}=Zd.TargetPath,HG={pattern:/.*/,quantizationVolume:"mesh",quantizePosition:14,quantizeNormal:10,quantizeTexcoord:12,quantizeColor:8,quantizeWeight:8,quantizeGeneric:12,normalizeWeights:!0,cleanup:!0};Pf({level:"high"},HG);var dC;(function(s){s[s.STEP=0]="STEP",s[s.LERP=1]="LERP",s[s.SLERP=2]="SLERP"})(dC||(dC={}));Promise.resolve();const{POINTS:kX,LINES:UX,LINE_STRIP:OX,LINE_LOOP:GX,TRIANGLES:zX,TRIANGLE_STRIP:HX,TRIANGLE_FAN:$X}=as.Mode;var N_;(function(s){s.LANCZOS3="lanczos3",s.LANCZOS2="lanczos2"})(N_||(N_={}));N_.LANCZOS3;class gb{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const $G=new ba(-1,1,1,-1,0,1);let VG=class extends bn{constructor(){super(),this.setAttribute("position",new An([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new An([0,2,0,0,2,0],2))}};const YG=new VG;let qG=class{constructor(e){this._mesh=new je(YG,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,$G)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}};/*!
|
|
3920
3920
|
fflate - fast JavaScript compression/decompression
|
|
3921
3921
|
<https://101arrowz.github.io/fflate>
|
|
3922
3922
|
Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
|
|
@@ -13095,12 +13095,12 @@ ${r.join(`
|
|
|
13095
13095
|
float verticalAperture = ${s.getFilmHeight().toPrecision(di)}
|
|
13096
13096
|
}
|
|
13097
13097
|
|
|
13098
|
-
`}const u5=Math.PI/180;function ix(s,e,t){return(1-t)*s+t*e}function oc(s){return s*u5}var Ed=(s=>(s.NONE="none",s.CONTACT="contact",s.ACCUMULATIVE="accumulative",s))(Ed||{});class d5 extends EventTarget{constructor(e){super(),this._loggerContext="THREEJS ENGINE",this.__scene=new co,this.__tweenGroup=new UT,this.__clock=new dg,this.__effectsComposer={},this.__canvas={},this.__mainRenderer={},this.__sparkRenderer=void 0,this.__textRenderer={},this.__screenshotRenderer={},this.__currentEnvMapUrl="",this.__sceneHierarchy={baseSceneGrp:new _n,lightsGrp:new _n,sceneStructure:{},dimensionLinesGrp:new _n,miscGrp:new _n},this.__lengthLine={},this.__depthLine={},this.__heightLine={},this.__textureAnisotropyToUse=4,this.__appWcRef=e,this.__sceneHierarchy.sceneStructure=this.__appWcRef.sceneManager.sceneStructure}get canvas(){return this.__canvas}get scene(){return this.__scene}get productSettings(){return this.__appWcRef.productSettings}get mainRenderer(){return this.__mainRenderer}get sparkRenderer(){return this.__sparkRenderer}get textRenderer(){return this.__textRenderer}get effectsComposer(){return this.__effectsComposer}get screenshotRenderer(){return this.__screenshotRenderer}get sceneHierarchy(){return this.__sceneHierarchy}get contactShadows(){return this.__shadowManager.contactShadows}get accumulativeShadows(){return this.__shadowManager.accumulativeShadows}getClockDelta(){return this.__clock.getDelta()}get tweenGroup(){return this.__tweenGroup}updateAllTextureAnisotropy(){this.__scene.traverse(e=>{const n=e.material;n?.map&&(n.map.anisotropy=this.__textureAnisotropyToUse,n.needsUpdate=!0)})}printSceneHierarchy(e=!1){(function t(n){if(e===!0)console.group(`------ ${n.name} ------`),console.log(n);else{const i="epgType"in n?n.epgType:n.type;console.group(" <"+i+"> "+n.name)}n.children.forEach(t),console.groupEnd()})(this.__scene)}printSceneStructure(){let e="--";(function t(n){if(n instanceof Al||n instanceof _a){const i=n.epgType;console.group(`${e} < ${i} > ${n.name} || ${n.uuid}`),e+="--|"}n.children.forEach(t),console.groupEnd()})(this.__sceneHierarchy.sceneStructure)}async emptyScene(){It.dispose3(this.scene),this.__sceneHierarchy.baseSceneGrp.clear(),this.__sceneHierarchy.lightsGrp.clear();const e=[];this.__sceneHierarchy.sceneStructure.rootEntity.traverse(t=>{t.uuid!==this.__sceneHierarchy.sceneStructure.rootEntity.uuid&&(t instanceof Al&&e.push(t),t instanceof yh&&e.push(t))});for(const t of e)t.removeFromParent(),It.dispose3(t)}async _setupSceneHierarchy(){this.__sceneHierarchy.baseSceneGrp.name="GRP_BASE_SCENE",this.__scene.add(this.__sceneHierarchy.baseSceneGrp),this.__sceneHierarchy.lightsGrp.name="GRP_LIGHTS",this.__scene.add(this.__sceneHierarchy.lightsGrp),this.__scene.add(this.__sceneHierarchy.sceneStructure),this.__sceneHierarchy.dimensionLinesGrp.name="GRP_DIMENSIONS_LINES",this.__scene.add(this.__sceneHierarchy.dimensionLinesGrp),this.__sceneHierarchy.miscGrp.name="GRP_MISC",this.__scene.add(this.__sceneHierarchy.miscGrp)}async updateEnvMap(e=this.__appWcRef.productSettings.render.envMap,t=this.__appWcRef.productSettings.render.envMapRotation){if(e===this.__currentEnvMapUrl){this.__scene.environmentRotation.x=oc(t.x),this.__scene.environmentRotation.y=oc(t.y),this.__scene.environmentRotation.z=oc(t.z);return}const n=await this.__appWcRef.loaders.rgbeLoader.loadAsync(e);n.mapping=Sd,this.__scene.environment=n,this.__currentEnvMapUrl=e,this.__scene.environmentRotation.x=oc(t.x),this.__scene.environmentRotation.y=oc(t.y),this.__scene.environmentRotation.z=oc(t.z)}async _setupLights(){this.__mainRenderer.outputColorSpace=Yt,this.__mainRenderer.toneMapping=F0,await this.updateEnvMap()}__setupEffectComposer(){this.__effectsComposer=new VH(this.__mainRenderer),window.epigraph.logger.info({title:"Effects to enable",details:this.productSettings.postEffect,contextOverride:this._loggerContext})}__constructLineSegment(e,t,n){const i=[e,t],r=new bn().setFromPoints(i),a=new _l(r,n);return a.castShadow=!1,a}__setupDimensionLines(){const e={color:new Me().setHex(11776947).convertSRGBToLinear(),scale:1,dashSize:.02,gapSize:.02},t=new fm(e),n=new fm(e),i=new fm(e),r=new Q;this.__lengthLine=this.__constructLineSegment(r,r,t),this.__depthLine=this.__constructLineSegment(r,r,n),this.__heightLine=this.__constructLineSegment(r,r,i),this.__sceneHierarchy.dimensionLinesGrp.add(this.__lengthLine),this.__sceneHierarchy.dimensionLinesGrp.add(this.__depthLine),this.__sceneHierarchy.dimensionLinesGrp.add(this.__heightLine),this.setDimensionsVisibility(!1)}updateDimensionLines(e){this.__lengthLine.geometry?.setFromPoints([e.length.begin.worldPos,e.length.end.worldPos]),this.__depthLine.geometry?.setFromPoints([e.width.begin.worldPos,e.width.end.worldPos]),this.__heightLine.geometry?.setFromPoints([e.height.begin.worldPos,e.height.end.worldPos]),this.__lengthLine?.computeLineDistances(),this.__depthLine?.computeLineDistances(),this.__heightLine?.computeLineDistances()}frameUpdate(){this.__appWcRef.eventsManager.frameUpdated.fire()}repopulateHotspotIndicators(){this.__appWcRef.eventsManager.hotspotsUpdatedEvent.fire()}setDimensionsVisibility(e){this.__lengthLine.visible=e,this.__depthLine.visible=e,this.__heightLine.visible=e}async getSceneAsUsdzUrl(){const e=this.__sceneHierarchy.sceneStructure;this.printSceneHierarchy();const n=await new jV().parseAsync(e,{quickLookCompatible:!0}),i=new Blob([n],{type:"model/vnd.usdz+zip"});return URL.createObjectURL(i)}async getSceneAsGlbUrl(){const e=new DU;e.registerExtensions([IM]);const t=new Ud,i=this.__sceneHierarchy.sceneStructure;this.printSceneHierarchy();const r={binary:!0,forceIndices:!0,trs:!1,onlyVisible:!0,embedImages:!0,maxTextureSize:1024},a=await t.parseAsync(i,r),o=await e.readBinary(new Uint8Array(a)),l=await this.optimizeGlb(o),c=await e.writeBinary(l);return await this.saveArrayBufferAsURL(c)}async optimizeGlb(e){const n=e.getRoot().listNodes();for(const i of n){i.setExtras({});const r=i.getName();(r==="GRP_ProxyMesh"||r==="GRP_LoadingPlaceholder")&&i.dispose()}return await e.transform(yG(),NG()),e}async saveArrayBufferAsURL(e){const t=new Blob([e],{type:"application/gltf-buffer"});return window.epigraph.logger.info({title:"Approx scene GLB size: "+t.size/1e6}),URL.createObjectURL(t)}__perFrameUpdate(){const e=this.__clock.getDelta();this.contactShadows?.isEnabled()&&this.contactShadows.reCalculate(),this.__appWcRef.postRenderFrameUpdateInEngine(e),this.__effectsComposer.render(),this.__tweenGroup.update(),this.__appWcRef.featuresToEnable.dimensions&&this.__appWcRef.dimensionsManager.repopulateDimensionIndicators(),requestAnimationFrame(this.__perFrameUpdate.bind(this))}setupSparkRendererIfNotExists(){this.__sparkRenderer||(this.__sparkRenderer=new K_({renderer:this.__mainRenderer,preBlurAmount:.3,blurAmount:0}),this.scene.add(this.__sparkRenderer))}__setupRenderers(){this.__mainRenderer=new Rf({antialias:this.productSettings.renderQuality.antiAlias,alpha:this.__appWcRef.transparentBackground});const e=this.__appWcRef.canvasSize.width||this.__appWcRef.getBoundingClientRect().width||300,t=this.__appWcRef.canvasSize.height||this.__appWcRef.getBoundingClientRect().height||150;this.__mainRenderer.setSize(e,t),this.__appWcRef.transparentBackground||this.__mainRenderer.setClearColor(this.productSettings.camera.backgroundColor),this.productSettings.screenshots.enabled&&(this.__screenshotRenderer=new Rf({antialias:this.productSettings.renderQuality.antiAlias,preserveDrawingBuffer:!0}),this.__screenshotRenderer.domElement.style.display="none"),this.__textRenderer=new d1,this.__textRenderer.setSize(e,t),this.__textRenderer.domElement.style.position="absolute",this.__textRenderer.domElement.style.top="0px",this.__textRenderer.domElement.style.pointerEvents="none"}showTextRenderer(){this.__textRenderer.domElement.style.display="block"}hideTextRenderer(){this.__textRenderer.domElement.style.display="none"}__setupShadows(){this.__mainRenderer.shadowMap.enabled=!0,this.__shadowManager||(this.__shadowManager=new WV(this.__appWcRef,this.__scene,this.__sceneHierarchy.sceneStructure,this.__mainRenderer,this.productSettings)),this.__shadowManager.updateShadowType(this.productSettings.shadows.shadowType)}async setup(){this.__setupRenderers(),this.__canvas=this.__mainRenderer.domElement,await this._setupSceneHierarchy(),await this._setupLights(),this.__setupShadows(),this.__setupDimensionLines(),this.__setupEffectComposer();const e=this.__mainRenderer.capabilities.getMaxAnisotropy();e<this.__textureAnisotropyToUse&&(this.__textureAnisotropyToUse=e),this.__perFrameUpdate();const t={canvasHtmlElem:this.__canvas,renderer:this.__mainRenderer,screenshotRenderer:this.__screenshotRenderer??void 0,textRendererElem:this.__textRenderer.domElement},n=1;return this.mainRenderer.setPixelRatio(n),this.effectsComposer.setPixelRatio(n),this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.experienceUpdatedEvent.name,()=>{this.__setupShadows()}),this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.productSettingsShadowTypeUpdatedEvent.name,(i=>{this.__shadowManager.updateShadowType(i.detail.shadowType)})),Promise.resolve(t)}}/*!
|
|
13098
|
+
`}const u5=Math.PI/180;function ix(s,e,t){return(1-t)*s+t*e}function oc(s){return s*u5}var Ed=(s=>(s.NONE="none",s.CONTACT="contact",s.ACCUMULATIVE="accumulative",s))(Ed||{});class d5{constructor(){this.frameCount=0,this.startTime=performance.now(),this.lastInterval=performance.now(),this.averageFps=0,this.isTracking=!0}update(){if(!this.isTracking)return;this.frameCount++;const t=(performance.now()-this.lastInterval)/1e3;return this.averageFps=this.frameCount/t,this.averageFps}reset(){this.lastInterval=performance.now(),this.averageFps=0,this.frameCount=0}getReport(){return{averageFps:Math.round(this.averageFps),totalFrames:this.frameCount,duration:((performance.now()-this.lastInterval)/1e3).toFixed(2)+"s"}}stop(){this.isTracking=!1}}class A5 extends EventTarget{constructor(e){super(),this._loggerContext="THREEJS ENGINE",this.__performanceTracker=new d5,this.__scene=new co,this.__tweenGroup=new UT,this.__clock=new dg,this.__effectsComposer={},this.__canvas={},this.__mainRenderer={},this.__sparkRenderer=void 0,this.__textRenderer={},this.__screenshotRenderer={},this.__currentEnvMapUrl="",this.__sceneHierarchy={baseSceneGrp:new _n,lightsGrp:new _n,sceneStructure:{},dimensionLinesGrp:new _n,miscGrp:new _n},this.__lengthLine={},this.__depthLine={},this.__heightLine={},this.__textureAnisotropyToUse=4,this.__currentDpr=window.devicePixelRatio,this.__clampedDpr=window.devicePixelRatio,this.__appWcRef=e,this.__sceneHierarchy.sceneStructure=this.__appWcRef.sceneManager.sceneStructure}get canvas(){return this.__canvas}get scene(){return this.__scene}get productSettings(){return this.__appWcRef.productSettings}get mainRenderer(){return this.__mainRenderer}get sparkRenderer(){return this.__sparkRenderer}get textRenderer(){return this.__textRenderer}get effectsComposer(){return this.__effectsComposer}get screenshotRenderer(){return this.__screenshotRenderer}get sceneHierarchy(){return this.__sceneHierarchy}get contactShadows(){return this.__shadowManager.contactShadows}get accumulativeShadows(){return this.__shadowManager.accumulativeShadows}getClockDelta(){return this.__clock.getDelta()}get tweenGroup(){return this.__tweenGroup}updateAllTextureAnisotropy(){this.__scene.traverse(e=>{const n=e.material;n?.map&&(n.map.anisotropy=this.__textureAnisotropyToUse,n.needsUpdate=!0)})}printSceneHierarchy(e=!1){(function t(n){if(e===!0)console.group(`------ ${n.name} ------`),console.log(n);else{const i="epgType"in n?n.epgType:n.type;console.group(" <"+i+"> "+n.name)}n.children.forEach(t),console.groupEnd()})(this.__scene)}printSceneStructure(){let e="--";(function t(n){if(n instanceof Al||n instanceof _a){const i=n.epgType;console.group(`${e} < ${i} > ${n.name} || ${n.uuid}`),e+="--|"}n.children.forEach(t),console.groupEnd()})(this.__sceneHierarchy.sceneStructure)}async emptyScene(){It.dispose3(this.scene),this.__sceneHierarchy.baseSceneGrp.clear(),this.__sceneHierarchy.lightsGrp.clear();const e=[];this.__sceneHierarchy.sceneStructure.rootEntity.traverse(t=>{t.uuid!==this.__sceneHierarchy.sceneStructure.rootEntity.uuid&&(t instanceof Al&&e.push(t),t instanceof yh&&e.push(t))});for(const t of e)t.removeFromParent(),It.dispose3(t)}async _setupSceneHierarchy(){this.__sceneHierarchy.baseSceneGrp.name="GRP_BASE_SCENE",this.__scene.add(this.__sceneHierarchy.baseSceneGrp),this.__sceneHierarchy.lightsGrp.name="GRP_LIGHTS",this.__scene.add(this.__sceneHierarchy.lightsGrp),this.__scene.add(this.__sceneHierarchy.sceneStructure),this.__sceneHierarchy.dimensionLinesGrp.name="GRP_DIMENSIONS_LINES",this.__scene.add(this.__sceneHierarchy.dimensionLinesGrp),this.__sceneHierarchy.miscGrp.name="GRP_MISC",this.__scene.add(this.__sceneHierarchy.miscGrp)}async updateEnvMap(e=this.__appWcRef.productSettings.render.envMap,t=this.__appWcRef.productSettings.render.envMapRotation){if(e===this.__currentEnvMapUrl){this.__scene.environmentRotation.x=oc(t.x),this.__scene.environmentRotation.y=oc(t.y),this.__scene.environmentRotation.z=oc(t.z);return}const n=await this.__appWcRef.loaders.rgbeLoader.loadAsync(e);n.mapping=Sd,this.__scene.environment=n,this.__currentEnvMapUrl=e,this.__scene.environmentRotation.x=oc(t.x),this.__scene.environmentRotation.y=oc(t.y),this.__scene.environmentRotation.z=oc(t.z)}async _setupLights(){this.__mainRenderer.outputColorSpace=Yt,this.__mainRenderer.toneMapping=F0,await this.updateEnvMap()}__setupEffectComposer(){this.__effectsComposer=new VH(this.__mainRenderer),window.epigraph.logger.info({title:"Effects to enable",details:this.productSettings.postEffect,contextOverride:this._loggerContext})}__constructLineSegment(e,t,n){const i=[e,t],r=new bn().setFromPoints(i),a=new _l(r,n);return a.castShadow=!1,a}__setupDimensionLines(){const e={color:new Me().setHex(11776947).convertSRGBToLinear(),scale:1,dashSize:.02,gapSize:.02},t=new fm(e),n=new fm(e),i=new fm(e),r=new Q;this.__lengthLine=this.__constructLineSegment(r,r,t),this.__depthLine=this.__constructLineSegment(r,r,n),this.__heightLine=this.__constructLineSegment(r,r,i),this.__sceneHierarchy.dimensionLinesGrp.add(this.__lengthLine),this.__sceneHierarchy.dimensionLinesGrp.add(this.__depthLine),this.__sceneHierarchy.dimensionLinesGrp.add(this.__heightLine),this.setDimensionsVisibility(!1)}updateDimensionLines(e){this.__lengthLine.geometry?.setFromPoints([e.length.begin.worldPos,e.length.end.worldPos]),this.__depthLine.geometry?.setFromPoints([e.width.begin.worldPos,e.width.end.worldPos]),this.__heightLine.geometry?.setFromPoints([e.height.begin.worldPos,e.height.end.worldPos]),this.__lengthLine?.computeLineDistances(),this.__depthLine?.computeLineDistances(),this.__heightLine?.computeLineDistances()}frameUpdate(){this.__appWcRef.eventsManager.frameUpdated.fire()}repopulateHotspotIndicators(){this.__appWcRef.eventsManager.hotspotsUpdatedEvent.fire()}setDimensionsVisibility(e){this.__lengthLine.visible=e,this.__depthLine.visible=e,this.__heightLine.visible=e}async getSceneAsUsdzUrl(){const e=this.__sceneHierarchy.sceneStructure;this.printSceneHierarchy();const n=await new jV().parseAsync(e,{quickLookCompatible:!0}),i=new Blob([n],{type:"model/vnd.usdz+zip"});return URL.createObjectURL(i)}async getSceneAsGlbUrl(){const e=new DU;e.registerExtensions([IM]);const t=new Ud,i=this.__sceneHierarchy.sceneStructure;this.printSceneHierarchy();const r={binary:!0,forceIndices:!0,trs:!1,onlyVisible:!0,embedImages:!0,maxTextureSize:1024},a=await t.parseAsync(i,r),o=await e.readBinary(new Uint8Array(a)),l=await this.optimizeGlb(o),c=await e.writeBinary(l);return await this.saveArrayBufferAsURL(c)}async optimizeGlb(e){const n=e.getRoot().listNodes();for(const i of n){i.setExtras({});const r=i.getName();(r==="GRP_ProxyMesh"||r==="GRP_LoadingPlaceholder")&&i.dispose()}return await e.transform(yG(),NG()),e}async saveArrayBufferAsURL(e){const t=new Blob([e],{type:"application/gltf-buffer"});return window.epigraph.logger.info({title:"Approx scene GLB size: "+t.size/1e6}),URL.createObjectURL(t)}__perFrameUpdate(){const e=this.__clock.getDelta();this.contactShadows?.isEnabled()&&this.contactShadows.reCalculate(),this.__appWcRef.postRenderFrameUpdateInEngine(e),this.__effectsComposer.render(),this.__tweenGroup.update(),this.__appWcRef.featuresToEnable.dimensions&&this.__appWcRef.dimensionsManager.repopulateDimensionIndicators(),this.__performanceTracker.update(),requestAnimationFrame(this.__perFrameUpdate.bind(this))}setupSparkRendererIfNotExists(){this.__sparkRenderer||(this.__sparkRenderer=new K_({renderer:this.__mainRenderer,preBlurAmount:.3,blurAmount:0}),this.scene.add(this.__sparkRenderer))}__setupRenderers(){this.__mainRenderer=new Rf({antialias:this.productSettings.renderQuality.antiAlias,alpha:this.__appWcRef.transparentBackground});const e=this.__appWcRef.canvasSize.width||this.__appWcRef.getBoundingClientRect().width||300,t=this.__appWcRef.canvasSize.height||this.__appWcRef.getBoundingClientRect().height||150;this.__mainRenderer.setSize(e,t),this.__appWcRef.transparentBackground||this.__mainRenderer.setClearColor(this.productSettings.camera.backgroundColor),this.productSettings.screenshots.enabled&&(this.__screenshotRenderer=new Rf({antialias:this.productSettings.renderQuality.antiAlias,preserveDrawingBuffer:!0}),this.__screenshotRenderer.domElement.style.display="none"),this.__textRenderer=new d1,this.__textRenderer.setSize(e,t),this.__textRenderer.domElement.style.position="absolute",this.__textRenderer.domElement.style.top="0px",this.__textRenderer.domElement.style.pointerEvents="none"}showTextRenderer(){this.__textRenderer.domElement.style.display="block"}hideTextRenderer(){this.__textRenderer.domElement.style.display="none"}__setupShadows(){this.__mainRenderer.shadowMap.enabled=!0,this.__shadowManager||(this.__shadowManager=new WV(this.__appWcRef,this.__scene,this.__sceneHierarchy.sceneStructure,this.__mainRenderer,this.productSettings)),this.__shadowManager.updateShadowType(this.productSettings.shadows.shadowType)}__registerAdaptiveDprCalculations(e=6){const t=window.devicePixelRatio;this.__clampedDpr=t,this.__currentDpr=t;let n=0;const i=setInterval(()=>{n++,this.__performanceTracker.averageFps<50&&(this.__currentDpr-=.2,this.__clampedDpr=parseFloat(Math.max(Math.min(this.__currentDpr,t),1).toFixed(2))),this.mainRenderer.setPixelRatio(this.__clampedDpr),this.effectsComposer.setPixelRatio(this.__clampedDpr),this.__performanceTracker.reset(),n>=e&&(clearInterval(i),this.__performanceTracker.stop())},2e3)}async setup(){this.__setupRenderers(),this.__canvas=this.__mainRenderer.domElement,await this._setupSceneHierarchy(),await this._setupLights(),this.__setupShadows(),this.__setupDimensionLines(),this.__setupEffectComposer();const e=this.__mainRenderer.capabilities.getMaxAnisotropy();e<this.__textureAnisotropyToUse&&(this.__textureAnisotropyToUse=e),this.__perFrameUpdate(),this.__registerAdaptiveDprCalculations();const t={canvasHtmlElem:this.__canvas,renderer:this.__mainRenderer,screenshotRenderer:this.__screenshotRenderer??void 0,textRendererElem:this.__textRenderer.domElement};return this.mainRenderer.setPixelRatio(this.__currentDpr),this.effectsComposer.setPixelRatio(this.__currentDpr),this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.experienceUpdatedEvent.name,()=>{this.__setupShadows()}),this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.productSettingsShadowTypeUpdatedEvent.name,(n=>{this.__shadowManager.updateShadowType(n.detail.shadowType)})),Promise.resolve(t)}}/*!
|
|
13099
13099
|
* camera-controls
|
|
13100
13100
|
* https://github.com/yomotsu/camera-controls
|
|
13101
13101
|
* (c) 2017 @yomotsu
|
|
13102
13102
|
* Released under the MIT License.
|
|
13103
|
-
*/const fn={LEFT:1,RIGHT:2,MIDDLE:4},ee=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}),lc={NONE:0,IN:1,OUT:-1};function Do(s){return s.isPerspectiveCamera}function ka(s){return s.isOrthographicCamera}const Na=Math.PI*2,sx=Math.PI/2,uR=1e-5,Au=Math.PI/180;function Qs(s,e,t){return Math.max(e,Math.min(t,s))}function Jt(s,e=uR){return Math.abs(s)<e}function Ot(s,e,t=uR){return Jt(s-e,t)}function rx(s,e){return Math.round(s/e)*e}function pu(s){return isFinite(s)?s:s<0?-Number.MAX_VALUE:Number.MAX_VALUE}function fu(s){return Math.abs(s)<Number.MAX_VALUE?s:s*(1/0)}function ip(s,e,t,n,i=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=s-e;const h=e,u=i*n;c=Qs(c,-u,u),e=s-c;const d=(t.value+a*c)*r;t.value=(t.value-a*d)*l;let A=e+(c+d)*l;return h-s>0==A>h&&(A=h,t.value=(A-h)/r),A}function ax(s,e,t,n,i=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 h=e.x,u=e.y,d=e.z,A=s.x-h,p=s.y-u,g=s.z-d;const m=h,f=u,_=d,E=i*n,y=E*E,b=A*A+p*p+g*g;if(b>y){const F=Math.sqrt(b);A=A/F*E,p=p/F*E,g=g/F*E}h=s.x-A,u=s.y-p,d=s.z-g;const x=(t.x+o*A)*r,I=(t.y+o*p)*r,w=(t.z+o*g)*r;t.x=(t.x-o*x)*c,t.y=(t.y-o*I)*c,t.z=(t.z-o*w)*c,a.x=h+(A+x)*c,a.y=u+(p+I)*c,a.z=d+(g+w)*c;const v=m-s.x,C=f-s.y,S=_-s.z,T=a.x-m,M=a.y-f,R=a.z-_;return v*T+C*M+S*R>0&&(a.x=m,a.y=f,a.z=_,t.x=(a.x-m)/r,t.y=(a.y-f)/r,t.z=(a.z-_)/r),a}function dE(s,e){e.set(0,0),s.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=s.length,e.y/=s.length}function AE(s,e){return ka(s)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class A5{_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 i=this._listeners[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.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 i=n.slice(0);for(let r=0,a=i.length;r<a;r++)i[r].call(this,e)}}}const p5="3.1.2",sp=1/8,f5=/Mac/.test(globalThis?.navigator?.platform);let tt,ox,rp,pE,Ui,dt,Rt,cc,gu,Zs,er,Qo,lx,cx,ji,hc,uc,hx,fE,ux,gE,mE,ap;class cl extends A5{static install(e){tt=e.THREE,ox=Object.freeze(new tt.Vector3(0,0,0)),rp=Object.freeze(new tt.Vector3(0,1,0)),pE=Object.freeze(new tt.Vector3(0,0,1)),Ui=new tt.Vector2,dt=new tt.Vector3,Rt=new tt.Vector3,cc=new tt.Vector3,gu=new tt.Vector3,Zs=new tt.Vector3,er=new tt.Vector3,Qo=new tt.Vector3,lx=new tt.Vector3,cx=new tt.Vector3,ji=new tt.Spherical,hc=new tt.Spherical,uc=new tt.Box3,hx=new tt.Box3,fE=new tt.Sphere,ux=new tt.Quaternion,gE=new tt.Quaternion,mE=new tt.Matrix4,ap=new tt.Raycaster}static get ACTION(){return ee}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=ee.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=lc.NONE;_thetaVelocity={value:0};_phiVelocity={value:0};_radiusVelocity={value:0};_targetVelocity=new tt.Vector3;_focalOffsetVelocity=new tt.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 tt>"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 tt.Quaternion().setFromUnitVectors(this._camera.up,rp),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=ee.NONE,this._target=new tt.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new tt.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new tt.Spherical().setFromVector3(dt.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 tt.Vector3,new tt.Vector3,new tt.Vector3,new tt.Vector3],this._updateNearPlaneCorners(),this._boundary=new tt.Box3(new tt.Vector3(-1/0,-1/0,-1/0),new tt.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 tt.Vector2,this.mouseButtons={left:ee.ROTATE,middle:ee.DOLLY,right:ee.TRUCK,wheel:Do(this._camera)?ee.DOLLY:ka(this._camera)?ee.ZOOM:ee.NONE},this.touches={one:ee.TOUCH_ROTATE,two:Do(this._camera)?ee.TOUCH_DOLLY_TRUCK:ka(this._camera)?ee.TOUCH_ZOOM_TRUCK:ee.NONE,three:ee.TOUCH_TRUCK};const n=new tt.Vector2,i=new tt.Vector2,r=new tt.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 y=this._domElement.getBoundingClientRect(),b=f.clientX/y.width,x=f.clientY/y.height;if(b<this._interactiveArea.left||b>this._interactiveArea.right||x<this._interactiveArea.top||x>this._interactiveArea.bottom)return}const _=f.pointerType!=="mouse"?null:(f.buttons&fn.LEFT)===fn.LEFT?fn.LEFT:(f.buttons&fn.MIDDLE)===fn.MIDDLE?fn.MIDDLE:(f.buttons&fn.RIGHT)===fn.RIGHT?fn.RIGHT:null;if(_!==null){const y=this._findPointerByMouseButton(_);y&&this._disposePointer(y)}if((f.buttons&fn.LEFT)===fn.LEFT&&this._lockedPointer)return;const E={pointerId:f.pointerId,clientX:f.clientX,clientY:f.clientY,deltaX:0,deltaY:0,mouseButton:_};this._activePointers.push(E),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 _=f.pointerId,E=this._lockedPointer||this._findPointerById(_);if(E){if(E.clientX=f.clientX,E.clientY=f.clientY,E.deltaX=f.movementX,E.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&fn.LEFT)===fn.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(f.buttons&fn.MIDDLE)===fn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(f.buttons&fn.RIGHT)===fn.RIGHT&&(this._state=this._state|this.mouseButtons.right);A()}},l=f=>{const _=this._findPointerById(f.pointerId);if(!(_&&_===this._lockedPointer)){if(_&&this._disposePointer(_),f.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=ee.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=ee.NONE;p()}};let c=-1;const h=f=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===ee.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const I=this._domElement.getBoundingClientRect(),w=f.clientX/I.width,v=f.clientY/I.height;if(w<this._interactiveArea.left||w>this._interactiveArea.right||v<this._interactiveArea.top||v>this._interactiveArea.bottom)return}if(f.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===ee.ROTATE||this.mouseButtons.wheel===ee.TRUCK){const I=performance.now();c-I<1e3&&this._getClientRect(this._elementRect),c=I}const _=f5?-1:-3,E=f.deltaMode===1&&!f.ctrlKey?f.deltaY/_:f.deltaY/(_*10),y=this.dollyToCursor?(f.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(f.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(f.ctrlKey?ee.ZOOM:this.mouseButtons.wheel){case ee.ROTATE:{this._rotateInternal(f.deltaX,f.deltaY),this._isUserControllingRotate=!0;break}case ee.TRUCK:{this._truckInternal(f.deltaX,f.deltaY,!1,!1),this._isUserControllingTruck=!0;break}case ee.SCREEN_PAN:{this._truckInternal(f.deltaX,f.deltaY,!1,!0),this._isUserControllingTruck=!0;break}case ee.OFFSET:{this._truckInternal(f.deltaX,f.deltaY,!0,!1),this._isUserControllingOffset=!0;break}case ee.DOLLY:{this._dollyInternal(-E,y,b),this._isUserControllingDolly=!0;break}case ee.ZOOM:{this._zoomInternal(-E,y,b),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},u=f=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===cl.ACTION.NONE){const _=f instanceof PointerEvent?f.pointerId:0,E=this._findPointerById(_);E&&this._disposePointer(E),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l);return}f.preventDefault()}},d=f=>{if(!this._enabled)return;if(dE(this._activePointers,Ui),this._getClientRect(this._elementRect),n.copy(Ui),i.copy(Ui),this._activePointers.length>=2){const E=Ui.x-this._activePointers[1].clientX,y=Ui.y-this._activePointers[1].clientY,b=Math.sqrt(E*E+y*y);r.set(0,b);const x=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,I=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(x,I)}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&fn.LEFT)===fn.LEFT&&(this._state=this._state|this.mouseButtons.left),(f.buttons&fn.MIDDLE)===fn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(f.buttons&fn.RIGHT)===fn.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&ee.ROTATE)===ee.ROTATE||(this._state&ee.TOUCH_ROTATE)===ee.TOUCH_ROTATE||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.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&ee.TRUCK)===ee.TRUCK||(this._state&ee.SCREEN_PAN)===ee.SCREEN_PAN||(this._state&ee.TOUCH_TRUCK)===ee.TOUCH_TRUCK||(this._state&ee.TOUCH_SCREEN_PAN)===ee.TOUCH_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&ee.DOLLY)===ee.DOLLY||(this._state&ee.TOUCH_DOLLY)===ee.TOUCH_DOLLY||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&ee.ZOOM)===ee.ZOOM||(this._state&ee.TOUCH_ZOOM)===ee.TOUCH_ZOOM||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_ZOOM_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.TOUCH_ZOOM_OFFSET||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&ee.OFFSET)===ee.OFFSET||(this._state&ee.TOUCH_OFFSET)===ee.TOUCH_OFFSET||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.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,dE(this._activePointers,Ui);const _=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,E=_?-_.deltaX:i.x-Ui.x,y=_?-_.deltaY:i.y-Ui.y;if(i.copy(Ui),((this._state&ee.ROTATE)===ee.ROTATE||(this._state&ee.TOUCH_ROTATE)===ee.TOUCH_ROTATE||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(E,y),this._isUserControllingRotate=!0),(this._state&ee.DOLLY)===ee.DOLLY||(this._state&ee.ZOOM)===ee.ZOOM){const b=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,x=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,I=this.dollyDragInverted?-1:1;(this._state&ee.DOLLY)===ee.DOLLY?(this._dollyInternal(I*y*sp,b,x),this._isUserControllingDolly=!0):(this._zoomInternal(I*y*sp,b,x),this._isUserControllingZoom=!0)}if((this._state&ee.TOUCH_DOLLY)===ee.TOUCH_DOLLY||(this._state&ee.TOUCH_ZOOM)===ee.TOUCH_ZOOM||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_ZOOM_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.TOUCH_ZOOM_OFFSET||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.TOUCH_ZOOM_ROTATE){const b=Ui.x-this._activePointers[1].clientX,x=Ui.y-this._activePointers[1].clientY,I=Math.sqrt(b*b+x*x),w=r.y-I;r.set(0,I);const v=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&ee.TOUCH_DOLLY)===ee.TOUCH_DOLLY||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET?(this._dollyInternal(w*sp,v,C),this._isUserControllingDolly=!0):(this._zoomInternal(w*sp,v,C),this._isUserControllingZoom=!0)}((this._state&ee.TRUCK)===ee.TRUCK||(this._state&ee.TOUCH_TRUCK)===ee.TOUCH_TRUCK||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(E,y,!1,!1),this._isUserControllingTruck=!0),((this._state&ee.SCREEN_PAN)===ee.SCREEN_PAN||(this._state&ee.TOUCH_SCREEN_PAN)===ee.TOUCH_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_ZOOM_SCREEN_PAN)&&(this._truckInternal(E,y,!1,!0),this._isUserControllingTruck=!0),((this._state&ee.OFFSET)===ee.OFFSET||(this._state&ee.TOUCH_OFFSET)===ee.TOUCH_OFFSET||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(E,y,!0,!1),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{dE(this._activePointers,Ui),i.copy(Ui),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",h,{passive:!1}),this._domElement.addEventListener("contextmenu",u)},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",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",u),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!==ee.NONE&&(this._state=ee.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=Qs(e.width,0,1),this._interactiveArea.height=Qs(e.height,0,1),this._interactiveArea.x=Qs(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Qs(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 i=Qs(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=Qs(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,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||Ot(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ot(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=lc.NONE,this._changedDolly=0,this._dollyToNoClamp(Qs(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=Ot(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||Ot(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(gu).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(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=Qs(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||Ot(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(),Zs.setFromMatrixColumn(this._camera.matrix,0),er.setFromMatrixColumn(this._camera.matrix,1),Zs.multiplyScalar(e),er.multiplyScalar(-t);const i=dt.copy(Zs).add(er),r=Rt.copy(this._targetEnd).add(i);return this.moveTo(r.x,r.y,r.z,n)}forward(e,t=!1){dt.setFromMatrixColumn(this._camera.matrix,0),dt.crossVectors(this._camera.up,dt),dt.multiplyScalar(e);const n=Rt.copy(this._targetEnd).add(dt);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return dt.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+dt.x,this._targetEnd.y+dt.y,this._targetEnd.z+dt.z,t)}moveTo(e,t,n,i=!1){this._isUserControllingTruck=!1;const r=dt.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const a=!i||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,i=!1){const o=dt.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(o.x,o.y,o.z,i)}fitToBox(e,t,{cover:n=!1,paddingLeft:i=0,paddingRight:r=0,paddingBottom:a=0,paddingTop:o=0}={}){const l=[],c=e.isBox3?uc.copy(e):uc.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=rx(this._sphericalEnd.theta,sx),u=rx(this._sphericalEnd.phi,sx);l.push(this.rotateTo(h,u,t));const d=dt.setFromSpherical(this._sphericalEnd).normalize(),A=ux.setFromUnitVectors(d,pE),p=Ot(Math.abs(d.y),1);p&&A.multiply(gE.setFromAxisAngle(rp,h)),A.multiply(this._yAxisUpSpaceInverse);const g=hx.makeEmpty();Rt.copy(c.min).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.min).setX(c.max.x).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.min).setY(c.max.y).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).setZ(c.min.z).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.min).setZ(c.max.z).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).setY(c.min.y).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).setX(c.min.x).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).applyQuaternion(A),g.expandByPoint(Rt),g.min.x-=i,g.min.y-=a,g.max.x+=r,g.max.y+=o,A.setFromUnitVectors(pE,d),p&&A.premultiply(gE.invert()),A.premultiply(this._yAxisUpSpace);const m=g.getSize(dt),f=g.getCenter(Rt).applyQuaternion(A);if(Do(this._camera)){const _=this.getDistanceToFitBox(m.x,m.y,m.z,n);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.dollyTo(_,t)),l.push(this.setFocalOffset(0,0,0,t))}else if(ka(this._camera)){const _=this._camera,E=_.right-_.left,y=_.top-_.bottom,b=n?Math.max(E/m.x,y/m.y):Math.min(E/m.x,y/m.y);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.zoomTo(b,t)),l.push(this.setFocalOffset(0,0,0,t))}return Promise.all(l)}fitToSphere(e,t){const n=[],r="isObject3D"in e?cl.createBoundingSphere(e,fE):fE.copy(e);if(n.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Do(this._camera)){const a=this.getDistanceToFitSphere(r.radius);n.push(this.dollyTo(a,t))}else if(ka(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,i,r,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=lc.NONE,this._changedDolly=0;const l=Rt.set(i,r,a),c=dt.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 h=!o||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(this._target.z,this._targetEnd.z,this.restThreshold)&&Ot(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ot(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ot(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerp(e,t,n,i=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=lc.NONE,this._changedDolly=0;const r=dt.set(...e.target);if("spherical"in e)ji.set(...e.spherical);else{const u=Rt.set(...e.position);ji.setFromVector3(u.sub(r).applyQuaternion(this._yAxisUpSpace))}const a=cc.set(...t.target);if("spherical"in t)hc.set(...t.spherical);else{const u=Rt.set(...t.position);hc.setFromVector3(u.sub(a).applyQuaternion(this._yAxisUpSpace))}this._targetEnd.copy(r.lerp(a,n));const o=hc.theta-ji.theta,l=hc.phi-ji.phi,c=hc.radius-ji.radius;this._sphericalEnd.set(ji.radius+c*n,ji.phi+l*n,ji.theta+o*n),this._needsUpdate=!0,i||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!i||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(this._target.z,this._targetEnd.z,this.restThreshold)&&Ot(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ot(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ot(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,n,i,r,a,o,l,c,h,u,d,A,p=!1){return this.lerp({position:[e,t,n],target:[i,r,a]},{position:[o,l,c],target:[h,u,d]},A,p)}setPosition(e,t,n,i=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,t,n,i=!1){const r=this.getPosition(dt),a=this.setLookAt(r.x,r.y,r.z,e,t,n,i);return this._sphericalEnd.phi=Qs(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const r=!i||Ot(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Ot(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Ot(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),Zs.setFromMatrixColumn(this._camera.matrixWorldInverse,0),er.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Qo.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=dt.set(e,t,n),r=i.distanceTo(this._camera.position),a=i.sub(this._camera.position);Zs.multiplyScalar(a.x),er.multiplyScalar(a.y),Qo.multiplyScalar(a.z),dt.copy(Zs).add(er).add(Qo),dt.z=dt.z+r,this.dollyTo(r,!1),this.setFocalOffset(-dt.x,dt.y,-dt.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,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new tt.Vector4,typeof e=="number"?this._viewport.set(e,t,n,i):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,i=!1){if(AE(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,a=this._camera.getEffectiveFOV()*Au,o=this._camera.aspect;return((i?r>o:r<o)?t:e/o)*.5/Math.tan(a*.5)+n*.5}getDistanceToFitSphere(e){if(AE(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*Au,n=Math.atan(Math.tan(t*.5)*this._camera.aspect)*2,i=1<this._camera.aspect?t:n;return e/Math.sin(i*.5)}getTarget(e,t=!0){return(e&&e.isVector3?e:new tt.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new tt.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e||new tt.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new tt.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){return this._sphericalEnd.theta=(this._sphericalEnd.theta%Na+Na)%Na,this._sphericalEnd.theta>Math.PI&&(this._sphericalEnd.theta-=Na),this._spherical.theta+=Na*Math.round((this._sphericalEnd.theta-this._spherical.theta)/Na),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(!Ot(this._camera.up.x,this._cameraUp0.x)||!Ot(this._camera.up.y,this._cameraUp0.y)||!Ot(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const n=this.getPosition(dt);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,rp),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=dt.subVectors(this._target,this._camera.position).normalize(),t=Rt.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(dt);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,i=this._sphericalEnd.radius-this._spherical.radius,r=lx.subVectors(this._targetEnd,this._target),a=cx.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(Jt(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const u=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=ip(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,u,1/0,e),this._needsUpdate=!0}if(Jt(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const u=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=ip(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,u,1/0,e),this._needsUpdate=!0}if(Jt(i))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const u=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=ip(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,u,this.maxSpeed,e),this._needsUpdate=!0}if(Jt(r.x)&&Jt(r.y)&&Jt(r.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const u=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;ax(this._target,this._targetEnd,this._targetVelocity,u,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(Jt(a.x)&&Jt(a.y)&&Jt(a.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const u=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;ax(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,u,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(Jt(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const u=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=ip(this._zoom,this._zoomEnd,this._zoomVelocity,u,1/0,e)}if(this.dollyToCursor){if(Do(this._camera)&&this._changedDolly!==0){const u=this._spherical.radius-this._lastDistance,d=this._camera,A=this._getCameraDirection(gu),p=dt.copy(A).cross(d.up).normalize();p.lengthSq()===0&&(p.x=1);const g=Rt.crossVectors(p,A),m=this._sphericalEnd.radius*Math.tan(d.getEffectiveFOV()*Au*.5),_=(this._sphericalEnd.radius-u-this._sphericalEnd.radius)/this._sphericalEnd.radius,E=cc.copy(this._targetEnd).add(p.multiplyScalar(this._dollyControlCoord.x*m*d.aspect)).add(g.multiplyScalar(this._dollyControlCoord.y*m)),y=dt.copy(this._targetEnd).lerp(E,_),b=this._lastDollyDirection===lc.IN&&this._spherical.radius<=this.minDistance,x=this._lastDollyDirection===lc.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(b||x)){this._sphericalEnd.radius-=u,this._spherical.radius-=u;const w=Rt.copy(A).multiplyScalar(-u);y.add(w)}this._boundary.clampPoint(y,y);const I=Rt.subVectors(y,this._targetEnd);this._targetEnd.copy(y),this._target.add(I),this._changedDolly-=u,Jt(this._changedDolly)&&(this._changedDolly=0)}else if(ka(this._camera)&&this._changedZoom!==0){const u=this._zoom-this._lastZoom,d=this._camera,A=dt.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(d.near+d.far)/(d.near-d.far)).unproject(d),p=Rt.set(0,0,-1).applyQuaternion(d.quaternion),g=cc.copy(A).add(p.multiplyScalar(-A.dot(d.up))),f=-(this._zoom-u-this._zoom)/this._zoom,_=this._getCameraDirection(gu),E=this._targetEnd.dot(_),y=dt.copy(this._targetEnd).lerp(g,f),b=y.dot(_),x=_.multiplyScalar(b-E);y.sub(x),this._boundary.clampPoint(y,y);const I=Rt.subVectors(y,this._targetEnd);this._targetEnd.copy(y),this._target.add(I),this._changedZoom-=u,Jt(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),(!Jt(this._focalOffset.x)||!Jt(this._focalOffset.y)||!Jt(this._focalOffset.z))&&(this._camera.matrix.compose(this._camera.position,this._camera.quaternion,this._camera.scale),Zs.setFromMatrixColumn(this._camera.matrix,0),er.setFromMatrixColumn(this._camera.matrix,1),Qo.setFromMatrixColumn(this._camera.matrix,2),Zs.multiplyScalar(this._focalOffset.x),er.multiplyScalar(-this._focalOffset.y),Qo.multiplyScalar(this._focalOffset.z),dt.copy(Zs).add(er).add(Qo),this._camera.position.add(dt),this._camera.updateMatrixWorld()),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),dt.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const h=this._needsUpdate;return h&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):h?(this.dispatchEvent({type:"update"}),Jt(t,this.restThreshold)&&Jt(n,this.restThreshold)&&Jt(i,this.restThreshold)&&Jt(r.x,this.restThreshold)&&Jt(r.y,this.restThreshold)&&Jt(r.z,this.restThreshold)&&Jt(a.x,this.restThreshold)&&Jt(a.y,this.restThreshold)&&Jt(a.z,this.restThreshold)&&Jt(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!h&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=h,this._needsUpdate=!1,h}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:pu(this.maxDistance),minZoom:this.minZoom,maxZoom:pu(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:pu(this.maxPolarAngle),minAzimuthAngle:pu(this.minAzimuthAngle),maxAzimuthAngle:pu(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,target:this._targetEnd.toArray(),position:dt.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=fu(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=fu(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=fu(n.maxPolarAngle),this.minAzimuthAngle=fu(n.minAzimuthAngle),this.maxAzimuthAngle=fu(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),ji.setFromVector3(dt.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(ji.theta,ji.phi,t),this.dollyTo(ji.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",p5),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 i=t.lengthSq();if(i===0)return e;const r=Rt.copy(t).add(e),o=this._boundary.clampPoint(r,cc).sub(r),l=o.lengthSq();if(l===0)return e.add(t);if(l===i)return e;if(n===0)return e.add(t).add(o);{const c=1+n*l/t.dot(o);return e.add(Rt.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(Do(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*Au,i=Math.tan(n*.5)*t,r=i*e.aspect;this._nearPlaneCorners[0].set(-r,-i,0),this._nearPlaneCorners[1].set(r,-i,0),this._nearPlaneCorners[2].set(r,i,0),this._nearPlaneCorners[3].set(-r,i,0)}else if(ka(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,i=e.right*t,r=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,r,0),this._nearPlaneCorners[1].set(i,r,0),this._nearPlaneCorners[2].set(i,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_truckInternal=(e,t,n,i)=>{let r,a;if(Do(this._camera)){const o=dt.copy(this._camera.position).sub(this._target),l=this._camera.getEffectiveFOV()*Au,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(ka(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;i?(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=Na*this.azimuthRotateSpeed*e/this._elementRect.height,i=Na*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,i,!0)};_dollyInternal=(e,t,n)=>{const i=Math.pow(.95,-e*this.dollySpeed),r=this._sphericalEnd.radius,a=this._sphericalEnd.radius*i,o=Qs(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 i=Math.pow(.95,e*this.dollySpeed),r=this._zoom,a=this._zoom*i;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)||AE(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(gu);mE.lookAt(ox,n,this._camera.up);for(let i=0;i<4;i++){const r=Rt.copy(this._nearPlaneCorners[i]);r.applyMatrix4(mE);const a=cc.addVectors(this._target,r);ap.set(a,n),ap.far=this._spherical.radius+1;const o=ap.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 tt.Sphere){const n=t,i=n.center;uc.makeEmpty(),e.traverseVisible(a=>{a.isMesh&&uc.expandByObject(a)}),uc.getCenter(i);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 h=l.attributes.position;for(let u=0,d=h.count;u<d;u++)dt.fromBufferAttribute(h,u),r=Math.max(r,i.distanceToSquared(dt))}),n.radius=Math.sqrt(r),n}}class dx{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 zf extends oR{constructor({appWcRef:e}){super({appWcRef:e}),this._loggerContext="CAMERA MANAGER",this.__cameras={},this.__mainRenderer={},this.__mainCameraControls={},this.__screenshotCameraControls={},this.__cameraDirection=new Q,this.__cameraSpherical=new Vc,this.__savedCameraState={position:new Q,target:new Q,focalLength:0}}static{this.TAU=Math.PI*2}get cameraActions(){return cl.ACTION}getCameras(){return this.__cameras}get mainCameraControls(){return this.__mainCameraControls}get screenshotCameraControls(){return this.__screenshotCameraControls}getCurrentCameraTransforms(){const e=new Q;this.__cameras.main.getWorldPosition(e);const t=new Q;return this.__mainCameraControls.getTarget(t),{position:e,target:t,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.getSceneSphericalBoundsForCameraFocus();if(!(t.radius<=0))return await this.fitCameraToObject({objectToFocus:t,enableTransition:e})}__onMainCameraControlsControlStart(e){const t=this.__mainCameraControls,n=t.currentAction===t.mouseButtons?.right||t.currentAction===t.touches?.two;e.canPan&&n?this._appWcRef.eventsManager.cameraControlsStart.fire({type:"pan"}):t.currentAction===t.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,skipCameraFit:n=!1}){const i=this._appWcRef.getSceneSphericalBoundsForCameraFocus().radius,r=i<=0?1:i;e&&(this.__mainCameraControls.minDistance=r*e),t&&(this.__mainCameraControls.maxDistance=r*t),n||this.fitCameraToSceneBounds()}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(){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,t=!1){this.setCameraZoomLimits({minDistance:e.minDistance??.5,maxDistance:e.maxDistance??5,skipCameraFit:t})}disableCameraZoomLimits(){this.setCameraZoomLimits({minDistance:-1/0,maxDistance:1/0})}enableCameraRotationLimits(e){const{infinitePolarAngle:t,minPolarAngle:n,maxPolarAngle:i,infiniteAzimuthAngle:r,minAzimuthAngle:a,maxAzimuthAngle:o}=e;this.__mainCameraControls.minPolarAngle=t?-1/0:n,this.__mainCameraControls.maxPolarAngle=t?1/0:i,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.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 hr.euclideanModulo(e,zf.TAU)}absoluteAngle(e,t){const n=e-t;return hr.euclideanModulo(n+Math.PI,zf.TAU)-Math.PI}async moveCameraToLocation({newCameraTransforms:e,freezeCamera:t=!1,transition:n=!0,targetCameraControlsRef:i=this.__mainCameraControls,ignoreCameraLimits:r=!1}){e instanceof dx||(e=new dx(e));const a=e.getPosition(),o=e.getTarget();if(i.enabled=!1,r===!0)i.setLookAt(a.x,a.y,a.z,o.x,o.y,o.z,n),i.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(i.azimuthAngle)),h=this.absoluteAngle(this.normalizeAngle(this.__cameraSpherical.phi),this.normalizeAngle(i.polarAngle));i.rotate(c,h,n),i.moveTo(o.x,o.y,o.z,n),i.dollyTo(l,n)}t||(i.enabled=!0)}async rotateCameraToLocation({azimuthAngle:e,polarAngle:t,distance:n,transition:i=!0,targetCameraControlsRef:r=this.__mainCameraControls}){e&&r.rotateAzimuthTo(e,i),t&&r.rotatePolarTo(t,i),n&&r.dollyTo(n,i)}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)}}__setupEventListeners(){this._appWcRef.addEventListener(this._appWcRef.eventsManager.productSettingUpdatedEvent.name,()=>{this.updateCameraSettings(this._appWcRef.productSettings.camera)})}async setup({mainRenderer:e,screenshotRenderer:t,cameraSettings:n}){this.__mainRenderer=e,this.__cameras={main:new Bn(75,window.innerWidth/window.innerHeight,.1,1e3),screenshot:new Bn(75,window.innerWidth/window.innerHeight,.1,1e3)},this.__cameras.main.name="MainCamera",this.__cameras.screenshot.name="ScreenshotCamera",this.__cameras.main.position.setZ(100);const i={Vector2:Ie,Vector3:Q,Vector4:ct,Quaternion:Nt,Matrix4:ze,Spherical:Vc,Box3:Cn,Sphere:Hi,Raycaster:lb};cl.install({THREE:i}),this.__mainCameraControls=new cl(this.__cameras.main,e.domElement),this.__screenshotCameraControls=new cl(this.__cameras.screenshot,t.domElement),await this.updateCameraSettings(n),this.__mainCameraControls.addEventListener("controlstart",()=>{this.__onMainCameraControlsControlStart(n)}),this.__mainCameraControls.addEventListener("controlend",()=>{this.__onMainCameraControlsControlEnd()}),this._appWcRef.addEventListener(this._appWcRef.eventsManager.cameraMoveToTransform.name,(r=>{r.detail.saveFirst&&this.saveCurrentCameraTransforms(),this.moveCameraToLocation({newCameraTransforms:r.detail.cameraTransforms,ignoreCameraLimits:r.detail.ignoreCameraLimits})})),this._appWcRef.addEventListener(this._appWcRef.eventsManager.sceneBoundsChanged.name,()=>{this.__mainCameraControls.setBoundary(this._appWcRef.sceneManager.currentSceneBounds)}),this.__setupEventListeners()}}const g5='@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}',m5={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"}}}},dR={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)"}}}},he={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 re(s){const e=/\{Primitives\.(.*?)}/,t=String(s).match(e),n=/\{BrandPrimitives\.(.*?)}/,i=String(s).match(n);let r=s;if(t){const a=t[1].split(".");r=m5[a[0]][a[1]][a[2]].$value}else if(i){const a=i[1].split("."),o=dR[a[0]][a[1]][a[2]],l=o.$web;r=`${l.substring(0,l.length-1)}, ${o.$value})`}return Mi(r)}const Mb={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 E5(){const s={};for(const[e,t]of Object.entries(dR))for(const[n,i]of Object.entries(t))for(const[r,a]of Object.entries(i)){const o=`${e}${n}${r}`;s[o]={name:Mi(a.$web),defaultValue:a.$value,argType:{control:a.$type}}}return s}const y5=E5(),_h={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 _5=Object.defineProperty,Ph=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&_5(e,t,i),i};const Ml=class AR extends Yc{constructor(){super(),this.epgOnClickEventName="epgonclick",this.disabled=!1,this.theme=_h.theme.defaultValue.toString(),this.size=_h.size.defaultValue.toString(),AR.ensureFontsAreLoaded(),this.addEventListener("click",this.doClick),this.addEventListener("pointerover",this.doHoverStart),this.addEventListener("pointerleave",this.doHoverEnd)}static{this.styles=[st`
|
|
13103
|
+
*/const fn={LEFT:1,RIGHT:2,MIDDLE:4},ee=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}),lc={NONE:0,IN:1,OUT:-1};function Do(s){return s.isPerspectiveCamera}function ka(s){return s.isOrthographicCamera}const Na=Math.PI*2,sx=Math.PI/2,uR=1e-5,Au=Math.PI/180;function Qs(s,e,t){return Math.max(e,Math.min(t,s))}function Jt(s,e=uR){return Math.abs(s)<e}function Ot(s,e,t=uR){return Jt(s-e,t)}function rx(s,e){return Math.round(s/e)*e}function pu(s){return isFinite(s)?s:s<0?-Number.MAX_VALUE:Number.MAX_VALUE}function fu(s){return Math.abs(s)<Number.MAX_VALUE?s:s*(1/0)}function ip(s,e,t,n,i=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=s-e;const h=e,u=i*n;c=Qs(c,-u,u),e=s-c;const d=(t.value+a*c)*r;t.value=(t.value-a*d)*l;let A=e+(c+d)*l;return h-s>0==A>h&&(A=h,t.value=(A-h)/r),A}function ax(s,e,t,n,i=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 h=e.x,u=e.y,d=e.z,A=s.x-h,p=s.y-u,g=s.z-d;const m=h,f=u,_=d,E=i*n,y=E*E,b=A*A+p*p+g*g;if(b>y){const F=Math.sqrt(b);A=A/F*E,p=p/F*E,g=g/F*E}h=s.x-A,u=s.y-p,d=s.z-g;const x=(t.x+o*A)*r,I=(t.y+o*p)*r,w=(t.z+o*g)*r;t.x=(t.x-o*x)*c,t.y=(t.y-o*I)*c,t.z=(t.z-o*w)*c,a.x=h+(A+x)*c,a.y=u+(p+I)*c,a.z=d+(g+w)*c;const v=m-s.x,C=f-s.y,S=_-s.z,T=a.x-m,M=a.y-f,R=a.z-_;return v*T+C*M+S*R>0&&(a.x=m,a.y=f,a.z=_,t.x=(a.x-m)/r,t.y=(a.y-f)/r,t.z=(a.z-_)/r),a}function dE(s,e){e.set(0,0),s.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=s.length,e.y/=s.length}function AE(s,e){return ka(s)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class p5{_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 i=this._listeners[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.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 i=n.slice(0);for(let r=0,a=i.length;r<a;r++)i[r].call(this,e)}}}const f5="3.1.2",sp=1/8,g5=/Mac/.test(globalThis?.navigator?.platform);let tt,ox,rp,pE,Ui,dt,Rt,cc,gu,Zs,er,Qo,lx,cx,ji,hc,uc,hx,fE,ux,gE,mE,ap;class cl extends p5{static install(e){tt=e.THREE,ox=Object.freeze(new tt.Vector3(0,0,0)),rp=Object.freeze(new tt.Vector3(0,1,0)),pE=Object.freeze(new tt.Vector3(0,0,1)),Ui=new tt.Vector2,dt=new tt.Vector3,Rt=new tt.Vector3,cc=new tt.Vector3,gu=new tt.Vector3,Zs=new tt.Vector3,er=new tt.Vector3,Qo=new tt.Vector3,lx=new tt.Vector3,cx=new tt.Vector3,ji=new tt.Spherical,hc=new tt.Spherical,uc=new tt.Box3,hx=new tt.Box3,fE=new tt.Sphere,ux=new tt.Quaternion,gE=new tt.Quaternion,mE=new tt.Matrix4,ap=new tt.Raycaster}static get ACTION(){return ee}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=ee.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=lc.NONE;_thetaVelocity={value:0};_phiVelocity={value:0};_radiusVelocity={value:0};_targetVelocity=new tt.Vector3;_focalOffsetVelocity=new tt.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 tt>"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 tt.Quaternion().setFromUnitVectors(this._camera.up,rp),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=ee.NONE,this._target=new tt.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new tt.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new tt.Spherical().setFromVector3(dt.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 tt.Vector3,new tt.Vector3,new tt.Vector3,new tt.Vector3],this._updateNearPlaneCorners(),this._boundary=new tt.Box3(new tt.Vector3(-1/0,-1/0,-1/0),new tt.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 tt.Vector2,this.mouseButtons={left:ee.ROTATE,middle:ee.DOLLY,right:ee.TRUCK,wheel:Do(this._camera)?ee.DOLLY:ka(this._camera)?ee.ZOOM:ee.NONE},this.touches={one:ee.TOUCH_ROTATE,two:Do(this._camera)?ee.TOUCH_DOLLY_TRUCK:ka(this._camera)?ee.TOUCH_ZOOM_TRUCK:ee.NONE,three:ee.TOUCH_TRUCK};const n=new tt.Vector2,i=new tt.Vector2,r=new tt.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 y=this._domElement.getBoundingClientRect(),b=f.clientX/y.width,x=f.clientY/y.height;if(b<this._interactiveArea.left||b>this._interactiveArea.right||x<this._interactiveArea.top||x>this._interactiveArea.bottom)return}const _=f.pointerType!=="mouse"?null:(f.buttons&fn.LEFT)===fn.LEFT?fn.LEFT:(f.buttons&fn.MIDDLE)===fn.MIDDLE?fn.MIDDLE:(f.buttons&fn.RIGHT)===fn.RIGHT?fn.RIGHT:null;if(_!==null){const y=this._findPointerByMouseButton(_);y&&this._disposePointer(y)}if((f.buttons&fn.LEFT)===fn.LEFT&&this._lockedPointer)return;const E={pointerId:f.pointerId,clientX:f.clientX,clientY:f.clientY,deltaX:0,deltaY:0,mouseButton:_};this._activePointers.push(E),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 _=f.pointerId,E=this._lockedPointer||this._findPointerById(_);if(E){if(E.clientX=f.clientX,E.clientY=f.clientY,E.deltaX=f.movementX,E.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&fn.LEFT)===fn.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(f.buttons&fn.MIDDLE)===fn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(f.buttons&fn.RIGHT)===fn.RIGHT&&(this._state=this._state|this.mouseButtons.right);A()}},l=f=>{const _=this._findPointerById(f.pointerId);if(!(_&&_===this._lockedPointer)){if(_&&this._disposePointer(_),f.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=ee.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=ee.NONE;p()}};let c=-1;const h=f=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===ee.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const I=this._domElement.getBoundingClientRect(),w=f.clientX/I.width,v=f.clientY/I.height;if(w<this._interactiveArea.left||w>this._interactiveArea.right||v<this._interactiveArea.top||v>this._interactiveArea.bottom)return}if(f.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===ee.ROTATE||this.mouseButtons.wheel===ee.TRUCK){const I=performance.now();c-I<1e3&&this._getClientRect(this._elementRect),c=I}const _=g5?-1:-3,E=f.deltaMode===1&&!f.ctrlKey?f.deltaY/_:f.deltaY/(_*10),y=this.dollyToCursor?(f.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(f.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(f.ctrlKey?ee.ZOOM:this.mouseButtons.wheel){case ee.ROTATE:{this._rotateInternal(f.deltaX,f.deltaY),this._isUserControllingRotate=!0;break}case ee.TRUCK:{this._truckInternal(f.deltaX,f.deltaY,!1,!1),this._isUserControllingTruck=!0;break}case ee.SCREEN_PAN:{this._truckInternal(f.deltaX,f.deltaY,!1,!0),this._isUserControllingTruck=!0;break}case ee.OFFSET:{this._truckInternal(f.deltaX,f.deltaY,!0,!1),this._isUserControllingOffset=!0;break}case ee.DOLLY:{this._dollyInternal(-E,y,b),this._isUserControllingDolly=!0;break}case ee.ZOOM:{this._zoomInternal(-E,y,b),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},u=f=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===cl.ACTION.NONE){const _=f instanceof PointerEvent?f.pointerId:0,E=this._findPointerById(_);E&&this._disposePointer(E),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",l);return}f.preventDefault()}},d=f=>{if(!this._enabled)return;if(dE(this._activePointers,Ui),this._getClientRect(this._elementRect),n.copy(Ui),i.copy(Ui),this._activePointers.length>=2){const E=Ui.x-this._activePointers[1].clientX,y=Ui.y-this._activePointers[1].clientY,b=Math.sqrt(E*E+y*y);r.set(0,b);const x=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,I=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(x,I)}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&fn.LEFT)===fn.LEFT&&(this._state=this._state|this.mouseButtons.left),(f.buttons&fn.MIDDLE)===fn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(f.buttons&fn.RIGHT)===fn.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&ee.ROTATE)===ee.ROTATE||(this._state&ee.TOUCH_ROTATE)===ee.TOUCH_ROTATE||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.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&ee.TRUCK)===ee.TRUCK||(this._state&ee.SCREEN_PAN)===ee.SCREEN_PAN||(this._state&ee.TOUCH_TRUCK)===ee.TOUCH_TRUCK||(this._state&ee.TOUCH_SCREEN_PAN)===ee.TOUCH_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&ee.DOLLY)===ee.DOLLY||(this._state&ee.TOUCH_DOLLY)===ee.TOUCH_DOLLY||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&ee.ZOOM)===ee.ZOOM||(this._state&ee.TOUCH_ZOOM)===ee.TOUCH_ZOOM||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_ZOOM_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.TOUCH_ZOOM_OFFSET||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&ee.OFFSET)===ee.OFFSET||(this._state&ee.TOUCH_OFFSET)===ee.TOUCH_OFFSET||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.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,dE(this._activePointers,Ui);const _=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,E=_?-_.deltaX:i.x-Ui.x,y=_?-_.deltaY:i.y-Ui.y;if(i.copy(Ui),((this._state&ee.ROTATE)===ee.ROTATE||(this._state&ee.TOUCH_ROTATE)===ee.TOUCH_ROTATE||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(E,y),this._isUserControllingRotate=!0),(this._state&ee.DOLLY)===ee.DOLLY||(this._state&ee.ZOOM)===ee.ZOOM){const b=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,x=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,I=this.dollyDragInverted?-1:1;(this._state&ee.DOLLY)===ee.DOLLY?(this._dollyInternal(I*y*sp,b,x),this._isUserControllingDolly=!0):(this._zoomInternal(I*y*sp,b,x),this._isUserControllingZoom=!0)}if((this._state&ee.TOUCH_DOLLY)===ee.TOUCH_DOLLY||(this._state&ee.TOUCH_ZOOM)===ee.TOUCH_ZOOM||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_ZOOM_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.TOUCH_ZOOM_OFFSET||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_ZOOM_ROTATE)===ee.TOUCH_ZOOM_ROTATE){const b=Ui.x-this._activePointers[1].clientX,x=Ui.y-this._activePointers[1].clientY,I=Math.sqrt(b*b+x*x),w=r.y-I;r.set(0,I);const v=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&ee.TOUCH_DOLLY)===ee.TOUCH_DOLLY||(this._state&ee.TOUCH_DOLLY_ROTATE)===ee.TOUCH_DOLLY_ROTATE||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET?(this._dollyInternal(w*sp,v,C),this._isUserControllingDolly=!0):(this._zoomInternal(w*sp,v,C),this._isUserControllingZoom=!0)}((this._state&ee.TRUCK)===ee.TRUCK||(this._state&ee.TOUCH_TRUCK)===ee.TOUCH_TRUCK||(this._state&ee.TOUCH_DOLLY_TRUCK)===ee.TOUCH_DOLLY_TRUCK||(this._state&ee.TOUCH_ZOOM_TRUCK)===ee.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(E,y,!1,!1),this._isUserControllingTruck=!0),((this._state&ee.SCREEN_PAN)===ee.SCREEN_PAN||(this._state&ee.TOUCH_SCREEN_PAN)===ee.TOUCH_SCREEN_PAN||(this._state&ee.TOUCH_DOLLY_SCREEN_PAN)===ee.TOUCH_DOLLY_SCREEN_PAN||(this._state&ee.TOUCH_ZOOM_SCREEN_PAN)===ee.TOUCH_ZOOM_SCREEN_PAN)&&(this._truckInternal(E,y,!1,!0),this._isUserControllingTruck=!0),((this._state&ee.OFFSET)===ee.OFFSET||(this._state&ee.TOUCH_OFFSET)===ee.TOUCH_OFFSET||(this._state&ee.TOUCH_DOLLY_OFFSET)===ee.TOUCH_DOLLY_OFFSET||(this._state&ee.TOUCH_ZOOM_OFFSET)===ee.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(E,y,!0,!1),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{dE(this._activePointers,Ui),i.copy(Ui),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",h,{passive:!1}),this._domElement.addEventListener("contextmenu",u)},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",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",u),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!==ee.NONE&&(this._state=ee.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=Qs(e.width,0,1),this._interactiveArea.height=Qs(e.height,0,1),this._interactiveArea.x=Qs(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Qs(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 i=Qs(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=Qs(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,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||Ot(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ot(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=lc.NONE,this._changedDolly=0,this._dollyToNoClamp(Qs(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=Ot(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||Ot(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(gu).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(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=Qs(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||Ot(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(),Zs.setFromMatrixColumn(this._camera.matrix,0),er.setFromMatrixColumn(this._camera.matrix,1),Zs.multiplyScalar(e),er.multiplyScalar(-t);const i=dt.copy(Zs).add(er),r=Rt.copy(this._targetEnd).add(i);return this.moveTo(r.x,r.y,r.z,n)}forward(e,t=!1){dt.setFromMatrixColumn(this._camera.matrix,0),dt.crossVectors(this._camera.up,dt),dt.multiplyScalar(e);const n=Rt.copy(this._targetEnd).add(dt);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return dt.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+dt.x,this._targetEnd.y+dt.y,this._targetEnd.z+dt.z,t)}moveTo(e,t,n,i=!1){this._isUserControllingTruck=!1;const r=dt.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const a=!i||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,i=!1){const o=dt.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(o.x,o.y,o.z,i)}fitToBox(e,t,{cover:n=!1,paddingLeft:i=0,paddingRight:r=0,paddingBottom:a=0,paddingTop:o=0}={}){const l=[],c=e.isBox3?uc.copy(e):uc.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=rx(this._sphericalEnd.theta,sx),u=rx(this._sphericalEnd.phi,sx);l.push(this.rotateTo(h,u,t));const d=dt.setFromSpherical(this._sphericalEnd).normalize(),A=ux.setFromUnitVectors(d,pE),p=Ot(Math.abs(d.y),1);p&&A.multiply(gE.setFromAxisAngle(rp,h)),A.multiply(this._yAxisUpSpaceInverse);const g=hx.makeEmpty();Rt.copy(c.min).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.min).setX(c.max.x).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.min).setY(c.max.y).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).setZ(c.min.z).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.min).setZ(c.max.z).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).setY(c.min.y).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).setX(c.min.x).applyQuaternion(A),g.expandByPoint(Rt),Rt.copy(c.max).applyQuaternion(A),g.expandByPoint(Rt),g.min.x-=i,g.min.y-=a,g.max.x+=r,g.max.y+=o,A.setFromUnitVectors(pE,d),p&&A.premultiply(gE.invert()),A.premultiply(this._yAxisUpSpace);const m=g.getSize(dt),f=g.getCenter(Rt).applyQuaternion(A);if(Do(this._camera)){const _=this.getDistanceToFitBox(m.x,m.y,m.z,n);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.dollyTo(_,t)),l.push(this.setFocalOffset(0,0,0,t))}else if(ka(this._camera)){const _=this._camera,E=_.right-_.left,y=_.top-_.bottom,b=n?Math.max(E/m.x,y/m.y):Math.min(E/m.x,y/m.y);l.push(this.moveTo(f.x,f.y,f.z,t)),l.push(this.zoomTo(b,t)),l.push(this.setFocalOffset(0,0,0,t))}return Promise.all(l)}fitToSphere(e,t){const n=[],r="isObject3D"in e?cl.createBoundingSphere(e,fE):fE.copy(e);if(n.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Do(this._camera)){const a=this.getDistanceToFitSphere(r.radius);n.push(this.dollyTo(a,t))}else if(ka(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,i,r,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=lc.NONE,this._changedDolly=0;const l=Rt.set(i,r,a),c=dt.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 h=!o||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(this._target.z,this._targetEnd.z,this.restThreshold)&&Ot(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ot(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ot(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerp(e,t,n,i=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=lc.NONE,this._changedDolly=0;const r=dt.set(...e.target);if("spherical"in e)ji.set(...e.spherical);else{const u=Rt.set(...e.position);ji.setFromVector3(u.sub(r).applyQuaternion(this._yAxisUpSpace))}const a=cc.set(...t.target);if("spherical"in t)hc.set(...t.spherical);else{const u=Rt.set(...t.position);hc.setFromVector3(u.sub(a).applyQuaternion(this._yAxisUpSpace))}this._targetEnd.copy(r.lerp(a,n));const o=hc.theta-ji.theta,l=hc.phi-ji.phi,c=hc.radius-ji.radius;this._sphericalEnd.set(ji.radius+c*n,ji.phi+l*n,ji.theta+o*n),this._needsUpdate=!0,i||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!i||Ot(this._target.x,this._targetEnd.x,this.restThreshold)&&Ot(this._target.y,this._targetEnd.y,this.restThreshold)&&Ot(this._target.z,this._targetEnd.z,this.restThreshold)&&Ot(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ot(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ot(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,n,i,r,a,o,l,c,h,u,d,A,p=!1){return this.lerp({position:[e,t,n],target:[i,r,a]},{position:[o,l,c],target:[h,u,d]},A,p)}setPosition(e,t,n,i=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,t,n,i=!1){const r=this.getPosition(dt),a=this.setLookAt(r.x,r.y,r.z,e,t,n,i);return this._sphericalEnd.phi=Qs(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const r=!i||Ot(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Ot(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Ot(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),Zs.setFromMatrixColumn(this._camera.matrixWorldInverse,0),er.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Qo.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=dt.set(e,t,n),r=i.distanceTo(this._camera.position),a=i.sub(this._camera.position);Zs.multiplyScalar(a.x),er.multiplyScalar(a.y),Qo.multiplyScalar(a.z),dt.copy(Zs).add(er).add(Qo),dt.z=dt.z+r,this.dollyTo(r,!1),this.setFocalOffset(-dt.x,dt.y,-dt.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,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new tt.Vector4,typeof e=="number"?this._viewport.set(e,t,n,i):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,i=!1){if(AE(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,a=this._camera.getEffectiveFOV()*Au,o=this._camera.aspect;return((i?r>o:r<o)?t:e/o)*.5/Math.tan(a*.5)+n*.5}getDistanceToFitSphere(e){if(AE(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*Au,n=Math.atan(Math.tan(t*.5)*this._camera.aspect)*2,i=1<this._camera.aspect?t:n;return e/Math.sin(i*.5)}getTarget(e,t=!0){return(e&&e.isVector3?e:new tt.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new tt.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e||new tt.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new tt.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){return this._sphericalEnd.theta=(this._sphericalEnd.theta%Na+Na)%Na,this._sphericalEnd.theta>Math.PI&&(this._sphericalEnd.theta-=Na),this._spherical.theta+=Na*Math.round((this._sphericalEnd.theta-this._spherical.theta)/Na),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(!Ot(this._camera.up.x,this._cameraUp0.x)||!Ot(this._camera.up.y,this._cameraUp0.y)||!Ot(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const n=this.getPosition(dt);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,rp),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=dt.subVectors(this._target,this._camera.position).normalize(),t=Rt.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(dt);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,i=this._sphericalEnd.radius-this._spherical.radius,r=lx.subVectors(this._targetEnd,this._target),a=cx.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(Jt(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const u=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=ip(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,u,1/0,e),this._needsUpdate=!0}if(Jt(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const u=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=ip(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,u,1/0,e),this._needsUpdate=!0}if(Jt(i))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const u=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=ip(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,u,this.maxSpeed,e),this._needsUpdate=!0}if(Jt(r.x)&&Jt(r.y)&&Jt(r.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const u=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;ax(this._target,this._targetEnd,this._targetVelocity,u,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(Jt(a.x)&&Jt(a.y)&&Jt(a.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const u=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;ax(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,u,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(Jt(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const u=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=ip(this._zoom,this._zoomEnd,this._zoomVelocity,u,1/0,e)}if(this.dollyToCursor){if(Do(this._camera)&&this._changedDolly!==0){const u=this._spherical.radius-this._lastDistance,d=this._camera,A=this._getCameraDirection(gu),p=dt.copy(A).cross(d.up).normalize();p.lengthSq()===0&&(p.x=1);const g=Rt.crossVectors(p,A),m=this._sphericalEnd.radius*Math.tan(d.getEffectiveFOV()*Au*.5),_=(this._sphericalEnd.radius-u-this._sphericalEnd.radius)/this._sphericalEnd.radius,E=cc.copy(this._targetEnd).add(p.multiplyScalar(this._dollyControlCoord.x*m*d.aspect)).add(g.multiplyScalar(this._dollyControlCoord.y*m)),y=dt.copy(this._targetEnd).lerp(E,_),b=this._lastDollyDirection===lc.IN&&this._spherical.radius<=this.minDistance,x=this._lastDollyDirection===lc.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(b||x)){this._sphericalEnd.radius-=u,this._spherical.radius-=u;const w=Rt.copy(A).multiplyScalar(-u);y.add(w)}this._boundary.clampPoint(y,y);const I=Rt.subVectors(y,this._targetEnd);this._targetEnd.copy(y),this._target.add(I),this._changedDolly-=u,Jt(this._changedDolly)&&(this._changedDolly=0)}else if(ka(this._camera)&&this._changedZoom!==0){const u=this._zoom-this._lastZoom,d=this._camera,A=dt.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(d.near+d.far)/(d.near-d.far)).unproject(d),p=Rt.set(0,0,-1).applyQuaternion(d.quaternion),g=cc.copy(A).add(p.multiplyScalar(-A.dot(d.up))),f=-(this._zoom-u-this._zoom)/this._zoom,_=this._getCameraDirection(gu),E=this._targetEnd.dot(_),y=dt.copy(this._targetEnd).lerp(g,f),b=y.dot(_),x=_.multiplyScalar(b-E);y.sub(x),this._boundary.clampPoint(y,y);const I=Rt.subVectors(y,this._targetEnd);this._targetEnd.copy(y),this._target.add(I),this._changedZoom-=u,Jt(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),(!Jt(this._focalOffset.x)||!Jt(this._focalOffset.y)||!Jt(this._focalOffset.z))&&(this._camera.matrix.compose(this._camera.position,this._camera.quaternion,this._camera.scale),Zs.setFromMatrixColumn(this._camera.matrix,0),er.setFromMatrixColumn(this._camera.matrix,1),Qo.setFromMatrixColumn(this._camera.matrix,2),Zs.multiplyScalar(this._focalOffset.x),er.multiplyScalar(-this._focalOffset.y),Qo.multiplyScalar(this._focalOffset.z),dt.copy(Zs).add(er).add(Qo),this._camera.position.add(dt),this._camera.updateMatrixWorld()),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),dt.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const h=this._needsUpdate;return h&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):h?(this.dispatchEvent({type:"update"}),Jt(t,this.restThreshold)&&Jt(n,this.restThreshold)&&Jt(i,this.restThreshold)&&Jt(r.x,this.restThreshold)&&Jt(r.y,this.restThreshold)&&Jt(r.z,this.restThreshold)&&Jt(a.x,this.restThreshold)&&Jt(a.y,this.restThreshold)&&Jt(a.z,this.restThreshold)&&Jt(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!h&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=h,this._needsUpdate=!1,h}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:pu(this.maxDistance),minZoom:this.minZoom,maxZoom:pu(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:pu(this.maxPolarAngle),minAzimuthAngle:pu(this.minAzimuthAngle),maxAzimuthAngle:pu(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,target:this._targetEnd.toArray(),position:dt.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=fu(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=fu(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=fu(n.maxPolarAngle),this.minAzimuthAngle=fu(n.minAzimuthAngle),this.maxAzimuthAngle=fu(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),ji.setFromVector3(dt.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(ji.theta,ji.phi,t),this.dollyTo(ji.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",f5),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 i=t.lengthSq();if(i===0)return e;const r=Rt.copy(t).add(e),o=this._boundary.clampPoint(r,cc).sub(r),l=o.lengthSq();if(l===0)return e.add(t);if(l===i)return e;if(n===0)return e.add(t).add(o);{const c=1+n*l/t.dot(o);return e.add(Rt.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(Do(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*Au,i=Math.tan(n*.5)*t,r=i*e.aspect;this._nearPlaneCorners[0].set(-r,-i,0),this._nearPlaneCorners[1].set(r,-i,0),this._nearPlaneCorners[2].set(r,i,0),this._nearPlaneCorners[3].set(-r,i,0)}else if(ka(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,i=e.right*t,r=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,r,0),this._nearPlaneCorners[1].set(i,r,0),this._nearPlaneCorners[2].set(i,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_truckInternal=(e,t,n,i)=>{let r,a;if(Do(this._camera)){const o=dt.copy(this._camera.position).sub(this._target),l=this._camera.getEffectiveFOV()*Au,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(ka(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;i?(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=Na*this.azimuthRotateSpeed*e/this._elementRect.height,i=Na*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,i,!0)};_dollyInternal=(e,t,n)=>{const i=Math.pow(.95,-e*this.dollySpeed),r=this._sphericalEnd.radius,a=this._sphericalEnd.radius*i,o=Qs(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 i=Math.pow(.95,e*this.dollySpeed),r=this._zoom,a=this._zoom*i;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)||AE(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(gu);mE.lookAt(ox,n,this._camera.up);for(let i=0;i<4;i++){const r=Rt.copy(this._nearPlaneCorners[i]);r.applyMatrix4(mE);const a=cc.addVectors(this._target,r);ap.set(a,n),ap.far=this._spherical.radius+1;const o=ap.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 tt.Sphere){const n=t,i=n.center;uc.makeEmpty(),e.traverseVisible(a=>{a.isMesh&&uc.expandByObject(a)}),uc.getCenter(i);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 h=l.attributes.position;for(let u=0,d=h.count;u<d;u++)dt.fromBufferAttribute(h,u),r=Math.max(r,i.distanceToSquared(dt))}),n.radius=Math.sqrt(r),n}}class dx{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 zf extends oR{constructor({appWcRef:e}){super({appWcRef:e}),this._loggerContext="CAMERA MANAGER",this.__cameras={},this.__mainRenderer={},this.__mainCameraControls={},this.__screenshotCameraControls={},this.__cameraDirection=new Q,this.__cameraSpherical=new Vc,this.__savedCameraState={position:new Q,target:new Q,focalLength:0}}static{this.TAU=Math.PI*2}get cameraActions(){return cl.ACTION}getCameras(){return this.__cameras}get mainCameraControls(){return this.__mainCameraControls}get screenshotCameraControls(){return this.__screenshotCameraControls}getCurrentCameraTransforms(){const e=new Q;this.__cameras.main.getWorldPosition(e);const t=new Q;return this.__mainCameraControls.getTarget(t),{position:e,target:t,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.getSceneSphericalBoundsForCameraFocus();if(!(t.radius<=0))return await this.fitCameraToObject({objectToFocus:t,enableTransition:e})}__onMainCameraControlsControlStart(e){const t=this.__mainCameraControls,n=t.currentAction===t.mouseButtons?.right||t.currentAction===t.touches?.two;e.canPan&&n?this._appWcRef.eventsManager.cameraControlsStart.fire({type:"pan"}):t.currentAction===t.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,skipCameraFit:n=!1}){const i=this._appWcRef.getSceneSphericalBoundsForCameraFocus().radius,r=i<=0?1:i;e&&(this.__mainCameraControls.minDistance=r*e),t&&(this.__mainCameraControls.maxDistance=r*t),n||this.fitCameraToSceneBounds()}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(){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,t=!1){this.setCameraZoomLimits({minDistance:e.minDistance??.5,maxDistance:e.maxDistance??5,skipCameraFit:t})}disableCameraZoomLimits(){this.setCameraZoomLimits({minDistance:-1/0,maxDistance:1/0})}enableCameraRotationLimits(e){const{infinitePolarAngle:t,minPolarAngle:n,maxPolarAngle:i,infiniteAzimuthAngle:r,minAzimuthAngle:a,maxAzimuthAngle:o}=e;this.__mainCameraControls.minPolarAngle=t?-1/0:n,this.__mainCameraControls.maxPolarAngle=t?1/0:i,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.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 hr.euclideanModulo(e,zf.TAU)}absoluteAngle(e,t){const n=e-t;return hr.euclideanModulo(n+Math.PI,zf.TAU)-Math.PI}async moveCameraToLocation({newCameraTransforms:e,freezeCamera:t=!1,transition:n=!0,targetCameraControlsRef:i=this.__mainCameraControls,ignoreCameraLimits:r=!1}){e instanceof dx||(e=new dx(e));const a=e.getPosition(),o=e.getTarget();if(i.enabled=!1,r===!0)i.setLookAt(a.x,a.y,a.z,o.x,o.y,o.z,n),i.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(i.azimuthAngle)),h=this.absoluteAngle(this.normalizeAngle(this.__cameraSpherical.phi),this.normalizeAngle(i.polarAngle));i.rotate(c,h,n),i.moveTo(o.x,o.y,o.z,n),i.dollyTo(l,n)}t||(i.enabled=!0)}async rotateCameraToLocation({azimuthAngle:e,polarAngle:t,distance:n,transition:i=!0,targetCameraControlsRef:r=this.__mainCameraControls}){e&&r.rotateAzimuthTo(e,i),t&&r.rotatePolarTo(t,i),n&&r.dollyTo(n,i)}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)}}__setupEventListeners(){this._appWcRef.addEventListener(this._appWcRef.eventsManager.productSettingUpdatedEvent.name,()=>{this.updateCameraSettings(this._appWcRef.productSettings.camera)})}async setup({mainRenderer:e,screenshotRenderer:t,cameraSettings:n}){this.__mainRenderer=e,this.__cameras={main:new Bn(75,window.innerWidth/window.innerHeight,.1,1e3),screenshot:new Bn(75,window.innerWidth/window.innerHeight,.1,1e3)},this.__cameras.main.name="MainCamera",this.__cameras.screenshot.name="ScreenshotCamera",this.__cameras.main.position.setZ(100);const i={Vector2:Ie,Vector3:Q,Vector4:ct,Quaternion:Nt,Matrix4:ze,Spherical:Vc,Box3:Cn,Sphere:Hi,Raycaster:lb};cl.install({THREE:i}),this.__mainCameraControls=new cl(this.__cameras.main,e.domElement),this.__screenshotCameraControls=new cl(this.__cameras.screenshot,t.domElement),await this.updateCameraSettings(n),this.__mainCameraControls.addEventListener("controlstart",()=>{this.__onMainCameraControlsControlStart(n)}),this.__mainCameraControls.addEventListener("controlend",()=>{this.__onMainCameraControlsControlEnd()}),this._appWcRef.addEventListener(this._appWcRef.eventsManager.cameraMoveToTransform.name,(r=>{r.detail.saveFirst&&this.saveCurrentCameraTransforms(),this.moveCameraToLocation({newCameraTransforms:r.detail.cameraTransforms,ignoreCameraLimits:r.detail.ignoreCameraLimits})})),this._appWcRef.addEventListener(this._appWcRef.eventsManager.sceneBoundsChanged.name,()=>{this.__mainCameraControls.setBoundary(this._appWcRef.sceneManager.currentSceneBounds)}),this.__setupEventListeners()}}const m5='@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}',E5={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"}}}},dR={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)"}}}},he={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 re(s){const e=/\{Primitives\.(.*?)}/,t=String(s).match(e),n=/\{BrandPrimitives\.(.*?)}/,i=String(s).match(n);let r=s;if(t){const a=t[1].split(".");r=E5[a[0]][a[1]][a[2]].$value}else if(i){const a=i[1].split("."),o=dR[a[0]][a[1]][a[2]],l=o.$web;r=`${l.substring(0,l.length-1)}, ${o.$value})`}return Mi(r)}const Mb={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 y5(){const s={};for(const[e,t]of Object.entries(dR))for(const[n,i]of Object.entries(t))for(const[r,a]of Object.entries(i)){const o=`${e}${n}${r}`;s[o]={name:Mi(a.$web),defaultValue:a.$value,argType:{control:a.$type}}}return s}const _5=y5(),_h={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 b5=Object.defineProperty,Ph=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&b5(e,t,i),i};const Ml=class AR extends Yc{constructor(){super(),this.epgOnClickEventName="epgonclick",this.disabled=!1,this.theme=_h.theme.defaultValue.toString(),this.size=_h.size.defaultValue.toString(),AR.ensureFontsAreLoaded(),this.addEventListener("click",this.doClick),this.addEventListener("pointerover",this.doHoverStart),this.addEventListener("pointerleave",this.doHoverEnd)}static{this.styles=[st`
|
|
13104
13104
|
:host {
|
|
13105
13105
|
font-family: ${re(he.Font.Family.Main.$value)};
|
|
13106
13106
|
letter-spacing: 0.5px;
|
|
@@ -13133,9 +13133,9 @@ ${r.join(`
|
|
|
13133
13133
|
.hide {
|
|
13134
13134
|
display: none;
|
|
13135
13135
|
}
|
|
13136
|
-
`]}firstUpdated(e){super.firstUpdated(e)}static ensureFontsAreLoaded(){const e="epigraphFonts";document.head.querySelector(`#${e}`)||document.head.insertAdjacentHTML("beforeend",`<style id=${e}>${
|
|
13136
|
+
`]}firstUpdated(e){super.firstUpdated(e)}static ensureFontsAreLoaded(){const e="epigraphFonts";document.head.querySelector(`#${e}`)||document.head.insertAdjacentHTML("beforeend",`<style id=${e}>${m5}</style>`)}_getSlottedElements(e){const t=e.assignedElements();return[...t.length>0?t:e.children]}doHoverStart(){if(this.disabled)return;typeof this.onHoverStartCallback=="function"&&this.onHoverStartCallback(),this.shadowRoot?.host.classList.add("hover");const e=new CustomEvent("epgonhoverstart");this.dispatchEvent(e)}doHoverEnd(){if(this.disabled)return;typeof this.onHoverEndCallback=="function"&&this.onHoverEndCallback(),this.shadowRoot?.host.classList.remove("hover");const e=new CustomEvent("epgonhoverend");this.dispatchEvent(e)}doClick(){if(this.disabled)return;typeof this.onClickCallback=="function"&&this.onClickCallback();const e=new CustomEvent("epgonclick");this.dispatchEvent(e)}_showElement(e){const t=e.target;t&&(t.classList.remove("hide"),t.ariaHidden="true")}_hideElement(e){const t=e.target;t&&(t.classList.add("hide"),t.ariaHidden="true")}_showPlaceholderImage(e){const t=e.target;t&&(t.src="https://placehold.co/100")}render(){return ae`
|
|
13137
13137
|
${It.getCustomStylesTemplate()}
|
|
13138
|
-
`}};Ph([q({type:Boolean,attribute:_h.disabled.name,reflect:!0})],Ml.prototype,"disabled");Ph([q({attribute:_h.theme.name,type:String,reflect:!0})],Ml.prototype,"theme");Ph([q({attribute:_h.size.name,type:String,reflect:!0})],Ml.prototype,"size");Ph([q({attribute:!1})],Ml.prototype,"onClickCallback");Ph([q({attribute:!1})],Ml.prototype,"onHoverStartCallback");Ph([q({attribute:!1})],Ml.prototype,"onHoverEndCallback");let ri=Ml;const Ax="epg-dimension-label",Hf={label:{name:"label",defaultValue:"6.5"},unitSymbol:{name:"unit-symbol",defaultValue:"”"}};var
|
|
13138
|
+
`}};Ph([q({type:Boolean,attribute:_h.disabled.name,reflect:!0})],Ml.prototype,"disabled");Ph([q({attribute:_h.theme.name,type:String,reflect:!0})],Ml.prototype,"theme");Ph([q({attribute:_h.size.name,type:String,reflect:!0})],Ml.prototype,"size");Ph([q({attribute:!1})],Ml.prototype,"onClickCallback");Ph([q({attribute:!1})],Ml.prototype,"onHoverStartCallback");Ph([q({attribute:!1})],Ml.prototype,"onHoverEndCallback");let ri=Ml;const Ax="epg-dimension-label",Hf={label:{name:"label",defaultValue:"6.5"},unitSymbol:{name:"unit-symbol",defaultValue:"”"}};var v5=Object.defineProperty,pR=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&v5(e,t,i),i};class Rb extends ri{constructor(){super(...arguments),this.label=Hf.label.defaultValue.toString(),this.unitSymbol=Hf.unitSymbol.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
13139
13139
|
:host {
|
|
13140
13140
|
display: flex;
|
|
13141
13141
|
font-size: 16px;
|
|
@@ -13186,7 +13186,7 @@ ${r.join(`
|
|
|
13186
13186
|
${this.unitSymbol?ae`<span class="unit-symbol">${this.unitSymbol}</span>`:me}
|
|
13187
13187
|
</slot>
|
|
13188
13188
|
|
|
13189
|
-
`}}pR([q({attribute:Hf.label.name})],Rb.prototype,"label");pR([q({attribute:Hf.unitSymbol.name})],Rb.prototype,"unitSymbol");window.customElements.get(Ax)||window.customElements.define(Ax,Rb);var
|
|
13189
|
+
`}}pR([q({attribute:Hf.label.name})],Rb.prototype,"label");pR([q({attribute:Hf.unitSymbol.name})],Rb.prototype,"unitSymbol");window.customElements.get(Ax)||window.customElements.define(Ax,Rb);var I5=Object.defineProperty,Fh=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&I5(e,t,i),i};const Rl=class Xp extends Tl{constructor(){super(),this.enabled=!1,this.dimensionsUnit=Fe.inch,this.dimensionsUnitSymbol="",this._loggerContext="DIMENSIONS MANAGER",this.__dimensionsIndicatorBoundsPadding=.08,this.__cameraDirection=new Q,this.__dimensionsInDisplayUnit={length:0,width:0,height:0},this.__currentDimensionsState={length:{begin:{worldPos:new Q,screenPos:new Ie},end:{worldPos:new Q,screenPos:new Ie},midPoint:{worldPos:new Q,screenPos:new Ie},distance:0},width:{begin:{worldPos:new Q,screenPos:new Ie},end:{worldPos:new Q,screenPos:new Ie},midPoint:{worldPos:new Q,screenPos:new Ie},distance:0},height:{begin:{worldPos:new Q,screenPos:new Ie},end:{worldPos:new Q,screenPos:new Ie},midPoint:{worldPos:new Q,screenPos:new Ie},distance:0}},this.__currentDimensionsIndicatorState={length:{begin:{worldPos:new Q,screenPos:new Ie},end:{worldPos:new Q,screenPos:new Ie},midPoint:{worldPos:new Q,screenPos:new Ie},distance:0},width:{begin:{worldPos:new Q,screenPos:new Ie},end:{worldPos:new Q,screenPos:new Ie},midPoint:{worldPos:new Q,screenPos:new Ie},distance:0},height:{begin:{worldPos:new Q,screenPos:new Ie},end:{worldPos:new Q,screenPos:new Ie},midPoint:{worldPos:new Q,screenPos:new Ie},distance:0}},this.__dimensionIndicatorDirection={length:new Q,width:new Q,height:new Q}}static{this.webComponentName="dimensions-manager"}static setupWebComponent(){window.customElements.get(Xp.webComponentName)||window.customElements.define(Xp.webComponentName,Xp)}static{this.styles=st`
|
|
13190
13190
|
:host {
|
|
13191
13191
|
position: absolute;
|
|
13192
13192
|
top: 0;
|
|
@@ -13242,7 +13242,7 @@ ${r.join(`
|
|
|
13242
13242
|
style="left: ${this.__currentDimensionsIndicatorState.height.midPoint.screenPos.x}px; top: ${this.__currentDimensionsIndicatorState.height.midPoint.screenPos.y}px;"
|
|
13243
13243
|
></epg-dimension-label>
|
|
13244
13244
|
</div>
|
|
13245
|
-
`:me}};Fh([q({type:Boolean,attribute:"enabled"})],Rl.prototype,"enabled");Fh([q({type:String,attribute:"dimensions-unit"})],Rl.prototype,"dimensionsUnit");Fh([q({type:String,attribute:"dimensions-unit-symbol"})],Rl.prototype,"dimensionsUnitSymbol");Fh([Mn()],Rl.prototype,"__dimensionsInDisplayUnit");Fh([Mn()],Rl.prototype,"__currentDimensionsState");Fh([Mn()],Rl.prototype,"__currentDimensionsIndicatorState");let
|
|
13245
|
+
`:me}};Fh([q({type:Boolean,attribute:"enabled"})],Rl.prototype,"enabled");Fh([q({type:String,attribute:"dimensions-unit"})],Rl.prototype,"dimensionsUnit");Fh([q({type:String,attribute:"dimensions-unit-symbol"})],Rl.prototype,"dimensionsUnitSymbol");Fh([Mn()],Rl.prototype,"__dimensionsInDisplayUnit");Fh([Mn()],Rl.prototype,"__currentDimensionsState");Fh([Mn()],Rl.prototype,"__currentDimensionsIndicatorState");let C5=Rl;var $n=(s=>(s.expanded="expanded",s.collapsed="collapsed",s))($n||{});class px{constructor({config:e,appWcRef:t,hotspotManagerRef:n}){this.__cameraDirection=new Q,this.__localPosition=new Q,this.__worldPosition=new Q,this.__normals=new Q,this.__screenPosition=new Ie,this.__camera={position:new Q,target:new Q,focalLength:35},this.entity=new St,this.visited=!1,this.__config=e,this.__appWcRef=t,this.__hotspotsManager=n,this.updateConfig(e)}static{this.styles=st`
|
|
13246
13246
|
.hotspot-indicator {
|
|
13247
13247
|
position: absolute;
|
|
13248
13248
|
transform: translate(-50%, -50%);
|
|
@@ -13286,7 +13286,7 @@ ${r.join(`
|
|
|
13286
13286
|
?is-first-hotspot=${e}
|
|
13287
13287
|
?is-last-hotspot=${t}
|
|
13288
13288
|
></epg-card>
|
|
13289
|
-
`}}const fx="epg-button",Yn={..._h,ariaLabel:{name:"aria-label",defaultValue:"Button",argType:{control:"text"}},label:{name:"label",defaultValue:"Button",argType:{control:"text"}},isLoading:{name:"is-loading",defaultValue:!1,argType:{control:"boolean"}},loadingLabel:{name:"loading-label",defaultValue:"Loading...",argType:{control:"string"}},leftIcon:{name:"left-icon",defaultValue:"3d-select-solid",argType:{control:"text"}},rightIcon:{name:"right-icon",defaultValue:"3d-select-solid",argType:{control:"text"}},fullWidth:{name:"full-width",defaultValue:!1,argType:{control:"boolean"}},tooltipPlacement:{name:"tooltip-placement",defaultValue:"none",argType:{control:"select",options:["none","left","right","bottom-left","bottom-center","bottom-right","top-left","top-center","top-right"]}},tooltipLabel:{name:"tooltip-label",defaultValue:"",argType:{control:"text"}}},gx="epg-tool-hotspot",bh={label:{name:"label",defaultValue:"Tool Control"},active:{name:"active"},visited:{name:"visited"},togglable:{name:"togglable"},tooltipLabel:{defaultValue:"HOTSPOT LABEL"}},mx="epg-tooltip",n0={placement:{name:"placement",defaultValue:"none"},theme:{defaultValue:"dark"}},Ex="epg-icon",fR={iconName:{name:"icon-name",defaultValue:"trash"}};var
|
|
13289
|
+
`}}const fx="epg-button",Yn={..._h,ariaLabel:{name:"aria-label",defaultValue:"Button",argType:{control:"text"}},label:{name:"label",defaultValue:"Button",argType:{control:"text"}},isLoading:{name:"is-loading",defaultValue:!1,argType:{control:"boolean"}},loadingLabel:{name:"loading-label",defaultValue:"Loading...",argType:{control:"string"}},leftIcon:{name:"left-icon",defaultValue:"3d-select-solid",argType:{control:"text"}},rightIcon:{name:"right-icon",defaultValue:"3d-select-solid",argType:{control:"text"}},fullWidth:{name:"full-width",defaultValue:!1,argType:{control:"boolean"}},tooltipPlacement:{name:"tooltip-placement",defaultValue:"none",argType:{control:"select",options:["none","left","right","bottom-left","bottom-center","bottom-right","top-left","top-center","top-right"]}},tooltipLabel:{name:"tooltip-label",defaultValue:"",argType:{control:"text"}}},gx="epg-tool-hotspot",bh={label:{name:"label",defaultValue:"Tool Control"},active:{name:"active"},visited:{name:"visited"},togglable:{name:"togglable"},tooltipLabel:{defaultValue:"HOTSPOT LABEL"}},mx="epg-tooltip",n0={placement:{name:"placement",defaultValue:"none"},theme:{defaultValue:"dark"}},Ex="epg-icon",fR={iconName:{name:"icon-name",defaultValue:"trash"}};var x5=Object.defineProperty,gR=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&x5(e,t,i),i};class Db extends ri{constructor(){super(...arguments),this.iconName=fR.iconName.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
13290
13290
|
:host {
|
|
13291
13291
|
display: inline-block;
|
|
13292
13292
|
vertical-align: middle;
|
|
@@ -13312,7 +13312,7 @@ ${r.join(`
|
|
|
13312
13312
|
aria-hidden="${this.iconName?"false":"true"}"
|
|
13313
13313
|
aria-label="${this.iconName||""}"
|
|
13314
13314
|
></div>
|
|
13315
|
-
`}}gR([q({type:String,attribute:fR.iconName.name})],Db.prototype,"iconName");gR([Pt("#iconContainer")],Db.prototype,"__iconContainerRef");window.customElements.get(Ex)||window.customElements.define(Ex,Db);var
|
|
13315
|
+
`}}gR([q({type:String,attribute:fR.iconName.name})],Db.prototype,"iconName");gR([Pt("#iconContainer")],Db.prototype,"__iconContainerRef");window.customElements.get(Ex)||window.customElements.define(Ex,Db);var w5=Object.defineProperty,S5=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&w5(e,t,i),i};class mR extends ri{constructor(){super(...arguments),this.placement=n0.placement.defaultValue.toString(),this.theme=n0.theme.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
13316
13316
|
:host {
|
|
13317
13317
|
--pointer-side-margin: 15px;
|
|
13318
13318
|
display: flex;
|
|
@@ -13460,7 +13460,7 @@ ${r.join(`
|
|
|
13460
13460
|
<div class="contents-container">
|
|
13461
13461
|
<slot name="replace-all"></slot>
|
|
13462
13462
|
</div>
|
|
13463
|
-
`}}
|
|
13463
|
+
`}}S5([q({attribute:n0.placement.name})],mR.prototype,"placement");window.customElements.get(mx)||window.customElements.define(mx,mR);const yx="epg-loader-circle";class B5 extends ri{static{this.styles=[super.styles,st`
|
|
13464
13464
|
:host {
|
|
13465
13465
|
display: flex;
|
|
13466
13466
|
width: 100px;
|
|
@@ -13526,7 +13526,7 @@ ${r.join(`
|
|
|
13526
13526
|
/>
|
|
13527
13527
|
</svg>
|
|
13528
13528
|
</div>
|
|
13529
|
-
`}}window.customElements.get(yx)||window.customElements.define(yx,
|
|
13529
|
+
`}}window.customElements.get(yx)||window.customElements.define(yx,B5);var T5=Object.defineProperty,Ir=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&T5(e,t,i),i};const M5=Mi(`${re(he.Space.Padding.Small.$value)} ${re(he.Space.Padding.Medium.$value)}`);class wn extends ri{constructor(){super(),this.size=Yn.size.defaultValue.toString(),this.ariaLabel=Yn.ariaLabel.defaultValue.toString(),this.label=Yn.label.defaultValue.toString(),this.isLoading=!1,this.loadingLabel=Yn.loadingLabel.defaultValue.toString(),this.leftIcon=Yn.leftIcon.defaultValue.toString(),this.rightIcon=Yn.rightIcon.defaultValue.toString(),this.fullWidth=!1,this.tooltipPlacement=Yn.tooltipPlacement.defaultValue.toString(),this.tooltipLabel=Yn.tooltipLabel.defaultValue.toString(),this.__isKeyDown=!1,this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("keyup",this.handleKeyUp)}static{this.styles=[super.styles,st`
|
|
13530
13530
|
:host {
|
|
13531
13531
|
display: flex;
|
|
13532
13532
|
position: relative;
|
|
@@ -13542,7 +13542,7 @@ ${r.join(`
|
|
|
13542
13542
|
user-select: none;
|
|
13543
13543
|
gap: ${re(he.Space.Gap.Small.$value)};
|
|
13544
13544
|
color: ${re(he.Color.Text.Invert.$value)};
|
|
13545
|
-
padding: ${
|
|
13545
|
+
padding: ${M5};
|
|
13546
13546
|
box-sizing: border-box;
|
|
13547
13547
|
background-color: ${re(he.Color.Fill.Accent.$value)};
|
|
13548
13548
|
border-radius: ${re(he.Size.Radius.Medium.$value)};
|
|
@@ -13692,7 +13692,7 @@ ${r.join(`
|
|
|
13692
13692
|
${this._defaultContents()}
|
|
13693
13693
|
</slot>
|
|
13694
13694
|
${this._renderTooltip()}
|
|
13695
|
-
`}}Ir([q({attribute:Yn.ariaLabel.name})],wn.prototype,"ariaLabel");Ir([q({attribute:Yn.label.name})],wn.prototype,"label");Ir([q({type:Boolean,attribute:Yn.isLoading.name})],wn.prototype,"isLoading");Ir([q({attribute:Yn.loadingLabel.name})],wn.prototype,"loadingLabel");Ir([q({attribute:Yn.leftIcon.name})],wn.prototype,"leftIcon");Ir([q({attribute:Yn.rightIcon.name})],wn.prototype,"rightIcon");Ir([q({type:Boolean,attribute:Yn.fullWidth.name})],wn.prototype,"fullWidth");Ir([q({attribute:Yn.tooltipPlacement.name})],wn.prototype,"tooltipPlacement");Ir([q({attribute:Yn.tooltipLabel.name})],wn.prototype,"tooltipLabel");Ir([Mn()],wn.prototype,"__isKeyDown");window.customElements.get(fx)||window.customElements.define(fx,wn);var
|
|
13695
|
+
`}}Ir([q({attribute:Yn.ariaLabel.name})],wn.prototype,"ariaLabel");Ir([q({attribute:Yn.label.name})],wn.prototype,"label");Ir([q({type:Boolean,attribute:Yn.isLoading.name})],wn.prototype,"isLoading");Ir([q({attribute:Yn.loadingLabel.name})],wn.prototype,"loadingLabel");Ir([q({attribute:Yn.leftIcon.name})],wn.prototype,"leftIcon");Ir([q({attribute:Yn.rightIcon.name})],wn.prototype,"rightIcon");Ir([q({type:Boolean,attribute:Yn.fullWidth.name})],wn.prototype,"fullWidth");Ir([q({attribute:Yn.tooltipPlacement.name})],wn.prototype,"tooltipPlacement");Ir([q({attribute:Yn.tooltipLabel.name})],wn.prototype,"tooltipLabel");Ir([Mn()],wn.prototype,"__isKeyDown");window.customElements.get(fx)||window.customElements.define(fx,wn);var R5=Object.defineProperty,Dl=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&R5(e,t,i),i};class fo extends wn{constructor(){super(...arguments),this.label=bh.label.defaultValue.toString(),this.leftIcon="",this.rightIcon="",this.togglable=!1,this.visited=!1,this.active=!1,this.showLabel=!1,this.tooltipPlacement="top-left",this.tooltipLabel=bh.tooltipLabel.defaultValue.toString(),this.tooltipLeftIcon="",this.tooltipRightIcon=""}static{this.styles=[super.styles,st`
|
|
13696
13696
|
:host {
|
|
13697
13697
|
all: unset;
|
|
13698
13698
|
color: #333;
|
|
@@ -13811,7 +13811,7 @@ ${r.join(`
|
|
|
13811
13811
|
<span class="hotspot-center-circle"></span>
|
|
13812
13812
|
<span class="hotspot-ripple-circle" id="rippleElement"></span>
|
|
13813
13813
|
</div>
|
|
13814
|
-
`}}Dl([q({attribute:bh.label.name})],fo.prototype,"label");Dl([q({attribute:!1})],fo.prototype,"leftIcon");Dl([q({attribute:!1})],fo.prototype,"rightIcon");Dl([q({type:Boolean,attribute:bh.togglable.name})],fo.prototype,"togglable");Dl([q({type:Boolean,attribute:bh.visited.name})],fo.prototype,"visited");Dl([q({type:Boolean,attribute:bh.active.name})],fo.prototype,"active");Dl([Pt("#rippleElement")],fo.prototype,"__rippleElement");window.customElements.get(gx)||window.customElements.define(gx,fo);var
|
|
13814
|
+
`}}Dl([q({attribute:bh.label.name})],fo.prototype,"label");Dl([q({attribute:!1})],fo.prototype,"leftIcon");Dl([q({attribute:!1})],fo.prototype,"rightIcon");Dl([q({type:Boolean,attribute:bh.togglable.name})],fo.prototype,"togglable");Dl([q({type:Boolean,attribute:bh.visited.name})],fo.prototype,"visited");Dl([q({type:Boolean,attribute:bh.active.name})],fo.prototype,"active");Dl([Pt("#rippleElement")],fo.prototype,"__rippleElement");window.customElements.get(gx)||window.customElements.define(gx,fo);var D5=Object.defineProperty,nA=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&D5(e,t,i),i};const kh=class Jp extends Tl{constructor(){super(),this._loggerContext="MOBILE HOTSPOT CARDS MANAGER",this.cardsState=$n.collapsed,this.allCards=[],this.activeHotspotIndex=-1,this.__currentCardsPerView=1}static{this.webComponentName="mobile-hotspot-cards-manager"}static setupWebComponent(){window.customElements.get(Jp.webComponentName)||window.customElements.define(Jp.webComponentName,Jp)}static{this.styles=st`
|
|
13815
13815
|
.swiper-container {
|
|
13816
13816
|
width: 100%;
|
|
13817
13817
|
height: 100%;
|
|
@@ -14022,7 +14022,7 @@ ${r.join(`
|
|
|
14022
14022
|
part="collapse-card-button"
|
|
14023
14023
|
></epg-button-icon>
|
|
14024
14024
|
</div>
|
|
14025
|
-
`}};nA([q({attribute:"cards-state"})],kh.prototype,"cardsState");nA([q({attribute:!1})],kh.prototype,"allCards");nA([q({attribute:!1})],kh.prototype,"activeHotspotIndex");nA([Pt("#cardsCarouselSwiperContainer")],kh.prototype,"cardsCarouselSwiperContainer");nA([Mn()],kh.prototype,"__currentCardsPerView");let
|
|
14025
|
+
`}};nA([q({attribute:"cards-state"})],kh.prototype,"cardsState");nA([q({attribute:!1})],kh.prototype,"allCards");nA([q({attribute:!1})],kh.prototype,"activeHotspotIndex");nA([Pt("#cardsCarouselSwiperContainer")],kh.prototype,"cardsCarouselSwiperContainer");nA([Mn()],kh.prototype,"__currentCardsPerView");let Q5=kh;const _x="epg-button-danger";class L5 extends wn{static{this.styles=[super.styles,st`
|
|
14026
14026
|
:host {
|
|
14027
14027
|
color: ${re(he.Color.Text.Invert.$value)};
|
|
14028
14028
|
background-color: ${re(he.Color.Fill.DangerPrimary.$value)};
|
|
@@ -14035,7 +14035,7 @@ ${r.join(`
|
|
|
14035
14035
|
:host(:active) {
|
|
14036
14036
|
background-color: #660e0c;
|
|
14037
14037
|
}
|
|
14038
|
-
`]}}window.customElements.get(_x)||window.customElements.define(_x,
|
|
14038
|
+
`]}}window.customElements.get(_x)||window.customElements.define(_x,L5);const bx="epg-button-dialog";class N5 extends wn{static{this.styles=wn.styles}}window.customElements.get(bx)||window.customElements.define(bx,N5);const vx="epg-button-icon",ha={...Yn,label:{name:"label",defaultValue:""},loadingLabel:{name:"loading-label",defaultValue:""},leftIcon:{name:"left-icon",defaultValue:"share-ios"},rightIcon:{name:"right-icon",defaultValue:""}};var P5=Object.defineProperty,iA=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&P5(e,t,i),i};class Uh extends wn{constructor(){super(...arguments),this.label=ha.label.defaultValue.toString(),this.isLoading=!1,this.loadingLabel=ha.loadingLabel.defaultValue.toString(),this.leftIcon=ha.leftIcon.defaultValue.toString(),this.rightIcon=ha.rightIcon.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
14039
14039
|
:host {
|
|
14040
14040
|
color: ${re(he.Color.Icon.NeutralPrimary.$value)};
|
|
14041
14041
|
background-color: ${re(he.Color.Fill.SubtleSecondary.$value)};
|
|
@@ -14050,7 +14050,7 @@ ${r.join(`
|
|
|
14050
14050
|
:host(:active) {
|
|
14051
14051
|
background-color: ${re(he.Color.Fill.NeutralTertiary.$value)};
|
|
14052
14052
|
}
|
|
14053
|
-
`]}}iA([q({attribute:ha.label.name})],Uh.prototype,"label");iA([q({attribute:ha.isLoading.name})],Uh.prototype,"isLoading");iA([q({attribute:ha.loadingLabel.name})],Uh.prototype,"loadingLabel");iA([q({attribute:ha.leftIcon.name})],Uh.prototype,"leftIcon");iA([q({attribute:ha.rightIcon.name})],Uh.prototype,"rightIcon");window.customElements.get(vx)||window.customElements.define(vx,Uh);const Ix="epg-button-primary";class
|
|
14053
|
+
`]}}iA([q({attribute:ha.label.name})],Uh.prototype,"label");iA([q({attribute:ha.isLoading.name})],Uh.prototype,"isLoading");iA([q({attribute:ha.loadingLabel.name})],Uh.prototype,"loadingLabel");iA([q({attribute:ha.leftIcon.name})],Uh.prototype,"leftIcon");iA([q({attribute:ha.rightIcon.name})],Uh.prototype,"rightIcon");window.customElements.get(vx)||window.customElements.define(vx,Uh);const Ix="epg-button-primary";class F5 extends wn{static{this.styles=[super.styles,st`
|
|
14054
14054
|
:host {
|
|
14055
14055
|
background-color: ${re(he.Color.Fill.Base.$value)};
|
|
14056
14056
|
}
|
|
@@ -14062,7 +14062,7 @@ ${r.join(`
|
|
|
14062
14062
|
:host(:active) {
|
|
14063
14063
|
background-color: ${re(he.Color.Fill.BasePress.$value)};
|
|
14064
14064
|
}
|
|
14065
|
-
`]}}window.customElements.get(Ix)||window.customElements.define(Ix,
|
|
14065
|
+
`]}}window.customElements.get(Ix)||window.customElements.define(Ix,F5);const Cx="epg-button-secondary";class k5 extends wn{static{this.styles=[super.styles,st`
|
|
14066
14066
|
:host {
|
|
14067
14067
|
background-color: ${re(he.Color.Surface.NeutralTertiary.$value)};
|
|
14068
14068
|
color: ${re(he.Color.Text.NeutralPrimary.$value)};
|
|
@@ -14078,7 +14078,7 @@ ${r.join(`
|
|
|
14078
14078
|
background-color: ${re(he.Color.Surface.NeutralPrimary.$value)};
|
|
14079
14079
|
outline: unset;
|
|
14080
14080
|
}
|
|
14081
|
-
`]}}window.customElements.get(Cx)||window.customElements.define(Cx,
|
|
14081
|
+
`]}}window.customElements.get(Cx)||window.customElements.define(Cx,k5);const xx="epg-button-tertiary";class U5 extends wn{static{this.styles=[super.styles,st`
|
|
14082
14082
|
:host {
|
|
14083
14083
|
background-color: transparent;
|
|
14084
14084
|
color: ${re(he.Color.Text.NeutralPrimary.$value)};
|
|
@@ -14091,14 +14091,14 @@ ${r.join(`
|
|
|
14091
14091
|
:host(:active) {
|
|
14092
14092
|
background-color: ${re(he.Color.Surface.NeutralPrimary.$value)};
|
|
14093
14093
|
}
|
|
14094
|
-
`]}}window.customElements.get(xx)||window.customElements.define(xx,
|
|
14094
|
+
`]}}window.customElements.get(xx)||window.customElements.define(xx,U5);const wx="epg-button-view-in-your-space",$f={label:{name:"label",defaultValue:"View In Your Space"},rightIcon:{name:"right-icon",defaultValue:""}};var O5=Object.defineProperty,ER=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&O5(e,t,i),i};const G5=Mi(`${re(he.Space.Padding.Medium.$value)} ${re(he.Space.Padding.Regular.$value)}`);class Qb extends wn{constructor(){super(...arguments),this.label=$f.label.defaultValue.toString(),this.rightIcon=$f.rightIcon.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
14095
14095
|
:host {
|
|
14096
14096
|
border: ${re(he.Size.Stroke.Regular.$value)} solid;
|
|
14097
14097
|
border-radius: ${re(he.Size.Radius.Full.$value)};
|
|
14098
14098
|
border-color: ${re(he.Color.Border.SubtlePrimary.$value)};
|
|
14099
14099
|
background-color: ${re(he.Color.Fill.SubtleSecondary.$value)};
|
|
14100
14100
|
color: ${re(he.Color.Text.NeutralPrimary.$value)};
|
|
14101
|
-
padding: ${
|
|
14101
|
+
padding: ${G5};
|
|
14102
14102
|
backdrop-filter: blur(2px);
|
|
14103
14103
|
}
|
|
14104
14104
|
|
|
@@ -14117,7 +14117,7 @@ ${r.join(`
|
|
|
14117
14117
|
* @license
|
|
14118
14118
|
* Copyright 2020 Google LLC
|
|
14119
14119
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14120
|
-
*/const
|
|
14120
|
+
*/const z5=s=>s.strings===void 0;/**
|
|
14121
14121
|
* @license
|
|
14122
14122
|
* Copyright 2017 Google LLC
|
|
14123
14123
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -14125,11 +14125,11 @@ ${r.join(`
|
|
|
14125
14125
|
* @license
|
|
14126
14126
|
* Copyright 2017 Google LLC
|
|
14127
14127
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14128
|
-
*/const yd=(s,e)=>{const t=s._$AN;if(t===void 0)return!1;for(const n of t)n._$AO?.(e,!1),yd(n,e);return!0},Vf=s=>{let e,t;do{if((e=s._$AM)===void 0)break;t=e._$AN,t.delete(s),s=e}while(t?.size===0)},yR=s=>{for(let e;e=s._$AM;s=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(s))break;t.add(s)
|
|
14128
|
+
*/const yd=(s,e)=>{const t=s._$AN;if(t===void 0)return!1;for(const n of t)n._$AO?.(e,!1),yd(n,e);return!0},Vf=s=>{let e,t;do{if((e=s._$AM)===void 0)break;t=e._$AN,t.delete(s),s=e}while(t?.size===0)},yR=s=>{for(let e;e=s._$AM;s=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(s))break;t.add(s),V5(e)}};function H5(s){this._$AN!==void 0?(Vf(this),this._$AM=s,yR(this)):this._$AM=s}function $5(s,e=!1,t=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let r=t;r<n.length;r++)yd(n[r],!1),Vf(n[r]);else n!=null&&(yd(n,!1),Vf(n));else yd(this,s)}const V5=s=>{s.type==Lb.CHILD&&(s._$AP??=$5,s._$AQ??=H5)};class Y5 extends Pb{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),yR(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(yd(this,e),Vf(this))}setValue(e){if(z5(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}/**
|
|
14129
14129
|
* @license
|
|
14130
14130
|
* Copyright 2020 Google LLC
|
|
14131
14131
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14132
|
-
*/const Tx=()=>new
|
|
14132
|
+
*/const Tx=()=>new q5;let q5=class{};const EE=new WeakMap,Mx=Nb(class extends Y5{render(s){return me}update(s,[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=s.options?.host,this.rt(this.ct=s.element)),me}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let t=EE.get(e);t===void 0&&(t=new WeakMap,EE.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?EE.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 W5=Object.defineProperty,Ql=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&W5(e,t,i),i},Hd=(s=>(s.IMAGE="image",s.VIDEO="video",s))(Hd||{});class go extends ri{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=Tx(),this.__videoControlsContainerRef=Tx(),this.__isPlaying=!1,this.__isLoading=!1}static{this.styles=[super.styles,st`
|
|
14133
14133
|
:host {
|
|
14134
14134
|
display: flex;
|
|
14135
14135
|
font-size: 20px;
|
|
@@ -14234,12 +14234,12 @@ ${r.join(`
|
|
|
14234
14234
|
${this.__generateMediaHtmlElemType()}
|
|
14235
14235
|
</div>
|
|
14236
14236
|
</slot>
|
|
14237
|
-
`:me}}Ql([q({attribute:pl.mediaAlt.name})],go.prototype,"mediaAlt");Ql([q({attribute:pl.mediaSrc.name})],go.prototype,"mediaSrc");Ql([q({attribute:pl.mediaType.name})],go.prototype,"mediaType");Ql([q({type:Boolean,attribute:pl.mediaAutoplay.name})],go.prototype,"mediaAutoplay");Ql([q({attribute:!1})],go.prototype,"onClick");Ql([Mn()],go.prototype,"__isPlaying");Ql([Mn()],go.prototype,"__isLoading");window.customElements.get(Bx)||window.customElements.define(Bx,go);function Rx(s){return s!==null&&typeof s=="object"&&"constructor"in s&&s.constructor===Object}function Fb(s,e){s===void 0&&(s={}),e===void 0&&(e={});const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof s[n]>"u"?s[n]=e[n]:Rx(e[n])&&Rx(s[n])&&Object.keys(e[n]).length>0&&Fb(s[n],e[n])})}const _R={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 Jn(){const s=typeof document<"u"?document:{};return Fb(s,_R),s}const W5={document:_R,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(s){return typeof setTimeout>"u"?(s(),null):setTimeout(s,0)},cancelAnimationFrame(s){typeof setTimeout>"u"||clearTimeout(s)}};function un(){const s=typeof window<"u"?window:{};return Fb(s,W5),s}function Ua(s){return s===void 0&&(s=""),s.trim().split(" ").filter(e=>!!e.trim())}function j5(s){const e=s;Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function Ih(s,e){return e===void 0&&(e=0),setTimeout(s,e)}function _s(){return Date.now()}function X5(s){const e=un();let t;return e.getComputedStyle&&(t=e.getComputedStyle(s,null)),!t&&s.currentStyle&&(t=s.currentStyle),t||(t=s.style),t}function i0(s,e){e===void 0&&(e="x");const t=un();let n,i,r;const a=X5(s);return t.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(o=>o.replace(",",".")).join(", ")),r=new t.WebKitCSSMatrix(i==="none"?"":i)):(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?i=r.m41:n.length===16?i=parseFloat(n[12]):i=parseFloat(n[4])),e==="y"&&(t.WebKitCSSMatrix?i=r.m42:n.length===16?i=parseFloat(n[13]):i=parseFloat(n[5])),i||0}function Yu(s){return typeof s=="object"&&s!==null&&s.constructor&&Object.prototype.toString.call(s).slice(8,-1)==="Object"}function J5(s){return typeof window<"u"&&typeof window.HTMLElement<"u"?s instanceof HTMLElement:s&&(s.nodeType===1||s.nodeType===11)}function Ki(){const s=Object(arguments.length<=0?void 0:arguments[0]),e=["__proto__","constructor","prototype"];for(let t=1;t<arguments.length;t+=1){const n=t<0||arguments.length<=t?void 0:arguments[t];if(n!=null&&!J5(n)){const i=Object.keys(Object(n)).filter(r=>e.indexOf(r)<0);for(let r=0,a=i.length;r<a;r+=1){const o=i[r],l=Object.getOwnPropertyDescriptor(n,o);l!==void 0&&l.enumerable&&(Yu(s[o])&&Yu(n[o])?n[o].__swiper__?s[o]=n[o]:Ki(s[o],n[o]):!Yu(s[o])&&Yu(n[o])?(s[o]={},n[o].__swiper__?s[o]=n[o]:Ki(s[o],n[o])):s[o]=n[o])}}}return s}function qu(s,e,t){s.style.setProperty(e,t)}function bR(s){let{swiper:e,targetPosition:t,side:n}=s;const i=un(),r=-e.translate;let a=null,o;const l=e.params.speed;e.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(e.cssModeFrameID);const c=t>r?"next":"prev",h=(d,A)=>c==="next"&&d>=A||c==="prev"&&d<=A,u=()=>{o=new Date().getTime(),a===null&&(a=o);const d=Math.max(Math.min((o-a)/l,1),0),A=.5-Math.cos(d*Math.PI)/2;let p=r+A*(t-r);if(h(p,t)&&(p=t),e.wrapperEl.scrollTo({[n]:p}),h(p,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:p})}),i.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=i.requestAnimationFrame(u)};u()}function Ll(s){return s.querySelector(".swiper-slide-transform")||s.shadowRoot&&s.shadowRoot.querySelector(".swiper-slide-transform")||s}function ii(s,e){e===void 0&&(e="");const t=un(),n=[...s.children];return t.HTMLSlotElement&&s instanceof HTMLSlotElement&&n.push(...s.assignedElements()),e?n.filter(i=>i.matches(e)):n}function K5(s,e){const t=[e];for(;t.length>0;){const n=t.shift();if(s===n)return!0;t.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}function Z5(s,e){const t=un();let n=e.contains(s);return!n&&t.HTMLSlotElement&&e instanceof HTMLSlotElement&&(n=[...e.assignedElements()].includes(s),n||(n=K5(s,e))),n}function Yf(s){try{console.warn(s);return}catch{}}function is(s,e){e===void 0&&(e=[]);const t=document.createElement(s);return t.classList.add(...Array.isArray(e)?e:Ua(e)),t}function qf(s){const e=un(),t=Jn(),n=s.getBoundingClientRect(),i=t.body,r=s.clientTop||i.clientTop||0,a=s.clientLeft||i.clientLeft||0,o=s===e?e.scrollY:s.scrollTop,l=s===e?e.scrollX:s.scrollLeft;return{top:n.top+o-r,left:n.left+l-a}}function e8(s,e){const t=[];for(;s.previousElementSibling;){const n=s.previousElementSibling;e?n.matches(e)&&t.push(n):t.push(n),s=n}return t}function t8(s,e){const t=[];for(;s.nextElementSibling;){const n=s.nextElementSibling;e?n.matches(e)&&t.push(n):t.push(n),s=n}return t}function to(s,e){return un().getComputedStyle(s,null).getPropertyValue(e)}function $d(s){let e=s,t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function fl(s,e){const t=[];let n=s.parentElement;for(;n;)e?n.matches(e)&&t.push(n):t.push(n),n=n.parentElement;return t}function _d(s,e){function t(n){n.target===s&&(e.call(s,n),s.removeEventListener("transitionend",t))}e&&s.addEventListener("transitionend",t)}function s0(s,e,t){const n=un();return s[e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(s,null).getPropertyValue(e==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(s,null).getPropertyValue(e==="width"?"margin-left":"margin-bottom"))}function bt(s){return(Array.isArray(s)?s:[s]).filter(e=>!!e)}function Sg(s){return e=>Math.abs(e)>0&&s.browser&&s.browser.need3dFix&&Math.abs(e)%90===0?e+.001:e}function Is(s,e){e===void 0&&(e=""),typeof trustedTypes<"u"?s.innerHTML=trustedTypes.createPolicy("html",{createHTML:t=>t}).createHTML(e):s.innerHTML=e}let yE;function n8(){const s=un(),e=Jn();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in s||s.DocumentTouch&&e instanceof s.DocumentTouch)}}function vR(){return yE||(yE=n8()),yE}let _E;function i8(s){let{userAgent:e}=s===void 0?{}:s;const t=vR(),n=un(),i=n.navigator.platform,r=e||n.navigator.userAgent,a={ios:!1,android:!1},o=n.screen.width,l=n.screen.height,c=r.match(/(Android);?[\s\/]+([\d.]+)?/);let h=r.match(/(iPad).*OS\s([\d_]+)/);const u=r.match(/(iPod)(.*OS\s([\d_]+))?/),d=!h&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),A=i==="Win32";let p=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!h&&p&&t.touch&&g.indexOf(`${o}x${l}`)>=0&&(h=r.match(/(Version)\/([\d.]+)/),h||(h=[0,1,"13_0_0"]),p=!1),c&&!A&&(a.os="android",a.android=!0),(h||d||u)&&(a.os="ios",a.ios=!0),a}function IR(s){return s===void 0&&(s={}),_E||(_E=i8(s)),_E}let bE;function s8(){const s=un(),e=IR();let t=!1;function n(){const o=s.navigator.userAgent.toLowerCase();return o.indexOf("safari")>=0&&o.indexOf("chrome")<0&&o.indexOf("android")<0}if(n()){const o=String(s.navigator.userAgent);if(o.includes("Version/")){const[l,c]=o.split("Version/")[1].split(" ")[0].split(".").map(h=>Number(h));t=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(s.navigator.userAgent),r=n(),a=r||i&&e.ios;return{isSafari:t||r,needPerspectiveFix:t,need3dFix:a,isWebView:i}}function CR(){return bE||(bE=s8()),bE}function r8(s){let{swiper:e,on:t,emit:n}=s;const i=un();let r=null,a=null;const o=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},l=()=>{!e||e.destroyed||!e.initialized||(r=new ResizeObserver(u=>{a=i.requestAnimationFrame(()=>{const{width:d,height:A}=e;let p=d,g=A;u.forEach(m=>{let{contentBoxSize:f,contentRect:_,target:E}=m;E&&E!==e.el||(p=_?_.width:(f[0]||f).inlineSize,g=_?_.height:(f[0]||f).blockSize)}),(p!==d||g!==A)&&o()})}),r.observe(e.el))},c=()=>{a&&i.cancelAnimationFrame(a),r&&r.unobserve&&e.el&&(r.unobserve(e.el),r=null)},h=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",o),i.addEventListener("orientationchange",h)}),t("destroy",()=>{c(),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",h)})}function a8(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=[],a=un(),o=function(h,u){u===void 0&&(u={});const d=a.MutationObserver||a.WebkitMutationObserver,A=new d(p=>{if(e.__preventObserver__)return;if(p.length===1){i("observerUpdate",p[0]);return}const g=function(){i("observerUpdate",p[0])};a.requestAnimationFrame?a.requestAnimationFrame(g):a.setTimeout(g,0)});A.observe(h,{attributes:typeof u.attributes>"u"?!0:u.attributes,childList:e.isElement||(typeof u.childList>"u"?!0:u).childList,characterData:typeof u.characterData>"u"?!0:u.characterData}),r.push(A)},l=()=>{if(e.params.observer){if(e.params.observeParents){const h=fl(e.hostEl);for(let u=0;u<h.length;u+=1)o(h[u])}o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}},c=()=>{r.forEach(h=>{h.disconnect()}),r.splice(0,r.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",l),n("destroy",c)}var o8={on(s,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const i=t?"unshift":"push";return s.split(" ").forEach(r=>{n.eventsListeners[r]||(n.eventsListeners[r]=[]),n.eventsListeners[r][i](e)}),n},once(s,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;function i(){n.off(s,i),i.__emitterProxy&&delete i.__emitterProxy;for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];e.apply(n,a)}return i.__emitterProxy=e,n.on(s,i,t)},onAny(s,e){const t=this;if(!t.eventsListeners||t.destroyed||typeof s!="function")return t;const n=e?"unshift":"push";return t.eventsAnyListeners.indexOf(s)<0&&t.eventsAnyListeners[n](s),t},offAny(s){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const t=e.eventsAnyListeners.indexOf(s);return t>=0&&e.eventsAnyListeners.splice(t,1),e},off(s,e){const t=this;return!t.eventsListeners||t.destroyed||!t.eventsListeners||s.split(" ").forEach(n=>{typeof e>"u"?t.eventsListeners[n]=[]:t.eventsListeners[n]&&t.eventsListeners[n].forEach((i,r)=>{(i===e||i.__emitterProxy&&i.__emitterProxy===e)&&t.eventsListeners[n].splice(r,1)})}),t},emit(){const s=this;if(!s.eventsListeners||s.destroyed||!s.eventsListeners)return s;let e,t,n;for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return typeof r[0]=="string"||Array.isArray(r[0])?(e=r[0],t=r.slice(1,r.length),n=s):(e=r[0].events,t=r[0].data,n=r[0].context||s),t.unshift(n),(Array.isArray(e)?e:e.split(" ")).forEach(l=>{s.eventsAnyListeners&&s.eventsAnyListeners.length&&s.eventsAnyListeners.forEach(c=>{c.apply(n,[l,...t])}),s.eventsListeners&&s.eventsListeners[l]&&s.eventsListeners[l].forEach(c=>{c.apply(n,t)})}),s}};function l8(){const s=this;let e,t;const n=s.el;typeof s.params.width<"u"&&s.params.width!==null?e=s.params.width:e=n.clientWidth,typeof s.params.height<"u"&&s.params.height!==null?t=s.params.height:t=n.clientHeight,!(e===0&&s.isHorizontal()||t===0&&s.isVertical())&&(e=e-parseInt(to(n,"padding-left")||0,10)-parseInt(to(n,"padding-right")||0,10),t=t-parseInt(to(n,"padding-top")||0,10)-parseInt(to(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(s,{width:e,height:t,size:s.isHorizontal()?e:t}))}function c8(){const s=this;function e(C,S){return parseFloat(C.getPropertyValue(s.getDirectionLabel(S))||0)}const t=s.params,{wrapperEl:n,slidesEl:i,size:r,rtlTranslate:a,wrongRTL:o}=s,l=s.virtual&&t.virtual.enabled,c=l?s.virtual.slides.length:s.slides.length,h=ii(i,`.${s.params.slideClass}, swiper-slide`),u=l?s.virtual.slides.length:h.length;let d=[];const A=[],p=[];let g=t.slidesOffsetBefore;typeof g=="function"&&(g=t.slidesOffsetBefore.call(s));let m=t.slidesOffsetAfter;typeof m=="function"&&(m=t.slidesOffsetAfter.call(s));const f=s.snapGrid.length,_=s.slidesGrid.length;let E=t.spaceBetween,y=-g,b=0,x=0;if(typeof r>"u")return;typeof E=="string"&&E.indexOf("%")>=0?E=parseFloat(E.replace("%",""))/100*r:typeof E=="string"&&(E=parseFloat(E)),s.virtualSize=-E,h.forEach(C=>{a?C.style.marginLeft="":C.style.marginRight="",C.style.marginBottom="",C.style.marginTop=""}),t.centeredSlides&&t.cssMode&&(qu(n,"--swiper-centered-offset-before",""),qu(n,"--swiper-centered-offset-after",""));const I=t.grid&&t.grid.rows>1&&s.grid;I?s.grid.initSlides(h):s.grid&&s.grid.unsetSlides();let w;const v=t.slidesPerView==="auto"&&t.breakpoints&&Object.keys(t.breakpoints).filter(C=>typeof t.breakpoints[C].slidesPerView<"u").length>0;for(let C=0;C<u;C+=1){w=0;let S;if(h[C]&&(S=h[C]),I&&s.grid.updateSlide(C,S,h),!(h[C]&&to(S,"display")==="none")){if(t.slidesPerView==="auto"){v&&(h[C].style[s.getDirectionLabel("width")]="");const T=getComputedStyle(S),M=S.style.transform,R=S.style.webkitTransform;if(M&&(S.style.transform="none"),R&&(S.style.webkitTransform="none"),t.roundLengths)w=s.isHorizontal()?s0(S,"width"):s0(S,"height");else{const F=e(T,"width"),N=e(T,"padding-left"),L=e(T,"padding-right"),P=e(T,"margin-left"),z=e(T,"margin-right"),te=T.getPropertyValue("box-sizing");if(te&&te==="border-box")w=F+P+z;else{const{clientWidth:ne,offsetWidth:ue}=S;w=F+N+L+P+z+(ue-ne)}}M&&(S.style.transform=M),R&&(S.style.webkitTransform=R),t.roundLengths&&(w=Math.floor(w))}else w=(r-(t.slidesPerView-1)*E)/t.slidesPerView,t.roundLengths&&(w=Math.floor(w)),h[C]&&(h[C].style[s.getDirectionLabel("width")]=`${w}px`);h[C]&&(h[C].swiperSlideSize=w),p.push(w),t.centeredSlides?(y=y+w/2+b/2+E,b===0&&C!==0&&(y=y-r/2-E),C===0&&(y=y-r/2-E),Math.abs(y)<1/1e3&&(y=0),t.roundLengths&&(y=Math.floor(y)),x%t.slidesPerGroup===0&&d.push(y),A.push(y)):(t.roundLengths&&(y=Math.floor(y)),(x-Math.min(s.params.slidesPerGroupSkip,x))%s.params.slidesPerGroup===0&&d.push(y),A.push(y),y=y+w+E),s.virtualSize+=w+E,b=w,x+=1}}if(s.virtualSize=Math.max(s.virtualSize,r)+m,a&&o&&(t.effect==="slide"||t.effect==="coverflow")&&(n.style.width=`${s.virtualSize+E}px`),t.setWrapperSize&&(n.style[s.getDirectionLabel("width")]=`${s.virtualSize+E}px`),I&&s.grid.updateWrapperSize(w,d),!t.centeredSlides){const C=[];for(let S=0;S<d.length;S+=1){let T=d[S];t.roundLengths&&(T=Math.floor(T)),d[S]<=s.virtualSize-r&&C.push(T)}d=C,Math.floor(s.virtualSize-r)-Math.floor(d[d.length-1])>1&&d.push(s.virtualSize-r)}if(l&&t.loop){const C=p[0]+E;if(t.slidesPerGroup>1){const S=Math.ceil((s.virtual.slidesBefore+s.virtual.slidesAfter)/t.slidesPerGroup),T=C*t.slidesPerGroup;for(let M=0;M<S;M+=1)d.push(d[d.length-1]+T)}for(let S=0;S<s.virtual.slidesBefore+s.virtual.slidesAfter;S+=1)t.slidesPerGroup===1&&d.push(d[d.length-1]+C),A.push(A[A.length-1]+C),s.virtualSize+=C}if(d.length===0&&(d=[0]),E!==0){const C=s.isHorizontal()&&a?"marginLeft":s.getDirectionLabel("marginRight");h.filter((S,T)=>!t.cssMode||t.loop?!0:T!==h.length-1).forEach(S=>{S.style[C]=`${E}px`})}if(t.centeredSlides&&t.centeredSlidesBounds){let C=0;p.forEach(T=>{C+=T+(E||0)}),C-=E;const S=C>r?C-r:0;d=d.map(T=>T<=0?-g:T>S?S+m:T)}if(t.centerInsufficientSlides){let C=0;p.forEach(T=>{C+=T+(E||0)}),C-=E;const S=(t.slidesOffsetBefore||0)+(t.slidesOffsetAfter||0);if(C+S<r){const T=(r-C-S)/2;d.forEach((M,R)=>{d[R]=M-T}),A.forEach((M,R)=>{A[R]=M+T})}}if(Object.assign(s,{slides:h,snapGrid:d,slidesGrid:A,slidesSizesGrid:p}),t.centeredSlides&&t.cssMode&&!t.centeredSlidesBounds){qu(n,"--swiper-centered-offset-before",`${-d[0]}px`),qu(n,"--swiper-centered-offset-after",`${s.size/2-p[p.length-1]/2}px`);const C=-s.snapGrid[0],S=-s.slidesGrid[0];s.snapGrid=s.snapGrid.map(T=>T+C),s.slidesGrid=s.slidesGrid.map(T=>T+S)}if(u!==c&&s.emit("slidesLengthChange"),d.length!==f&&(s.params.watchOverflow&&s.checkOverflow(),s.emit("snapGridLengthChange")),A.length!==_&&s.emit("slidesGridLengthChange"),t.watchSlidesProgress&&s.updateSlidesOffset(),s.emit("slidesUpdated"),!l&&!t.cssMode&&(t.effect==="slide"||t.effect==="fade")){const C=`${t.containerModifierClass}backface-hidden`,S=s.el.classList.contains(C);u<=t.maxBackfaceHiddenSlides?S||s.el.classList.add(C):S&&s.el.classList.remove(C)}}function h8(s){const e=this,t=[],n=e.virtual&&e.params.virtual.enabled;let i=0,r;typeof s=="number"?e.setTransition(s):s===!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;i=o>i?o:i}(i||i===0)&&(e.wrapperEl.style.height=`${i}px`)}function u8(){const s=this,e=s.slides,t=s.isElement?s.isHorizontal()?s.wrapperEl.offsetLeft:s.wrapperEl.offsetTop:0;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=(s.isHorizontal()?e[n].offsetLeft:e[n].offsetTop)-t-s.cssOverflowAdjustment()}const Dx=(s,e,t)=>{e&&!s.classList.contains(t)?s.classList.add(t):!e&&s.classList.contains(t)&&s.classList.remove(t)};function d8(s){s===void 0&&(s=this&&this.translate||0);const e=this,t=e.params,{slides:n,rtlTranslate:i,snapGrid:r}=e;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let a=-s;i&&(a=s),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 h=c.swiperSlideOffset;t.cssMode&&t.centeredSlides&&(h-=n[0].swiperSlideOffset);const u=(a+(t.centeredSlides?e.minTranslate():0)-h)/(c.swiperSlideSize+o),d=(a-r[0]+(t.centeredSlides?e.minTranslate():0)-h)/(c.swiperSlideSize+o),A=-(a-h),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)),Dx(c,m,t.slideVisibleClass),Dx(c,g,t.slideFullyVisibleClass),c.progress=i?-u:u,c.originalProgress=i?-d:d}}function A8(s){const e=this;if(typeof s>"u"){const h=e.rtlTranslate?-1:1;s=e&&e.translate&&e.translate*h||0}const t=e.params,n=e.maxTranslate()-e.minTranslate();let{progress:i,isBeginning:r,isEnd:a,progressLoop:o}=e;const l=r,c=a;if(n===0)i=0,r=!0,a=!0;else{i=(s-e.minTranslate())/n;const h=Math.abs(s-e.minTranslate())<1,u=Math.abs(s-e.maxTranslate())<1;r=h||i<=0,a=u||i>=1,h&&(i=0),u&&(i=1)}if(t.loop){const h=e.getSlideIndexByData(0),u=e.getSlideIndexByData(e.slides.length-1),d=e.slidesGrid[h],A=e.slidesGrid[u],p=e.slidesGrid[e.slidesGrid.length-1],g=Math.abs(s);g>=d?o=(g-d)/p:o=(g+p-A)/p,o>1&&(o-=1)}Object.assign(e,{progress:i,progressLoop:o,isBeginning:r,isEnd:a}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&e.updateSlidesProgress(s),r&&!l&&e.emit("reachBeginning toEdge"),a&&!c&&e.emit("reachEnd toEdge"),(l&&!r||c&&!a)&&e.emit("fromEdge"),e.emit("progress",i)}const vE=(s,e,t)=>{e&&!s.classList.contains(t)?s.classList.add(t):!e&&s.classList.contains(t)&&s.classList.remove(t)};function p8(){const s=this,{slides:e,params:t,slidesEl:n,activeIndex:i}=s,r=s.virtual&&t.virtual.enabled,a=s.grid&&t.grid&&t.grid.rows>1,o=u=>ii(n,`.${t.slideClass}${u}, swiper-slide${u}`)[0];let l,c,h;if(r)if(t.loop){let u=i-s.virtual.slidesBefore;u<0&&(u=s.virtual.slides.length+u),u>=s.virtual.slides.length&&(u-=s.virtual.slides.length),l=o(`[data-swiper-slide-index="${u}"]`)}else l=o(`[data-swiper-slide-index="${i}"]`);else a?(l=e.find(u=>u.column===i),h=e.find(u=>u.column===i+1),c=e.find(u=>u.column===i-1)):l=e[i];l&&(a||(h=t8(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!h&&(h=e[0]),c=e8(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!c===0&&(c=e[e.length-1]))),e.forEach(u=>{vE(u,u===l,t.slideActiveClass),vE(u,u===h,t.slideNextClass),vE(u,u===c,t.slidePrevClass)}),s.emitSlidesClasses()}const Kp=(s,e)=>{if(!s||s.destroyed||!s.params)return;const t=()=>s.isElement?"swiper-slide":`.${s.params.slideClass}`,n=e.closest(t());if(n){let i=n.querySelector(`.${s.params.lazyPreloaderClass}`);!i&&s.isElement&&(n.shadowRoot?i=n.shadowRoot.querySelector(`.${s.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(i=n.shadowRoot.querySelector(`.${s.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},IE=(s,e)=>{if(!s.slides[e])return;const t=s.slides[e].querySelector('[loading="lazy"]');t&&t.removeAttribute("loading")},r0=s=>{if(!s||s.destroyed||!s.params)return;let e=s.params.lazyPreloadPrevNext;const t=s.slides.length;if(!t||!e||e<0)return;e=Math.min(e,t);const n=s.params.slidesPerView==="auto"?s.slidesPerViewDynamic():Math.ceil(s.params.slidesPerView),i=s.activeIndex;if(s.params.grid&&s.params.grid.rows>1){const a=i,o=[a-e];o.push(...Array.from({length:e}).map((l,c)=>a+n+c)),s.slides.forEach((l,c)=>{o.includes(l.column)&&IE(s,c)});return}const r=i+n-1;if(s.params.rewind||s.params.loop)for(let a=i-e;a<=r+e;a+=1){const o=(a%t+t)%t;(o<i||o>r)&&IE(s,o)}else for(let a=Math.max(i-e,0);a<=Math.min(r+e,t-1);a+=1)a!==i&&(a>r||a<i)&&IE(s,a)};function f8(s){const{slidesGrid:e,params:t}=s,n=s.rtlTranslate?s.translate:-s.translate;let i;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?i=r:n>=e[r]&&n<e[r+1]&&(i=r+1):n>=e[r]&&(i=r);return t.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function g8(s){const e=this,t=e.rtlTranslate?e.translate:-e.translate,{snapGrid:n,params:i,activeIndex:r,realIndex:a,snapIndex:o}=e;let l=s,c;const h=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=f8(e)),n.indexOf(t)>=0)c=n.indexOf(t);else{const A=Math.min(i.slidesPerGroupSkip,l);c=A+Math.floor((l-A)/i.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=h(l);return}const u=e.grid&&i.grid&&i.grid.rows>1;let d;if(e.virtual&&i.virtual.enabled&&i.loop)d=h(l);else if(u){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/i.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&&r0(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&(a!==d&&e.emit("realIndexChange"),e.emit("slideChange"))}function m8(s,e){const t=this,n=t.params;let i=s.closest(`.${n.slideClass}, swiper-slide`);!i&&t.isElement&&e&&e.length>1&&e.includes(s)&&[...e.slice(e.indexOf(s)+1,e.length)].forEach(o=>{!i&&o.matches&&o.matches(`.${n.slideClass}, swiper-slide`)&&(i=o)});let r=!1,a;if(i){for(let o=0;o<t.slides.length;o+=1)if(t.slides[o]===i){r=!0,a=o;break}}if(i&&r)t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(i.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 E8={updateSize:l8,updateSlides:c8,updateAutoHeight:h8,updateSlidesOffset:u8,updateSlidesProgress:d8,updateProgress:A8,updateSlidesClasses:p8,updateActiveIndex:g8,updateClickedSlide:m8};function y8(s){s===void 0&&(s=this.isHorizontal()?"x":"y");const e=this,{params:t,rtlTranslate:n,translate:i,wrapperEl:r}=e;if(t.virtualTranslate)return n?-i:i;if(t.cssMode)return i;let a=i0(r,s);return a+=e.cssOverflowAdjustment(),n&&(a=-a),a||0}function _8(s,e){const t=this,{rtlTranslate:n,params:i,wrapperEl:r,progress:a}=t;let o=0,l=0;const c=0;t.isHorizontal()?o=n?-s:s:l=s,i.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),t.previousTranslate=t.translate,t.translate=t.isHorizontal()?o:l,i.cssMode?r[t.isHorizontal()?"scrollLeft":"scrollTop"]=t.isHorizontal()?-o:-l:i.virtualTranslate||(t.isHorizontal()?o-=t.cssOverflowAdjustment():l-=t.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${l}px, ${c}px)`);let h;const u=t.maxTranslate()-t.minTranslate();u===0?h=0:h=(s-t.minTranslate())/u,h!==a&&t.updateProgress(s),t.emit("setTranslate",t.translate,e)}function b8(){return-this.snapGrid[0]}function v8(){return-this.snapGrid[this.snapGrid.length-1]}function I8(s,e,t,n,i){s===void 0&&(s=0),e===void 0&&(e=this.params.speed),t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:a,wrapperEl:o}=r;if(r.animating&&a.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let h;if(n&&s>l?h=l:n&&s<c?h=c:h=s,r.updateProgress(h),a.cssMode){const u=r.isHorizontal();if(e===0)o[u?"scrollLeft":"scrollTop"]=-h;else{if(!r.support.smoothScroll)return bR({swiper:r,targetPosition:-h,side:u?"left":"top"}),!0;o.scrollTo({[u?"left":"top"]:-h,behavior:"smooth"})}return!0}return e===0?(r.setTransition(0),r.setTranslate(h),t&&(r.emit("beforeTransitionStart",e,i),r.emit("transitionEnd"))):(r.setTransition(e),r.setTranslate(h),t&&(r.emit("beforeTransitionStart",e,i),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 C8={getTranslate:y8,setTranslate:_8,minTranslate:b8,maxTranslate:v8,translateTo:I8};function x8(s,e){const t=this;t.params.cssMode||(t.wrapperEl.style.transitionDuration=`${s}ms`,t.wrapperEl.style.transitionDelay=s===0?"0ms":""),t.emit("setTransition",s,e)}function xR(s){let{swiper:e,runCallbacks:t,direction:n,step:i}=s;const{activeIndex:r,previousIndex:a}=e;let o=n;o||(r>a?o="next":r<a?o="prev":o="reset"),e.emit(`transition${i}`),t&&o==="reset"?e.emit(`slideResetTransition${i}`):t&&r!==a&&(e.emit(`slideChangeTransition${i}`),o==="next"?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}function w8(s,e){s===void 0&&(s=!0);const t=this,{params:n}=t;n.cssMode||(n.autoHeight&&t.updateAutoHeight(),xR({swiper:t,runCallbacks:s,direction:e,step:"Start"}))}function S8(s,e){s===void 0&&(s=!0);const t=this,{params:n}=t;t.animating=!1,!n.cssMode&&(t.setTransition(0),xR({swiper:t,runCallbacks:s,direction:e,step:"End"}))}var B8={setTransition:x8,transitionStart:w8,transitionEnd:S8};function T8(s,e,t,n,i){s===void 0&&(s=0),t===void 0&&(t=!0),typeof s=="string"&&(s=parseInt(s,10));const r=this;let a=s;a<0&&(a=0);const{params:o,snapGrid:l,slidesGrid:c,previousIndex:h,activeIndex:u,rtlTranslate:d,wrapperEl:A,enabled:p}=r;if(!p&&!n&&!i||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 I=0;I<c.length;I+=1){const w=-Math.floor(f*100),v=Math.floor(c[I]*100),C=Math.floor(c[I+1]*100);typeof c[I+1]<"u"?w>=v&&w<C-(C-v)/2?a=I:w>=v&&w<C&&(a=I+1):w>=v&&(a=I)}if(r.initialized&&a!==u&&(!r.allowSlideNext&&(d?f>r.translate&&f>r.minTranslate():f<r.translate&&f<r.minTranslate())||!r.allowSlidePrev&&f>r.translate&&f>r.maxTranslate()&&(u||0)!==a))return!1;a!==(h||0)&&t&&r.emit("beforeSlideChangeStart"),r.updateProgress(f);let _;a>u?_="next":a<u?_="prev":_="reset";const E=r.virtual&&r.params.virtual.enabled;if(!(E&&i)&&(d&&-f===r.translate||!d&&f===r.translate))return r.updateActiveIndex(a),o.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),o.effect!=="slide"&&r.setTranslate(f),_!=="reset"&&(r.transitionStart(t,_),r.transitionEnd(t,_)),!1;if(o.cssMode){const I=r.isHorizontal(),w=d?f:-f;if(e===0)E&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),E&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{A[I?"scrollLeft":"scrollTop"]=w})):A[I?"scrollLeft":"scrollTop"]=w,E&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return bR({swiper:r,targetPosition:w,side:I?"left":"top"}),!0;A.scrollTo({[I?"left":"top"]:w,behavior:"smooth"})}return!0}const x=CR().isSafari;return E&&!i&&x&&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,_),e===0?r.transitionEnd(t,_):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(w){!r||r.destroyed||w.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(t,_))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function M8(s,e,t,n){s===void 0&&(s=0),t===void 0&&(t=!0),typeof s=="string"&&(s=parseInt(s,10));const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);const r=i.grid&&i.params.grid&&i.params.grid.rows>1;let a=s;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)a=a+i.virtual.slidesBefore;else{let o;if(r){const d=a*i.params.grid.rows;o=i.slides.find(A=>A.getAttribute("data-swiper-slide-index")*1===d).column}else o=i.getSlideIndexByData(a);const l=r?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let h=i.params.slidesPerView;h==="auto"?h=i.slidesPerViewDynamic():(h=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&h%2===0&&(h=h+1));let u=l-o<h;if(c&&(u=u||o<Math.ceil(h/2)),n&&c&&i.params.slidesPerView!=="auto"&&!r&&(u=!1),u){const d=c?o<i.activeIndex?"prev":"next":o-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:d,slideTo:!0,activeSlideIndex:d==="next"?o+1:o-l+1,slideRealIndex:d==="next"?i.realIndex:void 0})}if(r){const d=a*i.params.grid.rows;a=i.slides.find(A=>A.getAttribute("data-swiper-slide-index")*1===d).column}else a=i.getSlideIndexByData(a)}return requestAnimationFrame(()=>{i.slideTo(a,e,t,n)}),i}function R8(s,e,t){e===void 0&&(e=!0);const n=this,{enabled:i,params:r,animating:a}=n;if(!i||n.destroyed)return n;typeof s>"u"&&(s=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,s,e,t)}),!0}return r.rewind&&n.isEnd?n.slideTo(0,s,e,t):n.slideTo(n.activeIndex+l,s,e,t)}function D8(s,e,t){e===void 0&&(e=!0);const n=this,{params:i,snapGrid:r,slidesGrid:a,rtlTranslate:o,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof s>"u"&&(s=n.params.speed);const h=n.virtual&&i.virtual.enabled;if(i.loop){if(c&&!h&&i.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const u=o?n.translate:-n.translate;function d(_){return _<0?-Math.floor(Math.abs(_)):Math.floor(_)}const A=d(u),p=r.map(_=>d(_)),g=i.freeMode&&i.freeMode.enabled;let m=r[p.indexOf(A)-1];if(typeof m>"u"&&(i.cssMode||g)){let _;r.forEach((E,y)=>{A>=E&&(_=y)}),typeof _<"u"&&(m=g?r[_]:r[_>0?_-1:_])}let f=0;if(typeof m<"u"&&(f=a.indexOf(m),f<0&&(f=n.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(f=f-n.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),i.rewind&&n.isBeginning){const _=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(_,s,e,t)}else if(i.loop&&n.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{n.slideTo(f,s,e,t)}),!0;return n.slideTo(f,s,e,t)}function Q8(s,e,t){e===void 0&&(e=!0);const n=this;if(!n.destroyed)return typeof s>"u"&&(s=n.params.speed),n.slideTo(n.activeIndex,s,e,t)}function L8(s,e,t,n){e===void 0&&(e=!0),n===void 0&&(n=.5);const i=this;if(i.destroyed)return;typeof s>"u"&&(s=i.params.speed);let r=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,r),o=a+Math.floor((r-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[o]){const c=i.snapGrid[o],h=i.snapGrid[o+1];l-c>(h-c)*n&&(r+=i.params.slidesPerGroup)}else{const c=i.snapGrid[o-1],h=i.snapGrid[o];l-c<=(h-c)*n&&(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,s,e,t)}function N8(){const s=this;if(s.destroyed)return;const{params:e,slidesEl:t}=s,n=e.slidesPerView==="auto"?s.slidesPerViewDynamic():e.slidesPerView;let i=s.getSlideIndexWhenGrid(s.clickedIndex),r;const a=s.isElement?"swiper-slide":`.${e.slideClass}`,o=s.grid&&s.params.grid&&s.params.grid.rows>1;if(e.loop){if(s.animating)return;r=parseInt(s.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?s.slideToLoop(r):i>(o?(s.slides.length-n)/2-(s.params.grid.rows-1):s.slides.length-n)?(s.loopFix(),i=s.getSlideIndex(ii(t,`${a}[data-swiper-slide-index="${r}"]`)[0]),Ih(()=>{s.slideTo(i)})):s.slideTo(i)}else s.slideTo(i)}var P8={slideTo:T8,slideToLoop:M8,slideNext:R8,slidePrev:D8,slideReset:Q8,slideToClosest:L8,slideToClickedSlide:N8};function F8(s,e){const t=this,{params:n,slidesEl:i}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const r=()=>{ii(i,`.${n.slideClass}, swiper-slide`).forEach((A,p)=>{A.setAttribute("data-swiper-slide-index",p)})},a=()=>{const d=ii(i,`.${n.slideBlankClass}`);d.forEach(A=>{A.remove()}),d.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,h=o&&t.slides.length%n.grid.rows!==0,u=d=>{for(let A=0;A<d;A+=1){const p=t.isElement?is("swiper-slide",[n.slideBlankClass]):is("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(p)}};if(c){if(n.loopAddBlankSlides){const d=l-t.slides.length%l;u(d),t.recalcSlides(),t.updateSlides()}else Yf("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(h){if(n.loopAddBlankSlides){const d=n.grid.rows-t.slides.length%n.grid.rows;u(d),t.recalcSlides(),t.updateSlides()}else Yf("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();t.loopFix({slideRealIndex:s,direction:n.centeredSlides?void 0:"next",initial:e})}function k8(s){let{slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:i,activeSlideIndex:r,initial:a,byController:o,byMousewheel:l}=s===void 0?{}:s;const c=this;if(!c.params.loop)return;c.emit("beforeLoopFix");const{slides:h,allowSlidePrev:u,allowSlideNext:d,slidesEl:A,params:p}=c,{centeredSlides:g,initialSlide:m}=p;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&p.virtual.enabled){t&&(!p.centeredSlides&&c.snapIndex===0?c.slideTo(c.virtual.slides.length,0,!1,!0):p.centeredSlides&&c.snapIndex<p.slidesPerView?c.slideTo(c.virtual.slides.length+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(c.virtual.slidesBefore,0,!1,!0)),c.allowSlidePrev=u,c.allowSlideNext=d,c.emit("loopFix");return}let f=p.slidesPerView;f==="auto"?f=c.slidesPerViewDynamic():(f=Math.ceil(parseFloat(p.slidesPerView,10)),g&&f%2===0&&(f=f+1));const _=p.slidesPerGroupAuto?f:p.slidesPerGroup;let E=g?Math.max(_,Math.ceil(f/2)):_;E%_!==0&&(E+=_-E%_),E+=p.loopAdditionalSlides,c.loopedSlides=E;const y=c.grid&&p.grid&&p.grid.rows>1;h.length<f+E||c.params.effect==="cards"&&h.length<f+E*2?Yf("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"):y&&p.grid.fill==="row"&&Yf("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const b=[],x=[],I=y?Math.ceil(h.length/p.grid.rows):h.length,w=a&&I-m<f&&!g;let v=w?m:c.activeIndex;typeof r>"u"?r=c.getSlideIndex(h.find(N=>N.classList.contains(p.slideActiveClass))):v=r;const C=n==="next"||!n,S=n==="prev"||!n;let T=0,M=0;const F=(y?h[r].column:r)+(g&&typeof i>"u"?-f/2+.5:0);if(F<E){T=Math.max(E-F,_);for(let N=0;N<E-F;N+=1){const L=N-Math.floor(N/I)*I;if(y){const P=I-L-1;for(let z=h.length-1;z>=0;z-=1)h[z].column===P&&b.push(z)}else b.push(I-L-1)}}else if(F+f>I-E){M=Math.max(F-(I-E*2),_),w&&(M=Math.max(M,f-I+m+1));for(let N=0;N<M;N+=1){const L=N-Math.floor(N/I)*I;y?h.forEach((P,z)=>{P.column===L&&x.push(z)}):x.push(L)}}if(c.__preventObserver__=!0,requestAnimationFrame(()=>{c.__preventObserver__=!1}),c.params.effect==="cards"&&h.length<f+E*2&&(x.includes(r)&&x.splice(x.indexOf(r),1),b.includes(r)&&b.splice(b.indexOf(r),1)),S&&b.forEach(N=>{h[N].swiperLoopMoveDOM=!0,A.prepend(h[N]),h[N].swiperLoopMoveDOM=!1}),C&&x.forEach(N=>{h[N].swiperLoopMoveDOM=!0,A.append(h[N]),h[N].swiperLoopMoveDOM=!1}),c.recalcSlides(),p.slidesPerView==="auto"?c.updateSlides():y&&(b.length>0&&S||x.length>0&&C)&&c.slides.forEach((N,L)=>{c.grid.updateSlide(L,N,c.slides)}),p.watchSlidesProgress&&c.updateSlidesOffset(),t){if(b.length>0&&S){if(typeof e>"u"){const N=c.slidesGrid[v],P=c.slidesGrid[v+T]-N;l?c.setTranslate(c.translate-P):(c.slideTo(v+Math.ceil(T),0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-P,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-P))}else if(i){const N=y?b.length/p.grid.rows:b.length;c.slideTo(c.activeIndex+N,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(x.length>0&&C)if(typeof e>"u"){const N=c.slidesGrid[v],P=c.slidesGrid[v-M]-N;l?c.setTranslate(c.translate-P):(c.slideTo(v-M,0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-P,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-P))}else{const N=y?x.length/p.grid.rows:x.length;c.slideTo(c.activeIndex-N,0,!1,!0)}}if(c.allowSlidePrev=u,c.allowSlideNext=d,c.controller&&c.controller.control&&!o){const N={slideRealIndex:e,direction:n,setTranslate:i,activeSlideIndex:r,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach(L=>{!L.destroyed&&L.params.loop&&L.loopFix({...N,slideTo:L.params.slidesPerView===p.slidesPerView?t:!1})}):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...N,slideTo:c.controller.control.params.slidesPerView===p.slidesPerView?t:!1})}c.emit("loopFix")}function U8(){const s=this,{params:e,slidesEl:t}=s;if(!e.loop||!t||s.virtual&&s.params.virtual.enabled)return;s.recalcSlides();const n=[];s.slides.forEach(i=>{const r=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;n[r]=i}),s.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),n.forEach(i=>{t.append(i)}),s.recalcSlides(),s.slideTo(s.realIndex,0)}var O8={loopCreate:F8,loopFix:k8,loopDestroy:U8};function G8(s){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=s?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})}function z8(){const s=this;s.params.watchOverflow&&s.isLocked||s.params.cssMode||(s.isElement&&(s.__preventObserver__=!0),s[s.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",s.isElement&&requestAnimationFrame(()=>{s.__preventObserver__=!1}))}var H8={setGrabCursor:G8,unsetGrabCursor:z8};function $8(s,e){e===void 0&&(e=this);function t(n){if(!n||n===Jn()||n===un())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(s);return!i&&!n.getRootNode?null:i||t(n.getRootNode().host)}return t(e)}function Qx(s,e,t){const n=un(),{params:i}=s,r=i.edgeSwipeDetection,a=i.edgeSwipeThreshold;return r&&(t<=a||t>=n.innerWidth-a)?r==="prevent"?(e.preventDefault(),!0):!1:!0}function V8(s){const e=this,t=Jn();let n=s;n.originalEvent&&(n=n.originalEvent);const i=e.touchEventsData;if(n.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==n.pointerId)return;i.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(i.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){Qx(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"&&!Z5(l,e.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||i.isTouched&&i.isMoved)return;const c=!!r.noSwipingClass&&r.noSwipingClass!=="",h=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&h&&(l=h[0]);const u=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,d=!!(n.target&&n.target.shadowRoot);if(r.noSwiping&&(d?$8(u,l):l.closest(u))){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(!Qx(e,n,A))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=A,a.startY=p,i.touchStartTime=_s(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,r.threshold>0&&(i.allowThresholdMove=!1);let g=!0;l.matches(i.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==l&&(n.pointerType==="mouse"||n.pointerType!=="mouse"&&!l.matches(i.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 Y8(s){const e=Jn(),t=this,n=t.touchEventsData,{params:i,touches:r,rtlTranslate:a,enabled:o}=t;if(!o||!i.simulateTouch&&s.pointerType==="mouse")return;let l=s;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(b=>b.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 h=c.pageX,u=c.pageY;if(l.preventedByNestedSwiper){r.startX=h,r.startY=u;return}if(!t.allowTouchMove){l.target.matches(n.focusableElements)||(t.allowClick=!1),n.isTouched&&(Object.assign(r,{startX:h,startY:u,currentX:h,currentY:u}),n.touchStartTime=_s());return}if(i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(u<r.startY&&t.translate<=t.maxTranslate()||u>r.startY&&t.translate>=t.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else{if(a&&(h>r.startX&&-t.translate<=t.maxTranslate()||h<r.startX&&-t.translate>=t.minTranslate()))return;if(!a&&(h<r.startX&&t.translate<=t.maxTranslate()||h>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=h,r.currentY=u;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 b;t.isHorizontal()&&r.currentY===r.startY||t.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:d*d+A*A>=25&&(b=Math.atan2(Math.abs(A),Math.abs(d))*180/Math.PI,n.isScrolling=t.isHorizontal()?b>i.touchAngle:90-b>i.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,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let p=t.isHorizontal()?d:A,g=t.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;i.oneWayMovement&&(p=Math.abs(p)*(a?1:-1),g=Math.abs(g)*(a?1:-1)),r.diff=p,p*=i.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&&!i.cssMode,_=t.touchesDirection==="next"&&t.allowSlideNext||t.touchesDirection==="prev"&&t.allowSlidePrev;if(!n.isMoved){if(f&&_&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(b)}n.allowMomentumBounce=!1,i.grabCursor&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!0),t.emit("sliderFirstMove",l)}if(new Date().getTime(),i._loopSwapReset!==!1&&n.isMoved&&n.allowThresholdMove&&m!==t.touchesDirection&&f&&_&&Math.abs(p)>=1){Object.assign(r,{startX:h,startY:u,currentX:h,currentY:u,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}t.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=p+n.startTranslate;let E=!0,y=i.resistanceRatio;if(i.touchReleaseOnEdges&&(y=0),p>0?(f&&_&&n.allowThresholdMove&&n.currentTranslate>(i.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]-(i.slidesPerView!=="auto"&&t.slides.length-i.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()&&(E=!1,i.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+n.startTranslate+p)**y))):p<0&&(f&&_&&n.allowThresholdMove&&n.currentTranslate<(i.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween+(i.slidesPerView!=="auto"&&t.slides.length-i.slidesPerView>=2?t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween:0):t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-(i.slidesPerView==="auto"?t.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),n.currentTranslate<t.maxTranslate()&&(E=!1,i.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-n.startTranslate-p)**y))),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),i.threshold>0)if(Math.abs(p)>i.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}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&t.freeMode||i.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate))}function q8(s){const e=this,t=e.touchEventsData;let n=s;n.originalEvent&&(n=n.originalEvent);let i;if(n.type==="touchend"||n.type==="touchcancel"){if(i=[...n.changedTouches].find(b=>b.identifier===t.touchId),!i||i.identifier!==t.touchId)return}else{if(t.touchId!==null||n.pointerId!==t.pointerId)return;i=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:h}=e;if(!h||!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 u=_s(),d=u-t.touchStartTime;if(e.allowClick){const b=n.path||n.composedPath&&n.composedPath();e.updateClickedSlide(b&&b[0]||n.target,b),e.emit("tap click",n),d<300&&u-t.lastClickTime<300&&e.emit("doubleTap doubleClick",n)}if(t.lastClickTime=_s(),Ih(()=>{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 b=0;b<c.length;b+=b<a.slidesPerGroupSkip?1:a.slidesPerGroup){const x=b<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;typeof c[b+x]<"u"?(p||A>=c[b]&&A<c[b+x])&&(g=b,m=c[b+x]-c[b]):(p||A>=c[b])&&(g=b,m=c[c.length-1]-c[c.length-2])}let f=null,_=null;a.rewind&&(e.isBeginning?_=a.virtual&&a.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(f=0));const E=(A-c[g])/m,y=g<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(d>a.longSwipesMs){if(!a.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(E>=a.longSwipesRatio?e.slideTo(a.rewind&&e.isEnd?f:g+y):e.slideTo(g)),e.swipeDirection==="prev"&&(E>1-a.longSwipesRatio?e.slideTo(g+y):_!==null&&E<0&&Math.abs(E)>a.longSwipesRatio?e.slideTo(_):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+y):e.slideTo(g):(e.swipeDirection==="next"&&e.slideTo(f!==null?f:g+y),e.swipeDirection==="prev"&&e.slideTo(_!==null?_:g))}}function Lx(){const s=this,{params:e,el:t}=s;if(t&&t.offsetWidth===0)return;e.breakpoints&&s.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:i,snapGrid:r}=s,a=s.virtual&&s.params.virtual.enabled;s.allowSlideNext=!0,s.allowSlidePrev=!0,s.updateSize(),s.updateSlides(),s.updateSlidesClasses();const o=a&&e.loop;(e.slidesPerView==="auto"||e.slidesPerView>1)&&s.isEnd&&!s.isBeginning&&!s.params.centeredSlides&&!o?s.slideTo(s.slides.length-1,0,!1,!0):s.params.loop&&!a?s.slideToLoop(s.realIndex,0,!1,!0):s.slideTo(s.activeIndex,0,!1,!0),s.autoplay&&s.autoplay.running&&s.autoplay.paused&&(clearTimeout(s.autoplay.resizeTimeout),s.autoplay.resizeTimeout=setTimeout(()=>{s.autoplay&&s.autoplay.running&&s.autoplay.paused&&s.autoplay.resume()},500)),s.allowSlidePrev=i,s.allowSlideNext=n,s.params.watchOverflow&&r!==s.snapGrid&&s.checkOverflow()}function W8(s){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&s.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(s.stopPropagation(),s.stopImmediatePropagation())))}function j8(){const s=this,{wrapperEl:e,rtlTranslate:t,enabled:n}=s;if(!n)return;s.previousTranslate=s.translate,s.isHorizontal()?s.translate=-e.scrollLeft:s.translate=-e.scrollTop,s.translate===0&&(s.translate=0),s.updateActiveIndex(),s.updateSlidesClasses();let i;const r=s.maxTranslate()-s.minTranslate();r===0?i=0:i=(s.translate-s.minTranslate())/r,i!==s.progress&&s.updateProgress(t?-s.translate:s.translate),s.emit("setTranslate",s.translate,!1)}function X8(s){const e=this;Kp(e,s.target),!(e.params.cssMode||e.params.slidesPerView!=="auto"&&!e.params.autoHeight)&&e.update()}function J8(){const s=this;s.documentTouchHandlerProceeded||(s.documentTouchHandlerProceeded=!0,s.params.touchReleaseOnEdges&&(s.el.style.touchAction="auto"))}const wR=(s,e)=>{const t=Jn(),{params:n,el:i,wrapperEl:r,device:a}=s,o=!!n.nested,l=e==="on"?"addEventListener":"removeEventListener",c=e;!i||typeof i=="string"||(t[l]("touchstart",s.onDocumentTouchStart,{passive:!1,capture:o}),i[l]("touchstart",s.onTouchStart,{passive:!1}),i[l]("pointerdown",s.onTouchStart,{passive:!1}),t[l]("touchmove",s.onTouchMove,{passive:!1,capture:o}),t[l]("pointermove",s.onTouchMove,{passive:!1,capture:o}),t[l]("touchend",s.onTouchEnd,{passive:!0}),t[l]("pointerup",s.onTouchEnd,{passive:!0}),t[l]("pointercancel",s.onTouchEnd,{passive:!0}),t[l]("touchcancel",s.onTouchEnd,{passive:!0}),t[l]("pointerout",s.onTouchEnd,{passive:!0}),t[l]("pointerleave",s.onTouchEnd,{passive:!0}),t[l]("contextmenu",s.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&i[l]("click",s.onClick,!0),n.cssMode&&r[l]("scroll",s.onScroll),n.updateOnWindowResize?s[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Lx,!0):s[c]("observerUpdate",Lx,!0),i[l]("load",s.onLoad,{capture:!0}))};function K8(){const s=this,{params:e}=s;s.onTouchStart=V8.bind(s),s.onTouchMove=Y8.bind(s),s.onTouchEnd=q8.bind(s),s.onDocumentTouchStart=J8.bind(s),e.cssMode&&(s.onScroll=j8.bind(s)),s.onClick=W8.bind(s),s.onLoad=X8.bind(s),wR(s,"on")}function Z8(){wR(this,"off")}var eY={attachEvents:K8,detachEvents:Z8};const Nx=(s,e)=>s.grid&&e.grid&&e.grid.rows>1;function tY(){const s=this,{realIndex:e,initialized:t,params:n,el:i}=s,r=n.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const a=Jn(),o=n.breakpointsBase==="window"||!n.breakpointsBase?n.breakpointsBase:"container",l=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?s.el:a.querySelector(n.breakpointsBase),c=s.getBreakpoint(r,o,l);if(!c||s.currentBreakpoint===c)return;const u=(c in r?r[c]:void 0)||s.originalParams,d=Nx(s,n),A=Nx(s,u),p=s.params.grabCursor,g=u.grabCursor,m=n.enabled;d&&!A?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),s.emitContainerClasses()):!d&&A&&(i.classList.add(`${n.containerModifierClass}grid`),(u.grid.fill&&u.grid.fill==="column"||!u.grid.fill&&n.grid.fill==="column")&&i.classList.add(`${n.containerModifierClass}grid-column`),s.emitContainerClasses()),p&&!g?s.unsetGrabCursor():!p&&g&&s.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(x=>{if(typeof u[x]>"u")return;const I=n[x]&&n[x].enabled,w=u[x]&&u[x].enabled;I&&!w&&s[x].disable(),!I&&w&&s[x].enable()});const f=u.direction&&u.direction!==n.direction,_=n.loop&&(u.slidesPerView!==n.slidesPerView||f),E=n.loop;f&&t&&s.changeDirection(),Ki(s.params,u);const y=s.params.enabled,b=s.params.loop;Object.assign(s,{allowTouchMove:s.params.allowTouchMove,allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev}),m&&!y?s.disable():!m&&y&&s.enable(),s.currentBreakpoint=c,s.emit("_beforeBreakpoint",u),t&&(_?(s.loopDestroy(),s.loopCreate(e),s.updateSlides()):!E&&b?(s.loopCreate(e),s.updateSlides()):E&&!b&&s.loopDestroy()),s.emit("breakpoint",u)}function nY(s,e,t){if(e===void 0&&(e="window"),!s||e==="container"&&!t)return;let n=!1;const i=un(),r=e==="window"?i.innerHeight:t.clientHeight,a=Object.keys(s).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"?i.matchMedia(`(min-width: ${c}px)`).matches&&(n=l):c<=t.clientWidth&&(n=l)}return n||"max"}var iY={setBreakpoint:tY,getBreakpoint:nY};function sY(s,e){const t=[];return s.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(i=>{n[i]&&t.push(e+i)}):typeof n=="string"&&t.push(e+n)}),t}function rY(){const s=this,{classNames:e,params:t,rtl:n,el:i,device:r}=s,a=sY(["initialized",t.direction,{"free-mode":s.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),i.classList.add(...e),s.emitContainerClasses()}function aY(){const s=this,{el:e,classNames:t}=s;!e||typeof e=="string"||(e.classList.remove(...t),s.emitContainerClasses())}var oY={addClasses:rY,removeClasses:aY};function lY(){const s=this,{isLocked:e,params:t}=s,{slidesOffsetBefore:n}=t;if(n){const i=s.slides.length-1,r=s.slidesGrid[i]+s.slidesSizesGrid[i]+n*2;s.isLocked=s.size>r}else s.isLocked=s.snapGrid.length===1;t.allowSlideNext===!0&&(s.allowSlideNext=!s.isLocked),t.allowSlidePrev===!0&&(s.allowSlidePrev=!s.isLocked),e&&e!==s.isLocked&&(s.isEnd=!1),e!==s.isLocked&&s.emit(s.isLocked?"lock":"unlock")}var cY={checkOverflow:lY},a0={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,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 hY(s,e){return function(n){n===void 0&&(n={});const i=Object.keys(n)[0],r=n[i];if(typeof r!="object"||r===null){Ki(e,n);return}if(s[i]===!0&&(s[i]={enabled:!0}),i==="navigation"&&s[i]&&s[i].enabled&&!s[i].prevEl&&!s[i].nextEl&&(s[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&s[i]&&s[i].enabled&&!s[i].el&&(s[i].auto=!0),!(i in s&&"enabled"in r)){Ki(e,n);return}typeof s[i]=="object"&&!("enabled"in s[i])&&(s[i].enabled=!0),s[i]||(s[i]={enabled:!1}),Ki(e,n)}}const CE={eventsEmitter:o8,update:E8,translate:C8,transition:B8,slide:P8,loop:O8,grabCursor:H8,events:eY,breakpoints:iY,checkOverflow:cY,classes:oY},xE={};class Ji{constructor(){let e,t;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i.length===1&&i[0].constructor&&Object.prototype.toString.call(i[0]).slice(8,-1)==="Object"?t=i[0]:[e,t]=i,t||(t={}),t=Ki({},t),e&&!t.el&&(t.el=e);const a=Jn();if(t.el&&typeof t.el=="string"&&a.querySelectorAll(t.el).length>1){const h=[];return a.querySelectorAll(t.el).forEach(u=>{const d=Ki({},t,{el:u});h.push(new Ji(d))}),h}const o=this;o.__swiper__=!0,o.support=vR(),o.device=IR({userAgent:t.userAgent}),o.browser=CR(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],t.modules&&Array.isArray(t.modules)&&o.modules.push(...t.modules);const l={};o.modules.forEach(h=>{h({params:t,swiper:o,extendParams:hY(t,l),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});const c=Ki({},a0,l);return o.params=Ki({},c,xE,t),o.originalParams=Ki({},o.params),o.passedParams=Ki({},t),o.params&&o.params.on&&Object.keys(o.params.on).forEach(h=>{o.on(h,o.params.on[h])}),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return o.params.direction==="horizontal"},isVertical(){return o.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:o.params.allowSlideNext,allowSlidePrev:o.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:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}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,i=ii(t,`.${n.slideClass}, swiper-slide`),r=$d(i[0]);return $d(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=ii(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 i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;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 i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){e===void 0&&(e="current"),t===void 0&&(t=!1);const n=this,{params:i,slides:r,slidesGrid:a,slidesSizesGrid:o,size:l,activeIndex:c}=n;let h=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let u=r[c]?Math.ceil(r[c].swiperSlideSize):0,d;for(let A=c+1;A<r.length;A+=1)r[A]&&!d&&(u+=Math.ceil(r[A].swiperSlideSize),h+=1,u>l&&(d=!0));for(let A=c-1;A>=0;A-=1)r[A]&&!d&&(u+=r[A].swiperSlideSize,h+=1,u>l&&(d=!0))}else if(e==="current")for(let u=c+1;u<r.length;u+=1)(t?a[u]+o[u]-a[c]<l:a[u]-a[c]<l)&&(h+=1);else for(let u=c-1;u>=0;u-=1)a[c]-a[u]<l&&(h+=1);return h}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&&Kp(e,a)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function i(){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)i(),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||i()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){t===void 0&&(t=!0);const n=this,i=n.params.direction;return e||(e=i==="horizontal"?"vertical":"horizontal"),e===i||e!=="horizontal"&&e!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),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 i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):ii(n,i())[0];return!a&&t.params.createElements&&(a=is("div",t.params.wrapperClass),n.append(a),ii(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"||to(n,"direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||to(n,"direction")==="rtl"),wrongRTL:to(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 i=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&i.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(r=>{r.complete?Kp(t,r):r.addEventListener("load",a=>{Kp(t,a.target)})}),r0(t),t.initialized=!0,r0(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){e===void 0&&(e=!0),t===void 0&&(t=!0);const n=this,{params:i,el:r,wrapperEl:a,slides:o}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.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(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.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),j5(n)),n.destroyed=!0),null}static extendDefaults(e){Ki(xE,e)}static get extendedDefaults(){return xE}static get defaults(){return a0}static installModule(e){Ji.prototype.__modules__||(Ji.prototype.__modules__=[]);const t=Ji.prototype.__modules__;typeof e=="function"&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(t=>Ji.installModule(t)),Ji):(Ji.installModule(e),Ji)}}Object.keys(CE).forEach(s=>{Object.keys(CE[s]).forEach(e=>{Ji.prototype[e]=CE[s][e]})});Ji.use([r8,a8]);function uY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;t({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let r;const a=Jn();e.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const o=a.createElement("div");function l(p,g){const m=e.params.virtual;if(m.cache&&e.virtual.cache[g])return e.virtual.cache[g];let f;return m.renderSlide?(f=m.renderSlide.call(e,p,g),typeof f=="string"&&(Is(o,f),f=o.children[0])):e.isElement?f=is("swiper-slide"):f=is("div",e.params.slideClass),f.setAttribute("data-swiper-slide-index",g),m.renderSlide||Is(f,p),m.cache&&(e.virtual.cache[g]=f),f}function c(p,g,m){const{slidesPerView:f,slidesPerGroup:_,centeredSlides:E,loop:y,initialSlide:b}=e.params;if(g&&!y&&b>0)return;const{addSlidesBefore:x,addSlidesAfter:I}=e.params.virtual,{from:w,to:v,slides:C,slidesGrid:S,offset:T}=e.virtual;e.params.cssMode||e.updateActiveIndex();const M=typeof m>"u"?e.activeIndex||0:m;let R;e.rtlTranslate?R="right":R=e.isHorizontal()?"left":"top";let F,N;E?(F=Math.floor(f/2)+_+I,N=Math.floor(f/2)+_+x):(F=f+(_-1)+I,N=(y?f:_)+x);let L=M-N,P=M+F;y||(L=Math.max(L,0),P=Math.min(P,C.length-1));let z=(e.slidesGrid[L]||0)-(e.slidesGrid[0]||0);y&&M>=N?(L-=N,E||(z+=e.slidesGrid[0])):y&&M<N&&(L=-N,E&&(z+=e.slidesGrid[0])),Object.assign(e.virtual,{from:L,to:P,offset:z,slidesGrid:e.slidesGrid,slidesBefore:N,slidesAfter:F});function te(){e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),i("virtualUpdate")}if(w===L&&v===P&&!p){e.slidesGrid!==S&&z!==T&&e.slides.forEach(Y=>{Y.style[R]=`${z-Math.abs(e.cssOverflowAdjustment())}px`}),e.updateProgress(),i("virtualUpdate");return}if(e.params.virtual.renderExternal){e.params.virtual.renderExternal.call(e,{offset:z,from:L,to:P,slides:(function(){const $=[];for(let de=L;de<=P;de+=1)$.push(C[de]);return $})()}),e.params.virtual.renderExternalUpdate?te():i("virtualUpdate");return}const ne=[],ue=[],pe=Y=>{let $=Y;return Y<0?$=C.length+Y:$>=C.length&&($=$-C.length),$};if(p)e.slides.filter(Y=>Y.matches(`.${e.params.slideClass}, swiper-slide`)).forEach(Y=>{Y.remove()});else for(let Y=w;Y<=v;Y+=1)if(Y<L||Y>P){const $=pe(Y);e.slides.filter(de=>de.matches(`.${e.params.slideClass}[data-swiper-slide-index="${$}"], swiper-slide[data-swiper-slide-index="${$}"]`)).forEach(de=>{de.remove()})}const Z=y?-C.length:0,G=y?C.length*2:C.length;for(let Y=Z;Y<G;Y+=1)if(Y>=L&&Y<=P){const $=pe(Y);typeof v>"u"||p?ue.push($):(Y>v&&ue.push($),Y<w&&ne.push($))}if(ue.forEach(Y=>{e.slidesEl.append(l(C[Y],Y))}),y)for(let Y=ne.length-1;Y>=0;Y-=1){const $=ne[Y];e.slidesEl.prepend(l(C[$],$))}else ne.sort((Y,$)=>$-Y),ne.forEach(Y=>{e.slidesEl.prepend(l(C[Y],Y))});ii(e.slidesEl,".swiper-slide, swiper-slide").forEach(Y=>{Y.style[R]=`${z-Math.abs(e.cssOverflowAdjustment())}px`}),te()}function h(p){if(typeof p=="object"&&"length"in p)for(let g=0;g<p.length;g+=1)p[g]&&e.virtual.slides.push(p[g]);else e.virtual.slides.push(p);c(!0)}function u(p){const g=e.activeIndex;let m=g+1,f=1;if(Array.isArray(p)){for(let _=0;_<p.length;_+=1)p[_]&&e.virtual.slides.unshift(p[_]);m=g+p.length,f=p.length}else e.virtual.slides.unshift(p);if(e.params.virtual.cache){const _=e.virtual.cache,E={};Object.keys(_).forEach(y=>{const b=_[y],x=b.getAttribute("data-swiper-slide-index");x&&b.setAttribute("data-swiper-slide-index",parseInt(x,10)+f),E[parseInt(y,10)+f]=b}),e.virtual.cache=E}c(!0),e.slideTo(m,0)}function d(p){if(typeof p>"u"||p===null)return;let g=e.activeIndex;if(Array.isArray(p))for(let m=p.length-1;m>=0;m-=1)e.params.virtual.cache&&(delete e.virtual.cache[p[m]],Object.keys(e.virtual.cache).forEach(f=>{f>p&&(e.virtual.cache[f-1]=e.virtual.cache[f],e.virtual.cache[f-1].setAttribute("data-swiper-slide-index",f-1),delete e.virtual.cache[f])})),e.virtual.slides.splice(p[m],1),p[m]<g&&(g-=1),g=Math.max(g,0);else e.params.virtual.cache&&(delete e.virtual.cache[p],Object.keys(e.virtual.cache).forEach(m=>{m>p&&(e.virtual.cache[m-1]=e.virtual.cache[m],e.virtual.cache[m-1].setAttribute("data-swiper-slide-index",m-1),delete e.virtual.cache[m])})),e.virtual.slides.splice(p,1),p<g&&(g-=1),g=Math.max(g,0);c(!0),e.slideTo(g,0)}function A(){e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),c(!0),e.slideTo(0,0)}n("beforeInit",()=>{if(!e.params.virtual.enabled)return;let p;if(typeof e.passedParams.virtual.slides>"u"){const g=[...e.slidesEl.children].filter(m=>m.matches(`.${e.params.slideClass}, swiper-slide`));g&&g.length&&(e.virtual.slides=[...g],p=!0,g.forEach((m,f)=>{m.setAttribute("data-swiper-slide-index",f),e.virtual.cache[f]=m,m.remove()}))}p||(e.virtual.slides=e.params.virtual.slides),e.classNames.push(`${e.params.containerModifierClass}virtual`),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0,c(!1,!0)}),n("setTranslate",()=>{e.params.virtual.enabled&&(e.params.cssMode&&!e._immediateVirtual?(clearTimeout(r),r=setTimeout(()=>{c()},100)):c())}),n("init update resize",()=>{e.params.virtual.enabled&&e.params.cssMode&&qu(e.wrapperEl,"--swiper-virtual-size",`${e.virtualSize}px`)}),Object.assign(e.virtual,{appendSlide:h,prependSlide:u,removeSlide:d,removeAllSlides:A,update:c})}function dY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=Jn(),a=un();e.keyboard={enabled:!1},t({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function o(h){if(!e.enabled)return;const{rtlTranslate:u}=e;let d=h;d.originalEvent&&(d=d.originalEvent);const A=d.keyCode||d.charCode,p=e.params.keyboard.pageUpDown,g=p&&A===33,m=p&&A===34,f=A===37,_=A===39,E=A===38,y=A===40;if(!e.allowSlideNext&&(e.isHorizontal()&&_||e.isVertical()&&y||m)||!e.allowSlidePrev&&(e.isHorizontal()&&f||e.isVertical()&&E||g))return!1;if(!(d.shiftKey||d.altKey||d.ctrlKey||d.metaKey)&&!(r.activeElement&&(r.activeElement.isContentEditable||r.activeElement.nodeName&&(r.activeElement.nodeName.toLowerCase()==="input"||r.activeElement.nodeName.toLowerCase()==="textarea")))){if(e.params.keyboard.onlyInViewport&&(g||m||f||_||E||y)){let b=!1;if(fl(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&fl(e.el,`.${e.params.slideActiveClass}`).length===0)return;const x=e.el,I=x.clientWidth,w=x.clientHeight,v=a.innerWidth,C=a.innerHeight,S=qf(x);u&&(S.left-=x.scrollLeft);const T=[[S.left,S.top],[S.left+I,S.top],[S.left,S.top+w],[S.left+I,S.top+w]];for(let M=0;M<T.length;M+=1){const R=T[M];if(R[0]>=0&&R[0]<=v&&R[1]>=0&&R[1]<=C){if(R[0]===0&&R[1]===0)continue;b=!0}}if(!b)return}e.isHorizontal()?((g||m||f||_)&&(d.preventDefault?d.preventDefault():d.returnValue=!1),((m||_)&&!u||(g||f)&&u)&&e.slideNext(),((g||f)&&!u||(m||_)&&u)&&e.slidePrev()):((g||m||E||y)&&(d.preventDefault?d.preventDefault():d.returnValue=!1),(m||y)&&e.slideNext(),(g||E)&&e.slidePrev()),i("keyPress",A)}}function l(){e.keyboard.enabled||(r.addEventListener("keydown",o),e.keyboard.enabled=!0)}function c(){e.keyboard.enabled&&(r.removeEventListener("keydown",o),e.keyboard.enabled=!1)}n("init",()=>{e.params.keyboard.enabled&&l()}),n("destroy",()=>{e.keyboard.enabled&&c()}),Object.assign(e.keyboard,{enable:l,disable:c})}function AY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=un();t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),e.mousewheel={enabled:!1};let a,o=_s(),l;const c=[];function h(E){let I=0,w=0,v=0,C=0;return"detail"in E&&(w=E.detail),"wheelDelta"in E&&(w=-E.wheelDelta/120),"wheelDeltaY"in E&&(w=-E.wheelDeltaY/120),"wheelDeltaX"in E&&(I=-E.wheelDeltaX/120),"axis"in E&&E.axis===E.HORIZONTAL_AXIS&&(I=w,w=0),v=I*10,C=w*10,"deltaY"in E&&(C=E.deltaY),"deltaX"in E&&(v=E.deltaX),E.shiftKey&&!v&&(v=C,C=0),(v||C)&&E.deltaMode&&(E.deltaMode===1?(v*=40,C*=40):(v*=800,C*=800)),v&&!I&&(I=v<1?-1:1),C&&!w&&(w=C<1?-1:1),{spinX:I,spinY:w,pixelX:v,pixelY:C}}function u(){e.enabled&&(e.mouseEntered=!0)}function d(){e.enabled&&(e.mouseEntered=!1)}function A(E){return e.params.mousewheel.thresholdDelta&&E.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&_s()-o<e.params.mousewheel.thresholdTime?!1:E.delta>=6&&_s()-o<60?!0:(E.direction<0?(!e.isEnd||e.params.loop)&&!e.animating&&(e.slideNext(),i("scroll",E.raw)):(!e.isBeginning||e.params.loop)&&!e.animating&&(e.slidePrev(),i("scroll",E.raw)),o=new r.Date().getTime(),!1)}function p(E){const y=e.params.mousewheel;if(E.direction<0){if(e.isEnd&&!e.params.loop&&y.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&y.releaseOnEdges)return!0;return!1}function g(E){let y=E,b=!0;if(!e.enabled||E.target.closest(`.${e.params.mousewheel.noMousewheelClass}`))return;const x=e.params.mousewheel;e.params.cssMode&&y.preventDefault();let I=e.el;e.params.mousewheel.eventsTarget!=="container"&&(I=document.querySelector(e.params.mousewheel.eventsTarget));const w=I&&I.contains(y.target);if(!e.mouseEntered&&!w&&!x.releaseOnEdges)return!0;y.originalEvent&&(y=y.originalEvent);let v=0;const C=e.rtlTranslate?-1:1,S=h(y);if(x.forceToAxis)if(e.isHorizontal())if(Math.abs(S.pixelX)>Math.abs(S.pixelY))v=-S.pixelX*C;else return!0;else if(Math.abs(S.pixelY)>Math.abs(S.pixelX))v=-S.pixelY;else return!0;else v=Math.abs(S.pixelX)>Math.abs(S.pixelY)?-S.pixelX*C:-S.pixelY;if(v===0)return!0;x.invert&&(v=-v);let T=e.getTranslate()+v*x.sensitivity;if(T>=e.minTranslate()&&(T=e.minTranslate()),T<=e.maxTranslate()&&(T=e.maxTranslate()),b=e.params.loop?!0:!(T===e.minTranslate()||T===e.maxTranslate()),b&&e.params.nested&&y.stopPropagation(),!e.params.freeMode||!e.params.freeMode.enabled){const M={time:_s(),delta:Math.abs(v),direction:Math.sign(v),raw:E};c.length>=2&&c.shift();const R=c.length?c[c.length-1]:void 0;if(c.push(M),R?(M.direction!==R.direction||M.delta>R.delta||M.time>R.time+150)&&A(M):A(M),p(M))return!0}else{const M={time:_s(),delta:Math.abs(v),direction:Math.sign(v)},R=l&&M.time<l.time+500&&M.delta<=l.delta&&M.direction===l.direction;if(!R){l=void 0;let F=e.getTranslate()+v*x.sensitivity;const N=e.isBeginning,L=e.isEnd;if(F>=e.minTranslate()&&(F=e.minTranslate()),F<=e.maxTranslate()&&(F=e.maxTranslate()),e.setTransition(0),e.setTranslate(F),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!N&&e.isBeginning||!L&&e.isEnd)&&e.updateSlidesClasses(),e.params.loop&&e.loopFix({direction:M.direction<0?"next":"prev",byMousewheel:!0}),e.params.freeMode.sticky){clearTimeout(a),a=void 0,c.length>=15&&c.shift();const P=c.length?c[c.length-1]:void 0,z=c[0];if(c.push(M),P&&(M.delta>P.delta||M.direction!==P.direction))c.splice(0);else if(c.length>=15&&M.time-z.time<500&&z.delta-M.delta>=1&&M.delta<=6){const te=v>0?.8:.2;l=M,c.splice(0),a=Ih(()=>{e.destroyed||!e.params||e.slideToClosest(e.params.speed,!0,void 0,te)},0)}a||(a=Ih(()=>{if(e.destroyed||!e.params)return;const te=.5;l=M,c.splice(0),e.slideToClosest(e.params.speed,!0,void 0,te)},500))}if(R||i("scroll",y),e.params.autoplay&&e.params.autoplay.disableOnInteraction&&e.autoplay.stop(),x.releaseOnEdges&&(F===e.minTranslate()||F===e.maxTranslate()))return!0}}return y.preventDefault?y.preventDefault():y.returnValue=!1,!1}function m(E){let y=e.el;e.params.mousewheel.eventsTarget!=="container"&&(y=document.querySelector(e.params.mousewheel.eventsTarget)),y[E]("mouseenter",u),y[E]("mouseleave",d),y[E]("wheel",g)}function f(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",g),!0):e.mousewheel.enabled?!1:(m("addEventListener"),e.mousewheel.enabled=!0,!0)}function _(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,g),!0):e.mousewheel.enabled?(m("removeEventListener"),e.mousewheel.enabled=!1,!0):!1}n("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&_(),e.params.mousewheel.enabled&&f()}),n("destroy",()=>{e.params.cssMode&&f(),e.mousewheel.enabled&&_()}),Object.assign(e.mousewheel,{enable:f,disable:_})}function kb(s,e,t,n){return s.params.createElements&&Object.keys(n).forEach(i=>{if(!t[i]&&t.auto===!0){let r=ii(s.el,`.${n[i]}`)[0];r||(r=is("div",n[i]),r.className=n[i],s.el.append(r)),t[i]=r,e[i]=r}}),t}function pY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null};function r(p){let g;return p&&typeof p=="string"&&e.isElement&&(g=e.el.querySelector(p)||e.hostEl.querySelector(p),g)?g:(p&&(typeof p=="string"&&(g=[...document.querySelectorAll(p)]),e.params.uniqueNavElements&&typeof p=="string"&&g&&g.length>1&&e.el.querySelectorAll(p).length===1?g=e.el.querySelector(p):g&&g.length===1&&(g=g[0])),p&&!g?p:g)}function a(p,g){const m=e.params.navigation;p=bt(p),p.forEach(f=>{f&&(f.classList[g?"add":"remove"](...m.disabledClass.split(" ")),f.tagName==="BUTTON"&&(f.disabled=g),e.params.watchOverflow&&e.enabled&&f.classList[e.isLocked?"add":"remove"](m.lockClass))})}function o(){const{nextEl:p,prevEl:g}=e.navigation;if(e.params.loop){a(g,!1),a(p,!1);return}a(g,e.isBeginning&&!e.params.rewind),a(p,e.isEnd&&!e.params.rewind)}function l(p){p.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),i("navigationPrev"))}function c(p){p.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),i("navigationNext"))}function h(){const p=e.params.navigation;if(e.params.navigation=kb(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(p.nextEl||p.prevEl))return;let g=r(p.nextEl),m=r(p.prevEl);Object.assign(e.navigation,{nextEl:g,prevEl:m}),g=bt(g),m=bt(m);const f=(_,E)=>{_&&_.addEventListener("click",E==="next"?c:l),!e.enabled&&_&&_.classList.add(...p.lockClass.split(" "))};g.forEach(_=>f(_,"next")),m.forEach(_=>f(_,"prev"))}function u(){let{nextEl:p,prevEl:g}=e.navigation;p=bt(p),g=bt(g);const m=(f,_)=>{f.removeEventListener("click",_==="next"?c:l),f.classList.remove(...e.params.navigation.disabledClass.split(" "))};p.forEach(f=>m(f,"next")),g.forEach(f=>m(f,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?A():(h(),o())}),n("toEdge fromEdge lock unlock",()=>{o()}),n("destroy",()=>{u()}),n("enable disable",()=>{let{nextEl:p,prevEl:g}=e.navigation;if(p=bt(p),g=bt(g),e.enabled){o();return}[...p,...g].filter(m=>!!m).forEach(m=>m.classList.add(e.params.navigation.lockClass))}),n("click",(p,g)=>{let{nextEl:m,prevEl:f}=e.navigation;m=bt(m),f=bt(f);const _=g.target;let E=f.includes(_)||m.includes(_);if(e.isElement&&!E){const y=g.path||g.composedPath&&g.composedPath();y&&(E=y.find(b=>m.includes(b)||f.includes(b)))}if(e.params.navigation.hideOnClick&&!E){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===_||e.pagination.el.contains(_)))return;let y;m.length?y=m[0].classList.contains(e.params.navigation.hiddenClass):f.length&&(y=f[0].classList.contains(e.params.navigation.hiddenClass)),i(y===!0?"navigationShow":"navigationHide"),[...m,...f].filter(b=>!!b).forEach(b=>b.classList.toggle(e.params.navigation.hiddenClass))}});const d=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),h(),o()},A=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(e.navigation,{enable:d,disable:A,update:o,init:h,destroy:u})}function oa(s){return s===void 0&&(s=""),`.${s.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function fY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r="swiper-pagination";t({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:_=>_,formatFractionTotal:_=>_,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};let a,o=0;function l(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function c(_,E){const{bulletActiveClass:y}=e.params.pagination;_&&(_=_[`${E==="prev"?"previous":"next"}ElementSibling`],_&&(_.classList.add(`${y}-${E}`),_=_[`${E==="prev"?"previous":"next"}ElementSibling`],_&&_.classList.add(`${y}-${E}-${E}`)))}function h(_,E,y){if(_=_%y,E=E%y,E===_+1)return"next";if(E===_-1)return"previous"}function u(_){const E=_.target.closest(oa(e.params.pagination.bulletClass));if(!E)return;_.preventDefault();const y=$d(E)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===y)return;const b=h(e.realIndex,y,e.slides.length);b==="next"?e.slideNext():b==="previous"?e.slidePrev():e.slideToLoop(y)}else e.slideTo(y)}function d(){const _=e.rtl,E=e.params.pagination;if(l())return;let y=e.pagination.el;y=bt(y);let b,x;const I=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,w=e.params.loop?Math.ceil(I/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(x=e.previousRealIndex||0,b=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(b=e.snapIndex,x=e.previousSnapIndex):(x=e.previousIndex||0,b=e.activeIndex||0),E.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const v=e.pagination.bullets;let C,S,T;if(E.dynamicBullets&&(a=s0(v[0],e.isHorizontal()?"width":"height"),y.forEach(M=>{M.style[e.isHorizontal()?"width":"height"]=`${a*(E.dynamicMainBullets+4)}px`}),E.dynamicMainBullets>1&&x!==void 0&&(o+=b-(x||0),o>E.dynamicMainBullets-1?o=E.dynamicMainBullets-1:o<0&&(o=0)),C=Math.max(b-o,0),S=C+(Math.min(v.length,E.dynamicMainBullets)-1),T=(S+C)/2),v.forEach(M=>{const R=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(F=>`${E.bulletActiveClass}${F}`)].map(F=>typeof F=="string"&&F.includes(" ")?F.split(" "):F).flat();M.classList.remove(...R)}),y.length>1)v.forEach(M=>{const R=$d(M);R===b?M.classList.add(...E.bulletActiveClass.split(" ")):e.isElement&&M.setAttribute("part","bullet"),E.dynamicBullets&&(R>=C&&R<=S&&M.classList.add(...`${E.bulletActiveClass}-main`.split(" ")),R===C&&c(M,"prev"),R===S&&c(M,"next"))});else{const M=v[b];if(M&&M.classList.add(...E.bulletActiveClass.split(" ")),e.isElement&&v.forEach((R,F)=>{R.setAttribute("part",F===b?"bullet-active":"bullet")}),E.dynamicBullets){const R=v[C],F=v[S];for(let N=C;N<=S;N+=1)v[N]&&v[N].classList.add(...`${E.bulletActiveClass}-main`.split(" "));c(R,"prev"),c(F,"next")}}if(E.dynamicBullets){const M=Math.min(v.length,E.dynamicMainBullets+4),R=(a*M-a)/2-T*a,F=_?"right":"left";v.forEach(N=>{N.style[e.isHorizontal()?F:"top"]=`${R}px`})}}y.forEach((v,C)=>{if(E.type==="fraction"&&(v.querySelectorAll(oa(E.currentClass)).forEach(S=>{S.textContent=E.formatFractionCurrent(b+1)}),v.querySelectorAll(oa(E.totalClass)).forEach(S=>{S.textContent=E.formatFractionTotal(w)})),E.type==="progressbar"){let S;E.progressbarOpposite?S=e.isHorizontal()?"vertical":"horizontal":S=e.isHorizontal()?"horizontal":"vertical";const T=(b+1)/w;let M=1,R=1;S==="horizontal"?M=T:R=T,v.querySelectorAll(oa(E.progressbarFillClass)).forEach(F=>{F.style.transform=`translate3d(0,0,0) scaleX(${M}) scaleY(${R})`,F.style.transitionDuration=`${e.params.speed}ms`})}E.type==="custom"&&E.renderCustom?(Is(v,E.renderCustom(e,b+1,w)),C===0&&i("paginationRender",v)):(C===0&&i("paginationRender",v),i("paginationUpdate",v)),e.params.watchOverflow&&e.enabled&&v.classList[e.isLocked?"add":"remove"](E.lockClass)})}function A(){const _=e.params.pagination;if(l())return;const E=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let y=e.pagination.el;y=bt(y);let b="";if(_.type==="bullets"){let x=e.params.loop?Math.ceil(E/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&x>E&&(x=E);for(let I=0;I<x;I+=1)_.renderBullet?b+=_.renderBullet.call(e,I,_.bulletClass):b+=`<${_.bulletElement} ${e.isElement?'part="bullet"':""} class="${_.bulletClass}"></${_.bulletElement}>`}_.type==="fraction"&&(_.renderFraction?b=_.renderFraction.call(e,_.currentClass,_.totalClass):b=`<span class="${_.currentClass}"></span> / <span class="${_.totalClass}"></span>`),_.type==="progressbar"&&(_.renderProgressbar?b=_.renderProgressbar.call(e,_.progressbarFillClass):b=`<span class="${_.progressbarFillClass}"></span>`),e.pagination.bullets=[],y.forEach(x=>{_.type!=="custom"&&Is(x,b||""),_.type==="bullets"&&e.pagination.bullets.push(...x.querySelectorAll(oa(_.bulletClass)))}),_.type!=="custom"&&i("paginationRender",y[0])}function p(){e.params.pagination=kb(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const _=e.params.pagination;if(!_.el)return;let E;typeof _.el=="string"&&e.isElement&&(E=e.el.querySelector(_.el)),!E&&typeof _.el=="string"&&(E=[...document.querySelectorAll(_.el)]),E||(E=_.el),!(!E||E.length===0)&&(e.params.uniqueNavElements&&typeof _.el=="string"&&Array.isArray(E)&&E.length>1&&(E=[...e.el.querySelectorAll(_.el)],E.length>1&&(E=E.find(y=>fl(y,".swiper")[0]===e.el))),Array.isArray(E)&&E.length===1&&(E=E[0]),Object.assign(e.pagination,{el:E}),E=bt(E),E.forEach(y=>{_.type==="bullets"&&_.clickable&&y.classList.add(...(_.clickableClass||"").split(" ")),y.classList.add(_.modifierClass+_.type),y.classList.add(e.isHorizontal()?_.horizontalClass:_.verticalClass),_.type==="bullets"&&_.dynamicBullets&&(y.classList.add(`${_.modifierClass}${_.type}-dynamic`),o=0,_.dynamicMainBullets<1&&(_.dynamicMainBullets=1)),_.type==="progressbar"&&_.progressbarOpposite&&y.classList.add(_.progressbarOppositeClass),_.clickable&&y.addEventListener("click",u),e.enabled||y.classList.add(_.lockClass)}))}function g(){const _=e.params.pagination;if(l())return;let E=e.pagination.el;E&&(E=bt(E),E.forEach(y=>{y.classList.remove(_.hiddenClass),y.classList.remove(_.modifierClass+_.type),y.classList.remove(e.isHorizontal()?_.horizontalClass:_.verticalClass),_.clickable&&(y.classList.remove(...(_.clickableClass||"").split(" ")),y.removeEventListener("click",u))})),e.pagination.bullets&&e.pagination.bullets.forEach(y=>y.classList.remove(..._.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const _=e.params.pagination;let{el:E}=e.pagination;E=bt(E),E.forEach(y=>{y.classList.remove(_.horizontalClass,_.verticalClass),y.classList.add(e.isHorizontal()?_.horizontalClass:_.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?f():(p(),A(),d())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&d()}),n("snapIndexChange",()=>{d()}),n("snapGridLengthChange",()=>{A(),d()}),n("destroy",()=>{g()}),n("enable disable",()=>{let{el:_}=e.pagination;_&&(_=bt(_),_.forEach(E=>E.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{d()}),n("click",(_,E)=>{const y=E.target,b=bt(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&b&&b.length>0&&!y.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&y===e.navigation.nextEl||e.navigation.prevEl&&y===e.navigation.prevEl))return;const x=b[0].classList.contains(e.params.pagination.hiddenClass);i(x===!0?"paginationShow":"paginationHide"),b.forEach(I=>I.classList.toggle(e.params.pagination.hiddenClass))}});const m=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:_}=e.pagination;_&&(_=bt(_),_.forEach(E=>E.classList.remove(e.params.pagination.paginationDisabledClass))),p(),A(),d()},f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:_}=e.pagination;_&&(_=bt(_),_.forEach(E=>E.classList.add(e.params.pagination.paginationDisabledClass))),g()};Object.assign(e.pagination,{enable:m,disable:f,render:A,update:d,init:p,destroy:g})}function gY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=Jn();let a=!1,o=null,l=null,c,h,u,d;t({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"}}),e.scrollbar={el:null,dragEl:null};function A(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:T,rtlTranslate:M}=e,{dragEl:R,el:F}=T,N=e.params.scrollbar,L=e.params.loop?e.progressLoop:e.progress;let P=h,z=(u-h)*L;M?(z=-z,z>0?(P=h-z,z=0):-z+h>u&&(P=u+z)):z<0?(P=h+z,z=0):z+h>u&&(P=u-z),e.isHorizontal()?(R.style.transform=`translate3d(${z}px, 0, 0)`,R.style.width=`${P}px`):(R.style.transform=`translate3d(0px, ${z}px, 0)`,R.style.height=`${P}px`),N.hide&&(clearTimeout(o),F.style.opacity=1,o=setTimeout(()=>{F.style.opacity=0,F.style.transitionDuration="400ms"},1e3))}function p(T){!e.params.scrollbar.el||!e.scrollbar.el||(e.scrollbar.dragEl.style.transitionDuration=`${T}ms`)}function g(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:T}=e,{dragEl:M,el:R}=T;M.style.width="",M.style.height="",u=e.isHorizontal()?R.offsetWidth:R.offsetHeight,d=e.size/(e.virtualSize+e.params.slidesOffsetBefore-(e.params.centeredSlides?e.snapGrid[0]:0)),e.params.scrollbar.dragSize==="auto"?h=u*d:h=parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?M.style.width=`${h}px`:M.style.height=`${h}px`,d>=1?R.style.display="none":R.style.display="",e.params.scrollbar.hide&&(R.style.opacity=0),e.params.watchOverflow&&e.enabled&&T.el.classList[e.isLocked?"add":"remove"](e.params.scrollbar.lockClass)}function m(T){return e.isHorizontal()?T.clientX:T.clientY}function f(T){const{scrollbar:M,rtlTranslate:R}=e,{el:F}=M;let N;N=(m(T)-qf(F)[e.isHorizontal()?"left":"top"]-(c!==null?c:h/2))/(u-h),N=Math.max(Math.min(N,1),0),R&&(N=1-N);const L=e.minTranslate()+(e.maxTranslate()-e.minTranslate())*N;e.updateProgress(L),e.setTranslate(L),e.updateActiveIndex(),e.updateSlidesClasses()}function _(T){const M=e.params.scrollbar,{scrollbar:R,wrapperEl:F}=e,{el:N,dragEl:L}=R;a=!0,c=T.target===L?m(T)-T.target.getBoundingClientRect()[e.isHorizontal()?"left":"top"]:null,T.preventDefault(),T.stopPropagation(),F.style.transitionDuration="100ms",L.style.transitionDuration="100ms",f(T),clearTimeout(l),N.style.transitionDuration="0ms",M.hide&&(N.style.opacity=1),e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="none"),i("scrollbarDragStart",T)}function E(T){const{scrollbar:M,wrapperEl:R}=e,{el:F,dragEl:N}=M;a&&(T.preventDefault&&T.cancelable?T.preventDefault():T.returnValue=!1,f(T),R.style.transitionDuration="0ms",F.style.transitionDuration="0ms",N.style.transitionDuration="0ms",i("scrollbarDragMove",T))}function y(T){const M=e.params.scrollbar,{scrollbar:R,wrapperEl:F}=e,{el:N}=R;a&&(a=!1,e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="",F.style.transitionDuration=""),M.hide&&(clearTimeout(l),l=Ih(()=>{N.style.opacity=0,N.style.transitionDuration="400ms"},1e3)),i("scrollbarDragEnd",T),M.snapOnRelease&&e.slideToClosest())}function b(T){const{scrollbar:M,params:R}=e,F=M.el;if(!F)return;const N=F,L=R.passiveListeners?{passive:!1,capture:!1}:!1,P=R.passiveListeners?{passive:!0,capture:!1}:!1;if(!N)return;const z=T==="on"?"addEventListener":"removeEventListener";N[z]("pointerdown",_,L),r[z]("pointermove",E,L),r[z]("pointerup",y,P)}function x(){!e.params.scrollbar.el||!e.scrollbar.el||b("on")}function I(){!e.params.scrollbar.el||!e.scrollbar.el||b("off")}function w(){const{scrollbar:T,el:M}=e;e.params.scrollbar=kb(e,e.originalParams.scrollbar,e.params.scrollbar,{el:"swiper-scrollbar"});const R=e.params.scrollbar;if(!R.el)return;let F;if(typeof R.el=="string"&&e.isElement&&(F=e.el.querySelector(R.el)),!F&&typeof R.el=="string"){if(F=r.querySelectorAll(R.el),!F.length)return}else F||(F=R.el);e.params.uniqueNavElements&&typeof R.el=="string"&&F.length>1&&M.querySelectorAll(R.el).length===1&&(F=M.querySelector(R.el)),F.length>0&&(F=F[0]),F.classList.add(e.isHorizontal()?R.horizontalClass:R.verticalClass);let N;F&&(N=F.querySelector(oa(e.params.scrollbar.dragClass)),N||(N=is("div",e.params.scrollbar.dragClass),F.append(N))),Object.assign(T,{el:F,dragEl:N}),R.draggable&&x(),F&&F.classList[e.enabled?"remove":"add"](...Ua(e.params.scrollbar.lockClass))}function v(){const T=e.params.scrollbar,M=e.scrollbar.el;M&&M.classList.remove(...Ua(e.isHorizontal()?T.horizontalClass:T.verticalClass)),I()}n("changeDirection",()=>{if(!e.scrollbar||!e.scrollbar.el)return;const T=e.params.scrollbar;let{el:M}=e.scrollbar;M=bt(M),M.forEach(R=>{R.classList.remove(T.horizontalClass,T.verticalClass),R.classList.add(e.isHorizontal()?T.horizontalClass:T.verticalClass)})}),n("init",()=>{e.params.scrollbar.enabled===!1?S():(w(),g(),A())}),n("update resize observerUpdate lock unlock changeDirection",()=>{g()}),n("setTranslate",()=>{A()}),n("setTransition",(T,M)=>{p(M)}),n("enable disable",()=>{const{el:T}=e.scrollbar;T&&T.classList[e.enabled?"remove":"add"](...Ua(e.params.scrollbar.lockClass))}),n("destroy",()=>{v()});const C=()=>{e.el.classList.remove(...Ua(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.remove(...Ua(e.params.scrollbar.scrollbarDisabledClass)),w(),g(),A()},S=()=>{e.el.classList.add(...Ua(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.add(...Ua(e.params.scrollbar.scrollbarDisabledClass)),v()};Object.assign(e.scrollbar,{enable:C,disable:S,updateSize:g,setTranslate:A,init:w,destroy:v})}function mY(s){let{swiper:e,extendParams:t,on:n}=s;t({parallax:{enabled:!1}});const i="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",r=(l,c)=>{const{rtl:h}=e,u=h?-1:1,d=l.getAttribute("data-swiper-parallax")||"0";let A=l.getAttribute("data-swiper-parallax-x"),p=l.getAttribute("data-swiper-parallax-y");const g=l.getAttribute("data-swiper-parallax-scale"),m=l.getAttribute("data-swiper-parallax-opacity"),f=l.getAttribute("data-swiper-parallax-rotate");if(A||p?(A=A||"0",p=p||"0"):e.isHorizontal()?(A=d,p="0"):(p=d,A="0"),A.indexOf("%")>=0?A=`${parseInt(A,10)*c*u}%`:A=`${A*c*u}px`,p.indexOf("%")>=0?p=`${parseInt(p,10)*c}%`:p=`${p*c}px`,typeof m<"u"&&m!==null){const E=m-(m-1)*(1-Math.abs(c));l.style.opacity=E}let _=`translate3d(${A}, ${p}, 0px)`;if(typeof g<"u"&&g!==null){const E=g-(g-1)*(1-Math.abs(c));_+=` scale(${E})`}if(f&&typeof f<"u"&&f!==null){const E=f*c*-1;_+=` rotate(${E}deg)`}l.style.transform=_},a=()=>{const{el:l,slides:c,progress:h,snapGrid:u,isElement:d}=e,A=ii(l,i);e.isElement&&A.push(...ii(e.hostEl,i)),A.forEach(p=>{r(p,h)}),c.forEach((p,g)=>{let m=p.progress;e.params.slidesPerGroup>1&&e.params.slidesPerView!=="auto"&&(m+=Math.ceil(g/2)-h*(u.length-1)),m=Math.min(Math.max(m,-1),1),p.querySelectorAll(`${i}, [data-swiper-parallax-rotate]`).forEach(f=>{r(f,m)})})},o=function(l){l===void 0&&(l=e.params.speed);const{el:c,hostEl:h}=e,u=[...c.querySelectorAll(i)];e.isElement&&u.push(...h.querySelectorAll(i)),u.forEach(d=>{let A=parseInt(d.getAttribute("data-swiper-parallax-duration"),10)||l;l===0&&(A=0),d.style.transitionDuration=`${A}ms`})};n("beforeInit",()=>{e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)}),n("init",()=>{e.params.parallax.enabled&&a()}),n("setTranslate",()=>{e.params.parallax.enabled&&a()}),n("setTransition",(l,c)=>{e.params.parallax.enabled&&o(c)})}function EY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=un();t({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),e.zoom={enabled:!1};let a=1,o=!1,l=!1,c={x:0,y:0};const h=-3;let u,d;const A=[],p={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},g={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:{}},m={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let f=1;Object.defineProperty(e.zoom,"scale",{get(){return f},set(G){if(f!==G){const Y=p.imageEl,$=p.slideEl;i("zoomChange",G,Y,$)}f=G}});function _(){if(A.length<2)return 1;const G=A[0].pageX,Y=A[0].pageY,$=A[1].pageX,de=A[1].pageY;return Math.sqrt(($-G)**2+(de-Y)**2)}function E(){const G=e.params.zoom,Y=p.imageWrapEl.getAttribute("data-swiper-zoom")||G.maxRatio;if(G.limitToOriginalSize&&p.imageEl&&p.imageEl.naturalWidth){const $=p.imageEl.naturalWidth/p.imageEl.offsetWidth;return Math.min($,Y)}return Y}function y(){if(A.length<2)return{x:null,y:null};const G=p.imageEl.getBoundingClientRect();return[(A[0].pageX+(A[1].pageX-A[0].pageX)/2-G.x-r.scrollX)/a,(A[0].pageY+(A[1].pageY-A[0].pageY)/2-G.y-r.scrollY)/a]}function b(){return e.isElement?"swiper-slide":`.${e.params.slideClass}`}function x(G){const Y=b();return!!(G.target.matches(Y)||e.slides.filter($=>$.contains(G.target)).length>0)}function I(G){const Y=`.${e.params.zoom.containerClass}`;return!!(G.target.matches(Y)||[...e.hostEl.querySelectorAll(Y)].filter($=>$.contains(G.target)).length>0)}function w(G){if(G.pointerType==="mouse"&&A.splice(0,A.length),!x(G))return;const Y=e.params.zoom;if(u=!1,d=!1,A.push(G),!(A.length<2)){if(u=!0,p.scaleStart=_(),!p.slideEl){p.slideEl=G.target.closest(`.${e.params.slideClass}, swiper-slide`),p.slideEl||(p.slideEl=e.slides[e.activeIndex]);let $=p.slideEl.querySelector(`.${Y.containerClass}`);if($&&($=$.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=$,$?p.imageWrapEl=fl(p.imageEl,`.${Y.containerClass}`)[0]:p.imageWrapEl=void 0,!p.imageWrapEl){p.imageEl=void 0;return}p.maxRatio=E()}if(p.imageEl){const[$,de]=y();p.originX=$,p.originY=de,p.imageEl.style.transitionDuration="0ms"}o=!0}}function v(G){if(!x(G))return;const Y=e.params.zoom,$=e.zoom,de=A.findIndex(_e=>_e.pointerId===G.pointerId);de>=0&&(A[de]=G),!(A.length<2)&&(d=!0,p.scaleMove=_(),p.imageEl&&($.scale=p.scaleMove/p.scaleStart*a,$.scale>p.maxRatio&&($.scale=p.maxRatio-1+($.scale-p.maxRatio+1)**.5),$.scale<Y.minRatio&&($.scale=Y.minRatio+1-(Y.minRatio-$.scale+1)**.5),p.imageEl.style.transform=`translate3d(0,0,0) scale(${$.scale})`))}function C(G){if(!x(G)||G.pointerType==="mouse"&&G.type==="pointerout")return;const Y=e.params.zoom,$=e.zoom,de=A.findIndex(_e=>_e.pointerId===G.pointerId);de>=0&&A.splice(de,1),!(!u||!d)&&(u=!1,d=!1,p.imageEl&&($.scale=Math.max(Math.min($.scale,p.maxRatio),Y.minRatio),p.imageEl.style.transitionDuration=`${e.params.speed}ms`,p.imageEl.style.transform=`translate3d(0,0,0) scale(${$.scale})`,a=$.scale,o=!1,$.scale>1&&p.slideEl?p.slideEl.classList.add(`${Y.zoomedSlideClass}`):$.scale<=1&&p.slideEl&&p.slideEl.classList.remove(`${Y.zoomedSlideClass}`),$.scale===1&&(p.originX=0,p.originY=0,p.slideEl=void 0)))}let S;function T(){e.touchEventsData.preventTouchMoveFromPointerMove=!1}function M(){clearTimeout(S),e.touchEventsData.preventTouchMoveFromPointerMove=!0,S=setTimeout(()=>{e.destroyed||T()})}function R(G){const Y=e.device;if(!p.imageEl||g.isTouched)return;Y.android&&G.cancelable&&G.preventDefault(),g.isTouched=!0;const $=A.length>0?A[0]:G;g.touchesStart.x=$.pageX,g.touchesStart.y=$.pageY}function F(G){const $=G.pointerType==="mouse"&&e.params.zoom.panOnMouseMove;if(!x(G)||!I(G))return;const de=e.zoom;if(!p.imageEl)return;if(!g.isTouched||!p.slideEl){$&&P(G);return}if($){P(G);return}g.isMoved||(g.width=p.imageEl.offsetWidth||p.imageEl.clientWidth,g.height=p.imageEl.offsetHeight||p.imageEl.clientHeight,g.startX=i0(p.imageWrapEl,"x")||0,g.startY=i0(p.imageWrapEl,"y")||0,p.slideWidth=p.slideEl.offsetWidth,p.slideHeight=p.slideEl.offsetHeight,p.imageWrapEl.style.transitionDuration="0ms");const _e=g.width*de.scale,ve=g.height*de.scale;if(g.minX=Math.min(p.slideWidth/2-_e/2,0),g.maxX=-g.minX,g.minY=Math.min(p.slideHeight/2-ve/2,0),g.maxY=-g.minY,g.touchesCurrent.x=A.length>0?A[0].pageX:G.pageX,g.touchesCurrent.y=A.length>0?A[0].pageY:G.pageY,Math.max(Math.abs(g.touchesCurrent.x-g.touchesStart.x),Math.abs(g.touchesCurrent.y-g.touchesStart.y))>5&&(e.allowClick=!1),!g.isMoved&&!o){if(e.isHorizontal()&&(Math.floor(g.minX)===Math.floor(g.startX)&&g.touchesCurrent.x<g.touchesStart.x||Math.floor(g.maxX)===Math.floor(g.startX)&&g.touchesCurrent.x>g.touchesStart.x)){g.isTouched=!1,T();return}if(!e.isHorizontal()&&(Math.floor(g.minY)===Math.floor(g.startY)&&g.touchesCurrent.y<g.touchesStart.y||Math.floor(g.maxY)===Math.floor(g.startY)&&g.touchesCurrent.y>g.touchesStart.y)){g.isTouched=!1,T();return}}G.cancelable&&G.preventDefault(),G.stopPropagation(),M(),g.isMoved=!0;const Oe=(de.scale-a)/(p.maxRatio-e.params.zoom.minRatio),{originX:Ye,originY:O}=p;g.currentX=g.touchesCurrent.x-g.touchesStart.x+g.startX+Oe*(g.width-Ye*2),g.currentY=g.touchesCurrent.y-g.touchesStart.y+g.startY+Oe*(g.height-O*2),g.currentX<g.minX&&(g.currentX=g.minX+1-(g.minX-g.currentX+1)**.8),g.currentX>g.maxX&&(g.currentX=g.maxX-1+(g.currentX-g.maxX+1)**.8),g.currentY<g.minY&&(g.currentY=g.minY+1-(g.minY-g.currentY+1)**.8),g.currentY>g.maxY&&(g.currentY=g.maxY-1+(g.currentY-g.maxY+1)**.8),m.prevPositionX||(m.prevPositionX=g.touchesCurrent.x),m.prevPositionY||(m.prevPositionY=g.touchesCurrent.y),m.prevTime||(m.prevTime=Date.now()),m.x=(g.touchesCurrent.x-m.prevPositionX)/(Date.now()-m.prevTime)/2,m.y=(g.touchesCurrent.y-m.prevPositionY)/(Date.now()-m.prevTime)/2,Math.abs(g.touchesCurrent.x-m.prevPositionX)<2&&(m.x=0),Math.abs(g.touchesCurrent.y-m.prevPositionY)<2&&(m.y=0),m.prevPositionX=g.touchesCurrent.x,m.prevPositionY=g.touchesCurrent.y,m.prevTime=Date.now(),p.imageWrapEl.style.transform=`translate3d(${g.currentX}px, ${g.currentY}px,0)`}function N(){const G=e.zoom;if(A.length=0,!p.imageEl)return;if(!g.isTouched||!g.isMoved){g.isTouched=!1,g.isMoved=!1;return}g.isTouched=!1,g.isMoved=!1;let Y=300,$=300;const de=m.x*Y,_e=g.currentX+de,ve=m.y*$,ke=g.currentY+ve;m.x!==0&&(Y=Math.abs((_e-g.currentX)/m.x)),m.y!==0&&($=Math.abs((ke-g.currentY)/m.y));const Oe=Math.max(Y,$);g.currentX=_e,g.currentY=ke;const Ye=g.width*G.scale,O=g.height*G.scale;g.minX=Math.min(p.slideWidth/2-Ye/2,0),g.maxX=-g.minX,g.minY=Math.min(p.slideHeight/2-O/2,0),g.maxY=-g.minY,g.currentX=Math.max(Math.min(g.currentX,g.maxX),g.minX),g.currentY=Math.max(Math.min(g.currentY,g.maxY),g.minY),p.imageWrapEl.style.transitionDuration=`${Oe}ms`,p.imageWrapEl.style.transform=`translate3d(${g.currentX}px, ${g.currentY}px,0)`}function L(){const G=e.zoom;p.slideEl&&e.activeIndex!==e.slides.indexOf(p.slideEl)&&(p.imageEl&&(p.imageEl.style.transform="translate3d(0,0,0) scale(1)"),p.imageWrapEl&&(p.imageWrapEl.style.transform="translate3d(0,0,0)"),p.slideEl.classList.remove(`${e.params.zoom.zoomedSlideClass}`),G.scale=1,a=1,p.slideEl=void 0,p.imageEl=void 0,p.imageWrapEl=void 0,p.originX=0,p.originY=0)}function P(G){if(a<=1||!p.imageWrapEl||!x(G)||!I(G))return;const Y=r.getComputedStyle(p.imageWrapEl).transform,$=new r.DOMMatrix(Y);if(!l){l=!0,c.x=G.clientX,c.y=G.clientY,g.startX=$.e,g.startY=$.f,g.width=p.imageEl.offsetWidth||p.imageEl.clientWidth,g.height=p.imageEl.offsetHeight||p.imageEl.clientHeight,p.slideWidth=p.slideEl.offsetWidth,p.slideHeight=p.slideEl.offsetHeight;return}const de=(G.clientX-c.x)*h,_e=(G.clientY-c.y)*h,ve=g.width*a,ke=g.height*a,Oe=p.slideWidth,Ye=p.slideHeight,O=Math.min(Oe/2-ve/2,0),mt=-O,qe=Math.min(Ye/2-ke/2,0),Xe=-qe,Te=Math.max(Math.min(g.startX+de,mt),O),Ke=Math.max(Math.min(g.startY+_e,Xe),qe);p.imageWrapEl.style.transitionDuration="0ms",p.imageWrapEl.style.transform=`translate3d(${Te}px, ${Ke}px, 0)`,c.x=G.clientX,c.y=G.clientY,g.startX=Te,g.startY=Ke,g.currentX=Te,g.currentY=Ke}function z(G){const Y=e.zoom,$=e.params.zoom;if(!p.slideEl){G&&G.target&&(p.slideEl=G.target.closest(`.${e.params.slideClass}, swiper-slide`)),p.slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?p.slideEl=ii(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:p.slideEl=e.slides[e.activeIndex]);let we=p.slideEl.querySelector(`.${$.containerClass}`);we&&(we=we.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=we,we?p.imageWrapEl=fl(p.imageEl,`.${$.containerClass}`)[0]:p.imageWrapEl=void 0}if(!p.imageEl||!p.imageWrapEl)return;e.params.cssMode&&(e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.touchAction="none"),p.slideEl.classList.add(`${$.zoomedSlideClass}`);let de,_e,ve,ke,Oe,Ye,O,mt,qe,Xe,Te,Ke,ye,k,D,K,oe,le;typeof g.touchesStart.x>"u"&&G?(de=G.pageX,_e=G.pageY):(de=g.touchesStart.x,_e=g.touchesStart.y);const se=a,xe=typeof G=="number"?G:null;a===1&&xe&&(de=void 0,_e=void 0,g.touchesStart.x=void 0,g.touchesStart.y=void 0);const be=E();Y.scale=xe||be,a=xe||be,G&&!(a===1&&xe)?(oe=p.slideEl.offsetWidth,le=p.slideEl.offsetHeight,ve=qf(p.slideEl).left+r.scrollX,ke=qf(p.slideEl).top+r.scrollY,Oe=ve+oe/2-de,Ye=ke+le/2-_e,qe=p.imageEl.offsetWidth||p.imageEl.clientWidth,Xe=p.imageEl.offsetHeight||p.imageEl.clientHeight,Te=qe*Y.scale,Ke=Xe*Y.scale,ye=Math.min(oe/2-Te/2,0),k=Math.min(le/2-Ke/2,0),D=-ye,K=-k,se>0&&xe&&typeof g.currentX=="number"&&typeof g.currentY=="number"?(O=g.currentX*Y.scale/se,mt=g.currentY*Y.scale/se):(O=Oe*Y.scale,mt=Ye*Y.scale),O<ye&&(O=ye),O>D&&(O=D),mt<k&&(mt=k),mt>K&&(mt=K)):(O=0,mt=0),xe&&Y.scale===1&&(p.originX=0,p.originY=0),g.currentX=O,g.currentY=mt,p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform=`translate3d(${O}px, ${mt}px,0)`,p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform=`translate3d(0,0,0) scale(${Y.scale})`}function te(){const G=e.zoom,Y=e.params.zoom;if(!p.slideEl){e.params.virtual&&e.params.virtual.enabled&&e.virtual?p.slideEl=ii(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:p.slideEl=e.slides[e.activeIndex];let $=p.slideEl.querySelector(`.${Y.containerClass}`);$&&($=$.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=$,$?p.imageWrapEl=fl(p.imageEl,`.${Y.containerClass}`)[0]:p.imageWrapEl=void 0}!p.imageEl||!p.imageWrapEl||(e.params.cssMode&&(e.wrapperEl.style.overflow="",e.wrapperEl.style.touchAction=""),G.scale=1,a=1,g.currentX=void 0,g.currentY=void 0,g.touchesStart.x=void 0,g.touchesStart.y=void 0,p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform="translate3d(0,0,0)",p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform="translate3d(0,0,0) scale(1)",p.slideEl.classList.remove(`${Y.zoomedSlideClass}`),p.slideEl=void 0,p.originX=0,p.originY=0,e.params.zoom.panOnMouseMove&&(c={x:0,y:0},l&&(l=!1,g.startX=0,g.startY=0)))}function ne(G){const Y=e.zoom;Y.scale&&Y.scale!==1?te():z(G)}function ue(){const G=e.params.passiveListeners?{passive:!0,capture:!1}:!1,Y=e.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:G,activeListenerWithCapture:Y}}function pe(){const G=e.zoom;if(G.enabled)return;G.enabled=!0;const{passiveListener:Y,activeListenerWithCapture:$}=ue();e.wrapperEl.addEventListener("pointerdown",w,Y),e.wrapperEl.addEventListener("pointermove",v,$),["pointerup","pointercancel","pointerout"].forEach(de=>{e.wrapperEl.addEventListener(de,C,Y)}),e.wrapperEl.addEventListener("pointermove",F,$)}function Z(){const G=e.zoom;if(!G.enabled)return;G.enabled=!1;const{passiveListener:Y,activeListenerWithCapture:$}=ue();e.wrapperEl.removeEventListener("pointerdown",w,Y),e.wrapperEl.removeEventListener("pointermove",v,$),["pointerup","pointercancel","pointerout"].forEach(de=>{e.wrapperEl.removeEventListener(de,C,Y)}),e.wrapperEl.removeEventListener("pointermove",F,$)}n("init",()=>{e.params.zoom.enabled&&pe()}),n("destroy",()=>{Z()}),n("touchStart",(G,Y)=>{e.zoom.enabled&&R(Y)}),n("touchEnd",(G,Y)=>{e.zoom.enabled&&N()}),n("doubleTap",(G,Y)=>{!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&ne(Y)}),n("transitionEnd",()=>{e.zoom.enabled&&e.params.zoom.enabled&&L()}),n("slideChange",()=>{e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&L()}),Object.assign(e.zoom,{enable:pe,disable:Z,in:z,out:te,toggle:ne})}function yY(s){let{swiper:e,extendParams:t,on:n}=s;t({controller:{control:void 0,inverse:!1,by:"slide"}}),e.controller={control:void 0};function i(c,h){const u=(function(){let g,m,f;return(_,E)=>{for(m=-1,g=_.length;g-m>1;)f=g+m>>1,_[f]<=E?m=f:g=f;return g}})();this.x=c,this.y=h,this.lastIndex=c.length-1;let d,A;return this.interpolate=function(g){return g?(A=u(this.x,g),d=A-1,(g-this.x[d])*(this.y[A]-this.y[d])/(this.x[A]-this.x[d])+this.y[d]):0},this}function r(c){e.controller.spline=e.params.loop?new i(e.slidesGrid,c.slidesGrid):new i(e.snapGrid,c.snapGrid)}function a(c,h){const u=e.controller.control;let d,A;const p=e.constructor;function g(m){if(m.destroyed)return;const f=e.rtlTranslate?-e.translate:e.translate;e.params.controller.by==="slide"&&(r(m),A=-e.controller.spline.interpolate(-f)),(!A||e.params.controller.by==="container")&&(d=(m.maxTranslate()-m.minTranslate())/(e.maxTranslate()-e.minTranslate()),(Number.isNaN(d)||!Number.isFinite(d))&&(d=1),A=(f-e.minTranslate())*d+m.minTranslate()),e.params.controller.inverse&&(A=m.maxTranslate()-A),m.updateProgress(A),m.setTranslate(A,e),m.updateActiveIndex(),m.updateSlidesClasses()}if(Array.isArray(u))for(let m=0;m<u.length;m+=1)u[m]!==h&&u[m]instanceof p&&g(u[m]);else u instanceof p&&h!==u&&g(u)}function o(c,h){const u=e.constructor,d=e.controller.control;let A;function p(g){g.destroyed||(g.setTransition(c,e),c!==0&&(g.transitionStart(),g.params.autoHeight&&Ih(()=>{g.updateAutoHeight()}),_d(g.wrapperEl,()=>{d&&g.transitionEnd()})))}if(Array.isArray(d))for(A=0;A<d.length;A+=1)d[A]!==h&&d[A]instanceof u&&p(d[A]);else d instanceof u&&h!==d&&p(d)}function l(){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)}n("beforeInit",()=>{if(typeof window<"u"&&(typeof e.params.controller.control=="string"||e.params.controller.control instanceof HTMLElement)){(typeof e.params.controller.control=="string"?[...document.querySelectorAll(e.params.controller.control)]:[e.params.controller.control]).forEach(h=>{if(e.controller.control||(e.controller.control=[]),h&&h.swiper)e.controller.control.push(h.swiper);else if(h){const u=`${e.params.eventsPrefix}init`,d=A=>{e.controller.control.push(A.detail[0]),e.update(),h.removeEventListener(u,d)};h.addEventListener(u,d)}});return}e.controller.control=e.params.controller.control}),n("update",()=>{l()}),n("resize",()=>{l()}),n("observerUpdate",()=>{l()}),n("setTranslate",(c,h,u)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTranslate(h,u)}),n("setTransition",(c,h,u)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTransition(h,u)}),Object.assign(e.controller,{setTranslate:a,setTransition:o})}function _Y(s){let{swiper:e,extendParams:t,on:n}=s;t({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}}),e.a11y={clicked:!1};let i=null,r,a,o=new Date().getTime();function l(L){const P=i;P.length!==0&&Is(P,L)}function c(L){const P=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(L).replace(/x/g,P)}function h(L){L=bt(L),L.forEach(P=>{P.setAttribute("tabIndex","0")})}function u(L){L=bt(L),L.forEach(P=>{P.setAttribute("tabIndex","-1")})}function d(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("role",P)})}function A(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-roledescription",P)})}function p(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-controls",P)})}function g(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-label",P)})}function m(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("id",P)})}function f(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-live",P)})}function _(L){L=bt(L),L.forEach(P=>{P.setAttribute("aria-disabled",!0)})}function E(L){L=bt(L),L.forEach(P=>{P.setAttribute("aria-disabled",!1)})}function y(L){if(L.keyCode!==13&&L.keyCode!==32)return;const P=e.params.a11y,z=L.target;if(!(e.pagination&&e.pagination.el&&(z===e.pagination.el||e.pagination.el.contains(L.target))&&!L.target.matches(oa(e.params.pagination.bulletClass)))){if(e.navigation&&e.navigation.prevEl&&e.navigation.nextEl){const te=bt(e.navigation.prevEl);bt(e.navigation.nextEl).includes(z)&&(e.isEnd&&!e.params.loop||e.slideNext(),e.isEnd?l(P.lastSlideMessage):l(P.nextSlideMessage)),te.includes(z)&&(e.isBeginning&&!e.params.loop||e.slidePrev(),e.isBeginning?l(P.firstSlideMessage):l(P.prevSlideMessage))}e.pagination&&z.matches(oa(e.params.pagination.bulletClass))&&z.click()}}function b(){if(e.params.loop||e.params.rewind||!e.navigation)return;const{nextEl:L,prevEl:P}=e.navigation;P&&(e.isBeginning?(_(P),u(P)):(E(P),h(P))),L&&(e.isEnd?(_(L),u(L)):(E(L),h(L)))}function x(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function I(){return x()&&e.params.pagination.clickable}function w(){const L=e.params.a11y;x()&&e.pagination.bullets.forEach(P=>{e.params.pagination.clickable&&(h(P),e.params.pagination.renderBullet||(d(P,"button"),g(P,L.paginationBulletMessage.replace(/\{\{index\}\}/,$d(P)+1)))),P.matches(oa(e.params.pagination.bulletActiveClass))?P.setAttribute("aria-current","true"):P.removeAttribute("aria-current")})}const v=(L,P,z)=>{h(L),L.tagName!=="BUTTON"&&(d(L,"button"),L.addEventListener("keydown",y)),g(L,z),p(L,P)},C=L=>{a&&a!==L.target&&!a.contains(L.target)&&(r=!0),e.a11y.clicked=!0},S=()=>{r=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.destroyed||(e.a11y.clicked=!1)})})},T=L=>{o=new Date().getTime()},M=L=>{if(e.a11y.clicked||!e.params.a11y.scrollOnFocus||new Date().getTime()-o<100)return;const P=L.target.closest(`.${e.params.slideClass}, swiper-slide`);if(!P||!e.slides.includes(P))return;a=P;const z=e.slides.indexOf(P)===e.activeIndex,te=e.params.watchSlidesProgress&&e.visibleSlides&&e.visibleSlides.includes(P);z||te||L.sourceCapabilities&&L.sourceCapabilities.firesTouchEvents||(e.isHorizontal()?e.el.scrollLeft=0:e.el.scrollTop=0,requestAnimationFrame(()=>{r||(e.params.loop?e.slideToLoop(e.getSlideIndexWhenGrid(parseInt(P.getAttribute("data-swiper-slide-index"))),0):e.slideTo(e.getSlideIndexWhenGrid(e.slides.indexOf(P)),0),r=!1)}))},R=()=>{const L=e.params.a11y;L.itemRoleDescriptionMessage&&A(e.slides,L.itemRoleDescriptionMessage),L.slideRole&&d(e.slides,L.slideRole);const P=e.slides.length;L.slideLabelMessage&&e.slides.forEach((z,te)=>{const ne=e.params.loop?parseInt(z.getAttribute("data-swiper-slide-index"),10):te,ue=L.slideLabelMessage.replace(/\{\{index\}\}/,ne+1).replace(/\{\{slidesLength\}\}/,P);g(z,ue)})},F=()=>{const L=e.params.a11y;e.el.append(i);const P=e.el;L.containerRoleDescriptionMessage&&A(P,L.containerRoleDescriptionMessage),L.containerMessage&&g(P,L.containerMessage),L.containerRole&&d(P,L.containerRole);const z=e.wrapperEl,te=L.id||z.getAttribute("id")||`swiper-wrapper-${c(16)}`,ne=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";m(z,te),f(z,ne),R();let{nextEl:ue,prevEl:pe}=e.navigation?e.navigation:{};ue=bt(ue),pe=bt(pe),ue&&ue.forEach(G=>v(G,te,L.nextSlideMessage)),pe&&pe.forEach(G=>v(G,te,L.prevSlideMessage)),I()&&bt(e.pagination.el).forEach(Y=>{Y.addEventListener("keydown",y)}),Jn().addEventListener("visibilitychange",T),e.el.addEventListener("focus",M,!0),e.el.addEventListener("focus",M,!0),e.el.addEventListener("pointerdown",C,!0),e.el.addEventListener("pointerup",S,!0)};function N(){i&&i.remove();let{nextEl:L,prevEl:P}=e.navigation?e.navigation:{};L=bt(L),P=bt(P),L&&L.forEach(te=>te.removeEventListener("keydown",y)),P&&P.forEach(te=>te.removeEventListener("keydown",y)),I()&&bt(e.pagination.el).forEach(ne=>{ne.removeEventListener("keydown",y)}),Jn().removeEventListener("visibilitychange",T),e.el&&typeof e.el!="string"&&(e.el.removeEventListener("focus",M,!0),e.el.removeEventListener("pointerdown",C,!0),e.el.removeEventListener("pointerup",S,!0))}n("beforeInit",()=>{i=is("span",e.params.a11y.notificationClass),i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true")}),n("afterInit",()=>{e.params.a11y.enabled&&F()}),n("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{e.params.a11y.enabled&&R()}),n("fromEdge toEdge afterInit lock unlock",()=>{e.params.a11y.enabled&&b()}),n("paginationUpdate",()=>{e.params.a11y.enabled&&w()}),n("destroy",()=>{e.params.a11y.enabled&&N()})}function bY(s){let{swiper:e,extendParams:t,on:n}=s;t({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,r={};const a=A=>A.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=A=>{const p=un();let g;A?g=new URL(A):g=p.location;const m=g.pathname.slice(1).split("/").filter(y=>y!==""),f=m.length,_=m[f-2],E=m[f-1];return{key:_,value:E}},l=(A,p)=>{const g=un();if(!i||!e.params.history.enabled)return;let m;e.params.url?m=new URL(e.params.url):m=g.location;const f=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${p}"]`):e.slides[p];let _=a(f.getAttribute("data-history"));if(e.params.history.root.length>0){let y=e.params.history.root;y[y.length-1]==="/"&&(y=y.slice(0,y.length-1)),_=`${y}/${A?`${A}/`:""}${_}`}else m.pathname.includes(A)||(_=`${A?`${A}/`:""}${_}`);e.params.history.keepQuery&&(_+=m.search);const E=g.history.state;E&&E.value===_||(e.params.history.replaceState?g.history.replaceState({value:_},null,_):g.history.pushState({value:_},null,_))},c=(A,p,g)=>{if(p)for(let m=0,f=e.slides.length;m<f;m+=1){const _=e.slides[m];if(a(_.getAttribute("data-history"))===p){const y=e.getSlideIndex(_);e.slideTo(y,A,g)}}else e.slideTo(0,A,g)},h=()=>{r=o(e.params.url),c(e.params.speed,r.value,!1)},u=()=>{const A=un();if(e.params.history){if(!A.history||!A.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(i=!0,r=o(e.params.url),!r.key&&!r.value){e.params.history.replaceState||A.addEventListener("popstate",h);return}c(0,r.value,e.params.runCallbacksOnInit),e.params.history.replaceState||A.addEventListener("popstate",h)}},d=()=>{const A=un();e.params.history.replaceState||A.removeEventListener("popstate",h)};n("init",()=>{e.params.history.enabled&&u()}),n("destroy",()=>{e.params.history.enabled&&d()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{i&&l(e.params.history.key,e.activeIndex)}),n("slideChange",()=>{i&&e.params.cssMode&&l(e.params.history.key,e.activeIndex)})}function vY(s){let{swiper:e,extendParams:t,emit:n,on:i}=s,r=!1;const a=Jn(),o=un();t({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(d,A){if(e.virtual&&e.params.virtual.enabled){const p=e.slides.find(m=>m.getAttribute("data-hash")===A);return p?parseInt(p.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(ii(e.slidesEl,`.${e.params.slideClass}[data-hash="${A}"], swiper-slide[data-hash="${A}"]`)[0])}}});const l=()=>{n("hashChange");const d=a.location.hash.replace("#",""),A=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],p=A?A.getAttribute("data-hash"):"";if(d!==p){const g=e.params.hashNavigation.getSlideIndex(e,d);if(typeof g>"u"||Number.isNaN(g))return;e.slideTo(g)}},c=()=>{if(!r||!e.params.hashNavigation.enabled)return;const d=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],A=d?d.getAttribute("data-hash")||d.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&o.history&&o.history.replaceState?(o.history.replaceState(null,null,`#${A}`||""),n("hashSet")):(a.location.hash=A||"",n("hashSet"))},h=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;r=!0;const d=a.location.hash.replace("#","");if(d){const p=e.params.hashNavigation.getSlideIndex(e,d);e.slideTo(p||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&o.addEventListener("hashchange",l)},u=()=>{e.params.hashNavigation.watchState&&o.removeEventListener("hashchange",l)};i("init",()=>{e.params.hashNavigation.enabled&&h()}),i("destroy",()=>{e.params.hashNavigation.enabled&&u()}),i("transitionEnd _freeModeNoMomentumRelease",()=>{r&&c()}),i("slideChange",()=>{r&&e.params.cssMode&&c()})}function IY(s){let{swiper:e,extendParams:t,on:n,emit:i,params:r}=s;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let a,o,l=r&&r.autoplay?r.autoplay.delay:3e3,c=r&&r.autoplay?r.autoplay.delay:3e3,h,u=new Date().getTime(),d,A,p,g,m,f,_;function E(P){!e||e.destroyed||!e.wrapperEl||P.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",E),!(_||P.detail&&P.detail.bySwiperTouchMove)&&C())}const y=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?d=!0:d&&(c=h,d=!1);const P=e.autoplay.paused?h:u+c-new Date().getTime();e.autoplay.timeLeft=P,i("autoplayTimeLeft",P,P/l),o=requestAnimationFrame(()=>{y()})},b=()=>{let P;return e.virtual&&e.params.virtual.enabled?P=e.slides.find(te=>te.classList.contains("swiper-slide-active")):P=e.slides[e.activeIndex],P?parseInt(P.getAttribute("data-swiper-autoplay"),10):void 0},x=P=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(o),y();let z=typeof P>"u"?e.params.autoplay.delay:P;l=e.params.autoplay.delay,c=e.params.autoplay.delay;const te=b();!Number.isNaN(te)&&te>0&&typeof P>"u"&&(z=te,l=te,c=te),h=z;const ne=e.params.speed,ue=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(ne,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,ne,!0,!0),i("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(ne,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,ne,!0,!0),i("autoplay")),e.params.cssMode&&(u=new Date().getTime(),requestAnimationFrame(()=>{x()})))};return z>0?(clearTimeout(a),a=setTimeout(()=>{ue()},z)):requestAnimationFrame(()=>{ue()}),z},I=()=>{u=new Date().getTime(),e.autoplay.running=!0,x(),i("autoplayStart")},w=()=>{e.autoplay.running=!1,clearTimeout(a),cancelAnimationFrame(o),i("autoplayStop")},v=(P,z)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(a),P||(f=!0);const te=()=>{i("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",E):C()};if(e.autoplay.paused=!0,z){m&&(h=e.params.autoplay.delay),m=!1,te();return}h=(h||e.params.autoplay.delay)-(new Date().getTime()-u),!(e.isEnd&&h<0&&!e.params.loop)&&(h<0&&(h=0),te())},C=()=>{e.isEnd&&h<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(u=new Date().getTime(),f?(f=!1,x(h)):x(),e.autoplay.paused=!1,i("autoplayResume"))},S=()=>{if(e.destroyed||!e.autoplay.running)return;const P=Jn();P.visibilityState==="hidden"&&(f=!0,v(!0)),P.visibilityState==="visible"&&C()},T=P=>{P.pointerType==="mouse"&&(f=!0,_=!0,!(e.animating||e.autoplay.paused)&&v(!0))},M=P=>{P.pointerType==="mouse"&&(_=!1,e.autoplay.paused&&C())},R=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",T),e.el.addEventListener("pointerleave",M))},F=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",T),e.el.removeEventListener("pointerleave",M))},N=()=>{Jn().addEventListener("visibilitychange",S)},L=()=>{Jn().removeEventListener("visibilitychange",S)};n("init",()=>{e.params.autoplay.enabled&&(R(),N(),I())}),n("destroy",()=>{F(),L(),e.autoplay.running&&w()}),n("_freeModeStaticRelease",()=>{(p||f)&&C()}),n("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?w():v(!0,!0)}),n("beforeTransitionStart",(P,z,te)=>{e.destroyed||!e.autoplay.running||(te||!e.params.autoplay.disableOnInteraction?v(!0,!0):w())}),n("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){w();return}A=!0,p=!1,f=!1,g=setTimeout(()=>{f=!0,p=!0,v(!0)},200)}}),n("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!A)){if(clearTimeout(g),clearTimeout(a),e.params.autoplay.disableOnInteraction){p=!1,A=!1;return}p&&e.params.cssMode&&C(),p=!1,A=!1}}),n("slideChange",()=>{e.destroyed||!e.autoplay.running||(m=!0)}),Object.assign(e.autoplay,{start:I,stop:w,pause:v,resume:C})}function CY(s){let{swiper:e,extendParams:t,on:n}=s;t({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let i=!1,r=!1;e.thumbs={swiper:null};function a(){const c=e.thumbs.swiper;if(!c||c.destroyed)return;const h=c.clickedIndex,u=c.clickedSlide;if(u&&u.classList.contains(e.params.thumbs.slideThumbActiveClass)||typeof h>"u"||h===null)return;let d;c.params.loop?d=parseInt(c.clickedSlide.getAttribute("data-swiper-slide-index"),10):d=h,e.params.loop?e.slideToLoop(d):e.slideTo(d)}function o(){const{thumbs:c}=e.params;if(i)return!1;i=!0;const h=e.constructor;if(c.swiper instanceof h){if(c.swiper.destroyed)return i=!1,!1;e.thumbs.swiper=c.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper.update()}else if(Yu(c.swiper)){const u=Object.assign({},c.swiper);Object.assign(u,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new h(u),r=!0}return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",a),!0}function l(c){const h=e.thumbs.swiper;if(!h||h.destroyed)return;const u=h.params.slidesPerView==="auto"?h.slidesPerViewDynamic():h.params.slidesPerView;let d=1;const A=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(d=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(d=1),d=Math.floor(d),h.slides.forEach(m=>m.classList.remove(A)),h.params.loop||h.params.virtual&&h.params.virtual.enabled)for(let m=0;m<d;m+=1)ii(h.slidesEl,`[data-swiper-slide-index="${e.realIndex+m}"]`).forEach(f=>{f.classList.add(A)});else for(let m=0;m<d;m+=1)h.slides[e.realIndex+m]&&h.slides[e.realIndex+m].classList.add(A);const p=e.params.thumbs.autoScrollOffset,g=p&&!h.params.loop;if(e.realIndex!==h.realIndex||g){const m=h.activeIndex;let f,_;if(h.params.loop){const E=h.slides.find(y=>y.getAttribute("data-swiper-slide-index")===`${e.realIndex}`);f=h.slides.indexOf(E),_=e.activeIndex>e.previousIndex?"next":"prev"}else f=e.realIndex,_=f>e.previousIndex?"next":"prev";g&&(f+=_==="next"?p:-1*p),h.visibleSlidesIndexes&&h.visibleSlidesIndexes.indexOf(f)<0&&(h.params.centeredSlides?f>m?f=f-Math.floor(u/2)+1:f=f+Math.floor(u/2)-1:f>m&&h.params.slidesPerGroup,h.slideTo(f,c?0:void 0))}}n("beforeInit",()=>{const{thumbs:c}=e.params;if(!(!c||!c.swiper))if(typeof c.swiper=="string"||c.swiper instanceof HTMLElement){const h=Jn(),u=()=>{const A=typeof c.swiper=="string"?h.querySelector(c.swiper):c.swiper;if(A&&A.swiper)c.swiper=A.swiper,o(),l(!0);else if(A){const p=`${e.params.eventsPrefix}init`,g=m=>{c.swiper=m.detail[0],A.removeEventListener(p,g),o(),l(!0),c.swiper.update(),e.update()};A.addEventListener(p,g)}return A},d=()=>{if(e.destroyed)return;u()||requestAnimationFrame(d)};requestAnimationFrame(d)}else o(),l(!0)}),n("slideChange update resize observerUpdate",()=>{l()}),n("setTransition",(c,h)=>{const u=e.thumbs.swiper;!u||u.destroyed||u.setTransition(h)}),n("beforeDestroy",()=>{const c=e.thumbs.swiper;!c||c.destroyed||r&&c.destroy()}),Object.assign(e.thumbs,{init:o,update:l})}function xY(s){let{swiper:e,extendParams:t,emit:n,once:i}=s;t({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function r(){if(e.params.cssMode)return;const l=e.getTranslate();e.setTranslate(l),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function a(){if(e.params.cssMode)return;const{touchEventsData:l,touches:c}=e;l.velocities.length===0&&l.velocities.push({position:c[e.isHorizontal()?"startX":"startY"],time:l.touchStartTime}),l.velocities.push({position:c[e.isHorizontal()?"currentX":"currentY"],time:_s()})}function o(l){let{currentPos:c}=l;if(e.params.cssMode)return;const{params:h,wrapperEl:u,rtlTranslate:d,snapGrid:A,touchEventsData:p}=e,m=_s()-p.touchStartTime;if(c<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(c>-e.maxTranslate()){e.slides.length<A.length?e.slideTo(A.length-1):e.slideTo(e.slides.length-1);return}if(h.freeMode.momentum){if(p.velocities.length>1){const w=p.velocities.pop(),v=p.velocities.pop(),C=w.position-v.position,S=w.time-v.time;e.velocity=C/S,e.velocity/=2,Math.abs(e.velocity)<h.freeMode.minimumVelocity&&(e.velocity=0),(S>150||_s()-w.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=h.freeMode.momentumVelocityRatio,p.velocities.length=0;let f=1e3*h.freeMode.momentumRatio;const _=e.velocity*f;let E=e.translate+_;d&&(E=-E);let y=!1,b;const x=Math.abs(e.velocity)*20*h.freeMode.momentumBounceRatio;let I;if(E<e.maxTranslate())h.freeMode.momentumBounce?(E+e.maxTranslate()<-x&&(E=e.maxTranslate()-x),b=e.maxTranslate(),y=!0,p.allowMomentumBounce=!0):E=e.maxTranslate(),h.loop&&h.centeredSlides&&(I=!0);else if(E>e.minTranslate())h.freeMode.momentumBounce?(E-e.minTranslate()>x&&(E=e.minTranslate()+x),b=e.minTranslate(),y=!0,p.allowMomentumBounce=!0):E=e.minTranslate(),h.loop&&h.centeredSlides&&(I=!0);else if(h.freeMode.sticky){let w;for(let v=0;v<A.length;v+=1)if(A[v]>-E){w=v;break}Math.abs(A[w]-E)<Math.abs(A[w-1]-E)||e.swipeDirection==="next"?E=A[w]:E=A[w-1],E=-E}if(I&&i("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(d?f=Math.abs((-E-e.translate)/e.velocity):f=Math.abs((E-e.translate)/e.velocity),h.freeMode.sticky){const w=Math.abs((d?-E:E)-e.translate),v=e.slidesSizesGrid[e.activeIndex];w<v?f=h.speed:w<2*v?f=h.speed*1.5:f=h.speed*2.5}}else if(h.freeMode.sticky){e.slideToClosest();return}h.freeMode.momentumBounce&&y?(e.updateProgress(b),e.setTransition(f),e.setTranslate(E),e.transitionStart(!0,e.swipeDirection),e.animating=!0,_d(u,()=>{!e||e.destroyed||!p.allowMomentumBounce||(n("momentumBounce"),e.setTransition(h.speed),setTimeout(()=>{e.setTranslate(b),_d(u,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(n("_freeModeNoMomentumRelease"),e.updateProgress(E),e.setTransition(f),e.setTranslate(E),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,_d(u,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(E),e.updateActiveIndex(),e.updateSlidesClasses()}else if(h.freeMode.sticky){e.slideToClosest();return}else h.freeMode&&n("_freeModeNoMomentumRelease");(!h.freeMode.momentum||m>=h.longSwipesMs)&&(n("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:r,onTouchMove:a,onTouchEnd:o}})}function wY(s){let{swiper:e,extendParams:t,on:n}=s;t({grid:{rows:1,fill:"column"}});let i,r,a,o;const l=()=>{let g=e.params.spaceBetween;return typeof g=="string"&&g.indexOf("%")>=0?g=parseFloat(g.replace("%",""))/100*e.size:typeof g=="string"&&(g=parseFloat(g)),g},c=g=>{const{slidesPerView:m}=e.params,{rows:f,fill:_}=e.params.grid,E=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:g.length;a=Math.floor(E/f),Math.floor(E/f)===E/f?i=E:i=Math.ceil(E/f)*f,m!=="auto"&&_==="row"&&(i=Math.max(i,m*f)),r=i/f},h=()=>{e.slides&&e.slides.forEach(g=>{g.swiperSlideGridSet&&(g.style.height="",g.style[e.getDirectionLabel("margin-top")]="")})},u=(g,m,f)=>{const{slidesPerGroup:_}=e.params,E=l(),{rows:y,fill:b}=e.params.grid,x=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:f.length;let I,w,v;if(b==="row"&&_>1){const C=Math.floor(g/(_*y)),S=g-y*_*C,T=C===0?_:Math.min(Math.ceil((x-C*y*_)/y),_);v=Math.floor(S/T),w=S-v*T+C*_,I=w+v*i/y,m.style.order=I}else b==="column"?(w=Math.floor(g/y),v=g-w*y,(w>a||w===a&&v===y-1)&&(v+=1,v>=y&&(v=0,w+=1))):(v=Math.floor(g/r),w=g-v*r);m.row=v,m.column=w,m.style.height=`calc((100% - ${(y-1)*E}px) / ${y})`,m.style[e.getDirectionLabel("margin-top")]=v!==0?E&&`${E}px`:"",m.swiperSlideGridSet=!0},d=(g,m)=>{const{centeredSlides:f,roundLengths:_}=e.params,E=l(),{rows:y}=e.params.grid;if(e.virtualSize=(g+E)*i,e.virtualSize=Math.ceil(e.virtualSize/y)-E,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+E}px`),f){const b=[];for(let x=0;x<m.length;x+=1){let I=m[x];_&&(I=Math.floor(I)),m[x]<e.virtualSize+m[0]&&b.push(I)}m.splice(0,m.length),m.push(...b)}},A=()=>{o=e.params.grid&&e.params.grid.rows>1},p=()=>{const{params:g,el:m}=e,f=g.grid&&g.grid.rows>1;o&&!f?(m.classList.remove(`${g.containerModifierClass}grid`,`${g.containerModifierClass}grid-column`),a=1,e.emitContainerClasses()):!o&&f&&(m.classList.add(`${g.containerModifierClass}grid`),g.grid.fill==="column"&&m.classList.add(`${g.containerModifierClass}grid-column`),e.emitContainerClasses()),o=f};n("init",A),n("update",p),e.grid={initSlides:c,unsetSlides:h,updateSlide:u,updateWrapperSize:d}}function SY(s){const e=this,{params:t,slidesEl:n}=e;t.loop&&e.loopDestroy();const i=r=>{if(typeof r=="string"){const a=document.createElement("div");Is(a,r),n.append(a.children[0]),Is(a,"")}else n.append(r)};if(typeof s=="object"&&"length"in s)for(let r=0;r<s.length;r+=1)s[r]&&i(s[r]);else i(s);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function BY(s){const e=this,{params:t,activeIndex:n,slidesEl:i}=e;t.loop&&e.loopDestroy();let r=n+1;const a=o=>{if(typeof o=="string"){const l=document.createElement("div");Is(l,o),i.prepend(l.children[0]),Is(l,"")}else i.prepend(o)};if(typeof s=="object"&&"length"in s){for(let o=0;o<s.length;o+=1)s[o]&&a(s[o]);r=n+s.length}else a(s);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(r,0,!1)}function TY(s,e){const t=this,{params:n,activeIndex:i,slidesEl:r}=t;let a=i;n.loop&&(a-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const o=t.slides.length;if(s<=0){t.prependSlide(e);return}if(s>=o){t.appendSlide(e);return}let l=a>s?a+1:a;const c=[];for(let h=o-1;h>=s;h-=1){const u=t.slides[h];u.remove(),c.unshift(u)}if(typeof e=="object"&&"length"in e){for(let h=0;h<e.length;h+=1)e[h]&&r.append(e[h]);l=a>s?a+e.length:a}else r.append(e);for(let h=0;h<c.length;h+=1)r.append(c[h]);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 MY(s){const e=this,{params:t,activeIndex:n}=e;let i=n;t.loop&&(i-=e.loopedSlides,e.loopDestroy());let r=i,a;if(typeof s=="object"&&"length"in s){for(let o=0;o<s.length;o+=1)a=s[o],e.slides[a]&&e.slides[a].remove(),a<r&&(r-=1);r=Math.max(r,0)}else a=s,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 RY(){const s=this,e=[];for(let t=0;t<s.slides.length;t+=1)e.push(t);s.removeSlide(e)}function DY(s){let{swiper:e}=s;Object.assign(e,{appendSlide:SY.bind(e),prependSlide:BY.bind(e),addSlide:TY.bind(e),removeSlide:MY.bind(e),removeAllSlides:RY.bind(e)})}function Oh(s){const{effect:e,swiper:t,on:n,setTranslate:i,setTransition:r,overwriteParams:a,perspective:o,recreateShadows:l,getEffectParams:c}=s;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 u=a?a():{};Object.assign(t.params,u),Object.assign(t.originalParams,u)}),n("setTranslate _virtualUpdated",()=>{t.params.effect===e&&i()}),n("setTransition",(u,d)=>{t.params.effect===e&&r(d)}),n("transitionEnd",()=>{if(t.params.effect===e&&l){if(!c||!c().slideShadows)return;t.slides.forEach(u=>{u.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>d.remove())}),l()}});let h;n("virtualUpdate",()=>{t.params.effect===e&&(t.slides.length||(h=!0),requestAnimationFrame(()=>{h&&t.slides&&t.slides.length&&(i(),h=!1)}))})}function sA(s,e){const t=Ll(e);return t!==e&&(t.style.backfaceVisibility="hidden",t.style["-webkit-backface-visibility"]="hidden"),t}function Bg(s){let{swiper:e,duration:t,transformElements:n,allSlides:i}=s;const{activeIndex:r}=e,a=o=>o.parentElement?o.parentElement:e.slides.find(c=>c.shadowRoot&&c.shadowRoot===o.parentNode);if(e.params.virtualTranslate&&t!==0){let o=!1,l;i?l=n:l=n.filter(c=>{const h=c.classList.contains("swiper-slide-transform")?a(c):c;return e.getSlideIndex(h)===r}),l.forEach(c=>{_d(c,()=>{if(o||!e||e.destroyed)return;o=!0,e.animating=!1;const h=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});e.wrapperEl.dispatchEvent(h)})})}}function QY(s){let{swiper:e,extendParams:t,on:n}=s;t({fadeEffect:{crossFade:!1}}),Oh({effect:"fade",swiper:e,on:n,setTranslate:()=>{const{slides:a}=e,o=e.params.fadeEffect;for(let l=0;l<a.length;l+=1){const c=e.slides[l];let u=-c.swiperSlideOffset;e.params.virtualTranslate||(u-=e.translate);let d=0;e.isHorizontal()||(d=u,u=0);const A=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(c.progress),0):1+Math.min(Math.max(c.progress,-1),0),p=sA(o,c);p.style.opacity=A,p.style.transform=`translate3d(${u}px, ${d}px, 0px)`}},setTransition:a=>{const o=e.slides.map(l=>Ll(l));o.forEach(l=>{l.style.transitionDuration=`${a}ms`}),Bg({swiper:e,duration:a,transformElements:o,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function LY(s){let{swiper:e,extendParams:t,on:n}=s;t({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(l,c,h)=>{let u=h?l.querySelector(".swiper-slide-shadow-left"):l.querySelector(".swiper-slide-shadow-top"),d=h?l.querySelector(".swiper-slide-shadow-right"):l.querySelector(".swiper-slide-shadow-bottom");u||(u=is("div",`swiper-slide-shadow-cube swiper-slide-shadow-${h?"left":"top"}`.split(" ")),l.append(u)),d||(d=is("div",`swiper-slide-shadow-cube swiper-slide-shadow-${h?"right":"bottom"}`.split(" ")),l.append(d)),u&&(u.style.opacity=Math.max(-c,0)),d&&(d.style.opacity=Math.max(c,0))};Oh({effect:"cube",swiper:e,on:n,setTranslate:()=>{const{el:l,wrapperEl:c,slides:h,width:u,height:d,rtlTranslate:A,size:p,browser:g}=e,m=Sg(e),f=e.params.cubeEffect,_=e.isHorizontal(),E=e.virtual&&e.params.virtual.enabled;let y=0,b;f.shadow&&(_?(b=e.wrapperEl.querySelector(".swiper-cube-shadow"),b||(b=is("div","swiper-cube-shadow"),e.wrapperEl.append(b)),b.style.height=`${u}px`):(b=l.querySelector(".swiper-cube-shadow"),b||(b=is("div","swiper-cube-shadow"),l.append(b))));for(let I=0;I<h.length;I+=1){const w=h[I];let v=I;E&&(v=parseInt(w.getAttribute("data-swiper-slide-index"),10));let C=v*90,S=Math.floor(C/360);A&&(C=-C,S=Math.floor(-C/360));const T=Math.max(Math.min(w.progress,1),-1);let M=0,R=0,F=0;v%4===0?(M=-S*4*p,F=0):(v-1)%4===0?(M=0,F=-S*4*p):(v-2)%4===0?(M=p+S*4*p,F=p):(v-3)%4===0&&(M=-p,F=3*p+p*4*S),A&&(M=-M),_||(R=M,M=0);const N=`rotateX(${m(_?0:-C)}deg) rotateY(${m(_?C:0)}deg) translate3d(${M}px, ${R}px, ${F}px)`;T<=1&&T>-1&&(y=v*90+T*90,A&&(y=-v*90-T*90)),w.style.transform=N,f.slideShadows&&i(w,T,_)}if(c.style.transformOrigin=`50% 50% -${p/2}px`,c.style["-webkit-transform-origin"]=`50% 50% -${p/2}px`,f.shadow)if(_)b.style.transform=`translate3d(0px, ${u/2+f.shadowOffset}px, ${-u/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${f.shadowScale})`;else{const I=Math.abs(y)-Math.floor(Math.abs(y)/90)*90,w=1.5-(Math.sin(I*2*Math.PI/360)/2+Math.cos(I*2*Math.PI/360)/2),v=f.shadowScale,C=f.shadowScale/w,S=f.shadowOffset;b.style.transform=`scale3d(${v}, 1, ${C}) translate3d(0px, ${d/2+S}px, ${-d/2/C}px) rotateX(-89.99deg)`}const x=(g.isSafari||g.isWebView)&&g.needPerspectiveFix?-p/2:0;c.style.transform=`translate3d(0px,0,${x}px) rotateX(${m(e.isHorizontal()?0:y)}deg) rotateY(${m(e.isHorizontal()?-y:0)}deg)`,c.style.setProperty("--swiper-cube-translate-z",`${x}px`)},setTransition:l=>{const{el:c,slides:h}=e;if(h.forEach(u=>{u.style.transitionDuration=`${l}ms`,u.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${l}ms`})}),e.params.cubeEffect.shadow&&!e.isHorizontal()){const u=c.querySelector(".swiper-cube-shadow");u&&(u.style.transitionDuration=`${l}ms`)}},recreateShadows:()=>{const l=e.isHorizontal();e.slides.forEach(c=>{const h=Math.max(Math.min(c.progress,1),-1);i(c,h,l)})},getEffectParams:()=>e.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Ch(s,e,t){const n=`swiper-slide-shadow${t?`-${t}`:""}${s?` swiper-slide-shadow-${s}`:""}`,i=Ll(e);let r=i.querySelector(`.${n.split(" ").join(".")}`);return r||(r=is("div",n.split(" ")),i.append(r)),r}function NY(s){let{swiper:e,extendParams:t,on:n}=s;t({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(l,c)=>{let h=e.isHorizontal()?l.querySelector(".swiper-slide-shadow-left"):l.querySelector(".swiper-slide-shadow-top"),u=e.isHorizontal()?l.querySelector(".swiper-slide-shadow-right"):l.querySelector(".swiper-slide-shadow-bottom");h||(h=Ch("flip",l,e.isHorizontal()?"left":"top")),u||(u=Ch("flip",l,e.isHorizontal()?"right":"bottom")),h&&(h.style.opacity=Math.max(-c,0)),u&&(u.style.opacity=Math.max(c,0))};Oh({effect:"flip",swiper:e,on:n,setTranslate:()=>{const{slides:l,rtlTranslate:c}=e,h=e.params.flipEffect,u=Sg(e);for(let d=0;d<l.length;d+=1){const A=l[d];let p=A.progress;e.params.flipEffect.limitRotation&&(p=Math.max(Math.min(A.progress,1),-1));const g=A.swiperSlideOffset;let f=-180*p,_=0,E=e.params.cssMode?-g-e.translate:-g,y=0;e.isHorizontal()?c&&(f=-f):(y=E,E=0,_=-f,f=0),A.style.zIndex=-Math.abs(Math.round(p))+l.length,h.slideShadows&&i(A,p);const b=`translate3d(${E}px, ${y}px, 0px) rotateX(${u(_)}deg) rotateY(${u(f)}deg)`,x=sA(h,A);x.style.transform=b}},setTransition:l=>{const c=e.slides.map(h=>Ll(h));c.forEach(h=>{h.style.transitionDuration=`${l}ms`,h.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(u=>{u.style.transitionDuration=`${l}ms`})}),Bg({swiper:e,duration:l,transformElements:c})},recreateShadows:()=>{e.params.flipEffect,e.slides.forEach(l=>{let c=l.progress;e.params.flipEffect.limitRotation&&(c=Math.max(Math.min(l.progress,1),-1)),i(l,c)})},getEffectParams:()=>e.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function PY(s){let{swiper:e,extendParams:t,on:n}=s;t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Oh({effect:"coverflow",swiper:e,on:n,setTranslate:()=>{const{width:a,height:o,slides:l,slidesSizesGrid:c}=e,h=e.params.coverflowEffect,u=e.isHorizontal(),d=e.translate,A=u?-d+a/2:-d+o/2,p=u?h.rotate:-h.rotate,g=h.depth,m=Sg(e);for(let f=0,_=l.length;f<_;f+=1){const E=l[f],y=c[f],b=E.swiperSlideOffset,x=(A-b-y/2)/y,I=typeof h.modifier=="function"?h.modifier(x):x*h.modifier;let w=u?p*I:0,v=u?0:p*I,C=-g*Math.abs(I),S=h.stretch;typeof S=="string"&&S.indexOf("%")!==-1&&(S=parseFloat(h.stretch)/100*y);let T=u?0:S*I,M=u?S*I:0,R=1-(1-h.scale)*Math.abs(I);Math.abs(M)<.001&&(M=0),Math.abs(T)<.001&&(T=0),Math.abs(C)<.001&&(C=0),Math.abs(w)<.001&&(w=0),Math.abs(v)<.001&&(v=0),Math.abs(R)<.001&&(R=0);const F=`translate3d(${M}px,${T}px,${C}px) rotateX(${m(v)}deg) rotateY(${m(w)}deg) scale(${R})`,N=sA(h,E);if(N.style.transform=F,E.style.zIndex=-Math.abs(Math.round(I))+1,h.slideShadows){let L=u?E.querySelector(".swiper-slide-shadow-left"):E.querySelector(".swiper-slide-shadow-top"),P=u?E.querySelector(".swiper-slide-shadow-right"):E.querySelector(".swiper-slide-shadow-bottom");L||(L=Ch("coverflow",E,u?"left":"top")),P||(P=Ch("coverflow",E,u?"right":"bottom")),L&&(L.style.opacity=I>0?I:0),P&&(P.style.opacity=-I>0?-I:0)}}},setTransition:a=>{e.slides.map(l=>Ll(l)).forEach(l=>{l.style.transitionDuration=`${a}ms`,l.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(c=>{c.style.transitionDuration=`${a}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function FY(s){let{swiper:e,extendParams:t,on:n}=s;t({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 i=o=>typeof o=="string"?o:`${o}px`;Oh({effect:"creative",swiper:e,on:n,setTranslate:()=>{const{slides:o,wrapperEl:l,slidesSizesGrid:c}=e,h=e.params.creativeEffect,{progressMultiplier:u}=h,d=e.params.centeredSlides,A=Sg(e);if(d){const p=c[0]/2-e.params.slidesOffsetBefore||0;l.style.transform=`translateX(calc(50% - ${p}px))`}for(let p=0;p<o.length;p+=1){const g=o[p],m=g.progress,f=Math.min(Math.max(g.progress,-h.limitProgress),h.limitProgress);let _=f;d||(_=Math.min(Math.max(g.originalProgress,-h.limitProgress),h.limitProgress));const E=g.swiperSlideOffset,y=[e.params.cssMode?-E-e.translate:-E,0,0],b=[0,0,0];let x=!1;e.isHorizontal()||(y[1]=y[0],y[0]=0);let I={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};f<0?(I=h.next,x=!0):f>0&&(I=h.prev,x=!0),y.forEach((R,F)=>{y[F]=`calc(${R}px + (${i(I.translate[F])} * ${Math.abs(f*u)}))`}),b.forEach((R,F)=>{let N=I.rotate[F]*Math.abs(f*u);b[F]=N}),g.style.zIndex=-Math.abs(Math.round(m))+o.length;const w=y.join(", "),v=`rotateX(${A(b[0])}deg) rotateY(${A(b[1])}deg) rotateZ(${A(b[2])}deg)`,C=_<0?`scale(${1+(1-I.scale)*_*u})`:`scale(${1-(1-I.scale)*_*u})`,S=_<0?1+(1-I.opacity)*_*u:1-(1-I.opacity)*_*u,T=`translate3d(${w}) ${v} ${C}`;if(x&&I.shadow||!x){let R=g.querySelector(".swiper-slide-shadow");if(!R&&I.shadow&&(R=Ch("creative",g)),R){const F=h.shadowPerProgress?f*(1/h.limitProgress):f;R.style.opacity=Math.min(Math.max(Math.abs(F),0),1)}}const M=sA(h,g);M.style.transform=T,M.style.opacity=S,I.origin&&(M.style.transformOrigin=I.origin)}},setTransition:o=>{const l=e.slides.map(c=>Ll(c));l.forEach(c=>{c.style.transitionDuration=`${o}ms`,c.querySelectorAll(".swiper-slide-shadow").forEach(h=>{h.style.transitionDuration=`${o}ms`})}),Bg({swiper:e,duration:o,transformElements:l,allSlides:!0})},perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}function kY(s){let{swiper:e,extendParams:t,on:n}=s;t({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Oh({effect:"cards",swiper:e,on:n,setTranslate:()=>{const{slides:a,activeIndex:o,rtlTranslate:l}=e,c=e.params.cardsEffect,{startTranslate:h,isTouched:u}=e.touchEventsData,d=l?-e.translate:e.translate;for(let A=0;A<a.length;A+=1){const p=a[A],g=p.progress,m=Math.min(Math.max(g,-4),4);let f=p.swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&(e.wrapperEl.style.transform=`translateX(${e.minTranslate()}px)`),e.params.centeredSlides&&e.params.cssMode&&(f-=a[0].swiperSlideOffset);let _=e.params.cssMode?-f-e.translate:-f,E=0;const y=-100*Math.abs(m);let b=1,x=-c.perSlideRotate*m,I=c.perSlideOffset-Math.abs(m)*.75;const w=e.virtual&&e.params.virtual.enabled?e.virtual.from+A:A,v=(w===o||w===o-1)&&m>0&&m<1&&(u||e.params.cssMode)&&d<h,C=(w===o||w===o+1)&&m<0&&m>-1&&(u||e.params.cssMode)&&d>h;if(v||C){const R=(1-Math.abs((Math.abs(m)-.5)/.5))**.5;x+=-28*m*R,b+=-.5*R,I+=96*R,E=`${-25*R*Math.abs(m)}%`}if(m<0?_=`calc(${_}px ${l?"-":"+"} (${I*Math.abs(m)}%))`:m>0?_=`calc(${_}px ${l?"-":"+"} (-${I*Math.abs(m)}%))`:_=`${_}px`,!e.isHorizontal()){const R=E;E=_,_=R}const S=m<0?`${1+(1-b)*m}`:`${1-(1-b)*m}`,T=`
|
|
14237
|
+
`:me}}Ql([q({attribute:pl.mediaAlt.name})],go.prototype,"mediaAlt");Ql([q({attribute:pl.mediaSrc.name})],go.prototype,"mediaSrc");Ql([q({attribute:pl.mediaType.name})],go.prototype,"mediaType");Ql([q({type:Boolean,attribute:pl.mediaAutoplay.name})],go.prototype,"mediaAutoplay");Ql([q({attribute:!1})],go.prototype,"onClick");Ql([Mn()],go.prototype,"__isPlaying");Ql([Mn()],go.prototype,"__isLoading");window.customElements.get(Bx)||window.customElements.define(Bx,go);function Rx(s){return s!==null&&typeof s=="object"&&"constructor"in s&&s.constructor===Object}function Fb(s,e){s===void 0&&(s={}),e===void 0&&(e={});const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof s[n]>"u"?s[n]=e[n]:Rx(e[n])&&Rx(s[n])&&Object.keys(e[n]).length>0&&Fb(s[n],e[n])})}const _R={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 Jn(){const s=typeof document<"u"?document:{};return Fb(s,_R),s}const j5={document:_R,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(s){return typeof setTimeout>"u"?(s(),null):setTimeout(s,0)},cancelAnimationFrame(s){typeof setTimeout>"u"||clearTimeout(s)}};function un(){const s=typeof window<"u"?window:{};return Fb(s,j5),s}function Ua(s){return s===void 0&&(s=""),s.trim().split(" ").filter(e=>!!e.trim())}function X5(s){const e=s;Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function Ih(s,e){return e===void 0&&(e=0),setTimeout(s,e)}function _s(){return Date.now()}function J5(s){const e=un();let t;return e.getComputedStyle&&(t=e.getComputedStyle(s,null)),!t&&s.currentStyle&&(t=s.currentStyle),t||(t=s.style),t}function i0(s,e){e===void 0&&(e="x");const t=un();let n,i,r;const a=J5(s);return t.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(o=>o.replace(",",".")).join(", ")),r=new t.WebKitCSSMatrix(i==="none"?"":i)):(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?i=r.m41:n.length===16?i=parseFloat(n[12]):i=parseFloat(n[4])),e==="y"&&(t.WebKitCSSMatrix?i=r.m42:n.length===16?i=parseFloat(n[13]):i=parseFloat(n[5])),i||0}function Yu(s){return typeof s=="object"&&s!==null&&s.constructor&&Object.prototype.toString.call(s).slice(8,-1)==="Object"}function K5(s){return typeof window<"u"&&typeof window.HTMLElement<"u"?s instanceof HTMLElement:s&&(s.nodeType===1||s.nodeType===11)}function Ki(){const s=Object(arguments.length<=0?void 0:arguments[0]),e=["__proto__","constructor","prototype"];for(let t=1;t<arguments.length;t+=1){const n=t<0||arguments.length<=t?void 0:arguments[t];if(n!=null&&!K5(n)){const i=Object.keys(Object(n)).filter(r=>e.indexOf(r)<0);for(let r=0,a=i.length;r<a;r+=1){const o=i[r],l=Object.getOwnPropertyDescriptor(n,o);l!==void 0&&l.enumerable&&(Yu(s[o])&&Yu(n[o])?n[o].__swiper__?s[o]=n[o]:Ki(s[o],n[o]):!Yu(s[o])&&Yu(n[o])?(s[o]={},n[o].__swiper__?s[o]=n[o]:Ki(s[o],n[o])):s[o]=n[o])}}}return s}function qu(s,e,t){s.style.setProperty(e,t)}function bR(s){let{swiper:e,targetPosition:t,side:n}=s;const i=un(),r=-e.translate;let a=null,o;const l=e.params.speed;e.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(e.cssModeFrameID);const c=t>r?"next":"prev",h=(d,A)=>c==="next"&&d>=A||c==="prev"&&d<=A,u=()=>{o=new Date().getTime(),a===null&&(a=o);const d=Math.max(Math.min((o-a)/l,1),0),A=.5-Math.cos(d*Math.PI)/2;let p=r+A*(t-r);if(h(p,t)&&(p=t),e.wrapperEl.scrollTo({[n]:p}),h(p,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:p})}),i.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=i.requestAnimationFrame(u)};u()}function Ll(s){return s.querySelector(".swiper-slide-transform")||s.shadowRoot&&s.shadowRoot.querySelector(".swiper-slide-transform")||s}function ii(s,e){e===void 0&&(e="");const t=un(),n=[...s.children];return t.HTMLSlotElement&&s instanceof HTMLSlotElement&&n.push(...s.assignedElements()),e?n.filter(i=>i.matches(e)):n}function Z5(s,e){const t=[e];for(;t.length>0;){const n=t.shift();if(s===n)return!0;t.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}function e8(s,e){const t=un();let n=e.contains(s);return!n&&t.HTMLSlotElement&&e instanceof HTMLSlotElement&&(n=[...e.assignedElements()].includes(s),n||(n=Z5(s,e))),n}function Yf(s){try{console.warn(s);return}catch{}}function is(s,e){e===void 0&&(e=[]);const t=document.createElement(s);return t.classList.add(...Array.isArray(e)?e:Ua(e)),t}function qf(s){const e=un(),t=Jn(),n=s.getBoundingClientRect(),i=t.body,r=s.clientTop||i.clientTop||0,a=s.clientLeft||i.clientLeft||0,o=s===e?e.scrollY:s.scrollTop,l=s===e?e.scrollX:s.scrollLeft;return{top:n.top+o-r,left:n.left+l-a}}function t8(s,e){const t=[];for(;s.previousElementSibling;){const n=s.previousElementSibling;e?n.matches(e)&&t.push(n):t.push(n),s=n}return t}function n8(s,e){const t=[];for(;s.nextElementSibling;){const n=s.nextElementSibling;e?n.matches(e)&&t.push(n):t.push(n),s=n}return t}function to(s,e){return un().getComputedStyle(s,null).getPropertyValue(e)}function $d(s){let e=s,t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function fl(s,e){const t=[];let n=s.parentElement;for(;n;)e?n.matches(e)&&t.push(n):t.push(n),n=n.parentElement;return t}function _d(s,e){function t(n){n.target===s&&(e.call(s,n),s.removeEventListener("transitionend",t))}e&&s.addEventListener("transitionend",t)}function s0(s,e,t){const n=un();return s[e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(s,null).getPropertyValue(e==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(s,null).getPropertyValue(e==="width"?"margin-left":"margin-bottom"))}function bt(s){return(Array.isArray(s)?s:[s]).filter(e=>!!e)}function Sg(s){return e=>Math.abs(e)>0&&s.browser&&s.browser.need3dFix&&Math.abs(e)%90===0?e+.001:e}function Is(s,e){e===void 0&&(e=""),typeof trustedTypes<"u"?s.innerHTML=trustedTypes.createPolicy("html",{createHTML:t=>t}).createHTML(e):s.innerHTML=e}let yE;function i8(){const s=un(),e=Jn();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in s||s.DocumentTouch&&e instanceof s.DocumentTouch)}}function vR(){return yE||(yE=i8()),yE}let _E;function s8(s){let{userAgent:e}=s===void 0?{}:s;const t=vR(),n=un(),i=n.navigator.platform,r=e||n.navigator.userAgent,a={ios:!1,android:!1},o=n.screen.width,l=n.screen.height,c=r.match(/(Android);?[\s\/]+([\d.]+)?/);let h=r.match(/(iPad).*OS\s([\d_]+)/);const u=r.match(/(iPod)(.*OS\s([\d_]+))?/),d=!h&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),A=i==="Win32";let p=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!h&&p&&t.touch&&g.indexOf(`${o}x${l}`)>=0&&(h=r.match(/(Version)\/([\d.]+)/),h||(h=[0,1,"13_0_0"]),p=!1),c&&!A&&(a.os="android",a.android=!0),(h||d||u)&&(a.os="ios",a.ios=!0),a}function IR(s){return s===void 0&&(s={}),_E||(_E=s8(s)),_E}let bE;function r8(){const s=un(),e=IR();let t=!1;function n(){const o=s.navigator.userAgent.toLowerCase();return o.indexOf("safari")>=0&&o.indexOf("chrome")<0&&o.indexOf("android")<0}if(n()){const o=String(s.navigator.userAgent);if(o.includes("Version/")){const[l,c]=o.split("Version/")[1].split(" ")[0].split(".").map(h=>Number(h));t=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(s.navigator.userAgent),r=n(),a=r||i&&e.ios;return{isSafari:t||r,needPerspectiveFix:t,need3dFix:a,isWebView:i}}function CR(){return bE||(bE=r8()),bE}function a8(s){let{swiper:e,on:t,emit:n}=s;const i=un();let r=null,a=null;const o=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},l=()=>{!e||e.destroyed||!e.initialized||(r=new ResizeObserver(u=>{a=i.requestAnimationFrame(()=>{const{width:d,height:A}=e;let p=d,g=A;u.forEach(m=>{let{contentBoxSize:f,contentRect:_,target:E}=m;E&&E!==e.el||(p=_?_.width:(f[0]||f).inlineSize,g=_?_.height:(f[0]||f).blockSize)}),(p!==d||g!==A)&&o()})}),r.observe(e.el))},c=()=>{a&&i.cancelAnimationFrame(a),r&&r.unobserve&&e.el&&(r.unobserve(e.el),r=null)},h=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",o),i.addEventListener("orientationchange",h)}),t("destroy",()=>{c(),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",h)})}function o8(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=[],a=un(),o=function(h,u){u===void 0&&(u={});const d=a.MutationObserver||a.WebkitMutationObserver,A=new d(p=>{if(e.__preventObserver__)return;if(p.length===1){i("observerUpdate",p[0]);return}const g=function(){i("observerUpdate",p[0])};a.requestAnimationFrame?a.requestAnimationFrame(g):a.setTimeout(g,0)});A.observe(h,{attributes:typeof u.attributes>"u"?!0:u.attributes,childList:e.isElement||(typeof u.childList>"u"?!0:u).childList,characterData:typeof u.characterData>"u"?!0:u.characterData}),r.push(A)},l=()=>{if(e.params.observer){if(e.params.observeParents){const h=fl(e.hostEl);for(let u=0;u<h.length;u+=1)o(h[u])}o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}},c=()=>{r.forEach(h=>{h.disconnect()}),r.splice(0,r.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",l),n("destroy",c)}var l8={on(s,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const i=t?"unshift":"push";return s.split(" ").forEach(r=>{n.eventsListeners[r]||(n.eventsListeners[r]=[]),n.eventsListeners[r][i](e)}),n},once(s,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;function i(){n.off(s,i),i.__emitterProxy&&delete i.__emitterProxy;for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];e.apply(n,a)}return i.__emitterProxy=e,n.on(s,i,t)},onAny(s,e){const t=this;if(!t.eventsListeners||t.destroyed||typeof s!="function")return t;const n=e?"unshift":"push";return t.eventsAnyListeners.indexOf(s)<0&&t.eventsAnyListeners[n](s),t},offAny(s){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const t=e.eventsAnyListeners.indexOf(s);return t>=0&&e.eventsAnyListeners.splice(t,1),e},off(s,e){const t=this;return!t.eventsListeners||t.destroyed||!t.eventsListeners||s.split(" ").forEach(n=>{typeof e>"u"?t.eventsListeners[n]=[]:t.eventsListeners[n]&&t.eventsListeners[n].forEach((i,r)=>{(i===e||i.__emitterProxy&&i.__emitterProxy===e)&&t.eventsListeners[n].splice(r,1)})}),t},emit(){const s=this;if(!s.eventsListeners||s.destroyed||!s.eventsListeners)return s;let e,t,n;for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return typeof r[0]=="string"||Array.isArray(r[0])?(e=r[0],t=r.slice(1,r.length),n=s):(e=r[0].events,t=r[0].data,n=r[0].context||s),t.unshift(n),(Array.isArray(e)?e:e.split(" ")).forEach(l=>{s.eventsAnyListeners&&s.eventsAnyListeners.length&&s.eventsAnyListeners.forEach(c=>{c.apply(n,[l,...t])}),s.eventsListeners&&s.eventsListeners[l]&&s.eventsListeners[l].forEach(c=>{c.apply(n,t)})}),s}};function c8(){const s=this;let e,t;const n=s.el;typeof s.params.width<"u"&&s.params.width!==null?e=s.params.width:e=n.clientWidth,typeof s.params.height<"u"&&s.params.height!==null?t=s.params.height:t=n.clientHeight,!(e===0&&s.isHorizontal()||t===0&&s.isVertical())&&(e=e-parseInt(to(n,"padding-left")||0,10)-parseInt(to(n,"padding-right")||0,10),t=t-parseInt(to(n,"padding-top")||0,10)-parseInt(to(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(s,{width:e,height:t,size:s.isHorizontal()?e:t}))}function h8(){const s=this;function e(C,S){return parseFloat(C.getPropertyValue(s.getDirectionLabel(S))||0)}const t=s.params,{wrapperEl:n,slidesEl:i,size:r,rtlTranslate:a,wrongRTL:o}=s,l=s.virtual&&t.virtual.enabled,c=l?s.virtual.slides.length:s.slides.length,h=ii(i,`.${s.params.slideClass}, swiper-slide`),u=l?s.virtual.slides.length:h.length;let d=[];const A=[],p=[];let g=t.slidesOffsetBefore;typeof g=="function"&&(g=t.slidesOffsetBefore.call(s));let m=t.slidesOffsetAfter;typeof m=="function"&&(m=t.slidesOffsetAfter.call(s));const f=s.snapGrid.length,_=s.slidesGrid.length;let E=t.spaceBetween,y=-g,b=0,x=0;if(typeof r>"u")return;typeof E=="string"&&E.indexOf("%")>=0?E=parseFloat(E.replace("%",""))/100*r:typeof E=="string"&&(E=parseFloat(E)),s.virtualSize=-E,h.forEach(C=>{a?C.style.marginLeft="":C.style.marginRight="",C.style.marginBottom="",C.style.marginTop=""}),t.centeredSlides&&t.cssMode&&(qu(n,"--swiper-centered-offset-before",""),qu(n,"--swiper-centered-offset-after",""));const I=t.grid&&t.grid.rows>1&&s.grid;I?s.grid.initSlides(h):s.grid&&s.grid.unsetSlides();let w;const v=t.slidesPerView==="auto"&&t.breakpoints&&Object.keys(t.breakpoints).filter(C=>typeof t.breakpoints[C].slidesPerView<"u").length>0;for(let C=0;C<u;C+=1){w=0;let S;if(h[C]&&(S=h[C]),I&&s.grid.updateSlide(C,S,h),!(h[C]&&to(S,"display")==="none")){if(t.slidesPerView==="auto"){v&&(h[C].style[s.getDirectionLabel("width")]="");const T=getComputedStyle(S),M=S.style.transform,R=S.style.webkitTransform;if(M&&(S.style.transform="none"),R&&(S.style.webkitTransform="none"),t.roundLengths)w=s.isHorizontal()?s0(S,"width"):s0(S,"height");else{const F=e(T,"width"),N=e(T,"padding-left"),L=e(T,"padding-right"),P=e(T,"margin-left"),z=e(T,"margin-right"),te=T.getPropertyValue("box-sizing");if(te&&te==="border-box")w=F+P+z;else{const{clientWidth:ne,offsetWidth:ue}=S;w=F+N+L+P+z+(ue-ne)}}M&&(S.style.transform=M),R&&(S.style.webkitTransform=R),t.roundLengths&&(w=Math.floor(w))}else w=(r-(t.slidesPerView-1)*E)/t.slidesPerView,t.roundLengths&&(w=Math.floor(w)),h[C]&&(h[C].style[s.getDirectionLabel("width")]=`${w}px`);h[C]&&(h[C].swiperSlideSize=w),p.push(w),t.centeredSlides?(y=y+w/2+b/2+E,b===0&&C!==0&&(y=y-r/2-E),C===0&&(y=y-r/2-E),Math.abs(y)<1/1e3&&(y=0),t.roundLengths&&(y=Math.floor(y)),x%t.slidesPerGroup===0&&d.push(y),A.push(y)):(t.roundLengths&&(y=Math.floor(y)),(x-Math.min(s.params.slidesPerGroupSkip,x))%s.params.slidesPerGroup===0&&d.push(y),A.push(y),y=y+w+E),s.virtualSize+=w+E,b=w,x+=1}}if(s.virtualSize=Math.max(s.virtualSize,r)+m,a&&o&&(t.effect==="slide"||t.effect==="coverflow")&&(n.style.width=`${s.virtualSize+E}px`),t.setWrapperSize&&(n.style[s.getDirectionLabel("width")]=`${s.virtualSize+E}px`),I&&s.grid.updateWrapperSize(w,d),!t.centeredSlides){const C=[];for(let S=0;S<d.length;S+=1){let T=d[S];t.roundLengths&&(T=Math.floor(T)),d[S]<=s.virtualSize-r&&C.push(T)}d=C,Math.floor(s.virtualSize-r)-Math.floor(d[d.length-1])>1&&d.push(s.virtualSize-r)}if(l&&t.loop){const C=p[0]+E;if(t.slidesPerGroup>1){const S=Math.ceil((s.virtual.slidesBefore+s.virtual.slidesAfter)/t.slidesPerGroup),T=C*t.slidesPerGroup;for(let M=0;M<S;M+=1)d.push(d[d.length-1]+T)}for(let S=0;S<s.virtual.slidesBefore+s.virtual.slidesAfter;S+=1)t.slidesPerGroup===1&&d.push(d[d.length-1]+C),A.push(A[A.length-1]+C),s.virtualSize+=C}if(d.length===0&&(d=[0]),E!==0){const C=s.isHorizontal()&&a?"marginLeft":s.getDirectionLabel("marginRight");h.filter((S,T)=>!t.cssMode||t.loop?!0:T!==h.length-1).forEach(S=>{S.style[C]=`${E}px`})}if(t.centeredSlides&&t.centeredSlidesBounds){let C=0;p.forEach(T=>{C+=T+(E||0)}),C-=E;const S=C>r?C-r:0;d=d.map(T=>T<=0?-g:T>S?S+m:T)}if(t.centerInsufficientSlides){let C=0;p.forEach(T=>{C+=T+(E||0)}),C-=E;const S=(t.slidesOffsetBefore||0)+(t.slidesOffsetAfter||0);if(C+S<r){const T=(r-C-S)/2;d.forEach((M,R)=>{d[R]=M-T}),A.forEach((M,R)=>{A[R]=M+T})}}if(Object.assign(s,{slides:h,snapGrid:d,slidesGrid:A,slidesSizesGrid:p}),t.centeredSlides&&t.cssMode&&!t.centeredSlidesBounds){qu(n,"--swiper-centered-offset-before",`${-d[0]}px`),qu(n,"--swiper-centered-offset-after",`${s.size/2-p[p.length-1]/2}px`);const C=-s.snapGrid[0],S=-s.slidesGrid[0];s.snapGrid=s.snapGrid.map(T=>T+C),s.slidesGrid=s.slidesGrid.map(T=>T+S)}if(u!==c&&s.emit("slidesLengthChange"),d.length!==f&&(s.params.watchOverflow&&s.checkOverflow(),s.emit("snapGridLengthChange")),A.length!==_&&s.emit("slidesGridLengthChange"),t.watchSlidesProgress&&s.updateSlidesOffset(),s.emit("slidesUpdated"),!l&&!t.cssMode&&(t.effect==="slide"||t.effect==="fade")){const C=`${t.containerModifierClass}backface-hidden`,S=s.el.classList.contains(C);u<=t.maxBackfaceHiddenSlides?S||s.el.classList.add(C):S&&s.el.classList.remove(C)}}function u8(s){const e=this,t=[],n=e.virtual&&e.params.virtual.enabled;let i=0,r;typeof s=="number"?e.setTransition(s):s===!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;i=o>i?o:i}(i||i===0)&&(e.wrapperEl.style.height=`${i}px`)}function d8(){const s=this,e=s.slides,t=s.isElement?s.isHorizontal()?s.wrapperEl.offsetLeft:s.wrapperEl.offsetTop:0;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=(s.isHorizontal()?e[n].offsetLeft:e[n].offsetTop)-t-s.cssOverflowAdjustment()}const Dx=(s,e,t)=>{e&&!s.classList.contains(t)?s.classList.add(t):!e&&s.classList.contains(t)&&s.classList.remove(t)};function A8(s){s===void 0&&(s=this&&this.translate||0);const e=this,t=e.params,{slides:n,rtlTranslate:i,snapGrid:r}=e;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let a=-s;i&&(a=s),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 h=c.swiperSlideOffset;t.cssMode&&t.centeredSlides&&(h-=n[0].swiperSlideOffset);const u=(a+(t.centeredSlides?e.minTranslate():0)-h)/(c.swiperSlideSize+o),d=(a-r[0]+(t.centeredSlides?e.minTranslate():0)-h)/(c.swiperSlideSize+o),A=-(a-h),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)),Dx(c,m,t.slideVisibleClass),Dx(c,g,t.slideFullyVisibleClass),c.progress=i?-u:u,c.originalProgress=i?-d:d}}function p8(s){const e=this;if(typeof s>"u"){const h=e.rtlTranslate?-1:1;s=e&&e.translate&&e.translate*h||0}const t=e.params,n=e.maxTranslate()-e.minTranslate();let{progress:i,isBeginning:r,isEnd:a,progressLoop:o}=e;const l=r,c=a;if(n===0)i=0,r=!0,a=!0;else{i=(s-e.minTranslate())/n;const h=Math.abs(s-e.minTranslate())<1,u=Math.abs(s-e.maxTranslate())<1;r=h||i<=0,a=u||i>=1,h&&(i=0),u&&(i=1)}if(t.loop){const h=e.getSlideIndexByData(0),u=e.getSlideIndexByData(e.slides.length-1),d=e.slidesGrid[h],A=e.slidesGrid[u],p=e.slidesGrid[e.slidesGrid.length-1],g=Math.abs(s);g>=d?o=(g-d)/p:o=(g+p-A)/p,o>1&&(o-=1)}Object.assign(e,{progress:i,progressLoop:o,isBeginning:r,isEnd:a}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&e.updateSlidesProgress(s),r&&!l&&e.emit("reachBeginning toEdge"),a&&!c&&e.emit("reachEnd toEdge"),(l&&!r||c&&!a)&&e.emit("fromEdge"),e.emit("progress",i)}const vE=(s,e,t)=>{e&&!s.classList.contains(t)?s.classList.add(t):!e&&s.classList.contains(t)&&s.classList.remove(t)};function f8(){const s=this,{slides:e,params:t,slidesEl:n,activeIndex:i}=s,r=s.virtual&&t.virtual.enabled,a=s.grid&&t.grid&&t.grid.rows>1,o=u=>ii(n,`.${t.slideClass}${u}, swiper-slide${u}`)[0];let l,c,h;if(r)if(t.loop){let u=i-s.virtual.slidesBefore;u<0&&(u=s.virtual.slides.length+u),u>=s.virtual.slides.length&&(u-=s.virtual.slides.length),l=o(`[data-swiper-slide-index="${u}"]`)}else l=o(`[data-swiper-slide-index="${i}"]`);else a?(l=e.find(u=>u.column===i),h=e.find(u=>u.column===i+1),c=e.find(u=>u.column===i-1)):l=e[i];l&&(a||(h=n8(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!h&&(h=e[0]),c=t8(l,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!c===0&&(c=e[e.length-1]))),e.forEach(u=>{vE(u,u===l,t.slideActiveClass),vE(u,u===h,t.slideNextClass),vE(u,u===c,t.slidePrevClass)}),s.emitSlidesClasses()}const Kp=(s,e)=>{if(!s||s.destroyed||!s.params)return;const t=()=>s.isElement?"swiper-slide":`.${s.params.slideClass}`,n=e.closest(t());if(n){let i=n.querySelector(`.${s.params.lazyPreloaderClass}`);!i&&s.isElement&&(n.shadowRoot?i=n.shadowRoot.querySelector(`.${s.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(i=n.shadowRoot.querySelector(`.${s.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},IE=(s,e)=>{if(!s.slides[e])return;const t=s.slides[e].querySelector('[loading="lazy"]');t&&t.removeAttribute("loading")},r0=s=>{if(!s||s.destroyed||!s.params)return;let e=s.params.lazyPreloadPrevNext;const t=s.slides.length;if(!t||!e||e<0)return;e=Math.min(e,t);const n=s.params.slidesPerView==="auto"?s.slidesPerViewDynamic():Math.ceil(s.params.slidesPerView),i=s.activeIndex;if(s.params.grid&&s.params.grid.rows>1){const a=i,o=[a-e];o.push(...Array.from({length:e}).map((l,c)=>a+n+c)),s.slides.forEach((l,c)=>{o.includes(l.column)&&IE(s,c)});return}const r=i+n-1;if(s.params.rewind||s.params.loop)for(let a=i-e;a<=r+e;a+=1){const o=(a%t+t)%t;(o<i||o>r)&&IE(s,o)}else for(let a=Math.max(i-e,0);a<=Math.min(r+e,t-1);a+=1)a!==i&&(a>r||a<i)&&IE(s,a)};function g8(s){const{slidesGrid:e,params:t}=s,n=s.rtlTranslate?s.translate:-s.translate;let i;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?i=r:n>=e[r]&&n<e[r+1]&&(i=r+1):n>=e[r]&&(i=r);return t.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function m8(s){const e=this,t=e.rtlTranslate?e.translate:-e.translate,{snapGrid:n,params:i,activeIndex:r,realIndex:a,snapIndex:o}=e;let l=s,c;const h=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=g8(e)),n.indexOf(t)>=0)c=n.indexOf(t);else{const A=Math.min(i.slidesPerGroupSkip,l);c=A+Math.floor((l-A)/i.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=h(l);return}const u=e.grid&&i.grid&&i.grid.rows>1;let d;if(e.virtual&&i.virtual.enabled&&i.loop)d=h(l);else if(u){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/i.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&&r0(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&(a!==d&&e.emit("realIndexChange"),e.emit("slideChange"))}function E8(s,e){const t=this,n=t.params;let i=s.closest(`.${n.slideClass}, swiper-slide`);!i&&t.isElement&&e&&e.length>1&&e.includes(s)&&[...e.slice(e.indexOf(s)+1,e.length)].forEach(o=>{!i&&o.matches&&o.matches(`.${n.slideClass}, swiper-slide`)&&(i=o)});let r=!1,a;if(i){for(let o=0;o<t.slides.length;o+=1)if(t.slides[o]===i){r=!0,a=o;break}}if(i&&r)t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(i.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 y8={updateSize:c8,updateSlides:h8,updateAutoHeight:u8,updateSlidesOffset:d8,updateSlidesProgress:A8,updateProgress:p8,updateSlidesClasses:f8,updateActiveIndex:m8,updateClickedSlide:E8};function _8(s){s===void 0&&(s=this.isHorizontal()?"x":"y");const e=this,{params:t,rtlTranslate:n,translate:i,wrapperEl:r}=e;if(t.virtualTranslate)return n?-i:i;if(t.cssMode)return i;let a=i0(r,s);return a+=e.cssOverflowAdjustment(),n&&(a=-a),a||0}function b8(s,e){const t=this,{rtlTranslate:n,params:i,wrapperEl:r,progress:a}=t;let o=0,l=0;const c=0;t.isHorizontal()?o=n?-s:s:l=s,i.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),t.previousTranslate=t.translate,t.translate=t.isHorizontal()?o:l,i.cssMode?r[t.isHorizontal()?"scrollLeft":"scrollTop"]=t.isHorizontal()?-o:-l:i.virtualTranslate||(t.isHorizontal()?o-=t.cssOverflowAdjustment():l-=t.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${l}px, ${c}px)`);let h;const u=t.maxTranslate()-t.minTranslate();u===0?h=0:h=(s-t.minTranslate())/u,h!==a&&t.updateProgress(s),t.emit("setTranslate",t.translate,e)}function v8(){return-this.snapGrid[0]}function I8(){return-this.snapGrid[this.snapGrid.length-1]}function C8(s,e,t,n,i){s===void 0&&(s=0),e===void 0&&(e=this.params.speed),t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:a,wrapperEl:o}=r;if(r.animating&&a.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let h;if(n&&s>l?h=l:n&&s<c?h=c:h=s,r.updateProgress(h),a.cssMode){const u=r.isHorizontal();if(e===0)o[u?"scrollLeft":"scrollTop"]=-h;else{if(!r.support.smoothScroll)return bR({swiper:r,targetPosition:-h,side:u?"left":"top"}),!0;o.scrollTo({[u?"left":"top"]:-h,behavior:"smooth"})}return!0}return e===0?(r.setTransition(0),r.setTranslate(h),t&&(r.emit("beforeTransitionStart",e,i),r.emit("transitionEnd"))):(r.setTransition(e),r.setTranslate(h),t&&(r.emit("beforeTransitionStart",e,i),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 x8={getTranslate:_8,setTranslate:b8,minTranslate:v8,maxTranslate:I8,translateTo:C8};function w8(s,e){const t=this;t.params.cssMode||(t.wrapperEl.style.transitionDuration=`${s}ms`,t.wrapperEl.style.transitionDelay=s===0?"0ms":""),t.emit("setTransition",s,e)}function xR(s){let{swiper:e,runCallbacks:t,direction:n,step:i}=s;const{activeIndex:r,previousIndex:a}=e;let o=n;o||(r>a?o="next":r<a?o="prev":o="reset"),e.emit(`transition${i}`),t&&o==="reset"?e.emit(`slideResetTransition${i}`):t&&r!==a&&(e.emit(`slideChangeTransition${i}`),o==="next"?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}function S8(s,e){s===void 0&&(s=!0);const t=this,{params:n}=t;n.cssMode||(n.autoHeight&&t.updateAutoHeight(),xR({swiper:t,runCallbacks:s,direction:e,step:"Start"}))}function B8(s,e){s===void 0&&(s=!0);const t=this,{params:n}=t;t.animating=!1,!n.cssMode&&(t.setTransition(0),xR({swiper:t,runCallbacks:s,direction:e,step:"End"}))}var T8={setTransition:w8,transitionStart:S8,transitionEnd:B8};function M8(s,e,t,n,i){s===void 0&&(s=0),t===void 0&&(t=!0),typeof s=="string"&&(s=parseInt(s,10));const r=this;let a=s;a<0&&(a=0);const{params:o,snapGrid:l,slidesGrid:c,previousIndex:h,activeIndex:u,rtlTranslate:d,wrapperEl:A,enabled:p}=r;if(!p&&!n&&!i||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 I=0;I<c.length;I+=1){const w=-Math.floor(f*100),v=Math.floor(c[I]*100),C=Math.floor(c[I+1]*100);typeof c[I+1]<"u"?w>=v&&w<C-(C-v)/2?a=I:w>=v&&w<C&&(a=I+1):w>=v&&(a=I)}if(r.initialized&&a!==u&&(!r.allowSlideNext&&(d?f>r.translate&&f>r.minTranslate():f<r.translate&&f<r.minTranslate())||!r.allowSlidePrev&&f>r.translate&&f>r.maxTranslate()&&(u||0)!==a))return!1;a!==(h||0)&&t&&r.emit("beforeSlideChangeStart"),r.updateProgress(f);let _;a>u?_="next":a<u?_="prev":_="reset";const E=r.virtual&&r.params.virtual.enabled;if(!(E&&i)&&(d&&-f===r.translate||!d&&f===r.translate))return r.updateActiveIndex(a),o.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),o.effect!=="slide"&&r.setTranslate(f),_!=="reset"&&(r.transitionStart(t,_),r.transitionEnd(t,_)),!1;if(o.cssMode){const I=r.isHorizontal(),w=d?f:-f;if(e===0)E&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),E&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{A[I?"scrollLeft":"scrollTop"]=w})):A[I?"scrollLeft":"scrollTop"]=w,E&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return bR({swiper:r,targetPosition:w,side:I?"left":"top"}),!0;A.scrollTo({[I?"left":"top"]:w,behavior:"smooth"})}return!0}const x=CR().isSafari;return E&&!i&&x&&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,_),e===0?r.transitionEnd(t,_):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(w){!r||r.destroyed||w.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(t,_))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function R8(s,e,t,n){s===void 0&&(s=0),t===void 0&&(t=!0),typeof s=="string"&&(s=parseInt(s,10));const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);const r=i.grid&&i.params.grid&&i.params.grid.rows>1;let a=s;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)a=a+i.virtual.slidesBefore;else{let o;if(r){const d=a*i.params.grid.rows;o=i.slides.find(A=>A.getAttribute("data-swiper-slide-index")*1===d).column}else o=i.getSlideIndexByData(a);const l=r?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let h=i.params.slidesPerView;h==="auto"?h=i.slidesPerViewDynamic():(h=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&h%2===0&&(h=h+1));let u=l-o<h;if(c&&(u=u||o<Math.ceil(h/2)),n&&c&&i.params.slidesPerView!=="auto"&&!r&&(u=!1),u){const d=c?o<i.activeIndex?"prev":"next":o-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:d,slideTo:!0,activeSlideIndex:d==="next"?o+1:o-l+1,slideRealIndex:d==="next"?i.realIndex:void 0})}if(r){const d=a*i.params.grid.rows;a=i.slides.find(A=>A.getAttribute("data-swiper-slide-index")*1===d).column}else a=i.getSlideIndexByData(a)}return requestAnimationFrame(()=>{i.slideTo(a,e,t,n)}),i}function D8(s,e,t){e===void 0&&(e=!0);const n=this,{enabled:i,params:r,animating:a}=n;if(!i||n.destroyed)return n;typeof s>"u"&&(s=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,s,e,t)}),!0}return r.rewind&&n.isEnd?n.slideTo(0,s,e,t):n.slideTo(n.activeIndex+l,s,e,t)}function Q8(s,e,t){e===void 0&&(e=!0);const n=this,{params:i,snapGrid:r,slidesGrid:a,rtlTranslate:o,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof s>"u"&&(s=n.params.speed);const h=n.virtual&&i.virtual.enabled;if(i.loop){if(c&&!h&&i.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const u=o?n.translate:-n.translate;function d(_){return _<0?-Math.floor(Math.abs(_)):Math.floor(_)}const A=d(u),p=r.map(_=>d(_)),g=i.freeMode&&i.freeMode.enabled;let m=r[p.indexOf(A)-1];if(typeof m>"u"&&(i.cssMode||g)){let _;r.forEach((E,y)=>{A>=E&&(_=y)}),typeof _<"u"&&(m=g?r[_]:r[_>0?_-1:_])}let f=0;if(typeof m<"u"&&(f=a.indexOf(m),f<0&&(f=n.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(f=f-n.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),i.rewind&&n.isBeginning){const _=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(_,s,e,t)}else if(i.loop&&n.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{n.slideTo(f,s,e,t)}),!0;return n.slideTo(f,s,e,t)}function L8(s,e,t){e===void 0&&(e=!0);const n=this;if(!n.destroyed)return typeof s>"u"&&(s=n.params.speed),n.slideTo(n.activeIndex,s,e,t)}function N8(s,e,t,n){e===void 0&&(e=!0),n===void 0&&(n=.5);const i=this;if(i.destroyed)return;typeof s>"u"&&(s=i.params.speed);let r=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,r),o=a+Math.floor((r-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[o]){const c=i.snapGrid[o],h=i.snapGrid[o+1];l-c>(h-c)*n&&(r+=i.params.slidesPerGroup)}else{const c=i.snapGrid[o-1],h=i.snapGrid[o];l-c<=(h-c)*n&&(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,s,e,t)}function P8(){const s=this;if(s.destroyed)return;const{params:e,slidesEl:t}=s,n=e.slidesPerView==="auto"?s.slidesPerViewDynamic():e.slidesPerView;let i=s.getSlideIndexWhenGrid(s.clickedIndex),r;const a=s.isElement?"swiper-slide":`.${e.slideClass}`,o=s.grid&&s.params.grid&&s.params.grid.rows>1;if(e.loop){if(s.animating)return;r=parseInt(s.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?s.slideToLoop(r):i>(o?(s.slides.length-n)/2-(s.params.grid.rows-1):s.slides.length-n)?(s.loopFix(),i=s.getSlideIndex(ii(t,`${a}[data-swiper-slide-index="${r}"]`)[0]),Ih(()=>{s.slideTo(i)})):s.slideTo(i)}else s.slideTo(i)}var F8={slideTo:M8,slideToLoop:R8,slideNext:D8,slidePrev:Q8,slideReset:L8,slideToClosest:N8,slideToClickedSlide:P8};function k8(s,e){const t=this,{params:n,slidesEl:i}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const r=()=>{ii(i,`.${n.slideClass}, swiper-slide`).forEach((A,p)=>{A.setAttribute("data-swiper-slide-index",p)})},a=()=>{const d=ii(i,`.${n.slideBlankClass}`);d.forEach(A=>{A.remove()}),d.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,h=o&&t.slides.length%n.grid.rows!==0,u=d=>{for(let A=0;A<d;A+=1){const p=t.isElement?is("swiper-slide",[n.slideBlankClass]):is("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(p)}};if(c){if(n.loopAddBlankSlides){const d=l-t.slides.length%l;u(d),t.recalcSlides(),t.updateSlides()}else Yf("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(h){if(n.loopAddBlankSlides){const d=n.grid.rows-t.slides.length%n.grid.rows;u(d),t.recalcSlides(),t.updateSlides()}else Yf("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();t.loopFix({slideRealIndex:s,direction:n.centeredSlides?void 0:"next",initial:e})}function U8(s){let{slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:i,activeSlideIndex:r,initial:a,byController:o,byMousewheel:l}=s===void 0?{}:s;const c=this;if(!c.params.loop)return;c.emit("beforeLoopFix");const{slides:h,allowSlidePrev:u,allowSlideNext:d,slidesEl:A,params:p}=c,{centeredSlides:g,initialSlide:m}=p;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&p.virtual.enabled){t&&(!p.centeredSlides&&c.snapIndex===0?c.slideTo(c.virtual.slides.length,0,!1,!0):p.centeredSlides&&c.snapIndex<p.slidesPerView?c.slideTo(c.virtual.slides.length+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(c.virtual.slidesBefore,0,!1,!0)),c.allowSlidePrev=u,c.allowSlideNext=d,c.emit("loopFix");return}let f=p.slidesPerView;f==="auto"?f=c.slidesPerViewDynamic():(f=Math.ceil(parseFloat(p.slidesPerView,10)),g&&f%2===0&&(f=f+1));const _=p.slidesPerGroupAuto?f:p.slidesPerGroup;let E=g?Math.max(_,Math.ceil(f/2)):_;E%_!==0&&(E+=_-E%_),E+=p.loopAdditionalSlides,c.loopedSlides=E;const y=c.grid&&p.grid&&p.grid.rows>1;h.length<f+E||c.params.effect==="cards"&&h.length<f+E*2?Yf("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"):y&&p.grid.fill==="row"&&Yf("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const b=[],x=[],I=y?Math.ceil(h.length/p.grid.rows):h.length,w=a&&I-m<f&&!g;let v=w?m:c.activeIndex;typeof r>"u"?r=c.getSlideIndex(h.find(N=>N.classList.contains(p.slideActiveClass))):v=r;const C=n==="next"||!n,S=n==="prev"||!n;let T=0,M=0;const F=(y?h[r].column:r)+(g&&typeof i>"u"?-f/2+.5:0);if(F<E){T=Math.max(E-F,_);for(let N=0;N<E-F;N+=1){const L=N-Math.floor(N/I)*I;if(y){const P=I-L-1;for(let z=h.length-1;z>=0;z-=1)h[z].column===P&&b.push(z)}else b.push(I-L-1)}}else if(F+f>I-E){M=Math.max(F-(I-E*2),_),w&&(M=Math.max(M,f-I+m+1));for(let N=0;N<M;N+=1){const L=N-Math.floor(N/I)*I;y?h.forEach((P,z)=>{P.column===L&&x.push(z)}):x.push(L)}}if(c.__preventObserver__=!0,requestAnimationFrame(()=>{c.__preventObserver__=!1}),c.params.effect==="cards"&&h.length<f+E*2&&(x.includes(r)&&x.splice(x.indexOf(r),1),b.includes(r)&&b.splice(b.indexOf(r),1)),S&&b.forEach(N=>{h[N].swiperLoopMoveDOM=!0,A.prepend(h[N]),h[N].swiperLoopMoveDOM=!1}),C&&x.forEach(N=>{h[N].swiperLoopMoveDOM=!0,A.append(h[N]),h[N].swiperLoopMoveDOM=!1}),c.recalcSlides(),p.slidesPerView==="auto"?c.updateSlides():y&&(b.length>0&&S||x.length>0&&C)&&c.slides.forEach((N,L)=>{c.grid.updateSlide(L,N,c.slides)}),p.watchSlidesProgress&&c.updateSlidesOffset(),t){if(b.length>0&&S){if(typeof e>"u"){const N=c.slidesGrid[v],P=c.slidesGrid[v+T]-N;l?c.setTranslate(c.translate-P):(c.slideTo(v+Math.ceil(T),0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-P,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-P))}else if(i){const N=y?b.length/p.grid.rows:b.length;c.slideTo(c.activeIndex+N,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(x.length>0&&C)if(typeof e>"u"){const N=c.slidesGrid[v],P=c.slidesGrid[v-M]-N;l?c.setTranslate(c.translate-P):(c.slideTo(v-M,0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-P,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-P))}else{const N=y?x.length/p.grid.rows:x.length;c.slideTo(c.activeIndex-N,0,!1,!0)}}if(c.allowSlidePrev=u,c.allowSlideNext=d,c.controller&&c.controller.control&&!o){const N={slideRealIndex:e,direction:n,setTranslate:i,activeSlideIndex:r,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach(L=>{!L.destroyed&&L.params.loop&&L.loopFix({...N,slideTo:L.params.slidesPerView===p.slidesPerView?t:!1})}):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...N,slideTo:c.controller.control.params.slidesPerView===p.slidesPerView?t:!1})}c.emit("loopFix")}function O8(){const s=this,{params:e,slidesEl:t}=s;if(!e.loop||!t||s.virtual&&s.params.virtual.enabled)return;s.recalcSlides();const n=[];s.slides.forEach(i=>{const r=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;n[r]=i}),s.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),n.forEach(i=>{t.append(i)}),s.recalcSlides(),s.slideTo(s.realIndex,0)}var G8={loopCreate:k8,loopFix:U8,loopDestroy:O8};function z8(s){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=s?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})}function H8(){const s=this;s.params.watchOverflow&&s.isLocked||s.params.cssMode||(s.isElement&&(s.__preventObserver__=!0),s[s.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",s.isElement&&requestAnimationFrame(()=>{s.__preventObserver__=!1}))}var $8={setGrabCursor:z8,unsetGrabCursor:H8};function V8(s,e){e===void 0&&(e=this);function t(n){if(!n||n===Jn()||n===un())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(s);return!i&&!n.getRootNode?null:i||t(n.getRootNode().host)}return t(e)}function Qx(s,e,t){const n=un(),{params:i}=s,r=i.edgeSwipeDetection,a=i.edgeSwipeThreshold;return r&&(t<=a||t>=n.innerWidth-a)?r==="prevent"?(e.preventDefault(),!0):!1:!0}function Y8(s){const e=this,t=Jn();let n=s;n.originalEvent&&(n=n.originalEvent);const i=e.touchEventsData;if(n.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==n.pointerId)return;i.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(i.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){Qx(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"&&!e8(l,e.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||i.isTouched&&i.isMoved)return;const c=!!r.noSwipingClass&&r.noSwipingClass!=="",h=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&h&&(l=h[0]);const u=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,d=!!(n.target&&n.target.shadowRoot);if(r.noSwiping&&(d?V8(u,l):l.closest(u))){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(!Qx(e,n,A))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=A,a.startY=p,i.touchStartTime=_s(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,r.threshold>0&&(i.allowThresholdMove=!1);let g=!0;l.matches(i.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==l&&(n.pointerType==="mouse"||n.pointerType!=="mouse"&&!l.matches(i.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 q8(s){const e=Jn(),t=this,n=t.touchEventsData,{params:i,touches:r,rtlTranslate:a,enabled:o}=t;if(!o||!i.simulateTouch&&s.pointerType==="mouse")return;let l=s;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(b=>b.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 h=c.pageX,u=c.pageY;if(l.preventedByNestedSwiper){r.startX=h,r.startY=u;return}if(!t.allowTouchMove){l.target.matches(n.focusableElements)||(t.allowClick=!1),n.isTouched&&(Object.assign(r,{startX:h,startY:u,currentX:h,currentY:u}),n.touchStartTime=_s());return}if(i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(u<r.startY&&t.translate<=t.maxTranslate()||u>r.startY&&t.translate>=t.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else{if(a&&(h>r.startX&&-t.translate<=t.maxTranslate()||h<r.startX&&-t.translate>=t.minTranslate()))return;if(!a&&(h<r.startX&&t.translate<=t.maxTranslate()||h>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=h,r.currentY=u;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 b;t.isHorizontal()&&r.currentY===r.startY||t.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:d*d+A*A>=25&&(b=Math.atan2(Math.abs(A),Math.abs(d))*180/Math.PI,n.isScrolling=t.isHorizontal()?b>i.touchAngle:90-b>i.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,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let p=t.isHorizontal()?d:A,g=t.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;i.oneWayMovement&&(p=Math.abs(p)*(a?1:-1),g=Math.abs(g)*(a?1:-1)),r.diff=p,p*=i.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&&!i.cssMode,_=t.touchesDirection==="next"&&t.allowSlideNext||t.touchesDirection==="prev"&&t.allowSlidePrev;if(!n.isMoved){if(f&&_&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(b)}n.allowMomentumBounce=!1,i.grabCursor&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!0),t.emit("sliderFirstMove",l)}if(new Date().getTime(),i._loopSwapReset!==!1&&n.isMoved&&n.allowThresholdMove&&m!==t.touchesDirection&&f&&_&&Math.abs(p)>=1){Object.assign(r,{startX:h,startY:u,currentX:h,currentY:u,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}t.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=p+n.startTranslate;let E=!0,y=i.resistanceRatio;if(i.touchReleaseOnEdges&&(y=0),p>0?(f&&_&&n.allowThresholdMove&&n.currentTranslate>(i.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]-(i.slidesPerView!=="auto"&&t.slides.length-i.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()&&(E=!1,i.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+n.startTranslate+p)**y))):p<0&&(f&&_&&n.allowThresholdMove&&n.currentTranslate<(i.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween+(i.slidesPerView!=="auto"&&t.slides.length-i.slidesPerView>=2?t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween:0):t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-(i.slidesPerView==="auto"?t.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),n.currentTranslate<t.maxTranslate()&&(E=!1,i.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-n.startTranslate-p)**y))),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),i.threshold>0)if(Math.abs(p)>i.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}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&t.freeMode||i.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate))}function W8(s){const e=this,t=e.touchEventsData;let n=s;n.originalEvent&&(n=n.originalEvent);let i;if(n.type==="touchend"||n.type==="touchcancel"){if(i=[...n.changedTouches].find(b=>b.identifier===t.touchId),!i||i.identifier!==t.touchId)return}else{if(t.touchId!==null||n.pointerId!==t.pointerId)return;i=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:h}=e;if(!h||!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 u=_s(),d=u-t.touchStartTime;if(e.allowClick){const b=n.path||n.composedPath&&n.composedPath();e.updateClickedSlide(b&&b[0]||n.target,b),e.emit("tap click",n),d<300&&u-t.lastClickTime<300&&e.emit("doubleTap doubleClick",n)}if(t.lastClickTime=_s(),Ih(()=>{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 b=0;b<c.length;b+=b<a.slidesPerGroupSkip?1:a.slidesPerGroup){const x=b<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;typeof c[b+x]<"u"?(p||A>=c[b]&&A<c[b+x])&&(g=b,m=c[b+x]-c[b]):(p||A>=c[b])&&(g=b,m=c[c.length-1]-c[c.length-2])}let f=null,_=null;a.rewind&&(e.isBeginning?_=a.virtual&&a.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(f=0));const E=(A-c[g])/m,y=g<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(d>a.longSwipesMs){if(!a.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(E>=a.longSwipesRatio?e.slideTo(a.rewind&&e.isEnd?f:g+y):e.slideTo(g)),e.swipeDirection==="prev"&&(E>1-a.longSwipesRatio?e.slideTo(g+y):_!==null&&E<0&&Math.abs(E)>a.longSwipesRatio?e.slideTo(_):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+y):e.slideTo(g):(e.swipeDirection==="next"&&e.slideTo(f!==null?f:g+y),e.swipeDirection==="prev"&&e.slideTo(_!==null?_:g))}}function Lx(){const s=this,{params:e,el:t}=s;if(t&&t.offsetWidth===0)return;e.breakpoints&&s.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:i,snapGrid:r}=s,a=s.virtual&&s.params.virtual.enabled;s.allowSlideNext=!0,s.allowSlidePrev=!0,s.updateSize(),s.updateSlides(),s.updateSlidesClasses();const o=a&&e.loop;(e.slidesPerView==="auto"||e.slidesPerView>1)&&s.isEnd&&!s.isBeginning&&!s.params.centeredSlides&&!o?s.slideTo(s.slides.length-1,0,!1,!0):s.params.loop&&!a?s.slideToLoop(s.realIndex,0,!1,!0):s.slideTo(s.activeIndex,0,!1,!0),s.autoplay&&s.autoplay.running&&s.autoplay.paused&&(clearTimeout(s.autoplay.resizeTimeout),s.autoplay.resizeTimeout=setTimeout(()=>{s.autoplay&&s.autoplay.running&&s.autoplay.paused&&s.autoplay.resume()},500)),s.allowSlidePrev=i,s.allowSlideNext=n,s.params.watchOverflow&&r!==s.snapGrid&&s.checkOverflow()}function j8(s){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&s.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(s.stopPropagation(),s.stopImmediatePropagation())))}function X8(){const s=this,{wrapperEl:e,rtlTranslate:t,enabled:n}=s;if(!n)return;s.previousTranslate=s.translate,s.isHorizontal()?s.translate=-e.scrollLeft:s.translate=-e.scrollTop,s.translate===0&&(s.translate=0),s.updateActiveIndex(),s.updateSlidesClasses();let i;const r=s.maxTranslate()-s.minTranslate();r===0?i=0:i=(s.translate-s.minTranslate())/r,i!==s.progress&&s.updateProgress(t?-s.translate:s.translate),s.emit("setTranslate",s.translate,!1)}function J8(s){const e=this;Kp(e,s.target),!(e.params.cssMode||e.params.slidesPerView!=="auto"&&!e.params.autoHeight)&&e.update()}function K8(){const s=this;s.documentTouchHandlerProceeded||(s.documentTouchHandlerProceeded=!0,s.params.touchReleaseOnEdges&&(s.el.style.touchAction="auto"))}const wR=(s,e)=>{const t=Jn(),{params:n,el:i,wrapperEl:r,device:a}=s,o=!!n.nested,l=e==="on"?"addEventListener":"removeEventListener",c=e;!i||typeof i=="string"||(t[l]("touchstart",s.onDocumentTouchStart,{passive:!1,capture:o}),i[l]("touchstart",s.onTouchStart,{passive:!1}),i[l]("pointerdown",s.onTouchStart,{passive:!1}),t[l]("touchmove",s.onTouchMove,{passive:!1,capture:o}),t[l]("pointermove",s.onTouchMove,{passive:!1,capture:o}),t[l]("touchend",s.onTouchEnd,{passive:!0}),t[l]("pointerup",s.onTouchEnd,{passive:!0}),t[l]("pointercancel",s.onTouchEnd,{passive:!0}),t[l]("touchcancel",s.onTouchEnd,{passive:!0}),t[l]("pointerout",s.onTouchEnd,{passive:!0}),t[l]("pointerleave",s.onTouchEnd,{passive:!0}),t[l]("contextmenu",s.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&i[l]("click",s.onClick,!0),n.cssMode&&r[l]("scroll",s.onScroll),n.updateOnWindowResize?s[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Lx,!0):s[c]("observerUpdate",Lx,!0),i[l]("load",s.onLoad,{capture:!0}))};function Z8(){const s=this,{params:e}=s;s.onTouchStart=Y8.bind(s),s.onTouchMove=q8.bind(s),s.onTouchEnd=W8.bind(s),s.onDocumentTouchStart=K8.bind(s),e.cssMode&&(s.onScroll=X8.bind(s)),s.onClick=j8.bind(s),s.onLoad=J8.bind(s),wR(s,"on")}function eY(){wR(this,"off")}var tY={attachEvents:Z8,detachEvents:eY};const Nx=(s,e)=>s.grid&&e.grid&&e.grid.rows>1;function nY(){const s=this,{realIndex:e,initialized:t,params:n,el:i}=s,r=n.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const a=Jn(),o=n.breakpointsBase==="window"||!n.breakpointsBase?n.breakpointsBase:"container",l=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?s.el:a.querySelector(n.breakpointsBase),c=s.getBreakpoint(r,o,l);if(!c||s.currentBreakpoint===c)return;const u=(c in r?r[c]:void 0)||s.originalParams,d=Nx(s,n),A=Nx(s,u),p=s.params.grabCursor,g=u.grabCursor,m=n.enabled;d&&!A?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),s.emitContainerClasses()):!d&&A&&(i.classList.add(`${n.containerModifierClass}grid`),(u.grid.fill&&u.grid.fill==="column"||!u.grid.fill&&n.grid.fill==="column")&&i.classList.add(`${n.containerModifierClass}grid-column`),s.emitContainerClasses()),p&&!g?s.unsetGrabCursor():!p&&g&&s.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(x=>{if(typeof u[x]>"u")return;const I=n[x]&&n[x].enabled,w=u[x]&&u[x].enabled;I&&!w&&s[x].disable(),!I&&w&&s[x].enable()});const f=u.direction&&u.direction!==n.direction,_=n.loop&&(u.slidesPerView!==n.slidesPerView||f),E=n.loop;f&&t&&s.changeDirection(),Ki(s.params,u);const y=s.params.enabled,b=s.params.loop;Object.assign(s,{allowTouchMove:s.params.allowTouchMove,allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev}),m&&!y?s.disable():!m&&y&&s.enable(),s.currentBreakpoint=c,s.emit("_beforeBreakpoint",u),t&&(_?(s.loopDestroy(),s.loopCreate(e),s.updateSlides()):!E&&b?(s.loopCreate(e),s.updateSlides()):E&&!b&&s.loopDestroy()),s.emit("breakpoint",u)}function iY(s,e,t){if(e===void 0&&(e="window"),!s||e==="container"&&!t)return;let n=!1;const i=un(),r=e==="window"?i.innerHeight:t.clientHeight,a=Object.keys(s).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"?i.matchMedia(`(min-width: ${c}px)`).matches&&(n=l):c<=t.clientWidth&&(n=l)}return n||"max"}var sY={setBreakpoint:nY,getBreakpoint:iY};function rY(s,e){const t=[];return s.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(i=>{n[i]&&t.push(e+i)}):typeof n=="string"&&t.push(e+n)}),t}function aY(){const s=this,{classNames:e,params:t,rtl:n,el:i,device:r}=s,a=rY(["initialized",t.direction,{"free-mode":s.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),i.classList.add(...e),s.emitContainerClasses()}function oY(){const s=this,{el:e,classNames:t}=s;!e||typeof e=="string"||(e.classList.remove(...t),s.emitContainerClasses())}var lY={addClasses:aY,removeClasses:oY};function cY(){const s=this,{isLocked:e,params:t}=s,{slidesOffsetBefore:n}=t;if(n){const i=s.slides.length-1,r=s.slidesGrid[i]+s.slidesSizesGrid[i]+n*2;s.isLocked=s.size>r}else s.isLocked=s.snapGrid.length===1;t.allowSlideNext===!0&&(s.allowSlideNext=!s.isLocked),t.allowSlidePrev===!0&&(s.allowSlidePrev=!s.isLocked),e&&e!==s.isLocked&&(s.isEnd=!1),e!==s.isLocked&&s.emit(s.isLocked?"lock":"unlock")}var hY={checkOverflow:cY},a0={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,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 uY(s,e){return function(n){n===void 0&&(n={});const i=Object.keys(n)[0],r=n[i];if(typeof r!="object"||r===null){Ki(e,n);return}if(s[i]===!0&&(s[i]={enabled:!0}),i==="navigation"&&s[i]&&s[i].enabled&&!s[i].prevEl&&!s[i].nextEl&&(s[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&s[i]&&s[i].enabled&&!s[i].el&&(s[i].auto=!0),!(i in s&&"enabled"in r)){Ki(e,n);return}typeof s[i]=="object"&&!("enabled"in s[i])&&(s[i].enabled=!0),s[i]||(s[i]={enabled:!1}),Ki(e,n)}}const CE={eventsEmitter:l8,update:y8,translate:x8,transition:T8,slide:F8,loop:G8,grabCursor:$8,events:tY,breakpoints:sY,checkOverflow:hY,classes:lY},xE={};class Ji{constructor(){let e,t;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i.length===1&&i[0].constructor&&Object.prototype.toString.call(i[0]).slice(8,-1)==="Object"?t=i[0]:[e,t]=i,t||(t={}),t=Ki({},t),e&&!t.el&&(t.el=e);const a=Jn();if(t.el&&typeof t.el=="string"&&a.querySelectorAll(t.el).length>1){const h=[];return a.querySelectorAll(t.el).forEach(u=>{const d=Ki({},t,{el:u});h.push(new Ji(d))}),h}const o=this;o.__swiper__=!0,o.support=vR(),o.device=IR({userAgent:t.userAgent}),o.browser=CR(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],t.modules&&Array.isArray(t.modules)&&o.modules.push(...t.modules);const l={};o.modules.forEach(h=>{h({params:t,swiper:o,extendParams:uY(t,l),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});const c=Ki({},a0,l);return o.params=Ki({},c,xE,t),o.originalParams=Ki({},o.params),o.passedParams=Ki({},t),o.params&&o.params.on&&Object.keys(o.params.on).forEach(h=>{o.on(h,o.params.on[h])}),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return o.params.direction==="horizontal"},isVertical(){return o.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:o.params.allowSlideNext,allowSlidePrev:o.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:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}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,i=ii(t,`.${n.slideClass}, swiper-slide`),r=$d(i[0]);return $d(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=ii(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 i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;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 i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){e===void 0&&(e="current"),t===void 0&&(t=!1);const n=this,{params:i,slides:r,slidesGrid:a,slidesSizesGrid:o,size:l,activeIndex:c}=n;let h=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let u=r[c]?Math.ceil(r[c].swiperSlideSize):0,d;for(let A=c+1;A<r.length;A+=1)r[A]&&!d&&(u+=Math.ceil(r[A].swiperSlideSize),h+=1,u>l&&(d=!0));for(let A=c-1;A>=0;A-=1)r[A]&&!d&&(u+=r[A].swiperSlideSize,h+=1,u>l&&(d=!0))}else if(e==="current")for(let u=c+1;u<r.length;u+=1)(t?a[u]+o[u]-a[c]<l:a[u]-a[c]<l)&&(h+=1);else for(let u=c-1;u>=0;u-=1)a[c]-a[u]<l&&(h+=1);return h}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&&Kp(e,a)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function i(){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)i(),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||i()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){t===void 0&&(t=!0);const n=this,i=n.params.direction;return e||(e=i==="horizontal"?"vertical":"horizontal"),e===i||e!=="horizontal"&&e!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),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 i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):ii(n,i())[0];return!a&&t.params.createElements&&(a=is("div",t.params.wrapperClass),n.append(a),ii(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"||to(n,"direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||to(n,"direction")==="rtl"),wrongRTL:to(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 i=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&i.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(r=>{r.complete?Kp(t,r):r.addEventListener("load",a=>{Kp(t,a.target)})}),r0(t),t.initialized=!0,r0(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){e===void 0&&(e=!0),t===void 0&&(t=!0);const n=this,{params:i,el:r,wrapperEl:a,slides:o}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.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(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.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),X5(n)),n.destroyed=!0),null}static extendDefaults(e){Ki(xE,e)}static get extendedDefaults(){return xE}static get defaults(){return a0}static installModule(e){Ji.prototype.__modules__||(Ji.prototype.__modules__=[]);const t=Ji.prototype.__modules__;typeof e=="function"&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(t=>Ji.installModule(t)),Ji):(Ji.installModule(e),Ji)}}Object.keys(CE).forEach(s=>{Object.keys(CE[s]).forEach(e=>{Ji.prototype[e]=CE[s][e]})});Ji.use([a8,o8]);function dY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;t({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let r;const a=Jn();e.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const o=a.createElement("div");function l(p,g){const m=e.params.virtual;if(m.cache&&e.virtual.cache[g])return e.virtual.cache[g];let f;return m.renderSlide?(f=m.renderSlide.call(e,p,g),typeof f=="string"&&(Is(o,f),f=o.children[0])):e.isElement?f=is("swiper-slide"):f=is("div",e.params.slideClass),f.setAttribute("data-swiper-slide-index",g),m.renderSlide||Is(f,p),m.cache&&(e.virtual.cache[g]=f),f}function c(p,g,m){const{slidesPerView:f,slidesPerGroup:_,centeredSlides:E,loop:y,initialSlide:b}=e.params;if(g&&!y&&b>0)return;const{addSlidesBefore:x,addSlidesAfter:I}=e.params.virtual,{from:w,to:v,slides:C,slidesGrid:S,offset:T}=e.virtual;e.params.cssMode||e.updateActiveIndex();const M=typeof m>"u"?e.activeIndex||0:m;let R;e.rtlTranslate?R="right":R=e.isHorizontal()?"left":"top";let F,N;E?(F=Math.floor(f/2)+_+I,N=Math.floor(f/2)+_+x):(F=f+(_-1)+I,N=(y?f:_)+x);let L=M-N,P=M+F;y||(L=Math.max(L,0),P=Math.min(P,C.length-1));let z=(e.slidesGrid[L]||0)-(e.slidesGrid[0]||0);y&&M>=N?(L-=N,E||(z+=e.slidesGrid[0])):y&&M<N&&(L=-N,E&&(z+=e.slidesGrid[0])),Object.assign(e.virtual,{from:L,to:P,offset:z,slidesGrid:e.slidesGrid,slidesBefore:N,slidesAfter:F});function te(){e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),i("virtualUpdate")}if(w===L&&v===P&&!p){e.slidesGrid!==S&&z!==T&&e.slides.forEach(Y=>{Y.style[R]=`${z-Math.abs(e.cssOverflowAdjustment())}px`}),e.updateProgress(),i("virtualUpdate");return}if(e.params.virtual.renderExternal){e.params.virtual.renderExternal.call(e,{offset:z,from:L,to:P,slides:(function(){const $=[];for(let de=L;de<=P;de+=1)$.push(C[de]);return $})()}),e.params.virtual.renderExternalUpdate?te():i("virtualUpdate");return}const ne=[],ue=[],pe=Y=>{let $=Y;return Y<0?$=C.length+Y:$>=C.length&&($=$-C.length),$};if(p)e.slides.filter(Y=>Y.matches(`.${e.params.slideClass}, swiper-slide`)).forEach(Y=>{Y.remove()});else for(let Y=w;Y<=v;Y+=1)if(Y<L||Y>P){const $=pe(Y);e.slides.filter(de=>de.matches(`.${e.params.slideClass}[data-swiper-slide-index="${$}"], swiper-slide[data-swiper-slide-index="${$}"]`)).forEach(de=>{de.remove()})}const Z=y?-C.length:0,G=y?C.length*2:C.length;for(let Y=Z;Y<G;Y+=1)if(Y>=L&&Y<=P){const $=pe(Y);typeof v>"u"||p?ue.push($):(Y>v&&ue.push($),Y<w&&ne.push($))}if(ue.forEach(Y=>{e.slidesEl.append(l(C[Y],Y))}),y)for(let Y=ne.length-1;Y>=0;Y-=1){const $=ne[Y];e.slidesEl.prepend(l(C[$],$))}else ne.sort((Y,$)=>$-Y),ne.forEach(Y=>{e.slidesEl.prepend(l(C[Y],Y))});ii(e.slidesEl,".swiper-slide, swiper-slide").forEach(Y=>{Y.style[R]=`${z-Math.abs(e.cssOverflowAdjustment())}px`}),te()}function h(p){if(typeof p=="object"&&"length"in p)for(let g=0;g<p.length;g+=1)p[g]&&e.virtual.slides.push(p[g]);else e.virtual.slides.push(p);c(!0)}function u(p){const g=e.activeIndex;let m=g+1,f=1;if(Array.isArray(p)){for(let _=0;_<p.length;_+=1)p[_]&&e.virtual.slides.unshift(p[_]);m=g+p.length,f=p.length}else e.virtual.slides.unshift(p);if(e.params.virtual.cache){const _=e.virtual.cache,E={};Object.keys(_).forEach(y=>{const b=_[y],x=b.getAttribute("data-swiper-slide-index");x&&b.setAttribute("data-swiper-slide-index",parseInt(x,10)+f),E[parseInt(y,10)+f]=b}),e.virtual.cache=E}c(!0),e.slideTo(m,0)}function d(p){if(typeof p>"u"||p===null)return;let g=e.activeIndex;if(Array.isArray(p))for(let m=p.length-1;m>=0;m-=1)e.params.virtual.cache&&(delete e.virtual.cache[p[m]],Object.keys(e.virtual.cache).forEach(f=>{f>p&&(e.virtual.cache[f-1]=e.virtual.cache[f],e.virtual.cache[f-1].setAttribute("data-swiper-slide-index",f-1),delete e.virtual.cache[f])})),e.virtual.slides.splice(p[m],1),p[m]<g&&(g-=1),g=Math.max(g,0);else e.params.virtual.cache&&(delete e.virtual.cache[p],Object.keys(e.virtual.cache).forEach(m=>{m>p&&(e.virtual.cache[m-1]=e.virtual.cache[m],e.virtual.cache[m-1].setAttribute("data-swiper-slide-index",m-1),delete e.virtual.cache[m])})),e.virtual.slides.splice(p,1),p<g&&(g-=1),g=Math.max(g,0);c(!0),e.slideTo(g,0)}function A(){e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),c(!0),e.slideTo(0,0)}n("beforeInit",()=>{if(!e.params.virtual.enabled)return;let p;if(typeof e.passedParams.virtual.slides>"u"){const g=[...e.slidesEl.children].filter(m=>m.matches(`.${e.params.slideClass}, swiper-slide`));g&&g.length&&(e.virtual.slides=[...g],p=!0,g.forEach((m,f)=>{m.setAttribute("data-swiper-slide-index",f),e.virtual.cache[f]=m,m.remove()}))}p||(e.virtual.slides=e.params.virtual.slides),e.classNames.push(`${e.params.containerModifierClass}virtual`),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0,c(!1,!0)}),n("setTranslate",()=>{e.params.virtual.enabled&&(e.params.cssMode&&!e._immediateVirtual?(clearTimeout(r),r=setTimeout(()=>{c()},100)):c())}),n("init update resize",()=>{e.params.virtual.enabled&&e.params.cssMode&&qu(e.wrapperEl,"--swiper-virtual-size",`${e.virtualSize}px`)}),Object.assign(e.virtual,{appendSlide:h,prependSlide:u,removeSlide:d,removeAllSlides:A,update:c})}function AY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=Jn(),a=un();e.keyboard={enabled:!1},t({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function o(h){if(!e.enabled)return;const{rtlTranslate:u}=e;let d=h;d.originalEvent&&(d=d.originalEvent);const A=d.keyCode||d.charCode,p=e.params.keyboard.pageUpDown,g=p&&A===33,m=p&&A===34,f=A===37,_=A===39,E=A===38,y=A===40;if(!e.allowSlideNext&&(e.isHorizontal()&&_||e.isVertical()&&y||m)||!e.allowSlidePrev&&(e.isHorizontal()&&f||e.isVertical()&&E||g))return!1;if(!(d.shiftKey||d.altKey||d.ctrlKey||d.metaKey)&&!(r.activeElement&&(r.activeElement.isContentEditable||r.activeElement.nodeName&&(r.activeElement.nodeName.toLowerCase()==="input"||r.activeElement.nodeName.toLowerCase()==="textarea")))){if(e.params.keyboard.onlyInViewport&&(g||m||f||_||E||y)){let b=!1;if(fl(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&fl(e.el,`.${e.params.slideActiveClass}`).length===0)return;const x=e.el,I=x.clientWidth,w=x.clientHeight,v=a.innerWidth,C=a.innerHeight,S=qf(x);u&&(S.left-=x.scrollLeft);const T=[[S.left,S.top],[S.left+I,S.top],[S.left,S.top+w],[S.left+I,S.top+w]];for(let M=0;M<T.length;M+=1){const R=T[M];if(R[0]>=0&&R[0]<=v&&R[1]>=0&&R[1]<=C){if(R[0]===0&&R[1]===0)continue;b=!0}}if(!b)return}e.isHorizontal()?((g||m||f||_)&&(d.preventDefault?d.preventDefault():d.returnValue=!1),((m||_)&&!u||(g||f)&&u)&&e.slideNext(),((g||f)&&!u||(m||_)&&u)&&e.slidePrev()):((g||m||E||y)&&(d.preventDefault?d.preventDefault():d.returnValue=!1),(m||y)&&e.slideNext(),(g||E)&&e.slidePrev()),i("keyPress",A)}}function l(){e.keyboard.enabled||(r.addEventListener("keydown",o),e.keyboard.enabled=!0)}function c(){e.keyboard.enabled&&(r.removeEventListener("keydown",o),e.keyboard.enabled=!1)}n("init",()=>{e.params.keyboard.enabled&&l()}),n("destroy",()=>{e.keyboard.enabled&&c()}),Object.assign(e.keyboard,{enable:l,disable:c})}function pY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=un();t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),e.mousewheel={enabled:!1};let a,o=_s(),l;const c=[];function h(E){let I=0,w=0,v=0,C=0;return"detail"in E&&(w=E.detail),"wheelDelta"in E&&(w=-E.wheelDelta/120),"wheelDeltaY"in E&&(w=-E.wheelDeltaY/120),"wheelDeltaX"in E&&(I=-E.wheelDeltaX/120),"axis"in E&&E.axis===E.HORIZONTAL_AXIS&&(I=w,w=0),v=I*10,C=w*10,"deltaY"in E&&(C=E.deltaY),"deltaX"in E&&(v=E.deltaX),E.shiftKey&&!v&&(v=C,C=0),(v||C)&&E.deltaMode&&(E.deltaMode===1?(v*=40,C*=40):(v*=800,C*=800)),v&&!I&&(I=v<1?-1:1),C&&!w&&(w=C<1?-1:1),{spinX:I,spinY:w,pixelX:v,pixelY:C}}function u(){e.enabled&&(e.mouseEntered=!0)}function d(){e.enabled&&(e.mouseEntered=!1)}function A(E){return e.params.mousewheel.thresholdDelta&&E.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&_s()-o<e.params.mousewheel.thresholdTime?!1:E.delta>=6&&_s()-o<60?!0:(E.direction<0?(!e.isEnd||e.params.loop)&&!e.animating&&(e.slideNext(),i("scroll",E.raw)):(!e.isBeginning||e.params.loop)&&!e.animating&&(e.slidePrev(),i("scroll",E.raw)),o=new r.Date().getTime(),!1)}function p(E){const y=e.params.mousewheel;if(E.direction<0){if(e.isEnd&&!e.params.loop&&y.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&y.releaseOnEdges)return!0;return!1}function g(E){let y=E,b=!0;if(!e.enabled||E.target.closest(`.${e.params.mousewheel.noMousewheelClass}`))return;const x=e.params.mousewheel;e.params.cssMode&&y.preventDefault();let I=e.el;e.params.mousewheel.eventsTarget!=="container"&&(I=document.querySelector(e.params.mousewheel.eventsTarget));const w=I&&I.contains(y.target);if(!e.mouseEntered&&!w&&!x.releaseOnEdges)return!0;y.originalEvent&&(y=y.originalEvent);let v=0;const C=e.rtlTranslate?-1:1,S=h(y);if(x.forceToAxis)if(e.isHorizontal())if(Math.abs(S.pixelX)>Math.abs(S.pixelY))v=-S.pixelX*C;else return!0;else if(Math.abs(S.pixelY)>Math.abs(S.pixelX))v=-S.pixelY;else return!0;else v=Math.abs(S.pixelX)>Math.abs(S.pixelY)?-S.pixelX*C:-S.pixelY;if(v===0)return!0;x.invert&&(v=-v);let T=e.getTranslate()+v*x.sensitivity;if(T>=e.minTranslate()&&(T=e.minTranslate()),T<=e.maxTranslate()&&(T=e.maxTranslate()),b=e.params.loop?!0:!(T===e.minTranslate()||T===e.maxTranslate()),b&&e.params.nested&&y.stopPropagation(),!e.params.freeMode||!e.params.freeMode.enabled){const M={time:_s(),delta:Math.abs(v),direction:Math.sign(v),raw:E};c.length>=2&&c.shift();const R=c.length?c[c.length-1]:void 0;if(c.push(M),R?(M.direction!==R.direction||M.delta>R.delta||M.time>R.time+150)&&A(M):A(M),p(M))return!0}else{const M={time:_s(),delta:Math.abs(v),direction:Math.sign(v)},R=l&&M.time<l.time+500&&M.delta<=l.delta&&M.direction===l.direction;if(!R){l=void 0;let F=e.getTranslate()+v*x.sensitivity;const N=e.isBeginning,L=e.isEnd;if(F>=e.minTranslate()&&(F=e.minTranslate()),F<=e.maxTranslate()&&(F=e.maxTranslate()),e.setTransition(0),e.setTranslate(F),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!N&&e.isBeginning||!L&&e.isEnd)&&e.updateSlidesClasses(),e.params.loop&&e.loopFix({direction:M.direction<0?"next":"prev",byMousewheel:!0}),e.params.freeMode.sticky){clearTimeout(a),a=void 0,c.length>=15&&c.shift();const P=c.length?c[c.length-1]:void 0,z=c[0];if(c.push(M),P&&(M.delta>P.delta||M.direction!==P.direction))c.splice(0);else if(c.length>=15&&M.time-z.time<500&&z.delta-M.delta>=1&&M.delta<=6){const te=v>0?.8:.2;l=M,c.splice(0),a=Ih(()=>{e.destroyed||!e.params||e.slideToClosest(e.params.speed,!0,void 0,te)},0)}a||(a=Ih(()=>{if(e.destroyed||!e.params)return;const te=.5;l=M,c.splice(0),e.slideToClosest(e.params.speed,!0,void 0,te)},500))}if(R||i("scroll",y),e.params.autoplay&&e.params.autoplay.disableOnInteraction&&e.autoplay.stop(),x.releaseOnEdges&&(F===e.minTranslate()||F===e.maxTranslate()))return!0}}return y.preventDefault?y.preventDefault():y.returnValue=!1,!1}function m(E){let y=e.el;e.params.mousewheel.eventsTarget!=="container"&&(y=document.querySelector(e.params.mousewheel.eventsTarget)),y[E]("mouseenter",u),y[E]("mouseleave",d),y[E]("wheel",g)}function f(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",g),!0):e.mousewheel.enabled?!1:(m("addEventListener"),e.mousewheel.enabled=!0,!0)}function _(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,g),!0):e.mousewheel.enabled?(m("removeEventListener"),e.mousewheel.enabled=!1,!0):!1}n("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&_(),e.params.mousewheel.enabled&&f()}),n("destroy",()=>{e.params.cssMode&&f(),e.mousewheel.enabled&&_()}),Object.assign(e.mousewheel,{enable:f,disable:_})}function kb(s,e,t,n){return s.params.createElements&&Object.keys(n).forEach(i=>{if(!t[i]&&t.auto===!0){let r=ii(s.el,`.${n[i]}`)[0];r||(r=is("div",n[i]),r.className=n[i],s.el.append(r)),t[i]=r,e[i]=r}}),t}function fY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null};function r(p){let g;return p&&typeof p=="string"&&e.isElement&&(g=e.el.querySelector(p)||e.hostEl.querySelector(p),g)?g:(p&&(typeof p=="string"&&(g=[...document.querySelectorAll(p)]),e.params.uniqueNavElements&&typeof p=="string"&&g&&g.length>1&&e.el.querySelectorAll(p).length===1?g=e.el.querySelector(p):g&&g.length===1&&(g=g[0])),p&&!g?p:g)}function a(p,g){const m=e.params.navigation;p=bt(p),p.forEach(f=>{f&&(f.classList[g?"add":"remove"](...m.disabledClass.split(" ")),f.tagName==="BUTTON"&&(f.disabled=g),e.params.watchOverflow&&e.enabled&&f.classList[e.isLocked?"add":"remove"](m.lockClass))})}function o(){const{nextEl:p,prevEl:g}=e.navigation;if(e.params.loop){a(g,!1),a(p,!1);return}a(g,e.isBeginning&&!e.params.rewind),a(p,e.isEnd&&!e.params.rewind)}function l(p){p.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),i("navigationPrev"))}function c(p){p.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),i("navigationNext"))}function h(){const p=e.params.navigation;if(e.params.navigation=kb(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(p.nextEl||p.prevEl))return;let g=r(p.nextEl),m=r(p.prevEl);Object.assign(e.navigation,{nextEl:g,prevEl:m}),g=bt(g),m=bt(m);const f=(_,E)=>{_&&_.addEventListener("click",E==="next"?c:l),!e.enabled&&_&&_.classList.add(...p.lockClass.split(" "))};g.forEach(_=>f(_,"next")),m.forEach(_=>f(_,"prev"))}function u(){let{nextEl:p,prevEl:g}=e.navigation;p=bt(p),g=bt(g);const m=(f,_)=>{f.removeEventListener("click",_==="next"?c:l),f.classList.remove(...e.params.navigation.disabledClass.split(" "))};p.forEach(f=>m(f,"next")),g.forEach(f=>m(f,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?A():(h(),o())}),n("toEdge fromEdge lock unlock",()=>{o()}),n("destroy",()=>{u()}),n("enable disable",()=>{let{nextEl:p,prevEl:g}=e.navigation;if(p=bt(p),g=bt(g),e.enabled){o();return}[...p,...g].filter(m=>!!m).forEach(m=>m.classList.add(e.params.navigation.lockClass))}),n("click",(p,g)=>{let{nextEl:m,prevEl:f}=e.navigation;m=bt(m),f=bt(f);const _=g.target;let E=f.includes(_)||m.includes(_);if(e.isElement&&!E){const y=g.path||g.composedPath&&g.composedPath();y&&(E=y.find(b=>m.includes(b)||f.includes(b)))}if(e.params.navigation.hideOnClick&&!E){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===_||e.pagination.el.contains(_)))return;let y;m.length?y=m[0].classList.contains(e.params.navigation.hiddenClass):f.length&&(y=f[0].classList.contains(e.params.navigation.hiddenClass)),i(y===!0?"navigationShow":"navigationHide"),[...m,...f].filter(b=>!!b).forEach(b=>b.classList.toggle(e.params.navigation.hiddenClass))}});const d=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),h(),o()},A=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(e.navigation,{enable:d,disable:A,update:o,init:h,destroy:u})}function oa(s){return s===void 0&&(s=""),`.${s.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function gY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r="swiper-pagination";t({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:_=>_,formatFractionTotal:_=>_,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};let a,o=0;function l(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function c(_,E){const{bulletActiveClass:y}=e.params.pagination;_&&(_=_[`${E==="prev"?"previous":"next"}ElementSibling`],_&&(_.classList.add(`${y}-${E}`),_=_[`${E==="prev"?"previous":"next"}ElementSibling`],_&&_.classList.add(`${y}-${E}-${E}`)))}function h(_,E,y){if(_=_%y,E=E%y,E===_+1)return"next";if(E===_-1)return"previous"}function u(_){const E=_.target.closest(oa(e.params.pagination.bulletClass));if(!E)return;_.preventDefault();const y=$d(E)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===y)return;const b=h(e.realIndex,y,e.slides.length);b==="next"?e.slideNext():b==="previous"?e.slidePrev():e.slideToLoop(y)}else e.slideTo(y)}function d(){const _=e.rtl,E=e.params.pagination;if(l())return;let y=e.pagination.el;y=bt(y);let b,x;const I=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,w=e.params.loop?Math.ceil(I/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(x=e.previousRealIndex||0,b=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(b=e.snapIndex,x=e.previousSnapIndex):(x=e.previousIndex||0,b=e.activeIndex||0),E.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const v=e.pagination.bullets;let C,S,T;if(E.dynamicBullets&&(a=s0(v[0],e.isHorizontal()?"width":"height"),y.forEach(M=>{M.style[e.isHorizontal()?"width":"height"]=`${a*(E.dynamicMainBullets+4)}px`}),E.dynamicMainBullets>1&&x!==void 0&&(o+=b-(x||0),o>E.dynamicMainBullets-1?o=E.dynamicMainBullets-1:o<0&&(o=0)),C=Math.max(b-o,0),S=C+(Math.min(v.length,E.dynamicMainBullets)-1),T=(S+C)/2),v.forEach(M=>{const R=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(F=>`${E.bulletActiveClass}${F}`)].map(F=>typeof F=="string"&&F.includes(" ")?F.split(" "):F).flat();M.classList.remove(...R)}),y.length>1)v.forEach(M=>{const R=$d(M);R===b?M.classList.add(...E.bulletActiveClass.split(" ")):e.isElement&&M.setAttribute("part","bullet"),E.dynamicBullets&&(R>=C&&R<=S&&M.classList.add(...`${E.bulletActiveClass}-main`.split(" ")),R===C&&c(M,"prev"),R===S&&c(M,"next"))});else{const M=v[b];if(M&&M.classList.add(...E.bulletActiveClass.split(" ")),e.isElement&&v.forEach((R,F)=>{R.setAttribute("part",F===b?"bullet-active":"bullet")}),E.dynamicBullets){const R=v[C],F=v[S];for(let N=C;N<=S;N+=1)v[N]&&v[N].classList.add(...`${E.bulletActiveClass}-main`.split(" "));c(R,"prev"),c(F,"next")}}if(E.dynamicBullets){const M=Math.min(v.length,E.dynamicMainBullets+4),R=(a*M-a)/2-T*a,F=_?"right":"left";v.forEach(N=>{N.style[e.isHorizontal()?F:"top"]=`${R}px`})}}y.forEach((v,C)=>{if(E.type==="fraction"&&(v.querySelectorAll(oa(E.currentClass)).forEach(S=>{S.textContent=E.formatFractionCurrent(b+1)}),v.querySelectorAll(oa(E.totalClass)).forEach(S=>{S.textContent=E.formatFractionTotal(w)})),E.type==="progressbar"){let S;E.progressbarOpposite?S=e.isHorizontal()?"vertical":"horizontal":S=e.isHorizontal()?"horizontal":"vertical";const T=(b+1)/w;let M=1,R=1;S==="horizontal"?M=T:R=T,v.querySelectorAll(oa(E.progressbarFillClass)).forEach(F=>{F.style.transform=`translate3d(0,0,0) scaleX(${M}) scaleY(${R})`,F.style.transitionDuration=`${e.params.speed}ms`})}E.type==="custom"&&E.renderCustom?(Is(v,E.renderCustom(e,b+1,w)),C===0&&i("paginationRender",v)):(C===0&&i("paginationRender",v),i("paginationUpdate",v)),e.params.watchOverflow&&e.enabled&&v.classList[e.isLocked?"add":"remove"](E.lockClass)})}function A(){const _=e.params.pagination;if(l())return;const E=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let y=e.pagination.el;y=bt(y);let b="";if(_.type==="bullets"){let x=e.params.loop?Math.ceil(E/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&x>E&&(x=E);for(let I=0;I<x;I+=1)_.renderBullet?b+=_.renderBullet.call(e,I,_.bulletClass):b+=`<${_.bulletElement} ${e.isElement?'part="bullet"':""} class="${_.bulletClass}"></${_.bulletElement}>`}_.type==="fraction"&&(_.renderFraction?b=_.renderFraction.call(e,_.currentClass,_.totalClass):b=`<span class="${_.currentClass}"></span> / <span class="${_.totalClass}"></span>`),_.type==="progressbar"&&(_.renderProgressbar?b=_.renderProgressbar.call(e,_.progressbarFillClass):b=`<span class="${_.progressbarFillClass}"></span>`),e.pagination.bullets=[],y.forEach(x=>{_.type!=="custom"&&Is(x,b||""),_.type==="bullets"&&e.pagination.bullets.push(...x.querySelectorAll(oa(_.bulletClass)))}),_.type!=="custom"&&i("paginationRender",y[0])}function p(){e.params.pagination=kb(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const _=e.params.pagination;if(!_.el)return;let E;typeof _.el=="string"&&e.isElement&&(E=e.el.querySelector(_.el)),!E&&typeof _.el=="string"&&(E=[...document.querySelectorAll(_.el)]),E||(E=_.el),!(!E||E.length===0)&&(e.params.uniqueNavElements&&typeof _.el=="string"&&Array.isArray(E)&&E.length>1&&(E=[...e.el.querySelectorAll(_.el)],E.length>1&&(E=E.find(y=>fl(y,".swiper")[0]===e.el))),Array.isArray(E)&&E.length===1&&(E=E[0]),Object.assign(e.pagination,{el:E}),E=bt(E),E.forEach(y=>{_.type==="bullets"&&_.clickable&&y.classList.add(...(_.clickableClass||"").split(" ")),y.classList.add(_.modifierClass+_.type),y.classList.add(e.isHorizontal()?_.horizontalClass:_.verticalClass),_.type==="bullets"&&_.dynamicBullets&&(y.classList.add(`${_.modifierClass}${_.type}-dynamic`),o=0,_.dynamicMainBullets<1&&(_.dynamicMainBullets=1)),_.type==="progressbar"&&_.progressbarOpposite&&y.classList.add(_.progressbarOppositeClass),_.clickable&&y.addEventListener("click",u),e.enabled||y.classList.add(_.lockClass)}))}function g(){const _=e.params.pagination;if(l())return;let E=e.pagination.el;E&&(E=bt(E),E.forEach(y=>{y.classList.remove(_.hiddenClass),y.classList.remove(_.modifierClass+_.type),y.classList.remove(e.isHorizontal()?_.horizontalClass:_.verticalClass),_.clickable&&(y.classList.remove(...(_.clickableClass||"").split(" ")),y.removeEventListener("click",u))})),e.pagination.bullets&&e.pagination.bullets.forEach(y=>y.classList.remove(..._.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const _=e.params.pagination;let{el:E}=e.pagination;E=bt(E),E.forEach(y=>{y.classList.remove(_.horizontalClass,_.verticalClass),y.classList.add(e.isHorizontal()?_.horizontalClass:_.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?f():(p(),A(),d())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&d()}),n("snapIndexChange",()=>{d()}),n("snapGridLengthChange",()=>{A(),d()}),n("destroy",()=>{g()}),n("enable disable",()=>{let{el:_}=e.pagination;_&&(_=bt(_),_.forEach(E=>E.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{d()}),n("click",(_,E)=>{const y=E.target,b=bt(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&b&&b.length>0&&!y.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&y===e.navigation.nextEl||e.navigation.prevEl&&y===e.navigation.prevEl))return;const x=b[0].classList.contains(e.params.pagination.hiddenClass);i(x===!0?"paginationShow":"paginationHide"),b.forEach(I=>I.classList.toggle(e.params.pagination.hiddenClass))}});const m=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:_}=e.pagination;_&&(_=bt(_),_.forEach(E=>E.classList.remove(e.params.pagination.paginationDisabledClass))),p(),A(),d()},f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:_}=e.pagination;_&&(_=bt(_),_.forEach(E=>E.classList.add(e.params.pagination.paginationDisabledClass))),g()};Object.assign(e.pagination,{enable:m,disable:f,render:A,update:d,init:p,destroy:g})}function mY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=Jn();let a=!1,o=null,l=null,c,h,u,d;t({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"}}),e.scrollbar={el:null,dragEl:null};function A(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:T,rtlTranslate:M}=e,{dragEl:R,el:F}=T,N=e.params.scrollbar,L=e.params.loop?e.progressLoop:e.progress;let P=h,z=(u-h)*L;M?(z=-z,z>0?(P=h-z,z=0):-z+h>u&&(P=u+z)):z<0?(P=h+z,z=0):z+h>u&&(P=u-z),e.isHorizontal()?(R.style.transform=`translate3d(${z}px, 0, 0)`,R.style.width=`${P}px`):(R.style.transform=`translate3d(0px, ${z}px, 0)`,R.style.height=`${P}px`),N.hide&&(clearTimeout(o),F.style.opacity=1,o=setTimeout(()=>{F.style.opacity=0,F.style.transitionDuration="400ms"},1e3))}function p(T){!e.params.scrollbar.el||!e.scrollbar.el||(e.scrollbar.dragEl.style.transitionDuration=`${T}ms`)}function g(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:T}=e,{dragEl:M,el:R}=T;M.style.width="",M.style.height="",u=e.isHorizontal()?R.offsetWidth:R.offsetHeight,d=e.size/(e.virtualSize+e.params.slidesOffsetBefore-(e.params.centeredSlides?e.snapGrid[0]:0)),e.params.scrollbar.dragSize==="auto"?h=u*d:h=parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?M.style.width=`${h}px`:M.style.height=`${h}px`,d>=1?R.style.display="none":R.style.display="",e.params.scrollbar.hide&&(R.style.opacity=0),e.params.watchOverflow&&e.enabled&&T.el.classList[e.isLocked?"add":"remove"](e.params.scrollbar.lockClass)}function m(T){return e.isHorizontal()?T.clientX:T.clientY}function f(T){const{scrollbar:M,rtlTranslate:R}=e,{el:F}=M;let N;N=(m(T)-qf(F)[e.isHorizontal()?"left":"top"]-(c!==null?c:h/2))/(u-h),N=Math.max(Math.min(N,1),0),R&&(N=1-N);const L=e.minTranslate()+(e.maxTranslate()-e.minTranslate())*N;e.updateProgress(L),e.setTranslate(L),e.updateActiveIndex(),e.updateSlidesClasses()}function _(T){const M=e.params.scrollbar,{scrollbar:R,wrapperEl:F}=e,{el:N,dragEl:L}=R;a=!0,c=T.target===L?m(T)-T.target.getBoundingClientRect()[e.isHorizontal()?"left":"top"]:null,T.preventDefault(),T.stopPropagation(),F.style.transitionDuration="100ms",L.style.transitionDuration="100ms",f(T),clearTimeout(l),N.style.transitionDuration="0ms",M.hide&&(N.style.opacity=1),e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="none"),i("scrollbarDragStart",T)}function E(T){const{scrollbar:M,wrapperEl:R}=e,{el:F,dragEl:N}=M;a&&(T.preventDefault&&T.cancelable?T.preventDefault():T.returnValue=!1,f(T),R.style.transitionDuration="0ms",F.style.transitionDuration="0ms",N.style.transitionDuration="0ms",i("scrollbarDragMove",T))}function y(T){const M=e.params.scrollbar,{scrollbar:R,wrapperEl:F}=e,{el:N}=R;a&&(a=!1,e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="",F.style.transitionDuration=""),M.hide&&(clearTimeout(l),l=Ih(()=>{N.style.opacity=0,N.style.transitionDuration="400ms"},1e3)),i("scrollbarDragEnd",T),M.snapOnRelease&&e.slideToClosest())}function b(T){const{scrollbar:M,params:R}=e,F=M.el;if(!F)return;const N=F,L=R.passiveListeners?{passive:!1,capture:!1}:!1,P=R.passiveListeners?{passive:!0,capture:!1}:!1;if(!N)return;const z=T==="on"?"addEventListener":"removeEventListener";N[z]("pointerdown",_,L),r[z]("pointermove",E,L),r[z]("pointerup",y,P)}function x(){!e.params.scrollbar.el||!e.scrollbar.el||b("on")}function I(){!e.params.scrollbar.el||!e.scrollbar.el||b("off")}function w(){const{scrollbar:T,el:M}=e;e.params.scrollbar=kb(e,e.originalParams.scrollbar,e.params.scrollbar,{el:"swiper-scrollbar"});const R=e.params.scrollbar;if(!R.el)return;let F;if(typeof R.el=="string"&&e.isElement&&(F=e.el.querySelector(R.el)),!F&&typeof R.el=="string"){if(F=r.querySelectorAll(R.el),!F.length)return}else F||(F=R.el);e.params.uniqueNavElements&&typeof R.el=="string"&&F.length>1&&M.querySelectorAll(R.el).length===1&&(F=M.querySelector(R.el)),F.length>0&&(F=F[0]),F.classList.add(e.isHorizontal()?R.horizontalClass:R.verticalClass);let N;F&&(N=F.querySelector(oa(e.params.scrollbar.dragClass)),N||(N=is("div",e.params.scrollbar.dragClass),F.append(N))),Object.assign(T,{el:F,dragEl:N}),R.draggable&&x(),F&&F.classList[e.enabled?"remove":"add"](...Ua(e.params.scrollbar.lockClass))}function v(){const T=e.params.scrollbar,M=e.scrollbar.el;M&&M.classList.remove(...Ua(e.isHorizontal()?T.horizontalClass:T.verticalClass)),I()}n("changeDirection",()=>{if(!e.scrollbar||!e.scrollbar.el)return;const T=e.params.scrollbar;let{el:M}=e.scrollbar;M=bt(M),M.forEach(R=>{R.classList.remove(T.horizontalClass,T.verticalClass),R.classList.add(e.isHorizontal()?T.horizontalClass:T.verticalClass)})}),n("init",()=>{e.params.scrollbar.enabled===!1?S():(w(),g(),A())}),n("update resize observerUpdate lock unlock changeDirection",()=>{g()}),n("setTranslate",()=>{A()}),n("setTransition",(T,M)=>{p(M)}),n("enable disable",()=>{const{el:T}=e.scrollbar;T&&T.classList[e.enabled?"remove":"add"](...Ua(e.params.scrollbar.lockClass))}),n("destroy",()=>{v()});const C=()=>{e.el.classList.remove(...Ua(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.remove(...Ua(e.params.scrollbar.scrollbarDisabledClass)),w(),g(),A()},S=()=>{e.el.classList.add(...Ua(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.add(...Ua(e.params.scrollbar.scrollbarDisabledClass)),v()};Object.assign(e.scrollbar,{enable:C,disable:S,updateSize:g,setTranslate:A,init:w,destroy:v})}function EY(s){let{swiper:e,extendParams:t,on:n}=s;t({parallax:{enabled:!1}});const i="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",r=(l,c)=>{const{rtl:h}=e,u=h?-1:1,d=l.getAttribute("data-swiper-parallax")||"0";let A=l.getAttribute("data-swiper-parallax-x"),p=l.getAttribute("data-swiper-parallax-y");const g=l.getAttribute("data-swiper-parallax-scale"),m=l.getAttribute("data-swiper-parallax-opacity"),f=l.getAttribute("data-swiper-parallax-rotate");if(A||p?(A=A||"0",p=p||"0"):e.isHorizontal()?(A=d,p="0"):(p=d,A="0"),A.indexOf("%")>=0?A=`${parseInt(A,10)*c*u}%`:A=`${A*c*u}px`,p.indexOf("%")>=0?p=`${parseInt(p,10)*c}%`:p=`${p*c}px`,typeof m<"u"&&m!==null){const E=m-(m-1)*(1-Math.abs(c));l.style.opacity=E}let _=`translate3d(${A}, ${p}, 0px)`;if(typeof g<"u"&&g!==null){const E=g-(g-1)*(1-Math.abs(c));_+=` scale(${E})`}if(f&&typeof f<"u"&&f!==null){const E=f*c*-1;_+=` rotate(${E}deg)`}l.style.transform=_},a=()=>{const{el:l,slides:c,progress:h,snapGrid:u,isElement:d}=e,A=ii(l,i);e.isElement&&A.push(...ii(e.hostEl,i)),A.forEach(p=>{r(p,h)}),c.forEach((p,g)=>{let m=p.progress;e.params.slidesPerGroup>1&&e.params.slidesPerView!=="auto"&&(m+=Math.ceil(g/2)-h*(u.length-1)),m=Math.min(Math.max(m,-1),1),p.querySelectorAll(`${i}, [data-swiper-parallax-rotate]`).forEach(f=>{r(f,m)})})},o=function(l){l===void 0&&(l=e.params.speed);const{el:c,hostEl:h}=e,u=[...c.querySelectorAll(i)];e.isElement&&u.push(...h.querySelectorAll(i)),u.forEach(d=>{let A=parseInt(d.getAttribute("data-swiper-parallax-duration"),10)||l;l===0&&(A=0),d.style.transitionDuration=`${A}ms`})};n("beforeInit",()=>{e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)}),n("init",()=>{e.params.parallax.enabled&&a()}),n("setTranslate",()=>{e.params.parallax.enabled&&a()}),n("setTransition",(l,c)=>{e.params.parallax.enabled&&o(c)})}function yY(s){let{swiper:e,extendParams:t,on:n,emit:i}=s;const r=un();t({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),e.zoom={enabled:!1};let a=1,o=!1,l=!1,c={x:0,y:0};const h=-3;let u,d;const A=[],p={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},g={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:{}},m={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let f=1;Object.defineProperty(e.zoom,"scale",{get(){return f},set(G){if(f!==G){const Y=p.imageEl,$=p.slideEl;i("zoomChange",G,Y,$)}f=G}});function _(){if(A.length<2)return 1;const G=A[0].pageX,Y=A[0].pageY,$=A[1].pageX,de=A[1].pageY;return Math.sqrt(($-G)**2+(de-Y)**2)}function E(){const G=e.params.zoom,Y=p.imageWrapEl.getAttribute("data-swiper-zoom")||G.maxRatio;if(G.limitToOriginalSize&&p.imageEl&&p.imageEl.naturalWidth){const $=p.imageEl.naturalWidth/p.imageEl.offsetWidth;return Math.min($,Y)}return Y}function y(){if(A.length<2)return{x:null,y:null};const G=p.imageEl.getBoundingClientRect();return[(A[0].pageX+(A[1].pageX-A[0].pageX)/2-G.x-r.scrollX)/a,(A[0].pageY+(A[1].pageY-A[0].pageY)/2-G.y-r.scrollY)/a]}function b(){return e.isElement?"swiper-slide":`.${e.params.slideClass}`}function x(G){const Y=b();return!!(G.target.matches(Y)||e.slides.filter($=>$.contains(G.target)).length>0)}function I(G){const Y=`.${e.params.zoom.containerClass}`;return!!(G.target.matches(Y)||[...e.hostEl.querySelectorAll(Y)].filter($=>$.contains(G.target)).length>0)}function w(G){if(G.pointerType==="mouse"&&A.splice(0,A.length),!x(G))return;const Y=e.params.zoom;if(u=!1,d=!1,A.push(G),!(A.length<2)){if(u=!0,p.scaleStart=_(),!p.slideEl){p.slideEl=G.target.closest(`.${e.params.slideClass}, swiper-slide`),p.slideEl||(p.slideEl=e.slides[e.activeIndex]);let $=p.slideEl.querySelector(`.${Y.containerClass}`);if($&&($=$.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=$,$?p.imageWrapEl=fl(p.imageEl,`.${Y.containerClass}`)[0]:p.imageWrapEl=void 0,!p.imageWrapEl){p.imageEl=void 0;return}p.maxRatio=E()}if(p.imageEl){const[$,de]=y();p.originX=$,p.originY=de,p.imageEl.style.transitionDuration="0ms"}o=!0}}function v(G){if(!x(G))return;const Y=e.params.zoom,$=e.zoom,de=A.findIndex(_e=>_e.pointerId===G.pointerId);de>=0&&(A[de]=G),!(A.length<2)&&(d=!0,p.scaleMove=_(),p.imageEl&&($.scale=p.scaleMove/p.scaleStart*a,$.scale>p.maxRatio&&($.scale=p.maxRatio-1+($.scale-p.maxRatio+1)**.5),$.scale<Y.minRatio&&($.scale=Y.minRatio+1-(Y.minRatio-$.scale+1)**.5),p.imageEl.style.transform=`translate3d(0,0,0) scale(${$.scale})`))}function C(G){if(!x(G)||G.pointerType==="mouse"&&G.type==="pointerout")return;const Y=e.params.zoom,$=e.zoom,de=A.findIndex(_e=>_e.pointerId===G.pointerId);de>=0&&A.splice(de,1),!(!u||!d)&&(u=!1,d=!1,p.imageEl&&($.scale=Math.max(Math.min($.scale,p.maxRatio),Y.minRatio),p.imageEl.style.transitionDuration=`${e.params.speed}ms`,p.imageEl.style.transform=`translate3d(0,0,0) scale(${$.scale})`,a=$.scale,o=!1,$.scale>1&&p.slideEl?p.slideEl.classList.add(`${Y.zoomedSlideClass}`):$.scale<=1&&p.slideEl&&p.slideEl.classList.remove(`${Y.zoomedSlideClass}`),$.scale===1&&(p.originX=0,p.originY=0,p.slideEl=void 0)))}let S;function T(){e.touchEventsData.preventTouchMoveFromPointerMove=!1}function M(){clearTimeout(S),e.touchEventsData.preventTouchMoveFromPointerMove=!0,S=setTimeout(()=>{e.destroyed||T()})}function R(G){const Y=e.device;if(!p.imageEl||g.isTouched)return;Y.android&&G.cancelable&&G.preventDefault(),g.isTouched=!0;const $=A.length>0?A[0]:G;g.touchesStart.x=$.pageX,g.touchesStart.y=$.pageY}function F(G){const $=G.pointerType==="mouse"&&e.params.zoom.panOnMouseMove;if(!x(G)||!I(G))return;const de=e.zoom;if(!p.imageEl)return;if(!g.isTouched||!p.slideEl){$&&P(G);return}if($){P(G);return}g.isMoved||(g.width=p.imageEl.offsetWidth||p.imageEl.clientWidth,g.height=p.imageEl.offsetHeight||p.imageEl.clientHeight,g.startX=i0(p.imageWrapEl,"x")||0,g.startY=i0(p.imageWrapEl,"y")||0,p.slideWidth=p.slideEl.offsetWidth,p.slideHeight=p.slideEl.offsetHeight,p.imageWrapEl.style.transitionDuration="0ms");const _e=g.width*de.scale,ve=g.height*de.scale;if(g.minX=Math.min(p.slideWidth/2-_e/2,0),g.maxX=-g.minX,g.minY=Math.min(p.slideHeight/2-ve/2,0),g.maxY=-g.minY,g.touchesCurrent.x=A.length>0?A[0].pageX:G.pageX,g.touchesCurrent.y=A.length>0?A[0].pageY:G.pageY,Math.max(Math.abs(g.touchesCurrent.x-g.touchesStart.x),Math.abs(g.touchesCurrent.y-g.touchesStart.y))>5&&(e.allowClick=!1),!g.isMoved&&!o){if(e.isHorizontal()&&(Math.floor(g.minX)===Math.floor(g.startX)&&g.touchesCurrent.x<g.touchesStart.x||Math.floor(g.maxX)===Math.floor(g.startX)&&g.touchesCurrent.x>g.touchesStart.x)){g.isTouched=!1,T();return}if(!e.isHorizontal()&&(Math.floor(g.minY)===Math.floor(g.startY)&&g.touchesCurrent.y<g.touchesStart.y||Math.floor(g.maxY)===Math.floor(g.startY)&&g.touchesCurrent.y>g.touchesStart.y)){g.isTouched=!1,T();return}}G.cancelable&&G.preventDefault(),G.stopPropagation(),M(),g.isMoved=!0;const Oe=(de.scale-a)/(p.maxRatio-e.params.zoom.minRatio),{originX:Ye,originY:O}=p;g.currentX=g.touchesCurrent.x-g.touchesStart.x+g.startX+Oe*(g.width-Ye*2),g.currentY=g.touchesCurrent.y-g.touchesStart.y+g.startY+Oe*(g.height-O*2),g.currentX<g.minX&&(g.currentX=g.minX+1-(g.minX-g.currentX+1)**.8),g.currentX>g.maxX&&(g.currentX=g.maxX-1+(g.currentX-g.maxX+1)**.8),g.currentY<g.minY&&(g.currentY=g.minY+1-(g.minY-g.currentY+1)**.8),g.currentY>g.maxY&&(g.currentY=g.maxY-1+(g.currentY-g.maxY+1)**.8),m.prevPositionX||(m.prevPositionX=g.touchesCurrent.x),m.prevPositionY||(m.prevPositionY=g.touchesCurrent.y),m.prevTime||(m.prevTime=Date.now()),m.x=(g.touchesCurrent.x-m.prevPositionX)/(Date.now()-m.prevTime)/2,m.y=(g.touchesCurrent.y-m.prevPositionY)/(Date.now()-m.prevTime)/2,Math.abs(g.touchesCurrent.x-m.prevPositionX)<2&&(m.x=0),Math.abs(g.touchesCurrent.y-m.prevPositionY)<2&&(m.y=0),m.prevPositionX=g.touchesCurrent.x,m.prevPositionY=g.touchesCurrent.y,m.prevTime=Date.now(),p.imageWrapEl.style.transform=`translate3d(${g.currentX}px, ${g.currentY}px,0)`}function N(){const G=e.zoom;if(A.length=0,!p.imageEl)return;if(!g.isTouched||!g.isMoved){g.isTouched=!1,g.isMoved=!1;return}g.isTouched=!1,g.isMoved=!1;let Y=300,$=300;const de=m.x*Y,_e=g.currentX+de,ve=m.y*$,ke=g.currentY+ve;m.x!==0&&(Y=Math.abs((_e-g.currentX)/m.x)),m.y!==0&&($=Math.abs((ke-g.currentY)/m.y));const Oe=Math.max(Y,$);g.currentX=_e,g.currentY=ke;const Ye=g.width*G.scale,O=g.height*G.scale;g.minX=Math.min(p.slideWidth/2-Ye/2,0),g.maxX=-g.minX,g.minY=Math.min(p.slideHeight/2-O/2,0),g.maxY=-g.minY,g.currentX=Math.max(Math.min(g.currentX,g.maxX),g.minX),g.currentY=Math.max(Math.min(g.currentY,g.maxY),g.minY),p.imageWrapEl.style.transitionDuration=`${Oe}ms`,p.imageWrapEl.style.transform=`translate3d(${g.currentX}px, ${g.currentY}px,0)`}function L(){const G=e.zoom;p.slideEl&&e.activeIndex!==e.slides.indexOf(p.slideEl)&&(p.imageEl&&(p.imageEl.style.transform="translate3d(0,0,0) scale(1)"),p.imageWrapEl&&(p.imageWrapEl.style.transform="translate3d(0,0,0)"),p.slideEl.classList.remove(`${e.params.zoom.zoomedSlideClass}`),G.scale=1,a=1,p.slideEl=void 0,p.imageEl=void 0,p.imageWrapEl=void 0,p.originX=0,p.originY=0)}function P(G){if(a<=1||!p.imageWrapEl||!x(G)||!I(G))return;const Y=r.getComputedStyle(p.imageWrapEl).transform,$=new r.DOMMatrix(Y);if(!l){l=!0,c.x=G.clientX,c.y=G.clientY,g.startX=$.e,g.startY=$.f,g.width=p.imageEl.offsetWidth||p.imageEl.clientWidth,g.height=p.imageEl.offsetHeight||p.imageEl.clientHeight,p.slideWidth=p.slideEl.offsetWidth,p.slideHeight=p.slideEl.offsetHeight;return}const de=(G.clientX-c.x)*h,_e=(G.clientY-c.y)*h,ve=g.width*a,ke=g.height*a,Oe=p.slideWidth,Ye=p.slideHeight,O=Math.min(Oe/2-ve/2,0),mt=-O,qe=Math.min(Ye/2-ke/2,0),Xe=-qe,Te=Math.max(Math.min(g.startX+de,mt),O),Ke=Math.max(Math.min(g.startY+_e,Xe),qe);p.imageWrapEl.style.transitionDuration="0ms",p.imageWrapEl.style.transform=`translate3d(${Te}px, ${Ke}px, 0)`,c.x=G.clientX,c.y=G.clientY,g.startX=Te,g.startY=Ke,g.currentX=Te,g.currentY=Ke}function z(G){const Y=e.zoom,$=e.params.zoom;if(!p.slideEl){G&&G.target&&(p.slideEl=G.target.closest(`.${e.params.slideClass}, swiper-slide`)),p.slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?p.slideEl=ii(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:p.slideEl=e.slides[e.activeIndex]);let we=p.slideEl.querySelector(`.${$.containerClass}`);we&&(we=we.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=we,we?p.imageWrapEl=fl(p.imageEl,`.${$.containerClass}`)[0]:p.imageWrapEl=void 0}if(!p.imageEl||!p.imageWrapEl)return;e.params.cssMode&&(e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.touchAction="none"),p.slideEl.classList.add(`${$.zoomedSlideClass}`);let de,_e,ve,ke,Oe,Ye,O,mt,qe,Xe,Te,Ke,ye,k,D,K,oe,le;typeof g.touchesStart.x>"u"&&G?(de=G.pageX,_e=G.pageY):(de=g.touchesStart.x,_e=g.touchesStart.y);const se=a,xe=typeof G=="number"?G:null;a===1&&xe&&(de=void 0,_e=void 0,g.touchesStart.x=void 0,g.touchesStart.y=void 0);const be=E();Y.scale=xe||be,a=xe||be,G&&!(a===1&&xe)?(oe=p.slideEl.offsetWidth,le=p.slideEl.offsetHeight,ve=qf(p.slideEl).left+r.scrollX,ke=qf(p.slideEl).top+r.scrollY,Oe=ve+oe/2-de,Ye=ke+le/2-_e,qe=p.imageEl.offsetWidth||p.imageEl.clientWidth,Xe=p.imageEl.offsetHeight||p.imageEl.clientHeight,Te=qe*Y.scale,Ke=Xe*Y.scale,ye=Math.min(oe/2-Te/2,0),k=Math.min(le/2-Ke/2,0),D=-ye,K=-k,se>0&&xe&&typeof g.currentX=="number"&&typeof g.currentY=="number"?(O=g.currentX*Y.scale/se,mt=g.currentY*Y.scale/se):(O=Oe*Y.scale,mt=Ye*Y.scale),O<ye&&(O=ye),O>D&&(O=D),mt<k&&(mt=k),mt>K&&(mt=K)):(O=0,mt=0),xe&&Y.scale===1&&(p.originX=0,p.originY=0),g.currentX=O,g.currentY=mt,p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform=`translate3d(${O}px, ${mt}px,0)`,p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform=`translate3d(0,0,0) scale(${Y.scale})`}function te(){const G=e.zoom,Y=e.params.zoom;if(!p.slideEl){e.params.virtual&&e.params.virtual.enabled&&e.virtual?p.slideEl=ii(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:p.slideEl=e.slides[e.activeIndex];let $=p.slideEl.querySelector(`.${Y.containerClass}`);$&&($=$.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=$,$?p.imageWrapEl=fl(p.imageEl,`.${Y.containerClass}`)[0]:p.imageWrapEl=void 0}!p.imageEl||!p.imageWrapEl||(e.params.cssMode&&(e.wrapperEl.style.overflow="",e.wrapperEl.style.touchAction=""),G.scale=1,a=1,g.currentX=void 0,g.currentY=void 0,g.touchesStart.x=void 0,g.touchesStart.y=void 0,p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform="translate3d(0,0,0)",p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform="translate3d(0,0,0) scale(1)",p.slideEl.classList.remove(`${Y.zoomedSlideClass}`),p.slideEl=void 0,p.originX=0,p.originY=0,e.params.zoom.panOnMouseMove&&(c={x:0,y:0},l&&(l=!1,g.startX=0,g.startY=0)))}function ne(G){const Y=e.zoom;Y.scale&&Y.scale!==1?te():z(G)}function ue(){const G=e.params.passiveListeners?{passive:!0,capture:!1}:!1,Y=e.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:G,activeListenerWithCapture:Y}}function pe(){const G=e.zoom;if(G.enabled)return;G.enabled=!0;const{passiveListener:Y,activeListenerWithCapture:$}=ue();e.wrapperEl.addEventListener("pointerdown",w,Y),e.wrapperEl.addEventListener("pointermove",v,$),["pointerup","pointercancel","pointerout"].forEach(de=>{e.wrapperEl.addEventListener(de,C,Y)}),e.wrapperEl.addEventListener("pointermove",F,$)}function Z(){const G=e.zoom;if(!G.enabled)return;G.enabled=!1;const{passiveListener:Y,activeListenerWithCapture:$}=ue();e.wrapperEl.removeEventListener("pointerdown",w,Y),e.wrapperEl.removeEventListener("pointermove",v,$),["pointerup","pointercancel","pointerout"].forEach(de=>{e.wrapperEl.removeEventListener(de,C,Y)}),e.wrapperEl.removeEventListener("pointermove",F,$)}n("init",()=>{e.params.zoom.enabled&&pe()}),n("destroy",()=>{Z()}),n("touchStart",(G,Y)=>{e.zoom.enabled&&R(Y)}),n("touchEnd",(G,Y)=>{e.zoom.enabled&&N()}),n("doubleTap",(G,Y)=>{!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&ne(Y)}),n("transitionEnd",()=>{e.zoom.enabled&&e.params.zoom.enabled&&L()}),n("slideChange",()=>{e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&L()}),Object.assign(e.zoom,{enable:pe,disable:Z,in:z,out:te,toggle:ne})}function _Y(s){let{swiper:e,extendParams:t,on:n}=s;t({controller:{control:void 0,inverse:!1,by:"slide"}}),e.controller={control:void 0};function i(c,h){const u=(function(){let g,m,f;return(_,E)=>{for(m=-1,g=_.length;g-m>1;)f=g+m>>1,_[f]<=E?m=f:g=f;return g}})();this.x=c,this.y=h,this.lastIndex=c.length-1;let d,A;return this.interpolate=function(g){return g?(A=u(this.x,g),d=A-1,(g-this.x[d])*(this.y[A]-this.y[d])/(this.x[A]-this.x[d])+this.y[d]):0},this}function r(c){e.controller.spline=e.params.loop?new i(e.slidesGrid,c.slidesGrid):new i(e.snapGrid,c.snapGrid)}function a(c,h){const u=e.controller.control;let d,A;const p=e.constructor;function g(m){if(m.destroyed)return;const f=e.rtlTranslate?-e.translate:e.translate;e.params.controller.by==="slide"&&(r(m),A=-e.controller.spline.interpolate(-f)),(!A||e.params.controller.by==="container")&&(d=(m.maxTranslate()-m.minTranslate())/(e.maxTranslate()-e.minTranslate()),(Number.isNaN(d)||!Number.isFinite(d))&&(d=1),A=(f-e.minTranslate())*d+m.minTranslate()),e.params.controller.inverse&&(A=m.maxTranslate()-A),m.updateProgress(A),m.setTranslate(A,e),m.updateActiveIndex(),m.updateSlidesClasses()}if(Array.isArray(u))for(let m=0;m<u.length;m+=1)u[m]!==h&&u[m]instanceof p&&g(u[m]);else u instanceof p&&h!==u&&g(u)}function o(c,h){const u=e.constructor,d=e.controller.control;let A;function p(g){g.destroyed||(g.setTransition(c,e),c!==0&&(g.transitionStart(),g.params.autoHeight&&Ih(()=>{g.updateAutoHeight()}),_d(g.wrapperEl,()=>{d&&g.transitionEnd()})))}if(Array.isArray(d))for(A=0;A<d.length;A+=1)d[A]!==h&&d[A]instanceof u&&p(d[A]);else d instanceof u&&h!==d&&p(d)}function l(){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)}n("beforeInit",()=>{if(typeof window<"u"&&(typeof e.params.controller.control=="string"||e.params.controller.control instanceof HTMLElement)){(typeof e.params.controller.control=="string"?[...document.querySelectorAll(e.params.controller.control)]:[e.params.controller.control]).forEach(h=>{if(e.controller.control||(e.controller.control=[]),h&&h.swiper)e.controller.control.push(h.swiper);else if(h){const u=`${e.params.eventsPrefix}init`,d=A=>{e.controller.control.push(A.detail[0]),e.update(),h.removeEventListener(u,d)};h.addEventListener(u,d)}});return}e.controller.control=e.params.controller.control}),n("update",()=>{l()}),n("resize",()=>{l()}),n("observerUpdate",()=>{l()}),n("setTranslate",(c,h,u)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTranslate(h,u)}),n("setTransition",(c,h,u)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTransition(h,u)}),Object.assign(e.controller,{setTranslate:a,setTransition:o})}function bY(s){let{swiper:e,extendParams:t,on:n}=s;t({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}}),e.a11y={clicked:!1};let i=null,r,a,o=new Date().getTime();function l(L){const P=i;P.length!==0&&Is(P,L)}function c(L){const P=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(L).replace(/x/g,P)}function h(L){L=bt(L),L.forEach(P=>{P.setAttribute("tabIndex","0")})}function u(L){L=bt(L),L.forEach(P=>{P.setAttribute("tabIndex","-1")})}function d(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("role",P)})}function A(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-roledescription",P)})}function p(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-controls",P)})}function g(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-label",P)})}function m(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("id",P)})}function f(L,P){L=bt(L),L.forEach(z=>{z.setAttribute("aria-live",P)})}function _(L){L=bt(L),L.forEach(P=>{P.setAttribute("aria-disabled",!0)})}function E(L){L=bt(L),L.forEach(P=>{P.setAttribute("aria-disabled",!1)})}function y(L){if(L.keyCode!==13&&L.keyCode!==32)return;const P=e.params.a11y,z=L.target;if(!(e.pagination&&e.pagination.el&&(z===e.pagination.el||e.pagination.el.contains(L.target))&&!L.target.matches(oa(e.params.pagination.bulletClass)))){if(e.navigation&&e.navigation.prevEl&&e.navigation.nextEl){const te=bt(e.navigation.prevEl);bt(e.navigation.nextEl).includes(z)&&(e.isEnd&&!e.params.loop||e.slideNext(),e.isEnd?l(P.lastSlideMessage):l(P.nextSlideMessage)),te.includes(z)&&(e.isBeginning&&!e.params.loop||e.slidePrev(),e.isBeginning?l(P.firstSlideMessage):l(P.prevSlideMessage))}e.pagination&&z.matches(oa(e.params.pagination.bulletClass))&&z.click()}}function b(){if(e.params.loop||e.params.rewind||!e.navigation)return;const{nextEl:L,prevEl:P}=e.navigation;P&&(e.isBeginning?(_(P),u(P)):(E(P),h(P))),L&&(e.isEnd?(_(L),u(L)):(E(L),h(L)))}function x(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function I(){return x()&&e.params.pagination.clickable}function w(){const L=e.params.a11y;x()&&e.pagination.bullets.forEach(P=>{e.params.pagination.clickable&&(h(P),e.params.pagination.renderBullet||(d(P,"button"),g(P,L.paginationBulletMessage.replace(/\{\{index\}\}/,$d(P)+1)))),P.matches(oa(e.params.pagination.bulletActiveClass))?P.setAttribute("aria-current","true"):P.removeAttribute("aria-current")})}const v=(L,P,z)=>{h(L),L.tagName!=="BUTTON"&&(d(L,"button"),L.addEventListener("keydown",y)),g(L,z),p(L,P)},C=L=>{a&&a!==L.target&&!a.contains(L.target)&&(r=!0),e.a11y.clicked=!0},S=()=>{r=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.destroyed||(e.a11y.clicked=!1)})})},T=L=>{o=new Date().getTime()},M=L=>{if(e.a11y.clicked||!e.params.a11y.scrollOnFocus||new Date().getTime()-o<100)return;const P=L.target.closest(`.${e.params.slideClass}, swiper-slide`);if(!P||!e.slides.includes(P))return;a=P;const z=e.slides.indexOf(P)===e.activeIndex,te=e.params.watchSlidesProgress&&e.visibleSlides&&e.visibleSlides.includes(P);z||te||L.sourceCapabilities&&L.sourceCapabilities.firesTouchEvents||(e.isHorizontal()?e.el.scrollLeft=0:e.el.scrollTop=0,requestAnimationFrame(()=>{r||(e.params.loop?e.slideToLoop(e.getSlideIndexWhenGrid(parseInt(P.getAttribute("data-swiper-slide-index"))),0):e.slideTo(e.getSlideIndexWhenGrid(e.slides.indexOf(P)),0),r=!1)}))},R=()=>{const L=e.params.a11y;L.itemRoleDescriptionMessage&&A(e.slides,L.itemRoleDescriptionMessage),L.slideRole&&d(e.slides,L.slideRole);const P=e.slides.length;L.slideLabelMessage&&e.slides.forEach((z,te)=>{const ne=e.params.loop?parseInt(z.getAttribute("data-swiper-slide-index"),10):te,ue=L.slideLabelMessage.replace(/\{\{index\}\}/,ne+1).replace(/\{\{slidesLength\}\}/,P);g(z,ue)})},F=()=>{const L=e.params.a11y;e.el.append(i);const P=e.el;L.containerRoleDescriptionMessage&&A(P,L.containerRoleDescriptionMessage),L.containerMessage&&g(P,L.containerMessage),L.containerRole&&d(P,L.containerRole);const z=e.wrapperEl,te=L.id||z.getAttribute("id")||`swiper-wrapper-${c(16)}`,ne=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";m(z,te),f(z,ne),R();let{nextEl:ue,prevEl:pe}=e.navigation?e.navigation:{};ue=bt(ue),pe=bt(pe),ue&&ue.forEach(G=>v(G,te,L.nextSlideMessage)),pe&&pe.forEach(G=>v(G,te,L.prevSlideMessage)),I()&&bt(e.pagination.el).forEach(Y=>{Y.addEventListener("keydown",y)}),Jn().addEventListener("visibilitychange",T),e.el.addEventListener("focus",M,!0),e.el.addEventListener("focus",M,!0),e.el.addEventListener("pointerdown",C,!0),e.el.addEventListener("pointerup",S,!0)};function N(){i&&i.remove();let{nextEl:L,prevEl:P}=e.navigation?e.navigation:{};L=bt(L),P=bt(P),L&&L.forEach(te=>te.removeEventListener("keydown",y)),P&&P.forEach(te=>te.removeEventListener("keydown",y)),I()&&bt(e.pagination.el).forEach(ne=>{ne.removeEventListener("keydown",y)}),Jn().removeEventListener("visibilitychange",T),e.el&&typeof e.el!="string"&&(e.el.removeEventListener("focus",M,!0),e.el.removeEventListener("pointerdown",C,!0),e.el.removeEventListener("pointerup",S,!0))}n("beforeInit",()=>{i=is("span",e.params.a11y.notificationClass),i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true")}),n("afterInit",()=>{e.params.a11y.enabled&&F()}),n("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{e.params.a11y.enabled&&R()}),n("fromEdge toEdge afterInit lock unlock",()=>{e.params.a11y.enabled&&b()}),n("paginationUpdate",()=>{e.params.a11y.enabled&&w()}),n("destroy",()=>{e.params.a11y.enabled&&N()})}function vY(s){let{swiper:e,extendParams:t,on:n}=s;t({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,r={};const a=A=>A.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=A=>{const p=un();let g;A?g=new URL(A):g=p.location;const m=g.pathname.slice(1).split("/").filter(y=>y!==""),f=m.length,_=m[f-2],E=m[f-1];return{key:_,value:E}},l=(A,p)=>{const g=un();if(!i||!e.params.history.enabled)return;let m;e.params.url?m=new URL(e.params.url):m=g.location;const f=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${p}"]`):e.slides[p];let _=a(f.getAttribute("data-history"));if(e.params.history.root.length>0){let y=e.params.history.root;y[y.length-1]==="/"&&(y=y.slice(0,y.length-1)),_=`${y}/${A?`${A}/`:""}${_}`}else m.pathname.includes(A)||(_=`${A?`${A}/`:""}${_}`);e.params.history.keepQuery&&(_+=m.search);const E=g.history.state;E&&E.value===_||(e.params.history.replaceState?g.history.replaceState({value:_},null,_):g.history.pushState({value:_},null,_))},c=(A,p,g)=>{if(p)for(let m=0,f=e.slides.length;m<f;m+=1){const _=e.slides[m];if(a(_.getAttribute("data-history"))===p){const y=e.getSlideIndex(_);e.slideTo(y,A,g)}}else e.slideTo(0,A,g)},h=()=>{r=o(e.params.url),c(e.params.speed,r.value,!1)},u=()=>{const A=un();if(e.params.history){if(!A.history||!A.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(i=!0,r=o(e.params.url),!r.key&&!r.value){e.params.history.replaceState||A.addEventListener("popstate",h);return}c(0,r.value,e.params.runCallbacksOnInit),e.params.history.replaceState||A.addEventListener("popstate",h)}},d=()=>{const A=un();e.params.history.replaceState||A.removeEventListener("popstate",h)};n("init",()=>{e.params.history.enabled&&u()}),n("destroy",()=>{e.params.history.enabled&&d()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{i&&l(e.params.history.key,e.activeIndex)}),n("slideChange",()=>{i&&e.params.cssMode&&l(e.params.history.key,e.activeIndex)})}function IY(s){let{swiper:e,extendParams:t,emit:n,on:i}=s,r=!1;const a=Jn(),o=un();t({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(d,A){if(e.virtual&&e.params.virtual.enabled){const p=e.slides.find(m=>m.getAttribute("data-hash")===A);return p?parseInt(p.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(ii(e.slidesEl,`.${e.params.slideClass}[data-hash="${A}"], swiper-slide[data-hash="${A}"]`)[0])}}});const l=()=>{n("hashChange");const d=a.location.hash.replace("#",""),A=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],p=A?A.getAttribute("data-hash"):"";if(d!==p){const g=e.params.hashNavigation.getSlideIndex(e,d);if(typeof g>"u"||Number.isNaN(g))return;e.slideTo(g)}},c=()=>{if(!r||!e.params.hashNavigation.enabled)return;const d=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],A=d?d.getAttribute("data-hash")||d.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&o.history&&o.history.replaceState?(o.history.replaceState(null,null,`#${A}`||""),n("hashSet")):(a.location.hash=A||"",n("hashSet"))},h=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;r=!0;const d=a.location.hash.replace("#","");if(d){const p=e.params.hashNavigation.getSlideIndex(e,d);e.slideTo(p||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&o.addEventListener("hashchange",l)},u=()=>{e.params.hashNavigation.watchState&&o.removeEventListener("hashchange",l)};i("init",()=>{e.params.hashNavigation.enabled&&h()}),i("destroy",()=>{e.params.hashNavigation.enabled&&u()}),i("transitionEnd _freeModeNoMomentumRelease",()=>{r&&c()}),i("slideChange",()=>{r&&e.params.cssMode&&c()})}function CY(s){let{swiper:e,extendParams:t,on:n,emit:i,params:r}=s;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let a,o,l=r&&r.autoplay?r.autoplay.delay:3e3,c=r&&r.autoplay?r.autoplay.delay:3e3,h,u=new Date().getTime(),d,A,p,g,m,f,_;function E(P){!e||e.destroyed||!e.wrapperEl||P.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",E),!(_||P.detail&&P.detail.bySwiperTouchMove)&&C())}const y=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?d=!0:d&&(c=h,d=!1);const P=e.autoplay.paused?h:u+c-new Date().getTime();e.autoplay.timeLeft=P,i("autoplayTimeLeft",P,P/l),o=requestAnimationFrame(()=>{y()})},b=()=>{let P;return e.virtual&&e.params.virtual.enabled?P=e.slides.find(te=>te.classList.contains("swiper-slide-active")):P=e.slides[e.activeIndex],P?parseInt(P.getAttribute("data-swiper-autoplay"),10):void 0},x=P=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(o),y();let z=typeof P>"u"?e.params.autoplay.delay:P;l=e.params.autoplay.delay,c=e.params.autoplay.delay;const te=b();!Number.isNaN(te)&&te>0&&typeof P>"u"&&(z=te,l=te,c=te),h=z;const ne=e.params.speed,ue=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(ne,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,ne,!0,!0),i("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(ne,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,ne,!0,!0),i("autoplay")),e.params.cssMode&&(u=new Date().getTime(),requestAnimationFrame(()=>{x()})))};return z>0?(clearTimeout(a),a=setTimeout(()=>{ue()},z)):requestAnimationFrame(()=>{ue()}),z},I=()=>{u=new Date().getTime(),e.autoplay.running=!0,x(),i("autoplayStart")},w=()=>{e.autoplay.running=!1,clearTimeout(a),cancelAnimationFrame(o),i("autoplayStop")},v=(P,z)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(a),P||(f=!0);const te=()=>{i("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",E):C()};if(e.autoplay.paused=!0,z){m&&(h=e.params.autoplay.delay),m=!1,te();return}h=(h||e.params.autoplay.delay)-(new Date().getTime()-u),!(e.isEnd&&h<0&&!e.params.loop)&&(h<0&&(h=0),te())},C=()=>{e.isEnd&&h<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(u=new Date().getTime(),f?(f=!1,x(h)):x(),e.autoplay.paused=!1,i("autoplayResume"))},S=()=>{if(e.destroyed||!e.autoplay.running)return;const P=Jn();P.visibilityState==="hidden"&&(f=!0,v(!0)),P.visibilityState==="visible"&&C()},T=P=>{P.pointerType==="mouse"&&(f=!0,_=!0,!(e.animating||e.autoplay.paused)&&v(!0))},M=P=>{P.pointerType==="mouse"&&(_=!1,e.autoplay.paused&&C())},R=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",T),e.el.addEventListener("pointerleave",M))},F=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",T),e.el.removeEventListener("pointerleave",M))},N=()=>{Jn().addEventListener("visibilitychange",S)},L=()=>{Jn().removeEventListener("visibilitychange",S)};n("init",()=>{e.params.autoplay.enabled&&(R(),N(),I())}),n("destroy",()=>{F(),L(),e.autoplay.running&&w()}),n("_freeModeStaticRelease",()=>{(p||f)&&C()}),n("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?w():v(!0,!0)}),n("beforeTransitionStart",(P,z,te)=>{e.destroyed||!e.autoplay.running||(te||!e.params.autoplay.disableOnInteraction?v(!0,!0):w())}),n("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){w();return}A=!0,p=!1,f=!1,g=setTimeout(()=>{f=!0,p=!0,v(!0)},200)}}),n("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!A)){if(clearTimeout(g),clearTimeout(a),e.params.autoplay.disableOnInteraction){p=!1,A=!1;return}p&&e.params.cssMode&&C(),p=!1,A=!1}}),n("slideChange",()=>{e.destroyed||!e.autoplay.running||(m=!0)}),Object.assign(e.autoplay,{start:I,stop:w,pause:v,resume:C})}function xY(s){let{swiper:e,extendParams:t,on:n}=s;t({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let i=!1,r=!1;e.thumbs={swiper:null};function a(){const c=e.thumbs.swiper;if(!c||c.destroyed)return;const h=c.clickedIndex,u=c.clickedSlide;if(u&&u.classList.contains(e.params.thumbs.slideThumbActiveClass)||typeof h>"u"||h===null)return;let d;c.params.loop?d=parseInt(c.clickedSlide.getAttribute("data-swiper-slide-index"),10):d=h,e.params.loop?e.slideToLoop(d):e.slideTo(d)}function o(){const{thumbs:c}=e.params;if(i)return!1;i=!0;const h=e.constructor;if(c.swiper instanceof h){if(c.swiper.destroyed)return i=!1,!1;e.thumbs.swiper=c.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper.update()}else if(Yu(c.swiper)){const u=Object.assign({},c.swiper);Object.assign(u,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new h(u),r=!0}return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",a),!0}function l(c){const h=e.thumbs.swiper;if(!h||h.destroyed)return;const u=h.params.slidesPerView==="auto"?h.slidesPerViewDynamic():h.params.slidesPerView;let d=1;const A=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(d=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(d=1),d=Math.floor(d),h.slides.forEach(m=>m.classList.remove(A)),h.params.loop||h.params.virtual&&h.params.virtual.enabled)for(let m=0;m<d;m+=1)ii(h.slidesEl,`[data-swiper-slide-index="${e.realIndex+m}"]`).forEach(f=>{f.classList.add(A)});else for(let m=0;m<d;m+=1)h.slides[e.realIndex+m]&&h.slides[e.realIndex+m].classList.add(A);const p=e.params.thumbs.autoScrollOffset,g=p&&!h.params.loop;if(e.realIndex!==h.realIndex||g){const m=h.activeIndex;let f,_;if(h.params.loop){const E=h.slides.find(y=>y.getAttribute("data-swiper-slide-index")===`${e.realIndex}`);f=h.slides.indexOf(E),_=e.activeIndex>e.previousIndex?"next":"prev"}else f=e.realIndex,_=f>e.previousIndex?"next":"prev";g&&(f+=_==="next"?p:-1*p),h.visibleSlidesIndexes&&h.visibleSlidesIndexes.indexOf(f)<0&&(h.params.centeredSlides?f>m?f=f-Math.floor(u/2)+1:f=f+Math.floor(u/2)-1:f>m&&h.params.slidesPerGroup,h.slideTo(f,c?0:void 0))}}n("beforeInit",()=>{const{thumbs:c}=e.params;if(!(!c||!c.swiper))if(typeof c.swiper=="string"||c.swiper instanceof HTMLElement){const h=Jn(),u=()=>{const A=typeof c.swiper=="string"?h.querySelector(c.swiper):c.swiper;if(A&&A.swiper)c.swiper=A.swiper,o(),l(!0);else if(A){const p=`${e.params.eventsPrefix}init`,g=m=>{c.swiper=m.detail[0],A.removeEventListener(p,g),o(),l(!0),c.swiper.update(),e.update()};A.addEventListener(p,g)}return A},d=()=>{if(e.destroyed)return;u()||requestAnimationFrame(d)};requestAnimationFrame(d)}else o(),l(!0)}),n("slideChange update resize observerUpdate",()=>{l()}),n("setTransition",(c,h)=>{const u=e.thumbs.swiper;!u||u.destroyed||u.setTransition(h)}),n("beforeDestroy",()=>{const c=e.thumbs.swiper;!c||c.destroyed||r&&c.destroy()}),Object.assign(e.thumbs,{init:o,update:l})}function wY(s){let{swiper:e,extendParams:t,emit:n,once:i}=s;t({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function r(){if(e.params.cssMode)return;const l=e.getTranslate();e.setTranslate(l),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function a(){if(e.params.cssMode)return;const{touchEventsData:l,touches:c}=e;l.velocities.length===0&&l.velocities.push({position:c[e.isHorizontal()?"startX":"startY"],time:l.touchStartTime}),l.velocities.push({position:c[e.isHorizontal()?"currentX":"currentY"],time:_s()})}function o(l){let{currentPos:c}=l;if(e.params.cssMode)return;const{params:h,wrapperEl:u,rtlTranslate:d,snapGrid:A,touchEventsData:p}=e,m=_s()-p.touchStartTime;if(c<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(c>-e.maxTranslate()){e.slides.length<A.length?e.slideTo(A.length-1):e.slideTo(e.slides.length-1);return}if(h.freeMode.momentum){if(p.velocities.length>1){const w=p.velocities.pop(),v=p.velocities.pop(),C=w.position-v.position,S=w.time-v.time;e.velocity=C/S,e.velocity/=2,Math.abs(e.velocity)<h.freeMode.minimumVelocity&&(e.velocity=0),(S>150||_s()-w.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=h.freeMode.momentumVelocityRatio,p.velocities.length=0;let f=1e3*h.freeMode.momentumRatio;const _=e.velocity*f;let E=e.translate+_;d&&(E=-E);let y=!1,b;const x=Math.abs(e.velocity)*20*h.freeMode.momentumBounceRatio;let I;if(E<e.maxTranslate())h.freeMode.momentumBounce?(E+e.maxTranslate()<-x&&(E=e.maxTranslate()-x),b=e.maxTranslate(),y=!0,p.allowMomentumBounce=!0):E=e.maxTranslate(),h.loop&&h.centeredSlides&&(I=!0);else if(E>e.minTranslate())h.freeMode.momentumBounce?(E-e.minTranslate()>x&&(E=e.minTranslate()+x),b=e.minTranslate(),y=!0,p.allowMomentumBounce=!0):E=e.minTranslate(),h.loop&&h.centeredSlides&&(I=!0);else if(h.freeMode.sticky){let w;for(let v=0;v<A.length;v+=1)if(A[v]>-E){w=v;break}Math.abs(A[w]-E)<Math.abs(A[w-1]-E)||e.swipeDirection==="next"?E=A[w]:E=A[w-1],E=-E}if(I&&i("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(d?f=Math.abs((-E-e.translate)/e.velocity):f=Math.abs((E-e.translate)/e.velocity),h.freeMode.sticky){const w=Math.abs((d?-E:E)-e.translate),v=e.slidesSizesGrid[e.activeIndex];w<v?f=h.speed:w<2*v?f=h.speed*1.5:f=h.speed*2.5}}else if(h.freeMode.sticky){e.slideToClosest();return}h.freeMode.momentumBounce&&y?(e.updateProgress(b),e.setTransition(f),e.setTranslate(E),e.transitionStart(!0,e.swipeDirection),e.animating=!0,_d(u,()=>{!e||e.destroyed||!p.allowMomentumBounce||(n("momentumBounce"),e.setTransition(h.speed),setTimeout(()=>{e.setTranslate(b),_d(u,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(n("_freeModeNoMomentumRelease"),e.updateProgress(E),e.setTransition(f),e.setTranslate(E),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,_d(u,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(E),e.updateActiveIndex(),e.updateSlidesClasses()}else if(h.freeMode.sticky){e.slideToClosest();return}else h.freeMode&&n("_freeModeNoMomentumRelease");(!h.freeMode.momentum||m>=h.longSwipesMs)&&(n("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:r,onTouchMove:a,onTouchEnd:o}})}function SY(s){let{swiper:e,extendParams:t,on:n}=s;t({grid:{rows:1,fill:"column"}});let i,r,a,o;const l=()=>{let g=e.params.spaceBetween;return typeof g=="string"&&g.indexOf("%")>=0?g=parseFloat(g.replace("%",""))/100*e.size:typeof g=="string"&&(g=parseFloat(g)),g},c=g=>{const{slidesPerView:m}=e.params,{rows:f,fill:_}=e.params.grid,E=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:g.length;a=Math.floor(E/f),Math.floor(E/f)===E/f?i=E:i=Math.ceil(E/f)*f,m!=="auto"&&_==="row"&&(i=Math.max(i,m*f)),r=i/f},h=()=>{e.slides&&e.slides.forEach(g=>{g.swiperSlideGridSet&&(g.style.height="",g.style[e.getDirectionLabel("margin-top")]="")})},u=(g,m,f)=>{const{slidesPerGroup:_}=e.params,E=l(),{rows:y,fill:b}=e.params.grid,x=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:f.length;let I,w,v;if(b==="row"&&_>1){const C=Math.floor(g/(_*y)),S=g-y*_*C,T=C===0?_:Math.min(Math.ceil((x-C*y*_)/y),_);v=Math.floor(S/T),w=S-v*T+C*_,I=w+v*i/y,m.style.order=I}else b==="column"?(w=Math.floor(g/y),v=g-w*y,(w>a||w===a&&v===y-1)&&(v+=1,v>=y&&(v=0,w+=1))):(v=Math.floor(g/r),w=g-v*r);m.row=v,m.column=w,m.style.height=`calc((100% - ${(y-1)*E}px) / ${y})`,m.style[e.getDirectionLabel("margin-top")]=v!==0?E&&`${E}px`:"",m.swiperSlideGridSet=!0},d=(g,m)=>{const{centeredSlides:f,roundLengths:_}=e.params,E=l(),{rows:y}=e.params.grid;if(e.virtualSize=(g+E)*i,e.virtualSize=Math.ceil(e.virtualSize/y)-E,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+E}px`),f){const b=[];for(let x=0;x<m.length;x+=1){let I=m[x];_&&(I=Math.floor(I)),m[x]<e.virtualSize+m[0]&&b.push(I)}m.splice(0,m.length),m.push(...b)}},A=()=>{o=e.params.grid&&e.params.grid.rows>1},p=()=>{const{params:g,el:m}=e,f=g.grid&&g.grid.rows>1;o&&!f?(m.classList.remove(`${g.containerModifierClass}grid`,`${g.containerModifierClass}grid-column`),a=1,e.emitContainerClasses()):!o&&f&&(m.classList.add(`${g.containerModifierClass}grid`),g.grid.fill==="column"&&m.classList.add(`${g.containerModifierClass}grid-column`),e.emitContainerClasses()),o=f};n("init",A),n("update",p),e.grid={initSlides:c,unsetSlides:h,updateSlide:u,updateWrapperSize:d}}function BY(s){const e=this,{params:t,slidesEl:n}=e;t.loop&&e.loopDestroy();const i=r=>{if(typeof r=="string"){const a=document.createElement("div");Is(a,r),n.append(a.children[0]),Is(a,"")}else n.append(r)};if(typeof s=="object"&&"length"in s)for(let r=0;r<s.length;r+=1)s[r]&&i(s[r]);else i(s);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function TY(s){const e=this,{params:t,activeIndex:n,slidesEl:i}=e;t.loop&&e.loopDestroy();let r=n+1;const a=o=>{if(typeof o=="string"){const l=document.createElement("div");Is(l,o),i.prepend(l.children[0]),Is(l,"")}else i.prepend(o)};if(typeof s=="object"&&"length"in s){for(let o=0;o<s.length;o+=1)s[o]&&a(s[o]);r=n+s.length}else a(s);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(r,0,!1)}function MY(s,e){const t=this,{params:n,activeIndex:i,slidesEl:r}=t;let a=i;n.loop&&(a-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const o=t.slides.length;if(s<=0){t.prependSlide(e);return}if(s>=o){t.appendSlide(e);return}let l=a>s?a+1:a;const c=[];for(let h=o-1;h>=s;h-=1){const u=t.slides[h];u.remove(),c.unshift(u)}if(typeof e=="object"&&"length"in e){for(let h=0;h<e.length;h+=1)e[h]&&r.append(e[h]);l=a>s?a+e.length:a}else r.append(e);for(let h=0;h<c.length;h+=1)r.append(c[h]);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 RY(s){const e=this,{params:t,activeIndex:n}=e;let i=n;t.loop&&(i-=e.loopedSlides,e.loopDestroy());let r=i,a;if(typeof s=="object"&&"length"in s){for(let o=0;o<s.length;o+=1)a=s[o],e.slides[a]&&e.slides[a].remove(),a<r&&(r-=1);r=Math.max(r,0)}else a=s,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 DY(){const s=this,e=[];for(let t=0;t<s.slides.length;t+=1)e.push(t);s.removeSlide(e)}function QY(s){let{swiper:e}=s;Object.assign(e,{appendSlide:BY.bind(e),prependSlide:TY.bind(e),addSlide:MY.bind(e),removeSlide:RY.bind(e),removeAllSlides:DY.bind(e)})}function Oh(s){const{effect:e,swiper:t,on:n,setTranslate:i,setTransition:r,overwriteParams:a,perspective:o,recreateShadows:l,getEffectParams:c}=s;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 u=a?a():{};Object.assign(t.params,u),Object.assign(t.originalParams,u)}),n("setTranslate _virtualUpdated",()=>{t.params.effect===e&&i()}),n("setTransition",(u,d)=>{t.params.effect===e&&r(d)}),n("transitionEnd",()=>{if(t.params.effect===e&&l){if(!c||!c().slideShadows)return;t.slides.forEach(u=>{u.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>d.remove())}),l()}});let h;n("virtualUpdate",()=>{t.params.effect===e&&(t.slides.length||(h=!0),requestAnimationFrame(()=>{h&&t.slides&&t.slides.length&&(i(),h=!1)}))})}function sA(s,e){const t=Ll(e);return t!==e&&(t.style.backfaceVisibility="hidden",t.style["-webkit-backface-visibility"]="hidden"),t}function Bg(s){let{swiper:e,duration:t,transformElements:n,allSlides:i}=s;const{activeIndex:r}=e,a=o=>o.parentElement?o.parentElement:e.slides.find(c=>c.shadowRoot&&c.shadowRoot===o.parentNode);if(e.params.virtualTranslate&&t!==0){let o=!1,l;i?l=n:l=n.filter(c=>{const h=c.classList.contains("swiper-slide-transform")?a(c):c;return e.getSlideIndex(h)===r}),l.forEach(c=>{_d(c,()=>{if(o||!e||e.destroyed)return;o=!0,e.animating=!1;const h=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});e.wrapperEl.dispatchEvent(h)})})}}function LY(s){let{swiper:e,extendParams:t,on:n}=s;t({fadeEffect:{crossFade:!1}}),Oh({effect:"fade",swiper:e,on:n,setTranslate:()=>{const{slides:a}=e,o=e.params.fadeEffect;for(let l=0;l<a.length;l+=1){const c=e.slides[l];let u=-c.swiperSlideOffset;e.params.virtualTranslate||(u-=e.translate);let d=0;e.isHorizontal()||(d=u,u=0);const A=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(c.progress),0):1+Math.min(Math.max(c.progress,-1),0),p=sA(o,c);p.style.opacity=A,p.style.transform=`translate3d(${u}px, ${d}px, 0px)`}},setTransition:a=>{const o=e.slides.map(l=>Ll(l));o.forEach(l=>{l.style.transitionDuration=`${a}ms`}),Bg({swiper:e,duration:a,transformElements:o,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function NY(s){let{swiper:e,extendParams:t,on:n}=s;t({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(l,c,h)=>{let u=h?l.querySelector(".swiper-slide-shadow-left"):l.querySelector(".swiper-slide-shadow-top"),d=h?l.querySelector(".swiper-slide-shadow-right"):l.querySelector(".swiper-slide-shadow-bottom");u||(u=is("div",`swiper-slide-shadow-cube swiper-slide-shadow-${h?"left":"top"}`.split(" ")),l.append(u)),d||(d=is("div",`swiper-slide-shadow-cube swiper-slide-shadow-${h?"right":"bottom"}`.split(" ")),l.append(d)),u&&(u.style.opacity=Math.max(-c,0)),d&&(d.style.opacity=Math.max(c,0))};Oh({effect:"cube",swiper:e,on:n,setTranslate:()=>{const{el:l,wrapperEl:c,slides:h,width:u,height:d,rtlTranslate:A,size:p,browser:g}=e,m=Sg(e),f=e.params.cubeEffect,_=e.isHorizontal(),E=e.virtual&&e.params.virtual.enabled;let y=0,b;f.shadow&&(_?(b=e.wrapperEl.querySelector(".swiper-cube-shadow"),b||(b=is("div","swiper-cube-shadow"),e.wrapperEl.append(b)),b.style.height=`${u}px`):(b=l.querySelector(".swiper-cube-shadow"),b||(b=is("div","swiper-cube-shadow"),l.append(b))));for(let I=0;I<h.length;I+=1){const w=h[I];let v=I;E&&(v=parseInt(w.getAttribute("data-swiper-slide-index"),10));let C=v*90,S=Math.floor(C/360);A&&(C=-C,S=Math.floor(-C/360));const T=Math.max(Math.min(w.progress,1),-1);let M=0,R=0,F=0;v%4===0?(M=-S*4*p,F=0):(v-1)%4===0?(M=0,F=-S*4*p):(v-2)%4===0?(M=p+S*4*p,F=p):(v-3)%4===0&&(M=-p,F=3*p+p*4*S),A&&(M=-M),_||(R=M,M=0);const N=`rotateX(${m(_?0:-C)}deg) rotateY(${m(_?C:0)}deg) translate3d(${M}px, ${R}px, ${F}px)`;T<=1&&T>-1&&(y=v*90+T*90,A&&(y=-v*90-T*90)),w.style.transform=N,f.slideShadows&&i(w,T,_)}if(c.style.transformOrigin=`50% 50% -${p/2}px`,c.style["-webkit-transform-origin"]=`50% 50% -${p/2}px`,f.shadow)if(_)b.style.transform=`translate3d(0px, ${u/2+f.shadowOffset}px, ${-u/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${f.shadowScale})`;else{const I=Math.abs(y)-Math.floor(Math.abs(y)/90)*90,w=1.5-(Math.sin(I*2*Math.PI/360)/2+Math.cos(I*2*Math.PI/360)/2),v=f.shadowScale,C=f.shadowScale/w,S=f.shadowOffset;b.style.transform=`scale3d(${v}, 1, ${C}) translate3d(0px, ${d/2+S}px, ${-d/2/C}px) rotateX(-89.99deg)`}const x=(g.isSafari||g.isWebView)&&g.needPerspectiveFix?-p/2:0;c.style.transform=`translate3d(0px,0,${x}px) rotateX(${m(e.isHorizontal()?0:y)}deg) rotateY(${m(e.isHorizontal()?-y:0)}deg)`,c.style.setProperty("--swiper-cube-translate-z",`${x}px`)},setTransition:l=>{const{el:c,slides:h}=e;if(h.forEach(u=>{u.style.transitionDuration=`${l}ms`,u.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${l}ms`})}),e.params.cubeEffect.shadow&&!e.isHorizontal()){const u=c.querySelector(".swiper-cube-shadow");u&&(u.style.transitionDuration=`${l}ms`)}},recreateShadows:()=>{const l=e.isHorizontal();e.slides.forEach(c=>{const h=Math.max(Math.min(c.progress,1),-1);i(c,h,l)})},getEffectParams:()=>e.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Ch(s,e,t){const n=`swiper-slide-shadow${t?`-${t}`:""}${s?` swiper-slide-shadow-${s}`:""}`,i=Ll(e);let r=i.querySelector(`.${n.split(" ").join(".")}`);return r||(r=is("div",n.split(" ")),i.append(r)),r}function PY(s){let{swiper:e,extendParams:t,on:n}=s;t({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(l,c)=>{let h=e.isHorizontal()?l.querySelector(".swiper-slide-shadow-left"):l.querySelector(".swiper-slide-shadow-top"),u=e.isHorizontal()?l.querySelector(".swiper-slide-shadow-right"):l.querySelector(".swiper-slide-shadow-bottom");h||(h=Ch("flip",l,e.isHorizontal()?"left":"top")),u||(u=Ch("flip",l,e.isHorizontal()?"right":"bottom")),h&&(h.style.opacity=Math.max(-c,0)),u&&(u.style.opacity=Math.max(c,0))};Oh({effect:"flip",swiper:e,on:n,setTranslate:()=>{const{slides:l,rtlTranslate:c}=e,h=e.params.flipEffect,u=Sg(e);for(let d=0;d<l.length;d+=1){const A=l[d];let p=A.progress;e.params.flipEffect.limitRotation&&(p=Math.max(Math.min(A.progress,1),-1));const g=A.swiperSlideOffset;let f=-180*p,_=0,E=e.params.cssMode?-g-e.translate:-g,y=0;e.isHorizontal()?c&&(f=-f):(y=E,E=0,_=-f,f=0),A.style.zIndex=-Math.abs(Math.round(p))+l.length,h.slideShadows&&i(A,p);const b=`translate3d(${E}px, ${y}px, 0px) rotateX(${u(_)}deg) rotateY(${u(f)}deg)`,x=sA(h,A);x.style.transform=b}},setTransition:l=>{const c=e.slides.map(h=>Ll(h));c.forEach(h=>{h.style.transitionDuration=`${l}ms`,h.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(u=>{u.style.transitionDuration=`${l}ms`})}),Bg({swiper:e,duration:l,transformElements:c})},recreateShadows:()=>{e.params.flipEffect,e.slides.forEach(l=>{let c=l.progress;e.params.flipEffect.limitRotation&&(c=Math.max(Math.min(l.progress,1),-1)),i(l,c)})},getEffectParams:()=>e.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function FY(s){let{swiper:e,extendParams:t,on:n}=s;t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Oh({effect:"coverflow",swiper:e,on:n,setTranslate:()=>{const{width:a,height:o,slides:l,slidesSizesGrid:c}=e,h=e.params.coverflowEffect,u=e.isHorizontal(),d=e.translate,A=u?-d+a/2:-d+o/2,p=u?h.rotate:-h.rotate,g=h.depth,m=Sg(e);for(let f=0,_=l.length;f<_;f+=1){const E=l[f],y=c[f],b=E.swiperSlideOffset,x=(A-b-y/2)/y,I=typeof h.modifier=="function"?h.modifier(x):x*h.modifier;let w=u?p*I:0,v=u?0:p*I,C=-g*Math.abs(I),S=h.stretch;typeof S=="string"&&S.indexOf("%")!==-1&&(S=parseFloat(h.stretch)/100*y);let T=u?0:S*I,M=u?S*I:0,R=1-(1-h.scale)*Math.abs(I);Math.abs(M)<.001&&(M=0),Math.abs(T)<.001&&(T=0),Math.abs(C)<.001&&(C=0),Math.abs(w)<.001&&(w=0),Math.abs(v)<.001&&(v=0),Math.abs(R)<.001&&(R=0);const F=`translate3d(${M}px,${T}px,${C}px) rotateX(${m(v)}deg) rotateY(${m(w)}deg) scale(${R})`,N=sA(h,E);if(N.style.transform=F,E.style.zIndex=-Math.abs(Math.round(I))+1,h.slideShadows){let L=u?E.querySelector(".swiper-slide-shadow-left"):E.querySelector(".swiper-slide-shadow-top"),P=u?E.querySelector(".swiper-slide-shadow-right"):E.querySelector(".swiper-slide-shadow-bottom");L||(L=Ch("coverflow",E,u?"left":"top")),P||(P=Ch("coverflow",E,u?"right":"bottom")),L&&(L.style.opacity=I>0?I:0),P&&(P.style.opacity=-I>0?-I:0)}}},setTransition:a=>{e.slides.map(l=>Ll(l)).forEach(l=>{l.style.transitionDuration=`${a}ms`,l.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(c=>{c.style.transitionDuration=`${a}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function kY(s){let{swiper:e,extendParams:t,on:n}=s;t({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 i=o=>typeof o=="string"?o:`${o}px`;Oh({effect:"creative",swiper:e,on:n,setTranslate:()=>{const{slides:o,wrapperEl:l,slidesSizesGrid:c}=e,h=e.params.creativeEffect,{progressMultiplier:u}=h,d=e.params.centeredSlides,A=Sg(e);if(d){const p=c[0]/2-e.params.slidesOffsetBefore||0;l.style.transform=`translateX(calc(50% - ${p}px))`}for(let p=0;p<o.length;p+=1){const g=o[p],m=g.progress,f=Math.min(Math.max(g.progress,-h.limitProgress),h.limitProgress);let _=f;d||(_=Math.min(Math.max(g.originalProgress,-h.limitProgress),h.limitProgress));const E=g.swiperSlideOffset,y=[e.params.cssMode?-E-e.translate:-E,0,0],b=[0,0,0];let x=!1;e.isHorizontal()||(y[1]=y[0],y[0]=0);let I={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};f<0?(I=h.next,x=!0):f>0&&(I=h.prev,x=!0),y.forEach((R,F)=>{y[F]=`calc(${R}px + (${i(I.translate[F])} * ${Math.abs(f*u)}))`}),b.forEach((R,F)=>{let N=I.rotate[F]*Math.abs(f*u);b[F]=N}),g.style.zIndex=-Math.abs(Math.round(m))+o.length;const w=y.join(", "),v=`rotateX(${A(b[0])}deg) rotateY(${A(b[1])}deg) rotateZ(${A(b[2])}deg)`,C=_<0?`scale(${1+(1-I.scale)*_*u})`:`scale(${1-(1-I.scale)*_*u})`,S=_<0?1+(1-I.opacity)*_*u:1-(1-I.opacity)*_*u,T=`translate3d(${w}) ${v} ${C}`;if(x&&I.shadow||!x){let R=g.querySelector(".swiper-slide-shadow");if(!R&&I.shadow&&(R=Ch("creative",g)),R){const F=h.shadowPerProgress?f*(1/h.limitProgress):f;R.style.opacity=Math.min(Math.max(Math.abs(F),0),1)}}const M=sA(h,g);M.style.transform=T,M.style.opacity=S,I.origin&&(M.style.transformOrigin=I.origin)}},setTransition:o=>{const l=e.slides.map(c=>Ll(c));l.forEach(c=>{c.style.transitionDuration=`${o}ms`,c.querySelectorAll(".swiper-slide-shadow").forEach(h=>{h.style.transitionDuration=`${o}ms`})}),Bg({swiper:e,duration:o,transformElements:l,allSlides:!0})},perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}function UY(s){let{swiper:e,extendParams:t,on:n}=s;t({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Oh({effect:"cards",swiper:e,on:n,setTranslate:()=>{const{slides:a,activeIndex:o,rtlTranslate:l}=e,c=e.params.cardsEffect,{startTranslate:h,isTouched:u}=e.touchEventsData,d=l?-e.translate:e.translate;for(let A=0;A<a.length;A+=1){const p=a[A],g=p.progress,m=Math.min(Math.max(g,-4),4);let f=p.swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&(e.wrapperEl.style.transform=`translateX(${e.minTranslate()}px)`),e.params.centeredSlides&&e.params.cssMode&&(f-=a[0].swiperSlideOffset);let _=e.params.cssMode?-f-e.translate:-f,E=0;const y=-100*Math.abs(m);let b=1,x=-c.perSlideRotate*m,I=c.perSlideOffset-Math.abs(m)*.75;const w=e.virtual&&e.params.virtual.enabled?e.virtual.from+A:A,v=(w===o||w===o-1)&&m>0&&m<1&&(u||e.params.cssMode)&&d<h,C=(w===o||w===o+1)&&m<0&&m>-1&&(u||e.params.cssMode)&&d>h;if(v||C){const R=(1-Math.abs((Math.abs(m)-.5)/.5))**.5;x+=-28*m*R,b+=-.5*R,I+=96*R,E=`${-25*R*Math.abs(m)}%`}if(m<0?_=`calc(${_}px ${l?"-":"+"} (${I*Math.abs(m)}%))`:m>0?_=`calc(${_}px ${l?"-":"+"} (-${I*Math.abs(m)}%))`:_=`${_}px`,!e.isHorizontal()){const R=E;E=_,_=R}const S=m<0?`${1+(1-b)*m}`:`${1-(1-b)*m}`,T=`
|
|
14238
14238
|
translate3d(${_}, ${E}, ${y}px)
|
|
14239
14239
|
rotateZ(${c.rotate?l?-x:x:0}deg)
|
|
14240
14240
|
scale(${S})
|
|
14241
|
-
`;if(c.slideShadows){let R=p.querySelector(".swiper-slide-shadow");R||(R=Ch("cards",p)),R&&(R.style.opacity=Math.min(Math.max((Math.abs(m)-.5)/.5,0),1))}p.style.zIndex=-Math.abs(Math.round(g))+a.length;const M=sA(c,p);M.style.transform=T}},setTransition:a=>{const o=e.slides.map(l=>Ll(l));o.forEach(l=>{l.style.transitionDuration=`${a}ms`,l.querySelectorAll(".swiper-slide-shadow").forEach(c=>{c.style.transitionDuration=`${a}ms`})}),Bg({swiper:e,duration:a,transformElements:o})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:e.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!e.params.cssMode})})}const UY=[uY,dY,AY,pY,fY,gY,mY,EY,yY,_Y,bY,vY,IY,CY,xY,wY,DY,QY,LY,NY,PY,FY,kY];Ji.use(UY);const Tg=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function xh(s){return typeof s=="object"&&s!==null&&s.constructor&&Object.prototype.toString.call(s).slice(8,-1)==="Object"&&!s.__swiper__}function o0(s,e){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof s[n]>"u"?s[n]=e[n]:xh(e[n])&&xh(s[n])&&Object.keys(e[n]).length>0?e[n].__swiper__?s[n]=e[n]:o0(s[n],e[n]):s[n]=e[n]})}function OY(s){return s===void 0&&(s={}),s.navigation&&typeof s.navigation.nextEl>"u"&&typeof s.navigation.prevEl>"u"}function GY(s){return s===void 0&&(s={}),s.pagination&&typeof s.pagination.el>"u"}function zY(s){return s===void 0&&(s={}),s.scrollbar&&typeof s.scrollbar.el>"u"}function Zp(s){return s===void 0&&(s=""),s.replace(/-[a-z]/g,e=>e.toUpperCase().replace("-",""))}function HY(s){let{swiper:e,slides:t,passedParams:n,changedParams:i,nextEl:r,prevEl:a,scrollbarEl:o,paginationEl:l}=s;const c=i.filter(v=>v!=="children"&&v!=="direction"&&v!=="wrapperClass"),{params:h,pagination:u,navigation:d,scrollbar:A,virtual:p,thumbs:g}=e;let m,f,_,E,y,b,x,I;i.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&h.thumbs&&(!h.thumbs.swiper||h.thumbs.swiper.destroyed)&&(m=!0),i.includes("controller")&&n.controller&&n.controller.control&&h.controller&&!h.controller.control&&(f=!0),i.includes("pagination")&&n.pagination&&(n.pagination.el||l)&&(h.pagination||h.pagination===!1)&&u&&!u.el&&(_=!0),i.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||o)&&(h.scrollbar||h.scrollbar===!1)&&A&&!A.el&&(E=!0),i.includes("navigation")&&n.navigation&&(n.navigation.prevEl||a)&&(n.navigation.nextEl||r)&&(h.navigation||h.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(y=!0);const w=v=>{e[v]&&(e[v].destroy(),v==="navigation"?(e.isElement&&(e[v].prevEl.remove(),e[v].nextEl.remove()),h[v].prevEl=void 0,h[v].nextEl=void 0,e[v].prevEl=void 0,e[v].nextEl=void 0):(e.isElement&&e[v].el.remove(),h[v].el=void 0,e[v].el=void 0))};i.includes("loop")&&e.isElement&&(h.loop&&!n.loop?b=!0:!h.loop&&n.loop?x=!0:I=!0),c.forEach(v=>{if(xh(h[v])&&xh(n[v]))Object.assign(h[v],n[v]),(v==="navigation"||v==="pagination"||v==="scrollbar")&&"enabled"in n[v]&&!n[v].enabled&&w(v);else{const C=n[v];(C===!0||C===!1)&&(v==="navigation"||v==="pagination"||v==="scrollbar")?C===!1&&w(v):h[v]=n[v]}}),c.includes("controller")&&!f&&e.controller&&e.controller.control&&h.controller&&h.controller.control&&(e.controller.control=h.controller.control),i.includes("children")&&t&&p&&h.virtual.enabled?(p.slides=t,p.update(!0)):i.includes("virtual")&&p&&h.virtual.enabled&&(t&&(p.slides=t),p.update(!0)),i.includes("children")&&t&&h.loop&&(I=!0),m&&g.init()&&g.update(!0),f&&(e.controller.control=h.controller.control),_&&(e.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),e.el.appendChild(l)),l&&(h.pagination.el=l),u.init(),u.render(),u.update()),E&&(e.isElement&&(!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-scrollbar"),o.part.add("scrollbar"),e.el.appendChild(o)),o&&(h.scrollbar.el=o),A.init(),A.updateSize(),A.setTranslate()),y&&(e.isElement&&((!r||typeof r=="string")&&(r=document.createElement("div"),r.classList.add("swiper-button-next"),Is(r,e.hostEl.constructor.nextButtonSvg),r.part.add("button-next"),e.el.appendChild(r)),(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-prev"),Is(a,e.hostEl.constructor.prevButtonSvg),a.part.add("button-prev"),e.el.appendChild(a))),r&&(h.navigation.nextEl=r),a&&(h.navigation.prevEl=a),d.init(),d.update()),i.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),i.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),i.includes("direction")&&e.changeDirection(n.direction,!1),(b||I)&&e.loopDestroy(),(x||I)&&e.loopCreate(),e.update()}const Px=s=>{if(parseFloat(s)===Number(s))return Number(s);if(s==="true"||s==="")return!0;if(s==="false")return!1;if(s==="null")return null;if(s!=="undefined"){if(typeof s=="string"&&s.includes("{")&&s.includes("}")&&s.includes('"')){let e;try{e=JSON.parse(s)}catch{e=s}return e}return s}},Fx=["a11y","autoplay","controller","cards-effect","coverflow-effect","creative-effect","cube-effect","fade-effect","flip-effect","free-mode","grid","hash-navigation","history","keyboard","mousewheel","navigation","pagination","parallax","scrollbar","thumbs","virtual","zoom"];function kx(s,e,t){const n={},i={};o0(n,a0);const r=[...Tg,"on"],a=r.map(l=>l.replace(/_/,""));r.forEach(l=>{l=l.replace("_",""),typeof s[l]<"u"&&(i[l]=s[l])});const o=[...s.attributes];return typeof e=="string"&&typeof t<"u"&&o.push({name:e,value:xh(t)?{...t}:t}),o.forEach(l=>{const c=Fx.find(h=>l.name.startsWith(`${h}-`));if(c){const h=Zp(c),u=Zp(l.name.split(`${c}-`)[1]);typeof i[h]>"u"&&(i[h]={}),i[h]===!0&&(i[h]={enabled:!0}),i[h]===!1&&(i[h]={enabled:!1}),i[h][u]=Px(l.value)}else{const h=Zp(l.name);if(!a.includes(h))return;const u=Px(l.value);i[h]&&Fx.includes(l.name)&&!xh(u)?(i[h].constructor!==Object&&(i[h]={}),i[h].enabled=!!u):i[h]=u}}),o0(n,i),n.navigation?n.navigation={prevEl:".swiper-button-prev",nextEl:".swiper-button-next",...n.navigation!==!0?n.navigation:{}}:n.navigation===!1&&delete n.navigation,n.scrollbar?n.scrollbar={el:".swiper-scrollbar",...n.scrollbar!==!0?n.scrollbar:{}}:n.scrollbar===!1&&delete n.scrollbar,n.pagination?n.pagination={el:".swiper-pagination",...n.pagination!==!0?n.pagination:{}}:n.pagination===!1&&delete n.pagination,{params:n,passedParams:i}}const $Y=":host{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{width:100%;height:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android ::slotted(swiper-slide),.swiper-ios ::slotted(swiper-slide),.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}::slotted(swiper-slide){flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}::slotted(.swiper-slide-invisible-blank){visibility:hidden}.swiper-autoheight,.swiper-autoheight ::slotted(swiper-slide){height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden ::slotted(swiper-slide){transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d ::slotted(swiper-slide){transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode ::slotted(swiper-slide){scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode ::slotted(swiper-slide){scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered ::slotted(swiper-slide){scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal ::slotted(swiper-slide):first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical ::slotted(swiper-slide):first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-virtual ::slotted(swiper-slide){-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:host{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}::slotted(.swiper-slide-zoomed){cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode ::slotted(swiper-slide){transition-timing-function:ease-out}.swiper-fade ::slotted(swiper-slide){pointer-events:none;transition-property:opacity}.swiper-fade ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-fade ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-fade ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper.swiper-cube{overflow:visible}.swiper-cube ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-cube.swiper-rtl ::slotted(swiper-slide){transform-origin:100% 0}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-next),.swiper-cube ::slotted(.swiper-slide-prev){pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube ::slotted(.swiper-slide-next)+::slotted(swiper-slide){pointer-events:auto;visibility:visible}.swiper.swiper-flip{overflow:visible}.swiper-flip ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-flip ::slotted(.swiper-slide-active),.swiper-flip ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-creative ::slotted(swiper-slide){-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper.swiper-cards{overflow:visible}.swiper-cards ::slotted(swiper-slide){transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}",VY="::slotted(.swiper-slide-shadow),::slotted(.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-top){position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}::slotted(.swiper-slide-shadow){background:rgba(0,0,0,.15)}::slotted(.swiper-slide-shadow-left){background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-right){background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-top){background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-bottom){background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear;width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-top){z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-top){z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}::slotted(.swiper-zoom-container){width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}::slotted(.swiper-zoom-container)>canvas,::slotted(.swiper-zoom-container)>img,::slotted(.swiper-zoom-container)>svg{max-width:100%;max-height:100%;object-fit:contain}";class YY{}const SR=typeof window>"u"||typeof HTMLElement>"u"?YY:HTMLElement,Ux=`<svg 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>
|
|
14242
|
-
`,BR=(s,e)=>{if(typeof CSSStyleSheet<"u"&&s.adoptedStyleSheets){const t=new CSSStyleSheet;t.replaceSync(e),s.adoptedStyleSheets=[t]}else{const t=document.createElement("style");t.rel="stylesheet",t.textContent=e,s.appendChild(t)}};class TR extends SR{constructor(){super(),this.attachShadow({mode:"open"})}static get nextButtonSvg(){return Ux}static get prevButtonSvg(){return Ux.replace("/></svg>",' transform-origin="center" transform="rotate(180)"/></svg>')}cssStyles(){return[
|
|
14241
|
+
`;if(c.slideShadows){let R=p.querySelector(".swiper-slide-shadow");R||(R=Ch("cards",p)),R&&(R.style.opacity=Math.min(Math.max((Math.abs(m)-.5)/.5,0),1))}p.style.zIndex=-Math.abs(Math.round(g))+a.length;const M=sA(c,p);M.style.transform=T}},setTransition:a=>{const o=e.slides.map(l=>Ll(l));o.forEach(l=>{l.style.transitionDuration=`${a}ms`,l.querySelectorAll(".swiper-slide-shadow").forEach(c=>{c.style.transitionDuration=`${a}ms`})}),Bg({swiper:e,duration:a,transformElements:o})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:e.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!e.params.cssMode})})}const OY=[dY,AY,pY,fY,gY,mY,EY,yY,_Y,bY,vY,IY,CY,xY,wY,SY,QY,LY,NY,PY,FY,kY,UY];Ji.use(OY);const Tg=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function xh(s){return typeof s=="object"&&s!==null&&s.constructor&&Object.prototype.toString.call(s).slice(8,-1)==="Object"&&!s.__swiper__}function o0(s,e){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof s[n]>"u"?s[n]=e[n]:xh(e[n])&&xh(s[n])&&Object.keys(e[n]).length>0?e[n].__swiper__?s[n]=e[n]:o0(s[n],e[n]):s[n]=e[n]})}function GY(s){return s===void 0&&(s={}),s.navigation&&typeof s.navigation.nextEl>"u"&&typeof s.navigation.prevEl>"u"}function zY(s){return s===void 0&&(s={}),s.pagination&&typeof s.pagination.el>"u"}function HY(s){return s===void 0&&(s={}),s.scrollbar&&typeof s.scrollbar.el>"u"}function Zp(s){return s===void 0&&(s=""),s.replace(/-[a-z]/g,e=>e.toUpperCase().replace("-",""))}function $Y(s){let{swiper:e,slides:t,passedParams:n,changedParams:i,nextEl:r,prevEl:a,scrollbarEl:o,paginationEl:l}=s;const c=i.filter(v=>v!=="children"&&v!=="direction"&&v!=="wrapperClass"),{params:h,pagination:u,navigation:d,scrollbar:A,virtual:p,thumbs:g}=e;let m,f,_,E,y,b,x,I;i.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&h.thumbs&&(!h.thumbs.swiper||h.thumbs.swiper.destroyed)&&(m=!0),i.includes("controller")&&n.controller&&n.controller.control&&h.controller&&!h.controller.control&&(f=!0),i.includes("pagination")&&n.pagination&&(n.pagination.el||l)&&(h.pagination||h.pagination===!1)&&u&&!u.el&&(_=!0),i.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||o)&&(h.scrollbar||h.scrollbar===!1)&&A&&!A.el&&(E=!0),i.includes("navigation")&&n.navigation&&(n.navigation.prevEl||a)&&(n.navigation.nextEl||r)&&(h.navigation||h.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(y=!0);const w=v=>{e[v]&&(e[v].destroy(),v==="navigation"?(e.isElement&&(e[v].prevEl.remove(),e[v].nextEl.remove()),h[v].prevEl=void 0,h[v].nextEl=void 0,e[v].prevEl=void 0,e[v].nextEl=void 0):(e.isElement&&e[v].el.remove(),h[v].el=void 0,e[v].el=void 0))};i.includes("loop")&&e.isElement&&(h.loop&&!n.loop?b=!0:!h.loop&&n.loop?x=!0:I=!0),c.forEach(v=>{if(xh(h[v])&&xh(n[v]))Object.assign(h[v],n[v]),(v==="navigation"||v==="pagination"||v==="scrollbar")&&"enabled"in n[v]&&!n[v].enabled&&w(v);else{const C=n[v];(C===!0||C===!1)&&(v==="navigation"||v==="pagination"||v==="scrollbar")?C===!1&&w(v):h[v]=n[v]}}),c.includes("controller")&&!f&&e.controller&&e.controller.control&&h.controller&&h.controller.control&&(e.controller.control=h.controller.control),i.includes("children")&&t&&p&&h.virtual.enabled?(p.slides=t,p.update(!0)):i.includes("virtual")&&p&&h.virtual.enabled&&(t&&(p.slides=t),p.update(!0)),i.includes("children")&&t&&h.loop&&(I=!0),m&&g.init()&&g.update(!0),f&&(e.controller.control=h.controller.control),_&&(e.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),e.el.appendChild(l)),l&&(h.pagination.el=l),u.init(),u.render(),u.update()),E&&(e.isElement&&(!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-scrollbar"),o.part.add("scrollbar"),e.el.appendChild(o)),o&&(h.scrollbar.el=o),A.init(),A.updateSize(),A.setTranslate()),y&&(e.isElement&&((!r||typeof r=="string")&&(r=document.createElement("div"),r.classList.add("swiper-button-next"),Is(r,e.hostEl.constructor.nextButtonSvg),r.part.add("button-next"),e.el.appendChild(r)),(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-prev"),Is(a,e.hostEl.constructor.prevButtonSvg),a.part.add("button-prev"),e.el.appendChild(a))),r&&(h.navigation.nextEl=r),a&&(h.navigation.prevEl=a),d.init(),d.update()),i.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),i.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),i.includes("direction")&&e.changeDirection(n.direction,!1),(b||I)&&e.loopDestroy(),(x||I)&&e.loopCreate(),e.update()}const Px=s=>{if(parseFloat(s)===Number(s))return Number(s);if(s==="true"||s==="")return!0;if(s==="false")return!1;if(s==="null")return null;if(s!=="undefined"){if(typeof s=="string"&&s.includes("{")&&s.includes("}")&&s.includes('"')){let e;try{e=JSON.parse(s)}catch{e=s}return e}return s}},Fx=["a11y","autoplay","controller","cards-effect","coverflow-effect","creative-effect","cube-effect","fade-effect","flip-effect","free-mode","grid","hash-navigation","history","keyboard","mousewheel","navigation","pagination","parallax","scrollbar","thumbs","virtual","zoom"];function kx(s,e,t){const n={},i={};o0(n,a0);const r=[...Tg,"on"],a=r.map(l=>l.replace(/_/,""));r.forEach(l=>{l=l.replace("_",""),typeof s[l]<"u"&&(i[l]=s[l])});const o=[...s.attributes];return typeof e=="string"&&typeof t<"u"&&o.push({name:e,value:xh(t)?{...t}:t}),o.forEach(l=>{const c=Fx.find(h=>l.name.startsWith(`${h}-`));if(c){const h=Zp(c),u=Zp(l.name.split(`${c}-`)[1]);typeof i[h]>"u"&&(i[h]={}),i[h]===!0&&(i[h]={enabled:!0}),i[h]===!1&&(i[h]={enabled:!1}),i[h][u]=Px(l.value)}else{const h=Zp(l.name);if(!a.includes(h))return;const u=Px(l.value);i[h]&&Fx.includes(l.name)&&!xh(u)?(i[h].constructor!==Object&&(i[h]={}),i[h].enabled=!!u):i[h]=u}}),o0(n,i),n.navigation?n.navigation={prevEl:".swiper-button-prev",nextEl:".swiper-button-next",...n.navigation!==!0?n.navigation:{}}:n.navigation===!1&&delete n.navigation,n.scrollbar?n.scrollbar={el:".swiper-scrollbar",...n.scrollbar!==!0?n.scrollbar:{}}:n.scrollbar===!1&&delete n.scrollbar,n.pagination?n.pagination={el:".swiper-pagination",...n.pagination!==!0?n.pagination:{}}:n.pagination===!1&&delete n.pagination,{params:n,passedParams:i}}const VY=":host{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{width:100%;height:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android ::slotted(swiper-slide),.swiper-ios ::slotted(swiper-slide),.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}::slotted(swiper-slide){flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}::slotted(.swiper-slide-invisible-blank){visibility:hidden}.swiper-autoheight,.swiper-autoheight ::slotted(swiper-slide){height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden ::slotted(swiper-slide){transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d ::slotted(swiper-slide){transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode ::slotted(swiper-slide){scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode ::slotted(swiper-slide){scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered ::slotted(swiper-slide){scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal ::slotted(swiper-slide):first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical ::slotted(swiper-slide):first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-virtual ::slotted(swiper-slide){-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:host{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}::slotted(.swiper-slide-zoomed){cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode ::slotted(swiper-slide){transition-timing-function:ease-out}.swiper-fade ::slotted(swiper-slide){pointer-events:none;transition-property:opacity}.swiper-fade ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-fade ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-fade ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper.swiper-cube{overflow:visible}.swiper-cube ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-cube.swiper-rtl ::slotted(swiper-slide){transform-origin:100% 0}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-next),.swiper-cube ::slotted(.swiper-slide-prev){pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube ::slotted(.swiper-slide-next)+::slotted(swiper-slide){pointer-events:auto;visibility:visible}.swiper.swiper-flip{overflow:visible}.swiper-flip ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-flip ::slotted(.swiper-slide-active),.swiper-flip ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-creative ::slotted(swiper-slide){-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper.swiper-cards{overflow:visible}.swiper-cards ::slotted(swiper-slide){transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}",YY="::slotted(.swiper-slide-shadow),::slotted(.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-top){position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}::slotted(.swiper-slide-shadow){background:rgba(0,0,0,.15)}::slotted(.swiper-slide-shadow-left){background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-right){background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-top){background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-bottom){background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear;width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-top){z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-top){z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}::slotted(.swiper-zoom-container){width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}::slotted(.swiper-zoom-container)>canvas,::slotted(.swiper-zoom-container)>img,::slotted(.swiper-zoom-container)>svg{max-width:100%;max-height:100%;object-fit:contain}";class qY{}const SR=typeof window>"u"||typeof HTMLElement>"u"?qY:HTMLElement,Ux=`<svg 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>
|
|
14242
|
+
`,BR=(s,e)=>{if(typeof CSSStyleSheet<"u"&&s.adoptedStyleSheets){const t=new CSSStyleSheet;t.replaceSync(e),s.adoptedStyleSheets=[t]}else{const t=document.createElement("style");t.rel="stylesheet",t.textContent=e,s.appendChild(t)}};class TR extends SR{constructor(){super(),this.attachShadow({mode:"open"})}static get nextButtonSvg(){return Ux}static get prevButtonSvg(){return Ux.replace("/></svg>",' transform-origin="center" transform="rotate(180)"/></svg>')}cssStyles(){return[VY,...this.injectStyles&&Array.isArray(this.injectStyles)?this.injectStyles:[]].join(`
|
|
14243
14243
|
`)}cssLinks(){return this.injectStylesUrls||[]}calcSlideSlots(){const e=this.slideSlots||0,t=[...this.querySelectorAll("[slot^=slide-]")].map(n=>parseInt(n.getAttribute("slot").split("slide-")[1],10));if(this.slideSlots=t.length?Math.max(...t)+1:0,!!this.rendered){if(this.slideSlots>e)for(let n=e;n<this.slideSlots;n+=1){const i=document.createElement("swiper-slide");i.setAttribute("part",`slide slide-${n+1}`);const r=document.createElement("slot");r.setAttribute("name",`slide-${n+1}`),i.appendChild(r),this.shadowRoot.querySelector(".swiper-wrapper").appendChild(i)}else if(this.slideSlots<e){const n=this.swiper.slides;for(let i=n.length-1;i>=0;i-=1)i>this.slideSlots&&n[i].remove()}}}render(){if(this.rendered)return;this.calcSlideSlots();let e=this.cssStyles();this.slideSlots>0&&(e=e.replace(/::slotted\(([a-z-0-9.]*)\)/g,"$1")),e.length&&BR(this.shadowRoot,e),this.cssLinks().forEach(n=>{if(this.shadowRoot.querySelector(`link[href="${n}"]`))return;const r=document.createElement("link");r.rel="stylesheet",r.href=n,this.shadowRoot.appendChild(r)});const t=document.createElement("div");t.classList.add("swiper"),t.part="container",Is(t,`
|
|
14244
14244
|
<slot name="container-start"></slot>
|
|
14245
14245
|
<div class="swiper-wrapper" part="wrapper">
|
|
@@ -14251,17 +14251,17 @@ ${r.join(`
|
|
|
14251
14251
|
`).join("")}
|
|
14252
14252
|
</div>
|
|
14253
14253
|
<slot name="container-end"></slot>
|
|
14254
|
-
${
|
|
14254
|
+
${GY(this.passedParams)?`
|
|
14255
14255
|
<div part="button-prev" class="swiper-button-prev">${this.constructor.prevButtonSvg}</div>
|
|
14256
14256
|
<div part="button-next" class="swiper-button-next">${this.constructor.nextButtonSvg}</div>
|
|
14257
14257
|
`:""}
|
|
14258
|
-
${
|
|
14258
|
+
${zY(this.passedParams)?`
|
|
14259
14259
|
<div part="pagination" class="swiper-pagination"></div>
|
|
14260
14260
|
`:""}
|
|
14261
|
-
${
|
|
14261
|
+
${HY(this.passedParams)?`
|
|
14262
14262
|
<div part="scrollbar" class="swiper-scrollbar"></div>
|
|
14263
14263
|
`:""}
|
|
14264
|
-
`),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;const{params:t,passedParams:n}=kx(this);this.swiperParams=t,this.passedParams=n,delete this.swiperParams.init,this.render(),this.swiper=new Ji(this.shadowRoot.querySelector(".swiper"),{...t.virtual?{}:{observer:!0},...t,touchEventsTarget:"container",onAny:function(i){i==="observerUpdate"&&e.calcSlideSlots();const r=t.eventsPrefix?`${t.eventsPrefix}${i.toLowerCase()}`:i.toLowerCase();for(var a=arguments.length,o=new Array(a>1?a-1:0),l=1;l<a;l++)o[l-1]=arguments[l];const c=new CustomEvent(r,{detail:o,bubbles:i!=="hashChange",cancelable:!0});e.dispatchEvent(c)}})}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){const{params:n,passedParams:i}=kx(this,e,t);this.passedParams=i,this.swiperParams=n,!(this.swiper&&this.swiper.params[e]===t)
|
|
14264
|
+
`),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;const{params:t,passedParams:n}=kx(this);this.swiperParams=t,this.passedParams=n,delete this.swiperParams.init,this.render(),this.swiper=new Ji(this.shadowRoot.querySelector(".swiper"),{...t.virtual?{}:{observer:!0},...t,touchEventsTarget:"container",onAny:function(i){i==="observerUpdate"&&e.calcSlideSlots();const r=t.eventsPrefix?`${t.eventsPrefix}${i.toLowerCase()}`:i.toLowerCase();for(var a=arguments.length,o=new Array(a>1?a-1:0),l=1;l<a;l++)o[l-1]=arguments[l];const c=new CustomEvent(r,{detail:o,bubbles:i!=="hashChange",cancelable:!0});e.dispatchEvent(c)}})}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){const{params:n,passedParams:i}=kx(this,e,t);this.passedParams=i,this.swiperParams=n,!(this.swiper&&this.swiper.params[e]===t)&&$Y({swiper:this.swiper,passedParams:this.passedParams,changedParams:[Zp(e)],...e==="navigation"&&i[e]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{},...e==="pagination"&&i[e]?{paginationEl:".swiper-pagination"}:{},...e==="scrollbar"&&i[e]?{scrollbarEl:".swiper-scrollbar"}:{}})}attributeChangedCallback(e,t,n){this.swiper&&this.swiper.initialized&&(t==="true"&&n===null&&(n=!1),this.updateSwiperOnPropChange(e,n))}static get observedAttributes(){return Tg.filter(t=>t.includes("_")).map(t=>t.replace(/[A-Z]/g,n=>`-${n}`).replace("_","").toLowerCase())}}Tg.forEach(s=>{s!=="init"&&(s=s.replace("_",""),Object.defineProperty(TR.prototype,s,{configurable:!0,get(){return(this.passedParams||{})[s]},set(e){this.passedParams||(this.passedParams={}),this.passedParams[s]=e,this.swiper&&this.swiper.initialized&&this.updateSwiperOnPropChange(s,e)}}))});class WY extends SR{constructor(){super(),this.attachShadow({mode:"open"})}render(){const e=this.lazy||this.getAttribute("lazy")===""||this.getAttribute("lazy")==="true";if(BR(this.shadowRoot,YY),this.shadowRoot.appendChild(document.createElement("slot")),e){const t=document.createElement("div");t.classList.add("swiper-lazy-preloader"),t.part.add("preloader"),this.shadowRoot.appendChild(t)}}initialize(){this.render()}connectedCallback(){this.swiperLoopMoveDOM||this.initialize()}}const MR=()=>{typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",TR),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",WY))};typeof window<"u"&&(window.SwiperElementRegisterParams=s=>{Tg.push(...s)});const jY='@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}',Ox="epg-carousel";var XY=Object.defineProperty,Cr=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&XY(e,t,i),i};class Js extends ri{constructor(){super(),this.hidePagination=!1,this.nested=!1,this.currentIndex=-1,this.slidesPerView=1,this.spaceBetween=0,this.centeredSlides=!1,this.disableInteractions="false",this.autoHeight="true",MR()}static{this.styles=[Mi(jY),st`
|
|
14265
14265
|
:host {
|
|
14266
14266
|
display: block;
|
|
14267
14267
|
overflow: hidden;
|
|
@@ -14426,7 +14426,7 @@ ${r.join(`
|
|
|
14426
14426
|
>
|
|
14427
14427
|
${this.data}
|
|
14428
14428
|
</swiper-container>
|
|
14429
|
-
`}}Cr([q({type:Boolean,attribute:"hide-pagination"})],Js.prototype,"hidePagination");Cr([q({type:Boolean,attribute:"nested"})],Js.prototype,"nested");Cr([q({type:Number,attribute:"current-index"})],Js.prototype,"currentIndex");Cr([q({type:Number,attribute:"slides-per-view"})],Js.prototype,"slidesPerView");Cr([q({type:Number,attribute:"space-between"})],Js.prototype,"spaceBetween");Cr([q({type:Boolean,attribute:"centered-slides"})],Js.prototype,"centeredSlides");Cr([q({type:String,attribute:"disable-interactions"})],Js.prototype,"disableInteractions");Cr([q({type:String,attribute:"auto-height"})],Js.prototype,"autoHeight");Cr([q({attribute:!1})],Js.prototype,"data");Cr([Pt("#swiperContainer")],Js.prototype,"__swiperContainer");window.customElements.get(Ox)||window.customElements.define(Ox,Js);const Gx="epg-tool-control",ni={label:{name:"label",defaultValue:"Tool Control"},leftIcon:{name:"left-icon",defaultValue:"share-ios"},rightIcon:{name:"right-icon",defaultValue:""},active:{name:"active"},showLabel:{name:"show-label"},togglable:{name:"togglable"},loadingLabel:{name:"loading-label",defaultValue:"Loading..."},tooltipLabel:{name:"tooltip-label",defaultValue:""},tooltipLeftIcon:{name:"tooltip-left-icon",defaultValue:""},tooltipRightIcon:{name:"tooltip-right-icon",defaultValue:""}};var
|
|
14429
|
+
`}}Cr([q({type:Boolean,attribute:"hide-pagination"})],Js.prototype,"hidePagination");Cr([q({type:Boolean,attribute:"nested"})],Js.prototype,"nested");Cr([q({type:Number,attribute:"current-index"})],Js.prototype,"currentIndex");Cr([q({type:Number,attribute:"slides-per-view"})],Js.prototype,"slidesPerView");Cr([q({type:Number,attribute:"space-between"})],Js.prototype,"spaceBetween");Cr([q({type:Boolean,attribute:"centered-slides"})],Js.prototype,"centeredSlides");Cr([q({type:String,attribute:"disable-interactions"})],Js.prototype,"disableInteractions");Cr([q({type:String,attribute:"auto-height"})],Js.prototype,"autoHeight");Cr([q({attribute:!1})],Js.prototype,"data");Cr([Pt("#swiperContainer")],Js.prototype,"__swiperContainer");window.customElements.get(Ox)||window.customElements.define(Ox,Js);const Gx="epg-tool-control",ni={label:{name:"label",defaultValue:"Tool Control"},leftIcon:{name:"left-icon",defaultValue:"share-ios"},rightIcon:{name:"right-icon",defaultValue:""},active:{name:"active"},showLabel:{name:"show-label"},togglable:{name:"togglable"},loadingLabel:{name:"loading-label",defaultValue:"Loading..."},tooltipLabel:{name:"tooltip-label",defaultValue:""},tooltipLeftIcon:{name:"tooltip-left-icon",defaultValue:""},tooltipRightIcon:{name:"tooltip-right-icon",defaultValue:""}};var JY=Object.defineProperty,xr=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&JY(e,t,i),i};class ws extends wn{constructor(){super(...arguments),this.label=ni.label.defaultValue.toString(),this.leftIcon=ni.leftIcon.defaultValue.toString(),this.rightIcon=ni.rightIcon.defaultValue.toString(),this.loadingLabel=ni.loadingLabel.defaultValue.toString(),this.togglable=!1,this.active=!1,this.showLabel=!1,this.tooltipLabel=ni.tooltipLabel.defaultValue.toString(),this.tooltipLeftIcon=ni.tooltipLeftIcon.defaultValue.toString(),this.tooltipRightIcon=ni.tooltipRightIcon.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
14430
14430
|
:host {
|
|
14431
14431
|
border-radius: 12px;
|
|
14432
14432
|
border: 1px solid ${re(he.Color.Border.SubtleSecondary.$value)};
|
|
@@ -14492,7 +14492,7 @@ ${r.join(`
|
|
|
14492
14492
|
<epg-icon class="icon ${this.size}" icon-name=${this.leftIcon}></epg-icon>
|
|
14493
14493
|
${this.label&&this.showLabel?ae`<div class="label ${this.size}">${this.label}</div>`:me}
|
|
14494
14494
|
<epg-icon class="icon ${this.size}" icon-name=${this.rightIcon}></epg-icon>
|
|
14495
|
-
`,e}}xr([q({attribute:ni.label.name})],ws.prototype,"label");xr([q({attribute:ni.leftIcon.name})],ws.prototype,"leftIcon");xr([q({attribute:ni.rightIcon.name})],ws.prototype,"rightIcon");xr([q({attribute:ni.loadingLabel.name})],ws.prototype,"loadingLabel");xr([q({type:Boolean,attribute:ni.togglable.name})],ws.prototype,"togglable");xr([q({type:Boolean,attribute:ni.active.name})],ws.prototype,"active");xr([q({type:Boolean,attribute:ni.showLabel.name})],ws.prototype,"showLabel");xr([q({attribute:ni.tooltipLabel.name})],ws.prototype,"tooltipLabel");xr([q({attribute:ni.tooltipLeftIcon.name})],ws.prototype,"tooltipLeftIcon");xr([q({attribute:ni.tooltipRightIcon.name})],ws.prototype,"tooltipRightIcon");window.customElements.get(Gx)||window.customElements.define(Gx,ws);const zx="epg-carousel-item",
|
|
14495
|
+
`,e}}xr([q({attribute:ni.label.name})],ws.prototype,"label");xr([q({attribute:ni.leftIcon.name})],ws.prototype,"leftIcon");xr([q({attribute:ni.rightIcon.name})],ws.prototype,"rightIcon");xr([q({attribute:ni.loadingLabel.name})],ws.prototype,"loadingLabel");xr([q({type:Boolean,attribute:ni.togglable.name})],ws.prototype,"togglable");xr([q({type:Boolean,attribute:ni.active.name})],ws.prototype,"active");xr([q({type:Boolean,attribute:ni.showLabel.name})],ws.prototype,"showLabel");xr([q({attribute:ni.tooltipLabel.name})],ws.prototype,"tooltipLabel");xr([q({attribute:ni.tooltipLeftIcon.name})],ws.prototype,"tooltipLeftIcon");xr([q({attribute:ni.tooltipRightIcon.name})],ws.prototype,"tooltipRightIcon");window.customElements.get(Gx)||window.customElements.define(Gx,ws);const zx="epg-carousel-item",KY={..._5},Vd={label:{name:"label",defaultValue:"Starter Component"},imgSrc:{name:"img-src",defaultValue:""},state:{name:"state"}};var ZY=Object.defineProperty,Ub=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&ZY(e,t,i),i};class eq{constructor(e){this.mediaAlt=e.altText,this.src=e.uri,this.mediaCaption=e.mediaCaption}getRenderTemplate(){return this.src?ae`
|
|
14496
14496
|
<epg-media
|
|
14497
14497
|
media-src=${this.src} media-type=${Hd.IMAGE} media-alt=${this.mediaAlt} media-autoplay
|
|
14498
14498
|
></epg-media>
|
|
@@ -14501,7 +14501,7 @@ ${r.join(`
|
|
|
14501
14501
|
<span>${this.mediaCaption}</span>
|
|
14502
14502
|
</div>
|
|
14503
14503
|
`:me}
|
|
14504
|
-
`:null}}class
|
|
14504
|
+
`:null}}class tq{constructor(e){this.mediaAlt=e.altText,this.src=e.uri,this.mediaCaption=e.mediaCaption}getRenderTemplate(){return ae`
|
|
14505
14505
|
<epg-media
|
|
14506
14506
|
media-src=${this.src} media-type=${Hd.VIDEO} media-alt=${this.mediaAlt} media-autoplay
|
|
14507
14507
|
></epg-media>
|
|
@@ -14533,7 +14533,7 @@ ${r.join(`
|
|
|
14533
14533
|
}
|
|
14534
14534
|
|
|
14535
14535
|
:host(.hover) {
|
|
14536
|
-
background-color: ${
|
|
14536
|
+
background-color: ${KY.ColorBrandAccent.name};
|
|
14537
14537
|
}
|
|
14538
14538
|
|
|
14539
14539
|
:host([state="collapsed"]) {
|
|
@@ -14557,17 +14557,17 @@ ${r.join(`
|
|
|
14557
14557
|
bottom: 0;
|
|
14558
14558
|
display: none;
|
|
14559
14559
|
}
|
|
14560
|
-
`]}static CreateCarouseItemByJson(e){let t=null;return e.type===Hd.IMAGE?t=new
|
|
14560
|
+
`]}static CreateCarouseItemByJson(e){let t=null;return e.type===Hd.IMAGE?t=new eq(e):e.type===Hd.VIDEO&&(t=new tq(e)),t}handleExpandClick(){this.state!=="expanded"&&this.state==="collapsed"&&(this.state="expanded")}render(){return ae`
|
|
14561
14561
|
${super.render()}
|
|
14562
14562
|
|
|
14563
14563
|
<slot></slot>
|
|
14564
14564
|
<div class="expand-button">EXPAND</div>
|
|
14565
|
-
`}}Ub([q({attribute:Vd.label.name})],rA.prototype,"label");Ub([q({attribute:Vd.imgSrc.name})],rA.prototype,"imgSrc");Ub([q({attribute:Vd.state.name})],rA.prototype,"state");window.customElements.get(zx)||window.customElements.define(zx,rA);/*! @license DOMPurify 3.3.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.3.1/LICENSE */const{entries:RR,setPrototypeOf:Hx,isFrozen:tq,getPrototypeOf:nq,getOwnPropertyDescriptor:iq}=Object;let{freeze:Qi,seal:Cs,create:l0}=Object,{apply:c0,construct:h0}=typeof Reflect<"u"&&Reflect;Qi||(Qi=function(e){return e});Cs||(Cs=function(e){return e});c0||(c0=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return e.apply(t,i)});h0||(h0=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});const op=Li(Array.prototype.forEach),sq=Li(Array.prototype.lastIndexOf),$x=Li(Array.prototype.pop),mu=Li(Array.prototype.push),rq=Li(Array.prototype.splice),ef=Li(String.prototype.toLowerCase),wE=Li(String.prototype.toString),SE=Li(String.prototype.match),Eu=Li(String.prototype.replace),aq=Li(String.prototype.indexOf),oq=Li(String.prototype.trim),Ls=Li(Object.prototype.hasOwnProperty),bi=Li(RegExp.prototype.test),yu=lq(TypeError);function Li(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return c0(s,e,n)}}function lq(s){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h0(s,t)}}function yt(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ef;Hx&&Hx(s,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const r=t(i);r!==i&&(tq(e)||(e[n]=r),i=r)}s[i]=!0}return s}function cq(s){for(let e=0;e<s.length;e++)Ls(s,e)||(s[e]=null);return s}function tr(s){const e=l0(null);for(const[t,n]of RR(s))Ls(s,t)&&(Array.isArray(n)?e[t]=cq(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=tr(n):e[t]=n);return e}function _u(s,e){for(;s!==null;){const n=iq(s,e);if(n){if(n.get)return Li(n.get);if(typeof n.value=="function")return Li(n.value)}s=nq(s)}function t(){return null}return t}const Vx=Qi(["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"]),BE=Qi(["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"]),TE=Qi(["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"]),hq=Qi(["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"]),ME=Qi(["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"]),uq=Qi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yx=Qi(["#text"]),qx=Qi(["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","slot"]),RE=Qi(["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"]),Wx=Qi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),lp=Qi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dq=Cs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Aq=Cs(/<%[\w\W]*|[\w\W]*%>/gm),pq=Cs(/\$\{[\w\W]*/gm),fq=Cs(/^data-[\-\w.\u00B7-\uFFFF]+$/),gq=Cs(/^aria-[\-\w]+$/),DR=Cs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mq=Cs(/^(?:\w+script|data):/i),Eq=Cs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),QR=Cs(/^html$/i),yq=Cs(/^[a-z][.\w]*(-[.\w]+)+$/i);var jx=Object.freeze({__proto__:null,ARIA_ATTR:gq,ATTR_WHITESPACE:Eq,CUSTOM_ELEMENT:yq,DATA_ATTR:fq,DOCTYPE_NAME:QR,ERB_EXPR:Aq,IS_ALLOWED_URI:DR,IS_SCRIPT_OR_DATA:mq,MUSTACHE_EXPR:dq,TMPLIT_EXPR:pq});const bu={element:1,text:3,progressingInstruction:7,comment:8,document:9},_q=function(){return typeof window>"u"?null:window},bq=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));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}},Xx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function LR(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_q();const e=He=>LR(He);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==bu.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const n=t,i=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:A}=s,p=l.prototype,g=_u(p,"cloneNode"),m=_u(p,"remove"),f=_u(p,"nextSibling"),_=_u(p,"childNodes"),E=_u(p,"parentNode");if(typeof a=="function"){const He=t.createElement("template");He.content&&He.content.ownerDocument&&(t=He.content.ownerDocument)}let y,b="";const{implementation:x,createNodeIterator:I,createDocumentFragment:w,getElementsByTagName:v}=t,{importNode:C}=n;let S=Xx();e.isSupported=typeof RR=="function"&&typeof E=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:T,ERB_EXPR:M,TMPLIT_EXPR:R,DATA_ATTR:F,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:z}=jx;let{IS_ALLOWED_URI:te}=jx,ne=null;const ue=yt({},[...Vx,...BE,...TE,...ME,...Yx]);let pe=null;const Z=yt({},[...qx,...RE,...Wx,...lp]);let G=Object.seal(l0(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}})),Y=null,$=null;const de=Object.seal(l0(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,ve=!0,ke=!1,Oe=!0,Ye=!1,O=!0,mt=!1,qe=!1,Xe=!1,Te=!1,Ke=!1,ye=!1,k=!0,D=!1;const K="user-content-";let oe=!0,le=!1,se={},xe=null;const be=yt({},["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 we=null;const Et=yt({},["audio","video","img","source","image","track"]);let ge=null;const Pe=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Re="http://www.w3.org/1999/xhtml";let ut=Re,at=!1,Ft=null;const W=yt({},[Ve,Je,Re],wE);let Ce=yt({},["mi","mo","mn","ms","mtext"]),ie=yt({},["annotation-xml"]);const ce=yt({},["title","style","font","a","script"]);let Se=null;const De=["application/xhtml+xml","text/html"],lt="text/html";let ht=null,pn=null;const Dt=t.createElement("form"),Pi=function(H){return H instanceof RegExp||H instanceof Function},Vi=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(pn&&pn===H)){if((!H||typeof H!="object")&&(H={}),H=tr(H),Se=De.indexOf(H.PARSER_MEDIA_TYPE)===-1?lt:H.PARSER_MEDIA_TYPE,ht=Se==="application/xhtml+xml"?wE:ef,ne=Ls(H,"ALLOWED_TAGS")?yt({},H.ALLOWED_TAGS,ht):ue,pe=Ls(H,"ALLOWED_ATTR")?yt({},H.ALLOWED_ATTR,ht):Z,Ft=Ls(H,"ALLOWED_NAMESPACES")?yt({},H.ALLOWED_NAMESPACES,wE):W,ge=Ls(H,"ADD_URI_SAFE_ATTR")?yt(tr(Pe),H.ADD_URI_SAFE_ATTR,ht):Pe,we=Ls(H,"ADD_DATA_URI_TAGS")?yt(tr(Et),H.ADD_DATA_URI_TAGS,ht):Et,xe=Ls(H,"FORBID_CONTENTS")?yt({},H.FORBID_CONTENTS,ht):be,Y=Ls(H,"FORBID_TAGS")?yt({},H.FORBID_TAGS,ht):tr({}),$=Ls(H,"FORBID_ATTR")?yt({},H.FORBID_ATTR,ht):tr({}),se=Ls(H,"USE_PROFILES")?H.USE_PROFILES:!1,_e=H.ALLOW_ARIA_ATTR!==!1,ve=H.ALLOW_DATA_ATTR!==!1,ke=H.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=H.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ye=H.SAFE_FOR_TEMPLATES||!1,O=H.SAFE_FOR_XML!==!1,mt=H.WHOLE_DOCUMENT||!1,Te=H.RETURN_DOM||!1,Ke=H.RETURN_DOM_FRAGMENT||!1,ye=H.RETURN_TRUSTED_TYPE||!1,Xe=H.FORCE_BODY||!1,k=H.SANITIZE_DOM!==!1,D=H.SANITIZE_NAMED_PROPS||!1,oe=H.KEEP_CONTENT!==!1,le=H.IN_PLACE||!1,te=H.ALLOWED_URI_REGEXP||DR,ut=H.NAMESPACE||Re,Ce=H.MATHML_TEXT_INTEGRATION_POINTS||Ce,ie=H.HTML_INTEGRATION_POINTS||ie,G=H.CUSTOM_ELEMENT_HANDLING||{},H.CUSTOM_ELEMENT_HANDLING&&Pi(H.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=H.CUSTOM_ELEMENT_HANDLING.tagNameCheck),H.CUSTOM_ELEMENT_HANDLING&&Pi(H.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=H.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),H.CUSTOM_ELEMENT_HANDLING&&typeof H.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=H.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ye&&(ve=!1),Ke&&(Te=!0),se&&(ne=yt({},Yx),pe=[],se.html===!0&&(yt(ne,Vx),yt(pe,qx)),se.svg===!0&&(yt(ne,BE),yt(pe,RE),yt(pe,lp)),se.svgFilters===!0&&(yt(ne,TE),yt(pe,RE),yt(pe,lp)),se.mathMl===!0&&(yt(ne,ME),yt(pe,Wx),yt(pe,lp))),H.ADD_TAGS&&(typeof H.ADD_TAGS=="function"?de.tagCheck=H.ADD_TAGS:(ne===ue&&(ne=tr(ne)),yt(ne,H.ADD_TAGS,ht))),H.ADD_ATTR&&(typeof H.ADD_ATTR=="function"?de.attributeCheck=H.ADD_ATTR:(pe===Z&&(pe=tr(pe)),yt(pe,H.ADD_ATTR,ht))),H.ADD_URI_SAFE_ATTR&&yt(ge,H.ADD_URI_SAFE_ATTR,ht),H.FORBID_CONTENTS&&(xe===be&&(xe=tr(xe)),yt(xe,H.FORBID_CONTENTS,ht)),H.ADD_FORBID_CONTENTS&&(xe===be&&(xe=tr(xe)),yt(xe,H.ADD_FORBID_CONTENTS,ht)),oe&&(ne["#text"]=!0),mt&&yt(ne,["html","head","body"]),ne.table&&(yt(ne,["tbody"]),delete Y.tbody),H.TRUSTED_TYPES_POLICY){if(typeof H.TRUSTED_TYPES_POLICY.createHTML!="function")throw yu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof H.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=H.TRUSTED_TYPES_POLICY,b=y.createHTML("")}else y===void 0&&(y=bq(A,i)),y!==null&&typeof b=="string"&&(b=y.createHTML(""));Qi&&Qi(H),pn=H}},Yh=yt({},[...BE,...TE,...hq]),qh=yt({},[...ME,...uq]),wr=function(H){let B=E(H);(!B||!B.tagName)&&(B={namespaceURI:ut,tagName:"template"});const U=ef(H.tagName),X=ef(B.tagName);return Ft[H.namespaceURI]?H.namespaceURI===Je?B.namespaceURI===Re?U==="svg":B.namespaceURI===Ve?U==="svg"&&(X==="annotation-xml"||Ce[X]):!!Yh[U]:H.namespaceURI===Ve?B.namespaceURI===Re?U==="math":B.namespaceURI===Je?U==="math"&&ie[X]:!!qh[U]:H.namespaceURI===Re?B.namespaceURI===Je&&!ie[X]||B.namespaceURI===Ve&&!Ce[X]?!1:!qh[U]&&(ce[U]||!Yh[U]):!!(Se==="application/xhtml+xml"&&Ft[H.namespaceURI]):!1},Fi=function(H){mu(e.removed,{element:H});try{E(H).removeChild(H)}catch{m(H)}},Ks=function(H,B){try{mu(e.removed,{attribute:B.getAttributeNode(H),from:B})}catch{mu(e.removed,{attribute:null,from:B})}if(B.removeAttribute(H),H==="is")if(Te||Ke)try{Fi(B)}catch{}else try{B.setAttribute(H,"")}catch{}},Wh=function(H){let B=null,U=null;if(Xe)H="<remove></remove>"+H;else{const V=SE(H,/^[\r\n\t ]+/);U=V&&V[0]}Se==="application/xhtml+xml"&&ut===Re&&(H='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+H+"</body></html>");const X=y?y.createHTML(H):H;if(ut===Re)try{B=new d().parseFromString(X,Se)}catch{}if(!B||!B.documentElement){B=x.createDocument(ut,"template",null);try{B.documentElement.innerHTML=at?b:X}catch{}}const J=B.body||B.documentElement;return H&&U&&J.insertBefore(t.createTextNode(U),J.childNodes[0]||null),ut===Re?v.call(B,mt?"html":"body")[0]:mt?B.documentElement:J},_o=function(H){return I.call(H.ownerDocument||H,H,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ul=function(H){return H instanceof u&&(typeof H.nodeName!="string"||typeof H.textContent!="string"||typeof H.removeChild!="function"||!(H.attributes instanceof h)||typeof H.removeAttribute!="function"||typeof H.setAttribute!="function"||typeof H.namespaceURI!="string"||typeof H.insertBefore!="function"||typeof H.hasChildNodes!="function")},bo=function(H){return typeof o=="function"&&H instanceof o};function os(He,H,B){op(He,U=>{U.call(e,H,B,pn)})}const jh=function(H){let B=null;if(os(S.beforeSanitizeElements,H,null),Ul(H))return Fi(H),!0;const U=ht(H.nodeName);if(os(S.uponSanitizeElement,H,{tagName:U,allowedTags:ne}),O&&H.hasChildNodes()&&!bo(H.firstElementChild)&&bi(/<[/\w!]/g,H.innerHTML)&&bi(/<[/\w!]/g,H.textContent)||H.nodeType===bu.progressingInstruction||O&&H.nodeType===bu.comment&&bi(/<[/\w]/g,H.data))return Fi(H),!0;if(!(de.tagCheck instanceof Function&&de.tagCheck(U))&&(!ne[U]||Y[U])){if(!Y[U]&&dA(U)&&(G.tagNameCheck instanceof RegExp&&bi(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U)))return!1;if(oe&&!xe[U]){const X=E(H)||H.parentNode,J=_(H)||H.childNodes;if(J&&X){const V=J.length;for(let Ae=V-1;Ae>=0;--Ae){const Ee=g(J[Ae],!0);Ee.__removalCount=(H.__removalCount||0)+1,X.insertBefore(Ee,f(H))}}}return Fi(H),!0}return H instanceof l&&!wr(H)||(U==="noscript"||U==="noembed"||U==="noframes")&&bi(/<\/no(script|embed|frames)/i,H.innerHTML)?(Fi(H),!0):(Ye&&H.nodeType===bu.text&&(B=H.textContent,op([T,M,R],X=>{B=Eu(B,X," ")}),H.textContent!==B&&(mu(e.removed,{element:H.cloneNode()}),H.textContent=B)),os(S.afterSanitizeElements,H,null),!1)},uA=function(H,B,U){if(k&&(B==="id"||B==="name")&&(U in t||U in Dt))return!1;if(!(ve&&!$[B]&&bi(F,B))){if(!(_e&&bi(N,B))){if(!(de.attributeCheck instanceof Function&&de.attributeCheck(B,H))){if(!pe[B]||$[B]){if(!(dA(H)&&(G.tagNameCheck instanceof RegExp&&bi(G.tagNameCheck,H)||G.tagNameCheck instanceof Function&&G.tagNameCheck(H))&&(G.attributeNameCheck instanceof RegExp&&bi(G.attributeNameCheck,B)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(B,H))||B==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&bi(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U))))return!1}else if(!ge[B]){if(!bi(te,Eu(U,P,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&H!=="script"&&aq(U,"data:")===0&&we[H])){if(!(ke&&!bi(L,Eu(U,P,"")))){if(U)return!1}}}}}}}return!0},dA=function(H){return H!=="annotation-xml"&&SE(H,z)},AA=function(H){os(S.beforeSanitizeAttributes,H,null);const{attributes:B}=H;if(!B||Ul(H))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:pe,forceKeepAttr:void 0};let X=B.length;for(;X--;){const J=B[X],{name:V,namespaceURI:Ae,value:Ee}=J,Qe=ht(V),Ne=Ee;let Ge=V==="value"?Ne:oq(Ne);if(U.attrName=Qe,U.attrValue=Ge,U.keepAttr=!0,U.forceKeepAttr=void 0,os(S.uponSanitizeAttribute,H,U),Ge=U.attrValue,D&&(Qe==="id"||Qe==="name")&&(Ks(V,H),Ge=K+Ge),O&&bi(/((--!?|])>)|<\/(style|title|textarea)/i,Ge)){Ks(V,H);continue}if(Qe==="attributename"&&SE(Ge,"href")){Ks(V,H);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){Ks(V,H);continue}if(!Oe&&bi(/\/>/i,Ge)){Ks(V,H);continue}Ye&&op([T,M,R],$e=>{Ge=Eu(Ge,$e," ")});const et=ht(H.nodeName);if(!uA(et,Qe,Ge)){Ks(V,H);continue}if(y&&typeof A=="object"&&typeof A.getAttributeType=="function"&&!Ae)switch(A.getAttributeType(et,Qe)){case"TrustedHTML":{Ge=y.createHTML(Ge);break}case"TrustedScriptURL":{Ge=y.createScriptURL(Ge);break}}if(Ge!==Ne)try{Ae?H.setAttributeNS(Ae,V,Ge):H.setAttribute(V,Ge),Ul(H)?Fi(H):$x(e.removed)}catch{Ks(V,H)}}os(S.afterSanitizeAttributes,H,null)},kg=function He(H){let B=null;const U=_o(H);for(os(S.beforeSanitizeShadowDOM,H,null);B=U.nextNode();)os(S.uponSanitizeShadowNode,B,null),jh(B),AA(B),B.content instanceof r&&He(B.content);os(S.afterSanitizeShadowDOM,H,null)};return e.sanitize=function(He){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,U=null,X=null,J=null;if(at=!He,at&&(He="<!-->"),typeof He!="string"&&!bo(He))if(typeof He.toString=="function"){if(He=He.toString(),typeof He!="string")throw yu("dirty is not a string, aborting")}else throw yu("toString is not a function");if(!e.isSupported)return He;if(qe||Vi(H),e.removed=[],typeof He=="string"&&(le=!1),le){if(He.nodeName){const Ee=ht(He.nodeName);if(!ne[Ee]||Y[Ee])throw yu("root node is forbidden and cannot be sanitized in-place")}}else if(He instanceof o)B=Wh("<!---->"),U=B.ownerDocument.importNode(He,!0),U.nodeType===bu.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?B=U:B.appendChild(U);else{if(!Te&&!Ye&&!mt&&He.indexOf("<")===-1)return y&&ye?y.createHTML(He):He;if(B=Wh(He),!B)return Te?null:ye?b:""}B&&Xe&&Fi(B.firstChild);const V=_o(le?He:B);for(;X=V.nextNode();)jh(X),AA(X),X.content instanceof r&&kg(X.content);if(le)return He;if(Te){if(Ke)for(J=w.call(B.ownerDocument);B.firstChild;)J.appendChild(B.firstChild);else J=B;return(pe.shadowroot||pe.shadowrootmode)&&(J=C.call(n,J,!0)),J}let Ae=mt?B.outerHTML:B.innerHTML;return mt&&ne["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&bi(QR,B.ownerDocument.doctype.name)&&(Ae="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
|
|
14566
|
-
`+Ae),Ye&&op([T,M,R],Ee=>{Ae=Eu(Ae,Ee," ")}),y&&ye?y.createHTML(Ae):Ae},e.setConfig=function(){let He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vi(He),qe=!0},e.clearConfig=function(){pn=null,qe=!1},e.isValidAttribute=function(He,H,B){pn||Vi({});const U=ht(He),X=ht(H);return uA(U,X,B)},e.addHook=function(He,H){typeof H=="function"&&mu(S[He],H)},e.removeHook=function(He,H){if(H!==void 0){const B=
|
|
14565
|
+
`}}Ub([q({attribute:Vd.label.name})],rA.prototype,"label");Ub([q({attribute:Vd.imgSrc.name})],rA.prototype,"imgSrc");Ub([q({attribute:Vd.state.name})],rA.prototype,"state");window.customElements.get(zx)||window.customElements.define(zx,rA);/*! @license DOMPurify 3.3.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.3.1/LICENSE */const{entries:RR,setPrototypeOf:Hx,isFrozen:nq,getPrototypeOf:iq,getOwnPropertyDescriptor:sq}=Object;let{freeze:Qi,seal:Cs,create:l0}=Object,{apply:c0,construct:h0}=typeof Reflect<"u"&&Reflect;Qi||(Qi=function(e){return e});Cs||(Cs=function(e){return e});c0||(c0=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return e.apply(t,i)});h0||(h0=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});const op=Li(Array.prototype.forEach),rq=Li(Array.prototype.lastIndexOf),$x=Li(Array.prototype.pop),mu=Li(Array.prototype.push),aq=Li(Array.prototype.splice),ef=Li(String.prototype.toLowerCase),wE=Li(String.prototype.toString),SE=Li(String.prototype.match),Eu=Li(String.prototype.replace),oq=Li(String.prototype.indexOf),lq=Li(String.prototype.trim),Ls=Li(Object.prototype.hasOwnProperty),bi=Li(RegExp.prototype.test),yu=cq(TypeError);function Li(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return c0(s,e,n)}}function cq(s){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h0(s,t)}}function yt(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ef;Hx&&Hx(s,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const r=t(i);r!==i&&(nq(e)||(e[n]=r),i=r)}s[i]=!0}return s}function hq(s){for(let e=0;e<s.length;e++)Ls(s,e)||(s[e]=null);return s}function tr(s){const e=l0(null);for(const[t,n]of RR(s))Ls(s,t)&&(Array.isArray(n)?e[t]=hq(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=tr(n):e[t]=n);return e}function _u(s,e){for(;s!==null;){const n=sq(s,e);if(n){if(n.get)return Li(n.get);if(typeof n.value=="function")return Li(n.value)}s=iq(s)}function t(){return null}return t}const Vx=Qi(["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"]),BE=Qi(["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"]),TE=Qi(["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"]),uq=Qi(["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"]),ME=Qi(["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"]),dq=Qi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yx=Qi(["#text"]),qx=Qi(["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","slot"]),RE=Qi(["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"]),Wx=Qi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),lp=Qi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Aq=Cs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pq=Cs(/<%[\w\W]*|[\w\W]*%>/gm),fq=Cs(/\$\{[\w\W]*/gm),gq=Cs(/^data-[\-\w.\u00B7-\uFFFF]+$/),mq=Cs(/^aria-[\-\w]+$/),DR=Cs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Eq=Cs(/^(?:\w+script|data):/i),yq=Cs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),QR=Cs(/^html$/i),_q=Cs(/^[a-z][.\w]*(-[.\w]+)+$/i);var jx=Object.freeze({__proto__:null,ARIA_ATTR:mq,ATTR_WHITESPACE:yq,CUSTOM_ELEMENT:_q,DATA_ATTR:gq,DOCTYPE_NAME:QR,ERB_EXPR:pq,IS_ALLOWED_URI:DR,IS_SCRIPT_OR_DATA:Eq,MUSTACHE_EXPR:Aq,TMPLIT_EXPR:fq});const bu={element:1,text:3,progressingInstruction:7,comment:8,document:9},bq=function(){return typeof window>"u"?null:window},vq=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));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}},Xx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function LR(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bq();const e=He=>LR(He);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==bu.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const n=t,i=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:A}=s,p=l.prototype,g=_u(p,"cloneNode"),m=_u(p,"remove"),f=_u(p,"nextSibling"),_=_u(p,"childNodes"),E=_u(p,"parentNode");if(typeof a=="function"){const He=t.createElement("template");He.content&&He.content.ownerDocument&&(t=He.content.ownerDocument)}let y,b="";const{implementation:x,createNodeIterator:I,createDocumentFragment:w,getElementsByTagName:v}=t,{importNode:C}=n;let S=Xx();e.isSupported=typeof RR=="function"&&typeof E=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:T,ERB_EXPR:M,TMPLIT_EXPR:R,DATA_ATTR:F,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:z}=jx;let{IS_ALLOWED_URI:te}=jx,ne=null;const ue=yt({},[...Vx,...BE,...TE,...ME,...Yx]);let pe=null;const Z=yt({},[...qx,...RE,...Wx,...lp]);let G=Object.seal(l0(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}})),Y=null,$=null;const de=Object.seal(l0(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,ve=!0,ke=!1,Oe=!0,Ye=!1,O=!0,mt=!1,qe=!1,Xe=!1,Te=!1,Ke=!1,ye=!1,k=!0,D=!1;const K="user-content-";let oe=!0,le=!1,se={},xe=null;const be=yt({},["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 we=null;const Et=yt({},["audio","video","img","source","image","track"]);let ge=null;const Pe=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Re="http://www.w3.org/1999/xhtml";let ut=Re,at=!1,Ft=null;const W=yt({},[Ve,Je,Re],wE);let Ce=yt({},["mi","mo","mn","ms","mtext"]),ie=yt({},["annotation-xml"]);const ce=yt({},["title","style","font","a","script"]);let Se=null;const De=["application/xhtml+xml","text/html"],lt="text/html";let ht=null,pn=null;const Dt=t.createElement("form"),Pi=function(H){return H instanceof RegExp||H instanceof Function},Vi=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(pn&&pn===H)){if((!H||typeof H!="object")&&(H={}),H=tr(H),Se=De.indexOf(H.PARSER_MEDIA_TYPE)===-1?lt:H.PARSER_MEDIA_TYPE,ht=Se==="application/xhtml+xml"?wE:ef,ne=Ls(H,"ALLOWED_TAGS")?yt({},H.ALLOWED_TAGS,ht):ue,pe=Ls(H,"ALLOWED_ATTR")?yt({},H.ALLOWED_ATTR,ht):Z,Ft=Ls(H,"ALLOWED_NAMESPACES")?yt({},H.ALLOWED_NAMESPACES,wE):W,ge=Ls(H,"ADD_URI_SAFE_ATTR")?yt(tr(Pe),H.ADD_URI_SAFE_ATTR,ht):Pe,we=Ls(H,"ADD_DATA_URI_TAGS")?yt(tr(Et),H.ADD_DATA_URI_TAGS,ht):Et,xe=Ls(H,"FORBID_CONTENTS")?yt({},H.FORBID_CONTENTS,ht):be,Y=Ls(H,"FORBID_TAGS")?yt({},H.FORBID_TAGS,ht):tr({}),$=Ls(H,"FORBID_ATTR")?yt({},H.FORBID_ATTR,ht):tr({}),se=Ls(H,"USE_PROFILES")?H.USE_PROFILES:!1,_e=H.ALLOW_ARIA_ATTR!==!1,ve=H.ALLOW_DATA_ATTR!==!1,ke=H.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=H.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ye=H.SAFE_FOR_TEMPLATES||!1,O=H.SAFE_FOR_XML!==!1,mt=H.WHOLE_DOCUMENT||!1,Te=H.RETURN_DOM||!1,Ke=H.RETURN_DOM_FRAGMENT||!1,ye=H.RETURN_TRUSTED_TYPE||!1,Xe=H.FORCE_BODY||!1,k=H.SANITIZE_DOM!==!1,D=H.SANITIZE_NAMED_PROPS||!1,oe=H.KEEP_CONTENT!==!1,le=H.IN_PLACE||!1,te=H.ALLOWED_URI_REGEXP||DR,ut=H.NAMESPACE||Re,Ce=H.MATHML_TEXT_INTEGRATION_POINTS||Ce,ie=H.HTML_INTEGRATION_POINTS||ie,G=H.CUSTOM_ELEMENT_HANDLING||{},H.CUSTOM_ELEMENT_HANDLING&&Pi(H.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=H.CUSTOM_ELEMENT_HANDLING.tagNameCheck),H.CUSTOM_ELEMENT_HANDLING&&Pi(H.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=H.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),H.CUSTOM_ELEMENT_HANDLING&&typeof H.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=H.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ye&&(ve=!1),Ke&&(Te=!0),se&&(ne=yt({},Yx),pe=[],se.html===!0&&(yt(ne,Vx),yt(pe,qx)),se.svg===!0&&(yt(ne,BE),yt(pe,RE),yt(pe,lp)),se.svgFilters===!0&&(yt(ne,TE),yt(pe,RE),yt(pe,lp)),se.mathMl===!0&&(yt(ne,ME),yt(pe,Wx),yt(pe,lp))),H.ADD_TAGS&&(typeof H.ADD_TAGS=="function"?de.tagCheck=H.ADD_TAGS:(ne===ue&&(ne=tr(ne)),yt(ne,H.ADD_TAGS,ht))),H.ADD_ATTR&&(typeof H.ADD_ATTR=="function"?de.attributeCheck=H.ADD_ATTR:(pe===Z&&(pe=tr(pe)),yt(pe,H.ADD_ATTR,ht))),H.ADD_URI_SAFE_ATTR&&yt(ge,H.ADD_URI_SAFE_ATTR,ht),H.FORBID_CONTENTS&&(xe===be&&(xe=tr(xe)),yt(xe,H.FORBID_CONTENTS,ht)),H.ADD_FORBID_CONTENTS&&(xe===be&&(xe=tr(xe)),yt(xe,H.ADD_FORBID_CONTENTS,ht)),oe&&(ne["#text"]=!0),mt&&yt(ne,["html","head","body"]),ne.table&&(yt(ne,["tbody"]),delete Y.tbody),H.TRUSTED_TYPES_POLICY){if(typeof H.TRUSTED_TYPES_POLICY.createHTML!="function")throw yu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof H.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=H.TRUSTED_TYPES_POLICY,b=y.createHTML("")}else y===void 0&&(y=vq(A,i)),y!==null&&typeof b=="string"&&(b=y.createHTML(""));Qi&&Qi(H),pn=H}},Yh=yt({},[...BE,...TE,...uq]),qh=yt({},[...ME,...dq]),wr=function(H){let B=E(H);(!B||!B.tagName)&&(B={namespaceURI:ut,tagName:"template"});const U=ef(H.tagName),X=ef(B.tagName);return Ft[H.namespaceURI]?H.namespaceURI===Je?B.namespaceURI===Re?U==="svg":B.namespaceURI===Ve?U==="svg"&&(X==="annotation-xml"||Ce[X]):!!Yh[U]:H.namespaceURI===Ve?B.namespaceURI===Re?U==="math":B.namespaceURI===Je?U==="math"&&ie[X]:!!qh[U]:H.namespaceURI===Re?B.namespaceURI===Je&&!ie[X]||B.namespaceURI===Ve&&!Ce[X]?!1:!qh[U]&&(ce[U]||!Yh[U]):!!(Se==="application/xhtml+xml"&&Ft[H.namespaceURI]):!1},Fi=function(H){mu(e.removed,{element:H});try{E(H).removeChild(H)}catch{m(H)}},Ks=function(H,B){try{mu(e.removed,{attribute:B.getAttributeNode(H),from:B})}catch{mu(e.removed,{attribute:null,from:B})}if(B.removeAttribute(H),H==="is")if(Te||Ke)try{Fi(B)}catch{}else try{B.setAttribute(H,"")}catch{}},Wh=function(H){let B=null,U=null;if(Xe)H="<remove></remove>"+H;else{const V=SE(H,/^[\r\n\t ]+/);U=V&&V[0]}Se==="application/xhtml+xml"&&ut===Re&&(H='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+H+"</body></html>");const X=y?y.createHTML(H):H;if(ut===Re)try{B=new d().parseFromString(X,Se)}catch{}if(!B||!B.documentElement){B=x.createDocument(ut,"template",null);try{B.documentElement.innerHTML=at?b:X}catch{}}const J=B.body||B.documentElement;return H&&U&&J.insertBefore(t.createTextNode(U),J.childNodes[0]||null),ut===Re?v.call(B,mt?"html":"body")[0]:mt?B.documentElement:J},_o=function(H){return I.call(H.ownerDocument||H,H,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ul=function(H){return H instanceof u&&(typeof H.nodeName!="string"||typeof H.textContent!="string"||typeof H.removeChild!="function"||!(H.attributes instanceof h)||typeof H.removeAttribute!="function"||typeof H.setAttribute!="function"||typeof H.namespaceURI!="string"||typeof H.insertBefore!="function"||typeof H.hasChildNodes!="function")},bo=function(H){return typeof o=="function"&&H instanceof o};function os(He,H,B){op(He,U=>{U.call(e,H,B,pn)})}const jh=function(H){let B=null;if(os(S.beforeSanitizeElements,H,null),Ul(H))return Fi(H),!0;const U=ht(H.nodeName);if(os(S.uponSanitizeElement,H,{tagName:U,allowedTags:ne}),O&&H.hasChildNodes()&&!bo(H.firstElementChild)&&bi(/<[/\w!]/g,H.innerHTML)&&bi(/<[/\w!]/g,H.textContent)||H.nodeType===bu.progressingInstruction||O&&H.nodeType===bu.comment&&bi(/<[/\w]/g,H.data))return Fi(H),!0;if(!(de.tagCheck instanceof Function&&de.tagCheck(U))&&(!ne[U]||Y[U])){if(!Y[U]&&dA(U)&&(G.tagNameCheck instanceof RegExp&&bi(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U)))return!1;if(oe&&!xe[U]){const X=E(H)||H.parentNode,J=_(H)||H.childNodes;if(J&&X){const V=J.length;for(let Ae=V-1;Ae>=0;--Ae){const Ee=g(J[Ae],!0);Ee.__removalCount=(H.__removalCount||0)+1,X.insertBefore(Ee,f(H))}}}return Fi(H),!0}return H instanceof l&&!wr(H)||(U==="noscript"||U==="noembed"||U==="noframes")&&bi(/<\/no(script|embed|frames)/i,H.innerHTML)?(Fi(H),!0):(Ye&&H.nodeType===bu.text&&(B=H.textContent,op([T,M,R],X=>{B=Eu(B,X," ")}),H.textContent!==B&&(mu(e.removed,{element:H.cloneNode()}),H.textContent=B)),os(S.afterSanitizeElements,H,null),!1)},uA=function(H,B,U){if(k&&(B==="id"||B==="name")&&(U in t||U in Dt))return!1;if(!(ve&&!$[B]&&bi(F,B))){if(!(_e&&bi(N,B))){if(!(de.attributeCheck instanceof Function&&de.attributeCheck(B,H))){if(!pe[B]||$[B]){if(!(dA(H)&&(G.tagNameCheck instanceof RegExp&&bi(G.tagNameCheck,H)||G.tagNameCheck instanceof Function&&G.tagNameCheck(H))&&(G.attributeNameCheck instanceof RegExp&&bi(G.attributeNameCheck,B)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(B,H))||B==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&bi(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U))))return!1}else if(!ge[B]){if(!bi(te,Eu(U,P,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&H!=="script"&&oq(U,"data:")===0&&we[H])){if(!(ke&&!bi(L,Eu(U,P,"")))){if(U)return!1}}}}}}}return!0},dA=function(H){return H!=="annotation-xml"&&SE(H,z)},AA=function(H){os(S.beforeSanitizeAttributes,H,null);const{attributes:B}=H;if(!B||Ul(H))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:pe,forceKeepAttr:void 0};let X=B.length;for(;X--;){const J=B[X],{name:V,namespaceURI:Ae,value:Ee}=J,Qe=ht(V),Ne=Ee;let Ge=V==="value"?Ne:lq(Ne);if(U.attrName=Qe,U.attrValue=Ge,U.keepAttr=!0,U.forceKeepAttr=void 0,os(S.uponSanitizeAttribute,H,U),Ge=U.attrValue,D&&(Qe==="id"||Qe==="name")&&(Ks(V,H),Ge=K+Ge),O&&bi(/((--!?|])>)|<\/(style|title|textarea)/i,Ge)){Ks(V,H);continue}if(Qe==="attributename"&&SE(Ge,"href")){Ks(V,H);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){Ks(V,H);continue}if(!Oe&&bi(/\/>/i,Ge)){Ks(V,H);continue}Ye&&op([T,M,R],$e=>{Ge=Eu(Ge,$e," ")});const et=ht(H.nodeName);if(!uA(et,Qe,Ge)){Ks(V,H);continue}if(y&&typeof A=="object"&&typeof A.getAttributeType=="function"&&!Ae)switch(A.getAttributeType(et,Qe)){case"TrustedHTML":{Ge=y.createHTML(Ge);break}case"TrustedScriptURL":{Ge=y.createScriptURL(Ge);break}}if(Ge!==Ne)try{Ae?H.setAttributeNS(Ae,V,Ge):H.setAttribute(V,Ge),Ul(H)?Fi(H):$x(e.removed)}catch{Ks(V,H)}}os(S.afterSanitizeAttributes,H,null)},kg=function He(H){let B=null;const U=_o(H);for(os(S.beforeSanitizeShadowDOM,H,null);B=U.nextNode();)os(S.uponSanitizeShadowNode,B,null),jh(B),AA(B),B.content instanceof r&&He(B.content);os(S.afterSanitizeShadowDOM,H,null)};return e.sanitize=function(He){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,U=null,X=null,J=null;if(at=!He,at&&(He="<!-->"),typeof He!="string"&&!bo(He))if(typeof He.toString=="function"){if(He=He.toString(),typeof He!="string")throw yu("dirty is not a string, aborting")}else throw yu("toString is not a function");if(!e.isSupported)return He;if(qe||Vi(H),e.removed=[],typeof He=="string"&&(le=!1),le){if(He.nodeName){const Ee=ht(He.nodeName);if(!ne[Ee]||Y[Ee])throw yu("root node is forbidden and cannot be sanitized in-place")}}else if(He instanceof o)B=Wh("<!---->"),U=B.ownerDocument.importNode(He,!0),U.nodeType===bu.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?B=U:B.appendChild(U);else{if(!Te&&!Ye&&!mt&&He.indexOf("<")===-1)return y&&ye?y.createHTML(He):He;if(B=Wh(He),!B)return Te?null:ye?b:""}B&&Xe&&Fi(B.firstChild);const V=_o(le?He:B);for(;X=V.nextNode();)jh(X),AA(X),X.content instanceof r&&kg(X.content);if(le)return He;if(Te){if(Ke)for(J=w.call(B.ownerDocument);B.firstChild;)J.appendChild(B.firstChild);else J=B;return(pe.shadowroot||pe.shadowrootmode)&&(J=C.call(n,J,!0)),J}let Ae=mt?B.outerHTML:B.innerHTML;return mt&&ne["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&bi(QR,B.ownerDocument.doctype.name)&&(Ae="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
|
|
14566
|
+
`+Ae),Ye&&op([T,M,R],Ee=>{Ae=Eu(Ae,Ee," ")}),y&&ye?y.createHTML(Ae):Ae},e.setConfig=function(){let He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vi(He),qe=!0},e.clearConfig=function(){pn=null,qe=!1},e.isValidAttribute=function(He,H,B){pn||Vi({});const U=ht(He),X=ht(H);return uA(U,X,B)},e.addHook=function(He,H){typeof H=="function"&&mu(S[He],H)},e.removeHook=function(He,H){if(H!==void 0){const B=rq(S[He],H);return B===-1?void 0:aq(S[He],B,1)[0]}return $x(S[He])},e.removeHooks=function(He){S[He]=[]},e.removeAllHooks=function(){S=Xx()},e}var Iq=LR();/**
|
|
14567
14567
|
* @license
|
|
14568
14568
|
* Copyright 2017 Google LLC
|
|
14569
14569
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14570
|
-
*/let u0=class extends Pb{constructor(e){if(super(e),this.it=me,e.type!==Lb.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===me||e==null)return this._t=void 0,this.it=e;if(e===ho)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};u0.directiveName="unsafeHTML",u0.resultType=1;const
|
|
14570
|
+
*/let u0=class extends Pb{constructor(e){if(super(e),this.it=me,e.type!==Lb.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===me||e==null)return this._t=void 0,this.it=e;if(e===ho)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};u0.directiveName="unsafeHTML",u0.resultType=1;const Cq=Nb(u0);var xq=Object.defineProperty,Gh=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&xq(e,t,i),i},Ga=(s=>(s.LEFT="left",s.RIGHT="right",s))(Ga||{});class Nl extends ri{constructor(){super(...arguments),this.hidden=!1,this.mobile=!1,this.showNextButton=!1,this.showPreviousButton=!1}static{this.styles=[super.styles,st`
|
|
14571
14571
|
:host {
|
|
14572
14572
|
--card-padding: 24px;
|
|
14573
14573
|
display: flex;
|
|
@@ -14795,10 +14795,10 @@ ${r.join(`
|
|
|
14795
14795
|
?hide-pagination=${e}
|
|
14796
14796
|
></epg-carousel>
|
|
14797
14797
|
</div>
|
|
14798
|
-
`}__renderCardDetails(){const e=
|
|
14798
|
+
`}__renderCardDetails(){const e=Iq.sanitize(this.data.details);return e?ae`
|
|
14799
14799
|
<div class="card-details">
|
|
14800
14800
|
<slot name="details-text">
|
|
14801
|
-
<pre class="preformatted-text">${
|
|
14801
|
+
<pre class="preformatted-text">${Cq(e)}</pre>
|
|
14802
14802
|
</slot>
|
|
14803
14803
|
</div>
|
|
14804
14804
|
`:me}__renderCardNavigations(){return this.data.showNavigationButtons?ae`
|
|
@@ -14879,7 +14879,7 @@ ${r.join(`
|
|
|
14879
14879
|
<!-- Card Animations -->
|
|
14880
14880
|
<!-- ${this.__renderCardAnimationControls()} -->
|
|
14881
14881
|
</slot>
|
|
14882
|
-
`}}Gh([q({type:Boolean,attribute:vh.hidden.name})],Nl.prototype,"hidden");Gh([q({type:Boolean,attribute:vh.mobile.name})],Nl.prototype,"mobile");Gh([q({type:Boolean,attribute:vh.showNextButton.name})],Nl.prototype,"showNextButton");Gh([q({type:Boolean,attribute:vh.showPreviousButton.name})],Nl.prototype,"showPreviousButton");Gh([q({attribute:!1})],Nl.prototype,"data");Gh([Pt("#cardCarousel")],Nl.prototype,"cardCarousel");window.customElements.get(Sx)||window.customElements.define(Sx,Nl);const Jx="epg-file-uploader",Wf={label:{name:"label",defaultValue:"Drag and drop files here or click to upload a file"},acceptedFileTypes:{name:"accepted-file-types",defaultValue:".glb"}};var
|
|
14882
|
+
`}}Gh([q({type:Boolean,attribute:vh.hidden.name})],Nl.prototype,"hidden");Gh([q({type:Boolean,attribute:vh.mobile.name})],Nl.prototype,"mobile");Gh([q({type:Boolean,attribute:vh.showNextButton.name})],Nl.prototype,"showNextButton");Gh([q({type:Boolean,attribute:vh.showPreviousButton.name})],Nl.prototype,"showPreviousButton");Gh([q({attribute:!1})],Nl.prototype,"data");Gh([Pt("#cardCarousel")],Nl.prototype,"cardCarousel");window.customElements.get(Sx)||window.customElements.define(Sx,Nl);const Jx="epg-file-uploader",Wf={label:{name:"label",defaultValue:"Drag and drop files here or click to upload a file"},acceptedFileTypes:{name:"accepted-file-types",defaultValue:".glb"}};var wq=Object.defineProperty,zh=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&wq(e,t,i),i};class Pl extends ri{constructor(){super(...arguments),this.label=Wf.label.defaultValue.toString(),this.acceptedFileTypes=Wf.acceptedFileTypes.defaultValue.toString(),this.__fileName="",this.__fileType="",this.__fileUrl=""}static{this.styles=[super.styles,st`
|
|
14883
14883
|
:host {
|
|
14884
14884
|
width: 100%;
|
|
14885
14885
|
height: 100%;
|
|
@@ -14924,7 +14924,7 @@ ${r.join(`
|
|
|
14924
14924
|
class="glb-file-upload-input"
|
|
14925
14925
|
accept=${this.acceptedFileTypes}
|
|
14926
14926
|
>
|
|
14927
|
-
`}}zh([q({attribute:Wf.label.name})],Pl.prototype,"label");zh([q({attribute:Wf.acceptedFileTypes.name})],Pl.prototype,"acceptedFileTypes");zh([Pt("#glbFileUploadInput")],Pl.prototype,"glbFileUploadInput");zh([Mn()],Pl.prototype,"__fileName");zh([Mn()],Pl.prototype,"__fileType");zh([Mn()],Pl.prototype,"__fileUrl");window.customElements.get(Jx)||window.customElements.define(Jx,Pl);const Kx="epg-loader-scene",no={loaderType:{name:"loading-type",defaultValue:"bar"},loadingLabel:{name:"loading-label",defaultValue:"Loading 3D..."},loadingLogoSrc:{name:"loading-logo-src",defaultValue:Mb.splashScreenLogo},currentProgress:{name:"current-progress",defaultValue:12}},Zx="epg-progress-bar",NR={currentProgress:{name:"current-progress",defaultValue:12}};var
|
|
14927
|
+
`}}zh([q({attribute:Wf.label.name})],Pl.prototype,"label");zh([q({attribute:Wf.acceptedFileTypes.name})],Pl.prototype,"acceptedFileTypes");zh([Pt("#glbFileUploadInput")],Pl.prototype,"glbFileUploadInput");zh([Mn()],Pl.prototype,"__fileName");zh([Mn()],Pl.prototype,"__fileType");zh([Mn()],Pl.prototype,"__fileUrl");window.customElements.get(Jx)||window.customElements.define(Jx,Pl);const Kx="epg-loader-scene",no={loaderType:{name:"loading-type",defaultValue:"bar"},loadingLabel:{name:"loading-label",defaultValue:"Loading 3D..."},loadingLogoSrc:{name:"loading-logo-src",defaultValue:Mb.splashScreenLogo},currentProgress:{name:"current-progress",defaultValue:12}},Zx="epg-progress-bar",NR={currentProgress:{name:"current-progress",defaultValue:12}};var Sq=Object.defineProperty,Bq=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Sq(e,t,i),i};class PR extends ri{constructor(){super(...arguments),this.currentProgress=parseInt(NR.currentProgress.defaultValue.toString())}static{this.styles=[super.styles,st`
|
|
14928
14928
|
:host {
|
|
14929
14929
|
display: flex;
|
|
14930
14930
|
height: 6px;
|
|
@@ -14976,7 +14976,7 @@ ${r.join(`
|
|
|
14976
14976
|
max="100"
|
|
14977
14977
|
></progress>
|
|
14978
14978
|
</slot>
|
|
14979
|
-
`}}
|
|
14979
|
+
`}}Bq([q({type:Number,attribute:NR.currentProgress.name})],PR.prototype,"currentProgress");window.customElements.get(Zx)||window.customElements.define(Zx,PR);var Tq=Object.defineProperty,aA=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Tq(e,t,i),i};class Hh extends ri{constructor(){super(...arguments),this.loadingLabel=no.loadingLabel.defaultValue.toString(),this.loadingLogoSrc=no.loadingLogoSrc.defaultValue.toString(),this.currentProgress=parseInt(no.currentProgress.defaultValue.toString()),this.loaderType=no.loaderType.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
14980
14980
|
:host {
|
|
14981
14981
|
display: flex;
|
|
14982
14982
|
flex-direction: column;
|
|
@@ -15040,11 +15040,11 @@ ${r.join(`
|
|
|
15040
15040
|
${this._renderLoaderByType()}
|
|
15041
15041
|
${this._renderLabel()}
|
|
15042
15042
|
</slot>
|
|
15043
|
-
`}}aA([q({type:String,attribute:no.loadingLabel.name})],Hh.prototype,"loadingLabel");aA([q({type:String,attribute:no.loadingLogoSrc.name})],Hh.prototype,"loadingLogoSrc");aA([q({type:Number,attribute:no.currentProgress.name})],Hh.prototype,"currentProgress");aA([q({type:String,attribute:no.loaderType.name})],Hh.prototype,"loaderType");aA([Pt("#loadingLogoParent")],Hh.prototype,"__loadingLogoParent");window.customElements.get(Kx)||window.customElements.define(Kx,Hh);const ew="epg-modal",Mg={open:{name:"open"},poweredByEpigraph:{name:"powered-by-epigraph"},poweredByEpigraphHref:{name:"powered-by-epigraph-href",defaultValue:"https://www.epigraph.us"}},
|
|
15043
|
+
`}}aA([q({type:String,attribute:no.loadingLabel.name})],Hh.prototype,"loadingLabel");aA([q({type:String,attribute:no.loadingLogoSrc.name})],Hh.prototype,"loadingLogoSrc");aA([q({type:Number,attribute:no.currentProgress.name})],Hh.prototype,"currentProgress");aA([q({type:String,attribute:no.loaderType.name})],Hh.prototype,"loaderType");aA([Pt("#loadingLogoParent")],Hh.prototype,"__loadingLogoParent");window.customElements.get(Kx)||window.customElements.define(Kx,Hh);const ew="epg-modal",Mg={open:{name:"open"},poweredByEpigraph:{name:"powered-by-epigraph"},poweredByEpigraphHref:{name:"powered-by-epigraph-href",defaultValue:"https://www.epigraph.us"}},Mq={modalContents:{name:"modal-contents"}},tf={SCREEN:{WIDTH:{MAX:{$value:"479px"}}},MODAL:{WIDTH:{MIN:{$value:"280px"},MAX:{$value:"380px"}}}},cp={SCREEN:{WIDTH:{MIN:{$value:"480px"},MAX:{$value:"1023px"}}},MODAL:{WIDTH:{MIN:{$value:"424px"},MAX:{$value:"578px"}}}},hp={SCREEN:{WIDTH:{MIN:{$value:"1024px"},MAX:{$value:"1439px"}}},MODAL:{WIDTH:{MIN:{$value:"532px"},MAX:{$value:"616px"}}}},DE={SCREEN:{WIDTH:{MIN:{$value:"1440px"}}},MODAL:{WIDTH:{MIN:{$value:"532px"},MAX:{$value:"648px"}}}};/**
|
|
15044
15044
|
* @license
|
|
15045
15045
|
* Copyright 2018 Google LLC
|
|
15046
15046
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
15047
|
-
*/const
|
|
15047
|
+
*/const Rq=Nb(class extends Pb{constructor(s){if(super(s),s.type!==Lb.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(e=>s[e]).join(" ")+" "}update(s,[e]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in e)e[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(e)}const t=s.element.classList;for(const n of this.st)n in e||(t.remove(n),this.st.delete(n));for(const n in e){const i=!!e[n];i===this.st.has(n)||this.nt?.has(n)||(i?(t.add(n),this.st.add(n)):(t.remove(n),this.st.delete(n)))}return ho}});var Dq=Object.defineProperty,$h=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Dq(e,t,i),i};const Qq=`${re(he.Size.Shadow.None.$value)} ${re(he.Size.Shadow.Small.$value)} ${re(he.Size.Blur.Small.$value)} ${re(he.Size.Shadow.Xsmall.$value)} ${re(he.Color.Surface.ShadowSecondary.$value)}`;class va extends ri{constructor(){super(...arguments),this.open=!1,this.poweredByEpigraph=!1,this.poweredByEpigraphHref=Mg.poweredByEpigraphHref.defaultValue.toString(),this.__lastFocusedElement=null}static{this.styles=[super.styles,st`
|
|
15048
15048
|
:host {
|
|
15049
15049
|
--footer-height: 50px;
|
|
15050
15050
|
display: flex;
|
|
@@ -15074,7 +15074,7 @@ ${r.join(`
|
|
|
15074
15074
|
transition: opacity 0.7s ease-out, transform 0.6s ease-out;
|
|
15075
15075
|
border-radius: 10px;
|
|
15076
15076
|
border: none;
|
|
15077
|
-
box-shadow: ${Mi(
|
|
15077
|
+
box-shadow: ${Mi(Qq)};
|
|
15078
15078
|
background-color: ${re(he.Color.Surface.Plain.$value)};
|
|
15079
15079
|
color: var(--modals_text_fill);
|
|
15080
15080
|
padding: 0;
|
|
@@ -15199,7 +15199,7 @@ ${r.join(`
|
|
|
15199
15199
|
</div>
|
|
15200
15200
|
</a>
|
|
15201
15201
|
</slot>
|
|
15202
|
-
`),e}__generateDialogContentClassMap(){return
|
|
15202
|
+
`),e}__generateDialogContentClassMap(){return Rq({"dialog-content":!0,"footer-padding":this.poweredByEpigraph})}render(){return ae`
|
|
15203
15203
|
${super.render()}
|
|
15204
15204
|
|
|
15205
15205
|
<div
|
|
@@ -15219,14 +15219,14 @@ ${r.join(`
|
|
|
15219
15219
|
left-icon="cancel"
|
|
15220
15220
|
></epg-button-icon>
|
|
15221
15221
|
|
|
15222
|
-
<slot name=${
|
|
15222
|
+
<slot name=${Mq.modalContents.name}>
|
|
15223
15223
|
${this._modalContentsSlot()}
|
|
15224
15224
|
</slot>
|
|
15225
15225
|
|
|
15226
15226
|
${this.__renderPoweredByEpigraph()}
|
|
15227
15227
|
</div>
|
|
15228
15228
|
</div>
|
|
15229
|
-
`}}$h([q({type:Boolean,attribute:Mg.open.name,reflect:!0})],va.prototype,"open");$h([q({type:Boolean,attribute:Mg.poweredByEpigraph.name})],va.prototype,"poweredByEpigraph");$h([q({type:String,attribute:Mg.poweredByEpigraphHref.name})],va.prototype,"poweredByEpigraphHref");$h([Pt("#modalDialog")],va.prototype,"dialogElem");$h([Pt("#closeButton")],va.prototype,"closeButtonElem");$h([Mn()],va.prototype,"__lastFocusedElement");window.customElements.get(ew)||window.customElements.define(ew,va);const tw="epg-modal-ar";var
|
|
15229
|
+
`}}$h([q({type:Boolean,attribute:Mg.open.name,reflect:!0})],va.prototype,"open");$h([q({type:Boolean,attribute:Mg.poweredByEpigraph.name})],va.prototype,"poweredByEpigraph");$h([q({type:String,attribute:Mg.poweredByEpigraphHref.name})],va.prototype,"poweredByEpigraphHref");$h([Pt("#modalDialog")],va.prototype,"dialogElem");$h([Pt("#closeButton")],va.prototype,"closeButtonElem");$h([Mn()],va.prototype,"__lastFocusedElement");window.customElements.get(ew)||window.customElements.define(ew,va);const tw="epg-modal-ar";var Lq=Object.defineProperty,Nq=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Lq(e,t,i),i};class FR extends va{constructor(){super(...arguments),this.isLoading=!1}static{this.styles=[super.styles,st`
|
|
15230
15230
|
.main-contents-container {
|
|
15231
15231
|
display: flex;
|
|
15232
15232
|
flex-direction: column;
|
|
@@ -15320,7 +15320,7 @@ ${r.join(`
|
|
|
15320
15320
|
?disabled=${this.isLoading}
|
|
15321
15321
|
></epg-button-primary>
|
|
15322
15322
|
</div>
|
|
15323
|
-
`}}
|
|
15323
|
+
`}}Nq([q({type:Boolean,attribute:"is-loading"})],FR.prototype,"isLoading");window.customElements.get(tw)||window.customElements.define(tw,FR);const nw="epg-modal-qr";var Pq=Object.defineProperty,Fq=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Pq(e,t,i),i};class kR extends va{constructor(){super(...arguments),this.qrCodeImage=Mb.sampleQrCode}static{this.styles=[super.styles,st`
|
|
15324
15324
|
.main-contents-container {
|
|
15325
15325
|
display: flex;
|
|
15326
15326
|
flex-direction: column;
|
|
@@ -15396,7 +15396,7 @@ ${r.join(`
|
|
|
15396
15396
|
label="Done"
|
|
15397
15397
|
></epg-button-primary>
|
|
15398
15398
|
</div>
|
|
15399
|
-
`}}
|
|
15399
|
+
`}}Fq([q({attribute:"qr-code-image"})],kR.prototype,"qrCodeImage");window.customElements.get(nw)||window.customElements.define(nw,kR);const iw="epg-radio-group",UR={label:{name:"label",defaultValue:"Select an option:"}},sw="epg-toggle-base",gl={active:{name:"active"},iconName:{name:"icon-name",defaultValue:"ruler-slant"},label:{name:"label",defaultValue:"Label"},orientation:{name:"orientation",defaultValue:"horizontal"}},rw="epg-toggle-radio";var kq=Object.defineProperty,Rg=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&kq(e,t,i),i};class Ia extends ri{constructor(){super(),this.label=gl.label.defaultValue.toString(),this.iconName=gl.iconName.defaultValue.toString(),this.orientation=gl.orientation.defaultValue.toString(),this.active=!1,this.isKeyDown=!1,this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("keyup",this.handleKeyUp),this.addEventListener("click",this.doClick)}static{this.styles=[super.styles,st`
|
|
15400
15400
|
:host {
|
|
15401
15401
|
display: flex;
|
|
15402
15402
|
font-size: 16px;
|
|
@@ -15521,7 +15521,7 @@ ${r.join(`
|
|
|
15521
15521
|
<input type="checkbox" ?checked=${this.active}>
|
|
15522
15522
|
<slot name="replace-all"> ${this._defaultContents()}</slot>
|
|
15523
15523
|
</div>
|
|
15524
|
-
`}}Rg([q({attribute:gl.label.name})],Ia.prototype,"label");Rg([q({attribute:gl.iconName.name})],Ia.prototype,"iconName");Rg([q({attribute:gl.orientation.name})],Ia.prototype,"orientation");Rg([q({type:Boolean,attribute:gl.active.name})],Ia.prototype,"active");window.customElements.get(sw)||window.customElements.define(sw,Ia);class
|
|
15524
|
+
`}}Rg([q({attribute:gl.label.name})],Ia.prototype,"label");Rg([q({attribute:gl.iconName.name})],Ia.prototype,"iconName");Rg([q({attribute:gl.orientation.name})],Ia.prototype,"orientation");Rg([q({type:Boolean,attribute:gl.active.name})],Ia.prototype,"active");window.customElements.get(sw)||window.customElements.define(sw,Ia);class Uq extends Ia{static{this.styles=[super.styles,st`
|
|
15525
15525
|
/* ================ RADIO STARTS HERE ================ */
|
|
15526
15526
|
/* Create a custom checkbox */
|
|
15527
15527
|
.radio {
|
|
@@ -15574,7 +15574,7 @@ ${r.join(`
|
|
|
15574
15574
|
${this.iconName?ae`<epg-icon class="icon" icon-name=${this.iconName}></epg-icon>`:me}
|
|
15575
15575
|
${this.label?ae`<span class="label-text">${this.label}</span>`:me}
|
|
15576
15576
|
</div>
|
|
15577
|
-
`}}window.customElements.get(rw)||window.customElements.define(rw,
|
|
15577
|
+
`}}window.customElements.get(rw)||window.customElements.define(rw,Uq);var Oq=Object.defineProperty,Dg=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Oq(e,t,i),i};class oA extends ri{constructor(){super(...arguments),this.label=UR.label.defaultValue.toString(),this.activeIndex=0,this.__radioButtons=[]}static{this.styles=[super.styles,st`
|
|
15578
15578
|
:host {
|
|
15579
15579
|
display: flex;
|
|
15580
15580
|
font-size: 16px;
|
|
@@ -15595,7 +15595,7 @@ ${r.join(`
|
|
|
15595
15595
|
<epg-toggle-radio label="Radio 3"></epg-toggle-radio>
|
|
15596
15596
|
</slot>
|
|
15597
15597
|
</slot>
|
|
15598
|
-
`}}Dg([q({type:String,attribute:UR.label.name})],oA.prototype,"label");Dg([q({type:Number,attribute:!1})],oA.prototype,"activeIndex");Dg([Mn()],oA.prototype,"__radioButtons");Dg([Pt("#radioButtonsSlot")],oA.prototype,"__radioButtonsSlot");window.customElements.get(iw)||window.customElements.define(iw,oA);const aw="epg-toggle-arrow";class
|
|
15598
|
+
`}}Dg([q({type:String,attribute:UR.label.name})],oA.prototype,"label");Dg([q({type:Number,attribute:!1})],oA.prototype,"activeIndex");Dg([Mn()],oA.prototype,"__radioButtons");Dg([Pt("#radioButtonsSlot")],oA.prototype,"__radioButtonsSlot");window.customElements.get(iw)||window.customElements.define(iw,oA);const aw="epg-toggle-arrow";class Gq extends Ia{static{this.styles=[super.styles,st`
|
|
15599
15599
|
:host {
|
|
15600
15600
|
border-radius: 50px;
|
|
15601
15601
|
}
|
|
@@ -15640,7 +15640,7 @@ ${r.join(`
|
|
|
15640
15640
|
<input type="checkbox" ?checked=${this.active}>
|
|
15641
15641
|
${this.iconName?ae`<epg-icon class="icon" icon-name="nav-arrow-up"></epg-icon>`:me}
|
|
15642
15642
|
</div>
|
|
15643
|
-
`}}window.customElements.get(aw)||window.customElements.define(aw,
|
|
15643
|
+
`}}window.customElements.get(aw)||window.customElements.define(aw,Gq);const ow="epg-toggle-checkbox";class OR extends Ia{static{this.styles=[super.styles,st`
|
|
15644
15644
|
/* ================ CHECKMARK STARTS HERE ================ */
|
|
15645
15645
|
/* Create a custom checkbox */
|
|
15646
15646
|
.checkmark {
|
|
@@ -15691,7 +15691,7 @@ ${r.join(`
|
|
|
15691
15691
|
${this.iconName?ae`<epg-icon class="icon" icon-name=${this.iconName}></epg-icon>`:me}
|
|
15692
15692
|
${this.label?ae`<span class="label-text">${this.label}</span>`:me}
|
|
15693
15693
|
</div>
|
|
15694
|
-
`}}window.customElements.get(ow)||window.customElements.define(ow,OR);const lw="epg-toggle-checkbox-int";class
|
|
15694
|
+
`}}window.customElements.get(ow)||window.customElements.define(ow,OR);const lw="epg-toggle-checkbox-int";class zq extends OR{static{this.styles=[super.styles,st`
|
|
15695
15695
|
/* Create the checkmark/indicator (hidden when not checked) */
|
|
15696
15696
|
.checkmark:after {
|
|
15697
15697
|
content: "";
|
|
@@ -15708,7 +15708,7 @@ ${r.join(`
|
|
|
15708
15708
|
-ms-transform: rotate(0);
|
|
15709
15709
|
transform: rotate(0);
|
|
15710
15710
|
}
|
|
15711
|
-
`]}}window.customElements.get(lw)||window.customElements.define(lw,
|
|
15711
|
+
`]}}window.customElements.get(lw)||window.customElements.define(lw,zq);const cw="epg-toggle-expand",wh={label:{name:"label",defaultValue:"More"},leftIcon:{name:"left-icon",defaultValue:"more-horiz"},active:{name:"active"},togglable:{name:"togglable"}};var Hq=Object.defineProperty,Qg=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Hq(e,t,i),i};class lA extends ws{constructor(){super(...arguments),this.label=wh.label.defaultValue.toString(),this.leftIcon=wh.leftIcon.defaultValue.toString(),this.togglable=!1,this.active=!1}static{this.styles=[super.styles]}}Qg([q({attribute:wh.label.name})],lA.prototype,"label");Qg([q({attribute:wh.leftIcon.name})],lA.prototype,"leftIcon");Qg([q({type:Boolean,attribute:wh.togglable.name})],lA.prototype,"togglable");Qg([q({type:Boolean,attribute:wh.active.name})],lA.prototype,"active");window.customElements.get(cw)||window.customElements.define(cw,lA);const hw="epg-toggle-switch";class $q extends Ia{static{this.styles=[super.styles,st`
|
|
15712
15712
|
:host(:focus-visible) {
|
|
15713
15713
|
outline: revert !important;
|
|
15714
15714
|
}
|
|
@@ -15794,7 +15794,7 @@ ${r.join(`
|
|
|
15794
15794
|
${this.iconName?ae`<epg-icon class="icon" icon-name=${this.iconName}></epg-icon>`:me}
|
|
15795
15795
|
${this.label?ae`<span class="label-text">${this.label}</span>`:me}
|
|
15796
15796
|
</div>
|
|
15797
|
-
`}}window.customElements.get(hw)||window.customElements.define(hw
|
|
15797
|
+
`}}window.customElements.get(hw)||window.customElements.define(hw,$q);const uw="epg-tool-help",Xc={orientation:{name:"orientation",defaultValue:"horizontal"},canPan:{name:"can-pan"},isTouch:{name:"is-touch"}};var Vq=Object.defineProperty,Ob=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Vq(e,t,i),i};class Lg extends ri{constructor(){super(...arguments),this.canPan=!1,this.isTouch=!1,this.orientation=Xc.orientation.defaultValue.toString()}static{this.styles=[super.styles,st`
|
|
15798
15798
|
:host {
|
|
15799
15799
|
display: flex;
|
|
15800
15800
|
font-size: 16px;
|
|
@@ -15863,7 +15863,7 @@ ${r.join(`
|
|
|
15863
15863
|
</div>
|
|
15864
15864
|
${this.canPan?this.__panControls():me}
|
|
15865
15865
|
</slot>
|
|
15866
|
-
`}}Ob([q({type:Boolean,attribute:Xc.canPan.name})],Lg.prototype,"canPan");Ob([q({type:Boolean,attribute:Xc.isTouch.name})],Lg.prototype,"isTouch");Ob([q({attribute:Xc.orientation.name})],Lg.prototype,"orientation");window.customElements.get(uw)||window.customElements.define(uw,Lg);const dw="epg-tool-powered-by-epigraph",nf={urlToOpen:{name:"url-to-open",defaultValue:"https://epigraph.us"},label:{defaultValue:""},tooltipPlacement:{defaultValue:"right"}};var
|
|
15866
|
+
`}}Ob([q({type:Boolean,attribute:Xc.canPan.name})],Lg.prototype,"canPan");Ob([q({type:Boolean,attribute:Xc.isTouch.name})],Lg.prototype,"isTouch");Ob([q({attribute:Xc.orientation.name})],Lg.prototype,"orientation");window.customElements.get(uw)||window.customElements.define(uw,Lg);const dw="epg-tool-powered-by-epigraph",nf={urlToOpen:{name:"url-to-open",defaultValue:"https://epigraph.us"},label:{defaultValue:""},tooltipPlacement:{defaultValue:"right"}};var Yq=Object.defineProperty,qq=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Yq(e,t,i),i};class GR extends wn{constructor(){super(...arguments),this.urlToOpen=nf.urlToOpen.defaultValue.toString(),this.label=nf.label.defaultValue.toString(),this.rightIcon="",this.leftIcon="epigraph-icon",this.tooltipPlacement=nf.tooltipPlacement.defaultValue.toString(),this.tooltipLabel="",this.__allowClick=!0}static{this.styles=[super.styles,st`
|
|
15867
15867
|
:host {
|
|
15868
15868
|
border-radius: 12px;
|
|
15869
15869
|
border: 1px solid rgba(204, 204, 204, 0.6);
|
|
@@ -15907,7 +15907,7 @@ ${r.join(`
|
|
|
15907
15907
|
<img style="vertical-align: middle;" src="https://asset.myepigraph.com/design-assets/icons/powered-by-epigraph-white.svg" alt="Powered by Epigraph" />
|
|
15908
15908
|
</div>
|
|
15909
15909
|
</epg-tooltip>
|
|
15910
|
-
`}doClick(){this.disabled||this.__allowClick===!1||this._redirectToWebsite()}_redirectToWebsite(){window.open(this.urlToOpen,"_blank")}}
|
|
15910
|
+
`}doClick(){this.disabled||this.__allowClick===!1||this._redirectToWebsite()}_redirectToWebsite(){window.open(this.urlToOpen,"_blank")}}qq([q({attribute:nf.urlToOpen.name})],GR.prototype,"urlToOpen");window.customElements.get(dw)||window.customElements.define(dw,GR);const Aw="epg-toolset",Wa={expandOrientation:{name:"expand-orientation",defaultValue:"horizontal"},collapsible:{name:"collapsible"},collapsed:{name:"collapsed"}};var Wq=Object.defineProperty,Gb=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Wq(e,t,i),i};class Ng extends ri{constructor(){super(...arguments),this.expandOrientation=Wa.expandOrientation.defaultValue.toString(),this.collapsible=!1,this.collapsed=!1}static{this.styles=[super.styles,st`
|
|
15911
15911
|
:host {
|
|
15912
15912
|
display: flex;
|
|
15913
15913
|
font-size: 20px;
|
|
@@ -15992,7 +15992,7 @@ ${r.join(`
|
|
|
15992
15992
|
></epg-tool-control>
|
|
15993
15993
|
</slot>
|
|
15994
15994
|
</div>
|
|
15995
|
-
`}}Gb([q({attribute:Wa.expandOrientation.name})],Ng.prototype,"expandOrientation");Gb([q({type:Boolean,attribute:Wa.collapsible.name})],Ng.prototype,"collapsible");Gb([q({type:Boolean,attribute:Wa.collapsed.name})],Ng.prototype,"collapsed");window.customElements.get(Aw)||window.customElements.define(Aw,Ng);var
|
|
15995
|
+
`}}Gb([q({attribute:Wa.expandOrientation.name})],Ng.prototype,"expandOrientation");Gb([q({type:Boolean,attribute:Wa.collapsible.name})],Ng.prototype,"collapsible");Gb([q({type:Boolean,attribute:Wa.collapsed.name})],Ng.prototype,"collapsed");window.customElements.get(Aw)||window.customElements.define(Aw,Ng);var jq=Object.defineProperty,Fl=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&jq(e,t,i),i};const mo=class sf extends Tl{constructor(){super(...arguments),this._loggerContext="DESKTOP HOTSPOT CARDS MANAGER",this.cardPlacement=Ga.LEFT,this.__previousCardPlacement=Ga.LEFT,this.activeHotspotHtml=me,this.__leftCardContentsHtml=me,this.__rightCardContentsHtml=me}static{this.webComponentName="desktop-hotspot-cards-manager"}static setupWebComponent(){window.customElements.get(sf.webComponentName)||window.customElements.define(sf.webComponentName,sf)}static{this.styles=st`
|
|
15996
15996
|
.hotspot-cards-container {
|
|
15997
15997
|
--landscape-cards-offset: 12px;
|
|
15998
15998
|
width: 40%;
|
|
@@ -16093,7 +16093,7 @@ ${r.join(`
|
|
|
16093
16093
|
</div>
|
|
16094
16094
|
${this.__rightCardContentsHtml}
|
|
16095
16095
|
</div>
|
|
16096
|
-
`}};Fl([q({attribute:"card-placement"})],mo.prototype,"cardPlacement");Fl([Mn()],mo.prototype,"__previousCardPlacement");Fl([q({attribute:!1})],mo.prototype,"activeHotspotHtml");Fl([Mn()],mo.prototype,"__leftCardContentsHtml");Fl([Mn()],mo.prototype,"__rightCardContentsHtml");Fl([Pt("#leftHotspotCardsContainer")],mo.prototype,"leftHotspotCardsContainerElem");Fl([Pt("#rightHotspotCardsContainer")],mo.prototype,"rightHotspotCardsContainerElem");let
|
|
16096
|
+
`}};Fl([q({attribute:"card-placement"})],mo.prototype,"cardPlacement");Fl([Mn()],mo.prototype,"__previousCardPlacement");Fl([q({attribute:!1})],mo.prototype,"activeHotspotHtml");Fl([Mn()],mo.prototype,"__leftCardContentsHtml");Fl([Mn()],mo.prototype,"__rightCardContentsHtml");Fl([Pt("#leftHotspotCardsContainer")],mo.prototype,"leftHotspotCardsContainerElem");Fl([Pt("#rightHotspotCardsContainer")],mo.prototype,"rightHotspotCardsContainerElem");let Xq=mo;var Jq=Object.defineProperty,Eo=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&Jq(e,t,i),i};const Ca=class rf extends Tl{constructor(){super(),this._loggerContext="HOTSPOTS MANAGER",this.hotspots=new Map,this.activeHotspot=void 0,this.activeHotspotIndex=-1,this.__activeHotspotHtml=me,this.__allCards=[],this.__isPortrait=!0,this.__cameraOffsetApplied={x:0,y:0,z:0},Xq.setupWebComponent(),Q5.setupWebComponent()}static{this.webComponentName="hotspots-manager"}static{this.styles=[px.styles,st`
|
|
16097
16097
|
:host {
|
|
16098
16098
|
position: absolute;
|
|
16099
16099
|
top: 0;
|
|
@@ -16172,7 +16172,7 @@ ${r.join(`
|
|
|
16172
16172
|
${super.render()}
|
|
16173
16173
|
${this.__renderHotspotIndicatorTemplates()}
|
|
16174
16174
|
${this._renderDesktopOrMobile()}
|
|
16175
|
-
`:me}};Eo([q({attribute:!1})],Ca.prototype,"hotspots");Eo([q({attribute:!1})],Ca.prototype,"hotspotsOrder");Eo([q({attribute:!1})],Ca.prototype,"activeHotspot");Eo([q({attribute:!1})],Ca.prototype,"activeHotspotIndex");Eo([Mn()],Ca.prototype,"__activeHotspotHtml");Eo([Mn()],Ca.prototype,"__allCards");Eo([Mn()],Ca.prototype,"__isPortrait");Eo([Pt("#mobileHotspotCardsManager")],Ca.prototype,"__mobileHotspotCardsManager");let
|
|
16175
|
+
`:me}};Eo([q({attribute:!1})],Ca.prototype,"hotspots");Eo([q({attribute:!1})],Ca.prototype,"hotspotsOrder");Eo([q({attribute:!1})],Ca.prototype,"activeHotspot");Eo([q({attribute:!1})],Ca.prototype,"activeHotspotIndex");Eo([Mn()],Ca.prototype,"__activeHotspotHtml");Eo([Mn()],Ca.prototype,"__allCards");Eo([Mn()],Ca.prototype,"__isPortrait");Eo([Pt("#mobileHotspotCardsManager")],Ca.prototype,"__mobileHotspotCardsManager");let Kq=Ca;const zt={apiMode:{name:"api-mode"},customVersionId:{name:"custom-version-id"},debug:{name:"debug"},showSettings:{name:"show-settings"},gaMeasurementId:{name:"ga-measurement-id"},sku:{name:"sku",defaultValue:""},shopifyVariantId:{name:"shopify-variant-id",defaultValue:""},upc:{name:"upc",defaultValue:""},asin:{name:"asin",defaultValue:""},experienceId:{name:"experience-id",defaultValue:""},productVariantUuid:{name:"product-variant-uuid",defaultValue:""},dimensionsUnit:{name:"dimensions-unit",defaultValue:Fe.inch,argType:{options:[Fe.foot,Fe.inch,Fe.meter,Fe.millimeter,Fe.centimeter]}},dimensionsUnitSymbol:{name:"dimensions-unit-symbol",defaultValue:'"'},baseUrlOverride:{name:"base-url-override",defaultValue:window.location.href},modalView:{name:"modal-view"},hide:{name:"hide"},transparentBackground:{name:"transparent-background"},splashScreenLogo:{name:"splash-screen-logo",defaultValue:"https://asset.myepigraph.com/design-assets/icons/default-splash-screen-image.svg"},splashScreenText:{name:"splash-screen-label",defaultValue:"Loading 3D..."}},af={slotCustomViewInYourSpaceButton:{name:"slot-custom-view-in-your-space-button",defaultValue:"",argType:{control:"text"}},slotSplashScreen:{name:"slot-splash-screen",defaultValue:"",argType:{control:"text"}}};class bd{constructor(){if(this.gltfLoader={},this.splatLoader={},this.textureLoader={},this.rgbeLoader={},bd.instance)return bd.instance;this.gltfLoader=this.initializeGltfLoader(),this.splatLoader=this.initializeSplatLoader(),this.textureLoader=this.initializeTextureLoader(),this.rgbeLoader=this.initializeRgbeLoader(),bd.instance=this}initializeGltfLoader(){const e=new o1,t=new a1;return t.setDecoderPath("https://asset.myepigraph.com/configurator-assets/configurator-lite/external-libs/draco/"),e.setDRACOLoader(t),e}initializeSplatLoader(){return new X1}initializeTextureLoader(){return new ib}initializeRgbeLoader(){const e=new h1;return e.setDataType(yn),e}}/* @license
|
|
16176
16176
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16177
16177
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16178
16178
|
* you may not use this file except in compliance with the License.
|
|
@@ -16185,7 +16185,7 @@ ${r.join(`
|
|
|
16185
16185
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16186
16186
|
* See the License for the specific language governing permissions and
|
|
16187
16187
|
* limitations under the License.
|
|
16188
|
-
*/const zR=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null,HR=zR&&self.XRSession.prototype.requestHitTestSource!=null,QE=self.ResizeObserver!=null,LE=self.IntersectionObserver!=null,jf=HR,pw=(()=>{const s=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(s)||/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(s.substr(0,4)))&&(e=!0),e})(),d0=/android/i.test(navigator.userAgent),$R=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,
|
|
16188
|
+
*/const zR=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null,HR=zR&&self.XRSession.prototype.requestHitTestSource!=null,QE=self.ResizeObserver!=null,LE=self.IntersectionObserver!=null,jf=HR,pw=(()=>{const s=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(s)||/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(s.substr(0,4)))&&(e=!0),e})(),d0=/android/i.test(navigator.userAgent),$R=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,Zq=/firefox/i.test(navigator.userAgent),e6=/OculusBrowser/.test(navigator.userAgent),t6=d0&&!Zq&&!e6,n6=!!(window.webkit&&window.webkit.messageHandlers),Xf=(()=>{if($R){if(n6)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{const s=document.createElement("a");return!!(s.relList&&s.relList.supports&&s.relList.supports("ar"))}}else return!1})();/* @license
|
|
16189
16189
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16190
16190
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16191
16191
|
* you may not use this file except in compliance with the License.
|
|
@@ -16198,7 +16198,7 @@ ${r.join(`
|
|
|
16198
16198
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16199
16199
|
* See the License for the specific language governing permissions and
|
|
16200
16200
|
* limitations under the License.
|
|
16201
|
-
*/const VR=s=>s&&s!=="null"?
|
|
16201
|
+
*/const VR=s=>s&&s!=="null"?i6(s):null,fw=()=>{if(jf)return;const s=[];throw zR||s.push("WebXR Device API"),HR||s.push("WebXR Hit Test API"),new Error(`The following APIs are required for AR, but are missing in this browser: ${s.join(", ")}`)},i6=s=>new URL(s,window.location.toString()).toString(),s6=(s,e)=>{let t=null;const n=(...i)=>{t==null&&(s(...i),t=self.setTimeout(()=>t=null,e))};return n.flush=()=>{t!=null&&(self.clearTimeout(t),t=null)},n},gw=(s,e)=>{let t=null;return(...n)=>{t!=null&&self.clearTimeout(t),t=self.setTimeout(()=>{t=null,s(...n)},e)}},or=(s,e,t)=>Math.max(e,Math.min(t,s)),mw=(()=>{const s="model-viewer-debug-mode",e=new RegExp(`[?&]${s}(&|$)`);return()=>self.ModelViewerElement&&self.ModelViewerElement.debugMode||self.location&&self.location.search&&self.location.search.match(e)})(),r6=(s=0)=>new Promise(e=>setTimeout(e,s)),a6=(s,e,t=null)=>new Promise(n=>{function i(r){(!t||t(r))&&(n(r),s.removeEventListener(e,i))}s.addEventListener(e,i)});/* @license
|
|
16202
16202
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16203
16203
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16204
16204
|
* you may not use this file except in compliance with the License.
|
|
@@ -16211,7 +16211,7 @@ ${r.join(`
|
|
|
16211
16211
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16212
16212
|
* See the License for the specific language governing permissions and
|
|
16213
16213
|
* limitations under the License.
|
|
16214
|
-
*/var Lo=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const
|
|
16214
|
+
*/var Lo=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const o6=.5,l6=0,c6=1,h6=1,Wu=Symbol("currentEnvironmentMap"),ju=Symbol("currentBackground"),Jf=Symbol("updateEnvironment"),up=Symbol("cancelEnvironmentUpdate"),u6=s=>{var e,t,n;class i extends s{constructor(){super(...arguments),this.environmentImage=null,this.skyboxImage=null,this.shadowIntensity=l6,this.shadowSoftness=c6,this.exposure=h6,this.toneMapping="auto",this.skyboxHeight="0",this[e]=null,this[t]=null,this[n]=null}updated(a){super.updated(a),a.has("shadowIntensity")&&(this[fe].setShadowIntensity(this.shadowIntensity*o6),this[Xn]()),a.has("shadowSoftness")&&(this[fe].setShadowSoftness(this.shadowSoftness),this[Xn]()),a.has("exposure")&&(this[fe].exposure=this.exposure,this[Xn]()),a.has("toneMapping")&&(this[fe].toneMapping=this.toneMapping==="aces"?F0:this.toneMapping==="agx"?tT:this.toneMapping==="reinhard"?ZB:this.toneMapping==="cineon"?eT:this.toneMapping==="linear"?KB:this.toneMapping==="none"?cr:wd,this[Xn]()),(a.has("environmentImage")||a.has("skyboxImage"))&&this[Sh]()&&this[Jf](),a.has("skyboxHeight")&&(this[fe].setGroundedSkybox(),this[Xn]())}hasBakedShadow(){return this[fe].bakedShadows.size>0}async[(e=Wu,t=ju,n=up,Jf)](){const{skyboxImage:a,environmentImage:o}=this;this[up]!=null&&(this[up](),this[up]=null);const{textureUtils:l}=this[Vt];if(l==null)return;const c=this[wl].beginActivity("environment-update");try{const{environmentMap:h,skybox:u}=await l.generateEnvironmentMapAndSkybox(VR(a),o,d=>c(or(d,0,1)),this.withCredentials);this[Wu]!==h&&(this[Wu]=h,this.dispatchEvent(new CustomEvent("environment-change"))),u!=null?this[ju]=u.name===h.name?h:u:this[ju]=null,this[fe].setEnvironmentAndSkybox(this[Wu],this[ju])}catch(h){if(h instanceof Error)throw this[fe].setEnvironmentAndSkybox(null,null),h}finally{c(1)}}}return Lo([q({type:String,attribute:"environment-image"})],i.prototype,"environmentImage",void 0),Lo([q({type:String,attribute:"skybox-image"})],i.prototype,"skyboxImage",void 0),Lo([q({type:Number,attribute:"shadow-intensity"})],i.prototype,"shadowIntensity",void 0),Lo([q({type:Number,attribute:"shadow-softness"})],i.prototype,"shadowSoftness",void 0),Lo([q({type:Number})],i.prototype,"exposure",void 0),Lo([q({type:String,attribute:"tone-mapping"})],i.prototype,"toneMapping",void 0),Lo([q({type:String,attribute:"skybox-height"})],i.prototype,"skyboxHeight",void 0),i};/* @license
|
|
16215
16215
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16216
16216
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16217
16217
|
* you may not use this file except in compliance with the License.
|
|
@@ -16224,7 +16224,7 @@ ${r.join(`
|
|
|
16224
16224
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16225
16225
|
* See the License for the specific language governing permissions and
|
|
16226
16226
|
* limitations under the License.
|
|
16227
|
-
*/const
|
|
16227
|
+
*/const d6=ae`
|
|
16228
16228
|
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#000000">
|
|
16229
16229
|
<!-- NOTE(cdata): This SVG filter is a stop-gap until we can implement
|
|
16230
16230
|
support for dynamic re-coloring of UI components -->
|
|
@@ -16255,7 +16255,7 @@ ${r.join(`
|
|
|
16255
16255
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16256
16256
|
* See the License for the specific language governing permissions and
|
|
16257
16257
|
* limitations under the License.
|
|
16258
|
-
*/const
|
|
16258
|
+
*/const A6=ae`
|
|
16259
16259
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="36">
|
|
16260
16260
|
<defs>
|
|
16261
16261
|
<path id="A" d="M.001.232h24.997V36H.001z" />
|
|
@@ -16287,7 +16287,7 @@ ${r.join(`
|
|
|
16287
16287
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16288
16288
|
* See the License for the specific language governing permissions and
|
|
16289
16289
|
* limitations under the License.
|
|
16290
|
-
*/const
|
|
16290
|
+
*/const p6=ae`
|
|
16291
16291
|
<svg version="1.1" id="view_x5F_in_x5F_AR_x5F_icon"
|
|
16292
16292
|
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px"
|
|
16293
16293
|
viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
|
@@ -16316,7 +16316,7 @@ ${r.join(`
|
|
|
16316
16316
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16317
16317
|
* See the License for the specific language governing permissions and
|
|
16318
16318
|
* limitations under the License.
|
|
16319
|
-
*/const
|
|
16319
|
+
*/const f6=ae`
|
|
16320
16320
|
<style>
|
|
16321
16321
|
:host {
|
|
16322
16322
|
display: block;
|
|
@@ -16615,7 +16615,7 @@ canvas {
|
|
|
16615
16615
|
role="button"
|
|
16616
16616
|
href="javascript:void(0);"
|
|
16617
16617
|
aria-label="View in your space">
|
|
16618
|
-
${
|
|
16618
|
+
${p6}
|
|
16619
16619
|
</a>
|
|
16620
16620
|
</slot>
|
|
16621
16621
|
</div>
|
|
@@ -16630,7 +16630,7 @@ canvas {
|
|
|
16630
16630
|
<div class="slot interaction-prompt cover centered">
|
|
16631
16631
|
<div id="prompt" class="animated-container">
|
|
16632
16632
|
<slot name="interaction-prompt" aria-hidden="true">
|
|
16633
|
-
${
|
|
16633
|
+
${A6}
|
|
16634
16634
|
</slot>
|
|
16635
16635
|
</div>
|
|
16636
16636
|
</div>
|
|
@@ -16661,7 +16661,7 @@ canvas {
|
|
|
16661
16661
|
tabindex="3"
|
|
16662
16662
|
aria-label="Exit AR"
|
|
16663
16663
|
aria-hidden="true">
|
|
16664
|
-
${
|
|
16664
|
+
${d6}
|
|
16665
16665
|
</a>
|
|
16666
16666
|
</slot>
|
|
16667
16667
|
</div>
|
|
@@ -16669,7 +16669,7 @@ canvas {
|
|
|
16669
16669
|
</div>
|
|
16670
16670
|
<div class="screen-reader-only" role="region" aria-label="Live announcements">
|
|
16671
16671
|
<span id="status" role="status"></span>
|
|
16672
|
-
</div>`,f6=s=>{kT(p6,s)};var Ew=(function(){var s="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb",e="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(t)?e:s,r,a=WebAssembly.instantiate(o(i),{}).then(function(f){r=f.instance,r.exports.__wasm_call_ctors()});function o(f){for(var _=new Uint8Array(f.length),E=0;E<f.length;++E){var y=f.charCodeAt(E);_[E]=y>96?y-97:y>64?y-39:y+4}for(var b=0,E=0;E<f.length;++E)_[b++]=_[E]<60?n[_[E]]:(_[E]-60)*64+_[++E];return _.buffer.slice(0,b)}function l(f,_,E,y,b,x){var I=r.exports.sbrk,w=E+3&-4,v=I(w*y),C=I(b.length),S=new Uint8Array(r.exports.memory.buffer);S.set(b,C);var T=f(v,E,y,C,b.length);if(T==0&&x&&x(v,w,y),_.set(S.subarray(v,v+E*y)),I(v-I(0)),T!=0)throw new Error("Malformed buffer data: "+T)}var c={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},u=[],d=0;function A(f){var _={object:new Worker(f),pending:0,requests:{}};return _.object.onmessage=function(E){var y=E.data;_.pending-=y.count,_.requests[y.id][y.action](y.value),delete _.requests[y.id]},_}function p(f){for(var _="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o(i))+"]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;"+l.toString()+m.toString(),E=new Blob([_],{type:"text/javascript"}),y=URL.createObjectURL(E),b=0;b<f;++b)u[b]=A(y);URL.revokeObjectURL(y)}function g(f,_,E,y,b){for(var x=u[0],I=1;I<u.length;++I)u[I].pending<x.pending&&(x=u[I]);return new Promise(function(w,v){var C=new Uint8Array(E),S=d++;x.pending+=f,x.requests[S]={resolve:w,reject:v},x.object.postMessage({id:S,count:f,size:_,source:C,mode:y,filter:b},[C.buffer])})}function m(f){a.then(function(){var _=f.data;try{var E=new Uint8Array(_.count*_.size);l(r.exports[_.mode],E,_.count,_.size,_.source,r.exports[_.filter]),self.postMessage({id:_.id,count:_.count,action:"resolve",value:E},[E.buffer])}catch(y){self.postMessage({id:_.id,count:_.count,action:"reject",value:y})}})}return{ready:a,supported:!0,useWorkers:function(f){p(f)},decodeVertexBuffer:function(f,_,E,y,b){l(r.exports.meshopt_decodeVertexBuffer,f,_,E,y,r.exports[c[b]])},decodeIndexBuffer:function(f,_,E,y){l(r.exports.meshopt_decodeIndexBuffer,f,_,E,y)},decodeIndexSequence:function(f,_,E,y){l(r.exports.meshopt_decodeIndexSequence,f,_,E,y)},decodeGltfBuffer:function(f,_,E,y,b,x){l(r.exports[h[b]],f,_,E,y,r.exports[c[x]])},decodeGltfBufferAsync:function(f,_,E,y,b){return u.length>0?g(f,_,E,h[y],c[b]):a.then(function(){var x=new Uint8Array(f*_);return l(r.exports[h[y]],x,f,_,E,r.exports[c[b]]),x})}}})();/* @license
|
|
16672
|
+
</div>`,g6=s=>{kT(f6,s)};var Ew=(function(){var s="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb",e="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(t)?e:s,r,a=WebAssembly.instantiate(o(i),{}).then(function(f){r=f.instance,r.exports.__wasm_call_ctors()});function o(f){for(var _=new Uint8Array(f.length),E=0;E<f.length;++E){var y=f.charCodeAt(E);_[E]=y>96?y-97:y>64?y-39:y+4}for(var b=0,E=0;E<f.length;++E)_[b++]=_[E]<60?n[_[E]]:(_[E]-60)*64+_[++E];return _.buffer.slice(0,b)}function l(f,_,E,y,b,x){var I=r.exports.sbrk,w=E+3&-4,v=I(w*y),C=I(b.length),S=new Uint8Array(r.exports.memory.buffer);S.set(b,C);var T=f(v,E,y,C,b.length);if(T==0&&x&&x(v,w,y),_.set(S.subarray(v,v+E*y)),I(v-I(0)),T!=0)throw new Error("Malformed buffer data: "+T)}var c={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},u=[],d=0;function A(f){var _={object:new Worker(f),pending:0,requests:{}};return _.object.onmessage=function(E){var y=E.data;_.pending-=y.count,_.requests[y.id][y.action](y.value),delete _.requests[y.id]},_}function p(f){for(var _="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o(i))+"]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;"+l.toString()+m.toString(),E=new Blob([_],{type:"text/javascript"}),y=URL.createObjectURL(E),b=0;b<f;++b)u[b]=A(y);URL.revokeObjectURL(y)}function g(f,_,E,y,b){for(var x=u[0],I=1;I<u.length;++I)u[I].pending<x.pending&&(x=u[I]);return new Promise(function(w,v){var C=new Uint8Array(E),S=d++;x.pending+=f,x.requests[S]={resolve:w,reject:v},x.object.postMessage({id:S,count:f,size:_,source:C,mode:y,filter:b},[C.buffer])})}function m(f){a.then(function(){var _=f.data;try{var E=new Uint8Array(_.count*_.size);l(r.exports[_.mode],E,_.count,_.size,_.source,r.exports[_.filter]),self.postMessage({id:_.id,count:_.count,action:"resolve",value:E},[E.buffer])}catch(y){self.postMessage({id:_.id,count:_.count,action:"reject",value:y})}})}return{ready:a,supported:!0,useWorkers:function(f){p(f)},decodeVertexBuffer:function(f,_,E,y,b){l(r.exports.meshopt_decodeVertexBuffer,f,_,E,y,r.exports[c[b]])},decodeIndexBuffer:function(f,_,E,y){l(r.exports.meshopt_decodeIndexBuffer,f,_,E,y)},decodeIndexSequence:function(f,_,E,y){l(r.exports.meshopt_decodeIndexSequence,f,_,E,y)},decodeGltfBuffer:function(f,_,E,y,b,x){l(r.exports[h[b]],f,_,E,y,r.exports[c[x]])},decodeGltfBufferAsync:function(f,_,E,y,b){return u.length>0?g(f,_,E,h[y],c[b]):a.then(function(){var x=new Uint8Array(f*_);return l(r.exports[h[y]],x,f,_,E,r.exports[c[b]]),x})}}})();/* @license
|
|
16673
16673
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16674
16674
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16675
16675
|
* you may not use this file except in compliance with the License.
|
|
@@ -16682,7 +16682,7 @@ canvas {
|
|
|
16682
16682
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16683
16683
|
* See the License for the specific language governing permissions and
|
|
16684
16684
|
* limitations under the License.
|
|
16685
|
-
*/var yw,_w;const Ds=Symbol("retainerCount"),Lr=Symbol("recentlyUsed"),dp=Symbol("evict"),vu=Symbol("evictionThreshold"),NE=Symbol("cache");class
|
|
16685
|
+
*/var yw,_w;const Ds=Symbol("retainerCount"),Lr=Symbol("recentlyUsed"),dp=Symbol("evict"),vu=Symbol("evictionThreshold"),NE=Symbol("cache");class m6{constructor(e,t=5){this[yw]=new Map,this[_w]=[],this[NE]=e,this[vu]=t}set evictionThreshold(e){this[vu]=e,this[dp]()}get evictionThreshold(){return this[vu]}get cache(){return this[NE]}retainerCount(e){return this[Ds].get(e)||0}reset(){this[Ds].clear(),this[Lr]=[]}retain(e){this[Ds].has(e)||this[Ds].set(e,0),this[Ds].set(e,this[Ds].get(e)+1);const t=this[Lr].indexOf(e);t!==-1&&this[Lr].splice(t,1),this[Lr].unshift(e),this[dp]()}release(e){this[Ds].has(e)&&this[Ds].set(e,Math.max(this[Ds].get(e)-1,0)),this[dp]()}[(yw=Ds,_w=Lr,dp)](){if(!(this[Lr].length<this[vu]))for(let e=this[Lr].length-1;e>=this[vu];--e){const t=this[Lr][e];this[Ds].get(t)===0&&(this[NE].delete(t),this[Lr].splice(e,1))}}}/* @license
|
|
16686
16686
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
16687
16687
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16688
16688
|
* you may not use this file except in compliance with the License.
|
|
@@ -16695,7 +16695,7 @@ canvas {
|
|
|
16695
16695
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16696
16696
|
* See the License for the specific language governing permissions and
|
|
16697
16697
|
* limitations under the License.
|
|
16698
|
-
*/const
|
|
16698
|
+
*/const E6=s=>{const e=[],t=new Set;for(const n of s){let i=n,r=0;for(;t.has(i);)i=n+"."+ ++r;t.add(i),e.push(i)}return e},y6=s=>{const e=new Map;for(const t of s.mappings)for(const n of t.variants)e.set(n,{material:null,gltfMaterialIndex:t.material});return e};class _6{constructor(e){this.parser=e,this.name="KHR_materials_variants"}afterRoot(e){const t=this.parser,n=t.json;if(n.extensions===void 0||n.extensions[this.name]===void 0)return null;const r=n.extensions[this.name].variants||[],a=E6(r.map(o=>o.name));for(const o of e.scenes)o.traverse(l=>{const c=l;if(!c.material)return;const h=t.associations.get(c);if(h==null||h.meshes==null||h.primitives==null)return;const p=n.meshes[h.meshes].primitives[h.primitives].extensions;!p||!p[this.name]||(c.userData.variantMaterials=y6(p[this.name]))});return e.userData.variants=a,Promise.resolve()}}/* @license
|
|
16699
16699
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16700
16700
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16701
16701
|
* you may not use this file except in compliance with the License.
|
|
@@ -16708,7 +16708,7 @@ canvas {
|
|
|
16708
16708
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16709
16709
|
* See the License for the specific language governing permissions and
|
|
16710
16710
|
* limitations under the License.
|
|
16711
|
-
*/var YR,bw;tn.DEFAULT_ANISOTROPY=4;const
|
|
16711
|
+
*/var YR,bw;tn.DEFAULT_ANISOTROPY=4;const b6=(s,e,t=()=>{})=>{const n=i=>{const r=i.loaded/i.total;t(Math.max(0,Math.min(1,isFinite(r)?r:1)))};return new Promise((i,r)=>{e.load(s,i,n,r)})},v6=s=>new Promise((e,t)=>{const n=document.createElement("script");document.body.appendChild(n),n.onload=e,n.onerror=t,n.async=!0,n.src=s}),Nr=new Map,PE=new Map;let vw;const Iw=new a1;let Cw;const FE=new Es;let kE,UE;const zo=Symbol("loader"),za=Symbol("evictionPolicy"),xw=Symbol("GLTFInstance");class wi extends Ws{static setDRACODecoderLocation(e){vw=e,Iw.setDecoderPath(e)}static getDRACODecoderLocation(){return vw}static setKTX2TranscoderLocation(e){Cw=e,FE.setTranscoderPath(e)}static getKTX2TranscoderLocation(){return Cw}static setMeshoptDecoderLocation(e){kE!==e&&(kE=e,UE=v6(e).then(()=>Ew.ready).then(()=>Ew))}static getMeshoptDecoderLocation(){return kE}static initializeKTX2Loader(e){FE.detectSupport(e)}static get cache(){return Nr}static clearCache(){Nr.forEach((e,t)=>{this.delete(t)}),this[za].reset()}static has(e){return Nr.has(e)}static async delete(e){if(!this.has(e))return;const t=Nr.get(e);PE.delete(e),Nr.delete(e),(await t).dispose()}static hasFinishedLoading(e){return!!PE.get(e)}constructor(e){super(),this[bw]=new o1().register(t=>new _6(t)),this[xw]=e,this[zo].setDRACOLoader(Iw),this[zo].setKTX2Loader(FE)}get[(YR=za,bw=zo,za)](){return this.constructor[za]}async preload(e,t,n=()=>{}){if(this[zo].setWithCredentials(t.withCredentials),this.dispatchEvent({type:"preload",element:t,src:e}),!Nr.has(e)){UE!=null&&this[zo].setMeshoptDecoder(await UE);const i=b6(e,this[zo],o=>{n(o*.8)}),r=this[xw],a=i.then(o=>r.prepare(o)).then(o=>(n(.9),new r(o))).catch((o=>(console.error(o),new r)));Nr.set(e,a)}await Nr.get(e),PE.set(e,!0),n&&n(1)}async load(e,t,n=()=>{}){await this.preload(e,t,n);const r=await(await Nr.get(e)).clone();return this[za].retain(e),r.dispose=()=>{this[za].release(e)},r}}wi[YR]=new m6(wi);/* @license
|
|
16712
16712
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
16713
16713
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16714
16714
|
* you may not use this file except in compliance with the License.
|
|
@@ -16721,7 +16721,7 @@ canvas {
|
|
|
16721
16721
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16722
16722
|
* See the License for the specific language governing permissions and
|
|
16723
16723
|
* limitations under the License.
|
|
16724
|
-
*/const ww=s=>s.material!==void 0&&s.userData&&s.userData.variantMaterials&&!!Array.from(s.userData.variantMaterials.values()).filter(e=>of(e.material)),of=s=>s&&s.isMaterial&&!Array.isArray(s);class
|
|
16724
|
+
*/const ww=s=>s.material!==void 0&&s.userData&&s.userData.variantMaterials&&!!Array.from(s.userData.variantMaterials.values()).filter(e=>of(e.material)),of=s=>s&&s.isMaterial&&!Array.isArray(s);class I6{constructor(e){this.writer=e,this.name="KHR_materials_variants",this.variantNames=[]}beforeParse(e){const t=new Set,n=i=>{if(!ww(i))return;const r=i.userData.variantMaterials,a=i.userData.variantData;for(const[o,l]of a){const c=r.get(l.index);c&&of(c.material)&&t.add(o)}};if(Array.isArray(e))for(const i of e)i.traverse(n);else e.traverse(n);t.forEach(i=>this.variantNames.push(i))}async writeMesh(e,t){if(!ww(e))return;const n=e.userData,i=n.variantMaterials,r=n.variantData,a=new Map,o=new Map,l=Array.from(r.values()).sort((u,d)=>u.index-d.index);for(const[u,d]of l.entries())o.set(d.index,u);for(const u of r.values()){const d=i.get(u.index);if(!d||!of(d.material))continue;const A=await this.writer.processMaterialAsync(d.material);a.has(A)||a.set(A,{material:A,variants:[]}),a.get(A).variants.push(o.get(u.index))}const c=Array.from(a.values()).map((u=>u.variants.sort((d,A)=>d-A)&&u)).sort((u,d)=>u.material-d.material);if(c.length===0)return;const h=of(n.originalMaterial)?await this.writer.processMaterialAsync(n.originalMaterial):-1;for(const u of t.primitives)h>=0&&(u.material=h),u.extensions=u.extensions||{},u.extensions[this.name]={mappings:c}}afterParse(){if(this.variantNames.length===0)return;const e=this.writer.json;e.extensions=e.extensions||{};const t=this.variantNames.map(n=>({name:n}));e.extensions[this.name]={variants:t},this.writer.extensionsUsed[this.name]=!0}}/* @license
|
|
16725
16725
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
16726
16726
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16727
16727
|
* you may not use this file except in compliance with the License.
|
|
@@ -16734,7 +16734,7 @@ canvas {
|
|
|
16734
16734
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16735
16735
|
* See the License for the specific language governing permissions and
|
|
16736
16736
|
* limitations under the License.
|
|
16737
|
-
*/const qR=1e4,
|
|
16737
|
+
*/const qR=1e4,C6=.001,WR=50;class Bi{constructor(e=WR){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(e)}setDecayTime(e){this.naturalFrequency=1/Math.max(C6,e)}update(e,t,n,i){const r=2e-4*this.naturalFrequency;if(e==null||i===0||e===t&&this.velocity===0)return t;if(n<0)return e;const a=e-t,o=this.velocity+this.naturalFrequency*a,l=a+n*o,c=Math.exp(-this.naturalFrequency*n),h=(o-this.naturalFrequency*l)*c,u=-this.naturalFrequency*(h+o*c);return Math.abs(h)<r*Math.abs(i)&&u*a>=0?(this.velocity=0,t):(this.velocity=h,t+l*c)}}/* @license
|
|
16738
16738
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
16739
16739
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16740
16740
|
* you may not use this file except in compliance with the License.
|
|
@@ -16747,7 +16747,7 @@ canvas {
|
|
|
16747
16747
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16748
16748
|
* See the License for the specific language governing permissions and
|
|
16749
16749
|
* limitations under the License.
|
|
16750
|
-
*/const rr=.2,Sw=.03,
|
|
16750
|
+
*/const rr=.2,Sw=.03,x6=.75,jR=12,w6=Math.PI/(2*jR),Bw=new Ie,Ap=(s,e,t)=>{let n=e>0?t>0?0:-Math.PI/2:t>0?Math.PI/2:Math.PI;for(let i=0;i<=jR;++i)s.push(e+(rr-Sw)*Math.cos(n),t+(rr-Sw)*Math.sin(n),0,e+rr*Math.cos(n),t+rr*Math.sin(n),0),n+=w6};class Tw extends je{constructor(e,t){const n=new bn,i=[],r=[],{size:a,boundingBox:o}=e,l=a.x/2,c=(t==="back"?a.y:a.z)/2;Ap(r,l,c),Ap(r,-l,c),Ap(r,-l,-c),Ap(r,l,-c);const h=r.length/3;for(let A=0;A<h-2;A+=2)i.push(A,A+1,A+3,A,A+3,A+2);const u=h-2;i.push(u,u+1,1,u,1,0),n.setAttribute("position",new An(r,3)),n.setIndex(i),super(n),this.side=t;const d=this.material;switch(d.side=Ln,d.transparent=!0,d.opacity=0,this.goalOpacity=0,this.opacityDamper=new Bi,this.hitPlane=new je(new js(2*(l+rr),2*(c+rr))),this.hitPlane.visible=!1,this.hitPlane.material.side=Ln,this.add(this.hitPlane),this.hitBox=new je(new xs(a.x+2*rr,a.y+rr,a.z+2*rr)),this.hitBox.visible=!1,this.hitBox.material.side=Ln,this.add(this.hitBox),o.getCenter(this.position),t){case"bottom":this.rotateX(-Math.PI/2),this.shadowHeight=o.min.y,this.position.y=this.shadowHeight;break;case"back":this.shadowHeight=o.min.z,this.position.z=this.shadowHeight}e.target.add(this),this.hitBox.position.y=(a.y+rr)/2+o.min.y,e.target.add(this.hitBox),this.offsetHeight=0}getHit(e,t,n){Bw.set(t,-n),this.hitPlane.visible=!0;const i=e.positionAndNormalFromPoint(Bw,this.hitPlane);return this.hitPlane.visible=!1,i==null?null:i.position}getExpandedHit(e,t,n){this.hitPlane.scale.set(1e3,1e3,1e3),this.hitPlane.updateMatrixWorld();const i=this.getHit(e,t,n);return this.hitPlane.scale.set(1,1,1),i}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?x6:0}updateOpacity(e){const t=this.material;t.opacity=this.opacityDamper.update(t.opacity,this.goalOpacity,e,1),this.visible=t.opacity>0}dispose(){const{geometry:e,material:t}=this.hitPlane;e.dispose(),t.dispose(),this.hitBox.geometry.dispose(),this.hitBox.material.dispose(),this.geometry.dispose(),this.material.dispose(),this.hitBox.removeFromParent(),this.removeFromParent()}}/* @license
|
|
16751
16751
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16752
16752
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16753
16753
|
* you may not use this file except in compliance with the License.
|
|
@@ -16760,7 +16760,7 @@ canvas {
|
|
|
16760
16760
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16761
16761
|
* See the License for the specific language governing permissions and
|
|
16762
16762
|
* limitations under the License.
|
|
16763
|
-
*/const pi=(s,e)=>({type:"number",number:s,unit:e}),ua=(()=>{const s={};return t=>{const n=t;if(n in s)return s[n];const i=[];let r=0;for(;t;){if(++r>1e3){t="";break}const a=XR(t),o=a.nodes[0];if(o==null||o.terms.length===0)break;i.push(o),t=a.remainingInput}return s[n]=i}})(),XR=(()=>{const s=/^(\-\-|[a-z\u0240-\uffff])/i,e=/^([\*\+\/]|[\-]\s)/i,t=/^[\),]/;return r=>{const a=[];for(;r.length&&(r=r.trim(),!t.test(r));)if(r[0]==="("){const{nodes:o,remainingInput:l}=Mw(r);r=l,a.push({type:"function",name:{type:"ident",value:"calc"},arguments:o})}else if(s.test(r)){const o=
|
|
16763
|
+
*/const pi=(s,e)=>({type:"number",number:s,unit:e}),ua=(()=>{const s={};return t=>{const n=t;if(n in s)return s[n];const i=[];let r=0;for(;t;){if(++r>1e3){t="";break}const a=XR(t),o=a.nodes[0];if(o==null||o.terms.length===0)break;i.push(o),t=a.remainingInput}return s[n]=i}})(),XR=(()=>{const s=/^(\-\-|[a-z\u0240-\uffff])/i,e=/^([\*\+\/]|[\-]\s)/i,t=/^[\),]/;return r=>{const a=[];for(;r.length&&(r=r.trim(),!t.test(r));)if(r[0]==="("){const{nodes:o,remainingInput:l}=Mw(r);r=l,a.push({type:"function",name:{type:"ident",value:"calc"},arguments:o})}else if(s.test(r)){const o=S6(r),l=o.nodes[0];if(r=o.remainingInput,r[0]==="("){const{nodes:c,remainingInput:h}=Mw(r);a.push({type:"function",name:l,arguments:c}),r=h}else a.push(l)}else if(e.test(r))a.push({type:"operator",value:r[0]}),r=r.slice(1);else{const{nodes:o,remainingInput:l}=r[0]==="#"?T6(r):B6(r);if(o.length===0)break;a.push(o[0]),r=l}return{nodes:[{type:"expression",terms:a}],remainingInput:r}}})(),S6=(()=>{const s=/[^a-z0-9_\-\u0240-\uffff]/i;return e=>{const t=e.match(s),n=t==null?e:e.substr(0,t.index),i=t==null?"":e.substr(t.index);return{nodes:[{type:"ident",value:n}],remainingInput:i}}})(),B6=(()=>{const s=/[\+\-]?(\d+[\.]\d+|\d+|[\.]\d+)([eE][\+\-]?\d+)?/,e=/^[a-z%]+/i,t=/^(m|mm|cm|rad|deg|[%])$/;return n=>{const i=n.match(s),r=i==null?"0":i[0];n=r==null?n:n.slice(r.length);const a=n.match(e);let o=a!=null&&a[0]!==""?a[0]:null;const l=a==null?n:n.slice(o.length);return o!=null&&!t.test(o)&&(o=null),{nodes:[{type:"number",number:parseFloat(r)||0,unit:o}],remainingInput:l}}})(),T6=(()=>{const s=/^[a-f0-9]*/i;return e=>{e=e.slice(1).trim();const t=e.match(s);return{nodes:t==null?[]:[{type:"hex",value:t[0]}],remainingInput:t==null?e:e.slice(t[0].length)}}})(),Mw=s=>{const e=[];for(s=s.slice(1).trim();s.length;){const t=XR(s);if(e.push(t.nodes[0]),s=t.remainingInput.trim(),s[0]===",")s=s.slice(1).trim();else if(s[0]===")"){s=s.slice(1);break}}return{nodes:e,remainingInput:s}},Rw=Symbol("visitedTypes");class M6{constructor(e){this[Rw]=e}walk(e,t){const n=e.slice();for(;n.length;){const i=n.shift();switch(this[Rw].indexOf(i.type)>-1&&t(i),i.type){case"expression":n.unshift(...i.terms);break;case"function":n.unshift(i.name,...i.arguments);break}}}}const po=Object.freeze({type:"number",number:0,unit:null});/* @license
|
|
16764
16764
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16765
16765
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16766
16766
|
* you may not use this file except in compliance with the License.
|
|
@@ -16786,7 +16786,7 @@ canvas {
|
|
|
16786
16786
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16787
16787
|
* See the License for the specific language governing permissions and
|
|
16788
16788
|
* limitations under the License.
|
|
16789
|
-
*/var JR,Qw,Lw;const Vh=Symbol("evaluate"),lf=Symbol("lastValue");class hn{constructor(){this[JR]=null}static evaluatableFor(e,t=po){if(e instanceof hn)return e;if(e.type==="number")return e.unit==="%"?new
|
|
16789
|
+
*/var JR,Qw,Lw;const Vh=Symbol("evaluate"),lf=Symbol("lastValue");class hn{constructor(){this[JR]=null}static evaluatableFor(e,t=po){if(e instanceof hn)return e;if(e.type==="number")return e.unit==="%"?new R6(e,t):e;switch(e.name.value){case"calc":return new L6(e,t);case"env":return new D6(e)}return po}static evaluate(e){return e instanceof hn?e.evaluate():e}static isConstant(e){return e instanceof hn?e.isConstant:!0}static applyIntrinsics(e,t){const{basis:n,keywords:i}=t,{auto:r}=i;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 h=c.value;h in i&&(c=i[h][o])}return(c==null||c.type==="ident")&&(c=l),c.unit==="%"?pi(c.number/100*a.number,a.unit):(c=lr(c,a),c.unit!==a.unit?a:c)})}get isConstant(){return!1}evaluate(){return(!this.isConstant||this[lf]==null)&&(this[lf]=this[Vh]()),this[lf]}}JR=lf;const Nw=Symbol("percentage"),OE=Symbol("basis");class R6 extends hn{constructor(e,t){super(),this[Nw]=e,this[OE]=t}get isConstant(){return!0}[Vh](){return pi(this[Nw].number/100*this[OE].number,this[OE].unit)}}const pp=Symbol("identNode");class D6 extends hn{constructor(e){super(),this[Qw]=null;const t=e.arguments.length?e.arguments[0].terms[0]:null;t!=null&&t.type==="ident"&&(this[pp]=t)}get isConstant(){return!1}[(Qw=pp,Vh)](){if(this[pp]!=null)switch(this[pp].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 po}}const Q6=/[\*\/]/,dc=Symbol("evaluator");class L6 extends hn{constructor(e,t=po){if(super(),this[Lw]=null,e.arguments.length!==1)return;const n=e.arguments[0].terms.slice(),i=[];for(;n.length;){const r=n.shift();if(i.length>0){const a=i[i.length-1];if(a.type==="operator"&&Q6.test(a.value)){const o=i.pop(),l=i.pop();if(l==null)return;i.push(new Fw(o,hn.evaluatableFor(l,t),hn.evaluatableFor(r,t)));continue}}i.push(r.type==="operator"?r:hn.evaluatableFor(r,t))}for(;i.length>2;){const[r,a,o]=i.splice(0,3);if(a.type!=="operator")return;i.unshift(new Fw(a,hn.evaluatableFor(r,t),hn.evaluatableFor(o,t)))}i.length===1&&(this[dc]=i[0])}get isConstant(){return this[dc]==null||hn.isConstant(this[dc])}[(Lw=dc,Vh)](){return this[dc]!=null?hn.evaluate(this[dc]):po}}const Pw=Symbol("operator"),GE=Symbol("left"),zE=Symbol("right");class Fw extends hn{constructor(e,t,n){super(),this[Pw]=e,this[GE]=t,this[zE]=n}get isConstant(){return hn.isConstant(this[GE])&&hn.isConstant(this[zE])}[Vh](){const e=lr(hn.evaluate(this[GE])),t=lr(hn.evaluate(this[zE])),{number:n,unit:i}=e,{number:r,unit:a}=t;if(a!=null&&i!=null&&a!=i)return po;const o=i||a;let l;switch(this[Pw].value){case"+":l=n+r;break;case"-":l=n-r;break;case"/":l=n/r;break;case"*":l=n*r;break;default:return po}return{type:"number",number:l,unit:o}}}const HE=Symbol("evaluatables"),kw=Symbol("intrinsics");class KR extends hn{constructor(e,t){super(),this[kw]=t;const n=e[0],i=n!=null?n.terms:[];this[HE]=t.basis.map((r,a)=>{const o=i[a];return o==null?{type:"ident",value:"auto"}:o.type==="ident"?o:hn.evaluatableFor(o,r)})}get isConstant(){for(const e of this[HE])if(!hn.isConstant(e))return!1;return!0}[Vh](){const e=this[HE].map(t=>hn.evaluate(t));return hn.applyIntrinsics(e,this[kw]).map(t=>t.number)}}/* @license
|
|
16790
16790
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16791
16791
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16792
16792
|
* you may not use this file except in compliance with the License.
|
|
@@ -16799,7 +16799,7 @@ canvas {
|
|
|
16799
16799
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16800
16800
|
* See the License for the specific language governing permissions and
|
|
16801
16801
|
* limitations under the License.
|
|
16802
|
-
*/var ZR,e2,t2,n2;const Ac=Symbol("instances"),Uw=Symbol("activateListener"),Ow=Symbol("deactivateListener"),$E=Symbol("notifyInstances"),Gw=Symbol("notify"),zw=Symbol("callback");class ir{static[$E](){for(const e of ir[Ac])e[Gw]()}static[(ZR=Ac,Uw)](){window.addEventListener("scroll",this[$E],{passive:!0})}static[Ow](){window.removeEventListener("scroll",this[$E])}constructor(e){this[zw]=e}observe(){ir[Ac].size===0&&ir[Uw](),ir[Ac].add(this)}disconnect(){ir[Ac].delete(this),ir[Ac].size===0&&ir[Ow]()}[Gw](){this[zw]()}}ir[ZR]=new Set;const Hw=Symbol("computeStyleCallback"),i2=Symbol("astWalker"),Xu=Symbol("dependencies"),s2=Symbol("onScroll");class
|
|
16802
|
+
*/var ZR,e2,t2,n2;const Ac=Symbol("instances"),Uw=Symbol("activateListener"),Ow=Symbol("deactivateListener"),$E=Symbol("notifyInstances"),Gw=Symbol("notify"),zw=Symbol("callback");class ir{static[$E](){for(const e of ir[Ac])e[Gw]()}static[(ZR=Ac,Uw)](){window.addEventListener("scroll",this[$E],{passive:!0})}static[Ow](){window.removeEventListener("scroll",this[$E])}constructor(e){this[zw]=e}observe(){ir[Ac].size===0&&ir[Uw](),ir[Ac].add(this)}disconnect(){ir[Ac].delete(this),ir[Ac].size===0&&ir[Ow]()}[Gw](){this[zw]()}}ir[ZR]=new Set;const Hw=Symbol("computeStyleCallback"),i2=Symbol("astWalker"),Xu=Symbol("dependencies"),s2=Symbol("onScroll");class N6{constructor(e){this[e2]={},this[t2]=new M6(["function"]),this[n2]=()=>{this[Hw]({relatedState:"window-scroll"})},this[Hw]=e}observeEffectsFor(e){const t={},n=this[Xu];this[i2].walk(e,i=>{const{name:r}=i,o=i.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 ir(this[s2]);l.observe(),delete n["window-scroll"],t["window-scroll"]=l}break}});for(const i in n)n[i].disconnect();this[Xu]=t}dispose(){for(const e in this[Xu])this[Xu][e].disconnect()}}e2=Xu,t2=i2,n2=s2;/* @license
|
|
16803
16803
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16804
16804
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16805
16805
|
* you may not use this file except in compliance with the License.
|
|
@@ -16812,7 +16812,7 @@ canvas {
|
|
|
16812
16812
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16813
16813
|
* See the License for the specific language governing permissions and
|
|
16814
16814
|
* limitations under the License.
|
|
16815
|
-
*/const Oa=s=>{const e=s.observeEffects||!1,t=s.intrinsics instanceof Function?s.intrinsics:(()=>s.intrinsics);return(n,i)=>{const r=n.updated,a=n.connectedCallback,o=n.disconnectedCallback,l=Symbol(`${i}StyleEffector`),c=Symbol(`${i}StyleEvaluator`),h=Symbol(`${i}UpdateEvaluator`),u=Symbol(`${i}EvaluateAndSync`);Object.defineProperties(n,{[l]:{value:null,writable:!0},[c]:{value:null,writable:!0},[h]:{value:function(){const d=ua(this[i]);this[c]=new KR(d,t(this)),this[l]==null&&e&&(this[l]=new
|
|
16815
|
+
*/const Oa=s=>{const e=s.observeEffects||!1,t=s.intrinsics instanceof Function?s.intrinsics:(()=>s.intrinsics);return(n,i)=>{const r=n.updated,a=n.connectedCallback,o=n.disconnectedCallback,l=Symbol(`${i}StyleEffector`),c=Symbol(`${i}StyleEvaluator`),h=Symbol(`${i}UpdateEvaluator`),u=Symbol(`${i}EvaluateAndSync`);Object.defineProperties(n,{[l]:{value:null,writable:!0},[c]:{value:null,writable:!0},[h]:{value:function(){const d=ua(this[i]);this[c]=new KR(d,t(this)),this[l]==null&&e&&(this[l]=new N6(()=>this[u]())),this[l]!=null&&this[l].observeEffectsFor(d)}},[u]:{value:function(){if(this[c]==null)return;const d=this[c].evaluate();this[s.updateHandler](d)}},updated:{value:function(d){d.has(i)&&(this[h](),this[u]()),r.call(this,d)}},connectedCallback:{value:function(){a.call(this),this.requestUpdate(i,this[i])}},disconnectedCallback:{value:function(){o.call(this),this[l]!=null&&(this[l].dispose(),this[l]=null)}}})}};/* @license
|
|
16816
16816
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16817
16817
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16818
16818
|
* you may not use this file except in compliance with the License.
|
|
@@ -16825,7 +16825,7 @@ canvas {
|
|
|
16825
16825
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16826
16826
|
* See the License for the specific language governing permissions and
|
|
16827
16827
|
* limitations under the License.
|
|
16828
|
-
*/const r2=s=>s<.5?2*s*s:-1+(4-2*s)*s,
|
|
16828
|
+
*/const r2=s=>s<.5?2*s*s:-1+(4-2*s)*s,P6=(s,e,t=r2)=>n=>s+(e-s)*t(n),F6=(s,e)=>{const t=(i=>r=>i+=r),n=e.map(t(0));return i=>{i=or(i,0,1),i*=n[n.length-1];const r=n.findIndex(l=>l>=i),a=r<1?0:n[r-1],o=n[r];return s[r]((i-a)/(o-a))}},kc=s=>{const e=[],t=[];let n=s.initialValue;for(let i=0;i<s.keyframes.length;++i){const r=s.keyframes[i],{value:a,frames:o}=r,l=r.ease||r2,c=P6(n,a,l);e.push(c),t.push(o),n=a}return F6(e,t)};/* @license
|
|
16829
16829
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16830
16830
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16831
16831
|
* you may not use this file except in compliance with the License.
|
|
@@ -16838,7 +16838,7 @@ canvas {
|
|
|
16838
16838
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16839
16839
|
* See the License for the specific language governing permissions and
|
|
16840
16840
|
* limitations under the License.
|
|
16841
|
-
*/var Qn=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const F6=5e3,k6=kc({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}]}),U6=kc({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),O6=30,G6=12,a2="0deg 75deg 105%",z6="auto auto auto",H6="auto",$6=2.2,V6=["front","right","back","left"],Y6=["upper-","","lower-"],q6=3e3,W6=". Use mouse, touch or arrow keys to move.",fp={AUTO:"auto"},VE={BASIC:"basic",WIGGLE:"wiggle"},j6={NONE:"none"},$w=()=>({basis:[Pg(pi(O6,"deg"))],keywords:{auto:[null]}}),X6=()=>({basis:[Pg(pi(G6,"deg"))],keywords:{auto:[null]}}),o2=(()=>{const s=ua(a2)[0].terms,e=lr(s[0]),t=lr(s[1]);return n=>{const i=n[fe].idealCameraDistance();return{basis:[e,t,pi(i,"m")],keywords:{auto:[null,null,pi(105,"%")]}}}})(),J6=s=>{const e=$6*s[fe].boundingSphere.radius;return{basis:[pi(-1/0,"rad"),pi(0,"rad"),pi(e,"m")],keywords:{auto:[null,null,null]}}},K6=s=>{const e=o2(s),n=new KR([],e).evaluate()[2];return{basis:[pi(1/0,"rad"),pi(Math.PI,"rad"),pi(n,"m")],keywords:{auto:[null,null,null]}}},Z6=s=>{const e=s[fe].boundingBox.getCenter(new Q);return{basis:[pi(e.x,"m"),pi(e.y,"m"),pi(e.z,"m")],keywords:{auto:[null,null,null]}}},l2=Math.PI/2,e9=Math.PI/3,t9=l2/2,n9=2*Math.PI,Ht=Symbol("controls"),cf=Symbol("panElement"),YE=Symbol("promptElement"),gp=Symbol("promptAnimatedContainer"),qE=Symbol("fingerAnimatedContainers"),mp=Symbol("deferInteractionPrompt"),Vw=Symbol("updateAria"),Pr=Symbol("a11y"),Yw=Symbol("updateA11y"),qw=Symbol("updateCameraForRadius"),pc=Symbol("cancelPrompts"),WE=Symbol("onChange"),Iu=Symbol("onPointerChange"),No=Symbol("waitingToPromptUser"),Ep=Symbol("userHasInteracted"),fc=Symbol("promptElementVisibleTime"),Cu=Symbol("lastPromptOffset"),yp=Symbol("cancellationSource"),jE=Symbol("lastSpherical"),xu=Symbol("jumpCamera"),XE=Symbol("initialized"),wu=Symbol("maintainThetaPhi"),Ww=Symbol("syncCameraOrbit"),jw=Symbol("syncFieldOfView"),Xw=Symbol("syncCameraTarget"),Jw=Symbol("syncMinCameraOrbit"),Kw=Symbol("syncMaxCameraOrbit"),Zw=Symbol("syncMinFieldOfView"),eS=Symbol("syncMaxFieldOfView"),i9=s=>{var e,t,n,i,r,a,o,l,c,h,u,d,A,p,g,m,f,_;class E extends s{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=a2,this.cameraTarget=z6,this.fieldOfView=H6,this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=q6,this.interactionPrompt=fp.AUTO,this.interactionPromptStyle=VE.WIGGLE,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=j6.NONE,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=WR,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[i]=this.shadowRoot.querySelector(".pan-target"),this[r]=0,this[a]=1/0,this[o]=!1,this[l]=!1,this[c]=mn.AUTOMATIC,this[h]=new o9(this[fe].camera,this[Us],this[fe]),this[u]=new Vc,this[d]=!1,this[A]=!1,this[p]=!1,this[g]={},this[m]=()=>{const b=this[Ht].changeSource;this[yp]=b,b===mn.USER_INTERACTION&&(this[Ep]=!0,this[mp]())},this[f]=()=>{this[Vw](),this[Xn]();const b=this[Ht].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:b}}))},this[_]=b=>{this[df].classList.toggle("pointer-tumbling",b.type==="pointer-change-start")}}get inputSensitivity(){return this[Ht].inputSensitivity}set inputSensitivity(b){this[Ht].inputSensitivity=b}getCameraOrbit(){const{theta:b,phi:x,radius:I}=this[jE];return{theta:b,phi:x,radius:I,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return Xa(this[Vt].isPresenting?this[Vt].arRenderer.target:this[fe].getDynamicTarget())}getFieldOfView(){return this[Ht].getFieldOfView()}getMinimumFieldOfView(){return this[Ht].options.minimumFieldOfView}getMaximumFieldOfView(){return this[Ht].options.maximumFieldOfView}getIdealAspect(){return this[fe].idealAspect}jumpCameraToGoal(){this[xu]=!0,this.requestUpdate(xu,!1)}resetInteractionPrompt(){this[Cu]=0,this[fc]=1/0,this[Ep]=!1,this[No]=this.interactionPrompt===fp.AUTO&&this.cameraControls}zoom(b){const x=new WheelEvent("wheel",{deltaY:-30*b});this[Us].dispatchEvent(x)}connectedCallback(){super.connectedCallback(),this[Ht].addEventListener("user-interaction",this[pc]),this[Ht].addEventListener("pointer-change-start",this[Iu]),this[Ht].addEventListener("pointer-change-end",this[Iu])}disconnectedCallback(){super.disconnectedCallback(),this[Ht].removeEventListener("user-interaction",this[pc]),this[Ht].removeEventListener("pointer-change-start",this[Iu]),this[Ht].removeEventListener("pointer-change-end",this[Iu])}updated(b){super.updated(b);const x=this[Ht],I=this[fe];if(b.has("cameraControls")&&(this.cameraControls?(x.enableInteraction(),this.interactionPrompt===fp.AUTO&&(this[No]=!0)):(x.disableInteraction(),this[mp]()),this[Us].setAttribute("aria-label",this[Oc])),b.has("disableZoom")&&(x.disableZoom=this.disableZoom),b.has("disablePan")&&(x.enablePan=!this.disablePan),b.has("disableTap")&&(x.enableTap=!this.disableTap),(b.has("interactionPrompt")||b.has("cameraControls")||b.has("src"))&&(this.interactionPrompt===fp.AUTO&&this.cameraControls&&!this[Ep]?this[No]=!0:this[mp]()),b.has("interactionPromptStyle")&&(this[gp].style.opacity=this.interactionPromptStyle==VE.BASIC?"1":"0"),b.has("touchAction")){const w=this.touchAction;x.applyOptions({touchAction:w}),x.updateTouchActionStyle()}b.has("orbitSensitivity")&&(x.orbitSensitivity=this.orbitSensitivity),b.has("zoomSensitivity")&&(x.zoomSensitivity=this.zoomSensitivity),b.has("panSensitivity")&&(x.panSensitivity=this.panSensitivity),b.has("interpolationDecay")&&(x.setDamperDecayTime(this.interpolationDecay),I.setTargetDamperDecayTime(this.interpolationDecay)),b.has("a11y")&&this[Yw](),this[xu]===!0&&Promise.resolve().then(()=>{x.jumpToGoal(),I.jumpToGoal(),this[WE](),this[xu]=!1})}async updateFraming(){const b=this[fe],x=b.adjustedFoV(b.framedFoVDeg);await b.updateFraming();const I=b.adjustedFoV(b.framedFoVDeg),w=this[Ht].getFieldOfView()/x;this[Ht].setFieldOfView(I*w),this[wu]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(b,x,I){const w=this[Us],v=this[qE];if(v[0].style.opacity==="1"){console.warn("interact() failed because an existing interaction is running.");return}const C=new Array;C.push({x:kc(x.x),y:kc(x.y)});const S=[{x:C[0].x(0),y:C[0].y(0)}];I!=null&&(C.push({x:kc(I.x),y:kc(I.y)}),S.push({x:C[1].x(0),y:C[1].y(0)}));let T=performance.now();const{width:M,height:R}=this[fe],F=this.getBoundingClientRect(),N=z=>{for(const[te,ne]of S.entries()){const{style:ue}=v[te];ue.transform=`translateX(${M*ne.x}px) translateY(${R*ne.y}px)`,z==="pointerdown"?ue.opacity="1":z==="pointerup"&&(ue.opacity="0");const pe={pointerId:te-5678,pointerType:"touch",target:w,clientX:M*ne.x+F.x,clientY:R*ne.y+F.y,altKey:!0};w.dispatchEvent(new PointerEvent(z,pe))}},L=()=>{const z=this[yp];if(z!==mn.AUTOMATIC||!w.isConnected){for(const ne of this[qE])ne.style.opacity="0";N("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:z}})),document.removeEventListener("visibilitychange",P);return}const te=Math.min(1,(performance.now()-T)/b);for(const[ne,ue]of S.entries())ue.x=C[ne].x(te),ue.y=C[ne].y(te);N("pointermove"),te<1?requestAnimationFrame(L):(N("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:mn.AUTOMATIC}})),document.removeEventListener("visibilitychange",P))},P=()=>{let z=0;document.visibilityState==="hidden"?z=performance.now()-T:T=performance.now()-z};document.addEventListener("visibilitychange",P),N("pointerdown"),this[yp]=mn.AUTOMATIC,requestAnimationFrame(L)}[(e=YE,t=gp,n=qE,i=cf,r=Cu,a=fc,o=Ep,l=No,c=yp,h=Ht,u=jE,d=xu,A=XE,p=wu,g=Pr,jw)](b){const x=this[Ht],I=this[fe];I.framedFoVDeg=b[0]*180/Math.PI,x.changeSource=mn.NONE,x.setFieldOfView(I.adjustedFoV(I.framedFoVDeg)),this[pc]()}[Ww](b){const x=this[Ht];if(this[wu]){const{theta:I,phi:w}=this.getCameraOrbit();b[0]=I,b[1]=w,this[wu]=!1}x.changeSource=mn.NONE,x.setOrbit(b[0],b[1],b[2]),this[pc]()}[Jw](b){this[Ht].applyOptions({minimumAzimuthalAngle:b[0],minimumPolarAngle:b[1],minimumRadius:b[2]}),this.jumpCameraToGoal()}[Kw](b){this[Ht].applyOptions({maximumAzimuthalAngle:b[0],maximumPolarAngle:b[1],maximumRadius:b[2]}),this[qw](b[2]),this.jumpCameraToGoal()}[Zw](b){this[Ht].applyOptions({minimumFieldOfView:b[0]*180/Math.PI}),this.jumpCameraToGoal()}[eS](b){const x=this[fe].adjustedFoV(b[0]*180/Math.PI);this[Ht].applyOptions({maximumFieldOfView:x}),this.jumpCameraToGoal()}[Xw](b){const[x,I,w]=b;this[Vt].arRenderer.isPresenting||this[fe].setTarget(x,I,w),this[Ht].changeSource=mn.NONE,this[Vt].arRenderer.updateTarget(),this[pc]()}[mr](b,x){if(super[mr](b,x),this[Vt].isPresenting||!this[Sl]())return;const I=this[Ht],w=this[fe],v=performance.now();if(this[No]&&this.loaded&&v>this[Zu]+this.interactionPromptThreshold&&(this[No]=!1,this[fc]=v,this[YE].classList.add("visible")),isFinite(this[fc])&&this.interactionPromptStyle===VE.WIGGLE){const T=(v-this[fc])/F6%1,M=k6(T),R=U6(T);if(this[gp].style.opacity=`${R}`,M!==this[Cu]){const F=M*w.width*.05,N=(M-this[Cu])*Math.PI/16;this[gp].style.transform=`translateX(${F}px)`,I.changeSource=mn.AUTOMATIC,I.adjustOrbit(N,0,0),this[Cu]=M}}const C=I.update(b,x),S=w.updateTarget(x);(C||S)&&this[WE]()}[mp](){this[No]=!1,this[YE].classList.remove("visible"),this[fc]=1/0}[qw](b){const x=Math.max(this[fe].farRadius(),b),I=0,w=Math.abs(2*x);this[Ht].updateNearFar(I,w)}[Vw](){const{theta:b,phi:x}=this[Ht].getCameraSpherical(this[jE]),I=(4+Math.floor((b%n9+t9)/l2))%4,w=Math.floor(x/e9),v=V6[I],S=`${Y6[w]}${v}`,T=S;T in this[Pr]?this[tg](this[Pr][T]):this[tg](`View from stage ${S}`)}get[Oc](){let b=W6;return"interaction-prompt"in this[Pr]&&(b=`. ${this[Pr]["interaction-prompt"]}`),super[Oc].replace(/\.$/,"")+(this.cameraControls?b:"")}async[ng](b){const x=this[Ht],I=this[fe],w=I.adjustedFoV(I.framedFoVDeg);super[ng](b);const v=I.adjustedFoV(I.framedFoVDeg)/w,C=x.getFieldOfView()*(isFinite(v)?v:1);x.updateAspect(this[fe].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[Ht].setFieldOfView(C),this.jumpCameraToGoal()}[Er](){super[Er](),this[XE]?this[wu]=!0:this[XE]=!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=pc,f=WE,_=Iu,Yw)](){if(typeof this.a11y=="string")if(this.a11y.startsWith("{"))try{this[Pr]=JSON.parse(this.a11y)}catch(b){console.warn("Error parsing a11y JSON:",b)}else this.a11y.length>0?console.warn("Error not supported format, should be a JSON string:",this.a11y):this[Pr]={};else typeof this.a11y=="object"&&this.a11y!=null?this[Pr]=Object.assign({},this.a11y):this[Pr]={};this[Us].setAttribute("aria-label",this[Oc])}}return Qn([q({type:Boolean,attribute:"camera-controls"})],E.prototype,"cameraControls",void 0),Qn([Oa({intrinsics:o2,observeEffects:!0,updateHandler:Ww}),q({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],E.prototype,"cameraOrbit",void 0),Qn([Oa({intrinsics:Z6,observeEffects:!0,updateHandler:Xw}),q({type:String,attribute:"camera-target",hasChanged:()=>!0})],E.prototype,"cameraTarget",void 0),Qn([Oa({intrinsics:$w,observeEffects:!0,updateHandler:jw}),q({type:String,attribute:"field-of-view",hasChanged:()=>!0})],E.prototype,"fieldOfView",void 0),Qn([Oa({intrinsics:J6,updateHandler:Jw}),q({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],E.prototype,"minCameraOrbit",void 0),Qn([Oa({intrinsics:K6,updateHandler:Kw}),q({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],E.prototype,"maxCameraOrbit",void 0),Qn([Oa({intrinsics:X6,updateHandler:Zw}),q({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],E.prototype,"minFieldOfView",void 0),Qn([Oa({intrinsics:$w,updateHandler:eS}),q({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],E.prototype,"maxFieldOfView",void 0),Qn([q({type:Number,attribute:"interaction-prompt-threshold"})],E.prototype,"interactionPromptThreshold",void 0),Qn([q({type:String,attribute:"interaction-prompt"})],E.prototype,"interactionPrompt",void 0),Qn([q({type:String,attribute:"interaction-prompt-style"})],E.prototype,"interactionPromptStyle",void 0),Qn([q({type:Number,attribute:"orbit-sensitivity"})],E.prototype,"orbitSensitivity",void 0),Qn([q({type:Number,attribute:"zoom-sensitivity"})],E.prototype,"zoomSensitivity",void 0),Qn([q({type:Number,attribute:"pan-sensitivity"})],E.prototype,"panSensitivity",void 0),Qn([q({type:String,attribute:"touch-action"})],E.prototype,"touchAction",void 0),Qn([q({type:Boolean,attribute:"disable-zoom"})],E.prototype,"disableZoom",void 0),Qn([q({type:Boolean,attribute:"disable-pan"})],E.prototype,"disablePan",void 0),Qn([q({type:Boolean,attribute:"disable-tap"})],E.prototype,"disableTap",void 0),Qn([q({type:Number,attribute:"interpolation-decay"})],E.prototype,"interpolationDecay",void 0),Qn([q()],E.prototype,"a11y",void 0),E};/* @license
|
|
16841
|
+
*/var Qn=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const k6=5e3,U6=kc({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}]}),O6=kc({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),G6=30,z6=12,a2="0deg 75deg 105%",H6="auto auto auto",$6="auto",V6=2.2,Y6=["front","right","back","left"],q6=["upper-","","lower-"],W6=3e3,j6=". Use mouse, touch or arrow keys to move.",fp={AUTO:"auto"},VE={BASIC:"basic",WIGGLE:"wiggle"},X6={NONE:"none"},$w=()=>({basis:[Pg(pi(G6,"deg"))],keywords:{auto:[null]}}),J6=()=>({basis:[Pg(pi(z6,"deg"))],keywords:{auto:[null]}}),o2=(()=>{const s=ua(a2)[0].terms,e=lr(s[0]),t=lr(s[1]);return n=>{const i=n[fe].idealCameraDistance();return{basis:[e,t,pi(i,"m")],keywords:{auto:[null,null,pi(105,"%")]}}}})(),K6=s=>{const e=V6*s[fe].boundingSphere.radius;return{basis:[pi(-1/0,"rad"),pi(0,"rad"),pi(e,"m")],keywords:{auto:[null,null,null]}}},Z6=s=>{const e=o2(s),n=new KR([],e).evaluate()[2];return{basis:[pi(1/0,"rad"),pi(Math.PI,"rad"),pi(n,"m")],keywords:{auto:[null,null,null]}}},e9=s=>{const e=s[fe].boundingBox.getCenter(new Q);return{basis:[pi(e.x,"m"),pi(e.y,"m"),pi(e.z,"m")],keywords:{auto:[null,null,null]}}},l2=Math.PI/2,t9=Math.PI/3,n9=l2/2,i9=2*Math.PI,Ht=Symbol("controls"),cf=Symbol("panElement"),YE=Symbol("promptElement"),gp=Symbol("promptAnimatedContainer"),qE=Symbol("fingerAnimatedContainers"),mp=Symbol("deferInteractionPrompt"),Vw=Symbol("updateAria"),Pr=Symbol("a11y"),Yw=Symbol("updateA11y"),qw=Symbol("updateCameraForRadius"),pc=Symbol("cancelPrompts"),WE=Symbol("onChange"),Iu=Symbol("onPointerChange"),No=Symbol("waitingToPromptUser"),Ep=Symbol("userHasInteracted"),fc=Symbol("promptElementVisibleTime"),Cu=Symbol("lastPromptOffset"),yp=Symbol("cancellationSource"),jE=Symbol("lastSpherical"),xu=Symbol("jumpCamera"),XE=Symbol("initialized"),wu=Symbol("maintainThetaPhi"),Ww=Symbol("syncCameraOrbit"),jw=Symbol("syncFieldOfView"),Xw=Symbol("syncCameraTarget"),Jw=Symbol("syncMinCameraOrbit"),Kw=Symbol("syncMaxCameraOrbit"),Zw=Symbol("syncMinFieldOfView"),eS=Symbol("syncMaxFieldOfView"),s9=s=>{var e,t,n,i,r,a,o,l,c,h,u,d,A,p,g,m,f,_;class E extends s{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=a2,this.cameraTarget=H6,this.fieldOfView=$6,this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=W6,this.interactionPrompt=fp.AUTO,this.interactionPromptStyle=VE.WIGGLE,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=X6.NONE,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=WR,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[i]=this.shadowRoot.querySelector(".pan-target"),this[r]=0,this[a]=1/0,this[o]=!1,this[l]=!1,this[c]=mn.AUTOMATIC,this[h]=new l9(this[fe].camera,this[Us],this[fe]),this[u]=new Vc,this[d]=!1,this[A]=!1,this[p]=!1,this[g]={},this[m]=()=>{const b=this[Ht].changeSource;this[yp]=b,b===mn.USER_INTERACTION&&(this[Ep]=!0,this[mp]())},this[f]=()=>{this[Vw](),this[Xn]();const b=this[Ht].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:b}}))},this[_]=b=>{this[df].classList.toggle("pointer-tumbling",b.type==="pointer-change-start")}}get inputSensitivity(){return this[Ht].inputSensitivity}set inputSensitivity(b){this[Ht].inputSensitivity=b}getCameraOrbit(){const{theta:b,phi:x,radius:I}=this[jE];return{theta:b,phi:x,radius:I,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return Xa(this[Vt].isPresenting?this[Vt].arRenderer.target:this[fe].getDynamicTarget())}getFieldOfView(){return this[Ht].getFieldOfView()}getMinimumFieldOfView(){return this[Ht].options.minimumFieldOfView}getMaximumFieldOfView(){return this[Ht].options.maximumFieldOfView}getIdealAspect(){return this[fe].idealAspect}jumpCameraToGoal(){this[xu]=!0,this.requestUpdate(xu,!1)}resetInteractionPrompt(){this[Cu]=0,this[fc]=1/0,this[Ep]=!1,this[No]=this.interactionPrompt===fp.AUTO&&this.cameraControls}zoom(b){const x=new WheelEvent("wheel",{deltaY:-30*b});this[Us].dispatchEvent(x)}connectedCallback(){super.connectedCallback(),this[Ht].addEventListener("user-interaction",this[pc]),this[Ht].addEventListener("pointer-change-start",this[Iu]),this[Ht].addEventListener("pointer-change-end",this[Iu])}disconnectedCallback(){super.disconnectedCallback(),this[Ht].removeEventListener("user-interaction",this[pc]),this[Ht].removeEventListener("pointer-change-start",this[Iu]),this[Ht].removeEventListener("pointer-change-end",this[Iu])}updated(b){super.updated(b);const x=this[Ht],I=this[fe];if(b.has("cameraControls")&&(this.cameraControls?(x.enableInteraction(),this.interactionPrompt===fp.AUTO&&(this[No]=!0)):(x.disableInteraction(),this[mp]()),this[Us].setAttribute("aria-label",this[Oc])),b.has("disableZoom")&&(x.disableZoom=this.disableZoom),b.has("disablePan")&&(x.enablePan=!this.disablePan),b.has("disableTap")&&(x.enableTap=!this.disableTap),(b.has("interactionPrompt")||b.has("cameraControls")||b.has("src"))&&(this.interactionPrompt===fp.AUTO&&this.cameraControls&&!this[Ep]?this[No]=!0:this[mp]()),b.has("interactionPromptStyle")&&(this[gp].style.opacity=this.interactionPromptStyle==VE.BASIC?"1":"0"),b.has("touchAction")){const w=this.touchAction;x.applyOptions({touchAction:w}),x.updateTouchActionStyle()}b.has("orbitSensitivity")&&(x.orbitSensitivity=this.orbitSensitivity),b.has("zoomSensitivity")&&(x.zoomSensitivity=this.zoomSensitivity),b.has("panSensitivity")&&(x.panSensitivity=this.panSensitivity),b.has("interpolationDecay")&&(x.setDamperDecayTime(this.interpolationDecay),I.setTargetDamperDecayTime(this.interpolationDecay)),b.has("a11y")&&this[Yw](),this[xu]===!0&&Promise.resolve().then(()=>{x.jumpToGoal(),I.jumpToGoal(),this[WE](),this[xu]=!1})}async updateFraming(){const b=this[fe],x=b.adjustedFoV(b.framedFoVDeg);await b.updateFraming();const I=b.adjustedFoV(b.framedFoVDeg),w=this[Ht].getFieldOfView()/x;this[Ht].setFieldOfView(I*w),this[wu]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(b,x,I){const w=this[Us],v=this[qE];if(v[0].style.opacity==="1"){console.warn("interact() failed because an existing interaction is running.");return}const C=new Array;C.push({x:kc(x.x),y:kc(x.y)});const S=[{x:C[0].x(0),y:C[0].y(0)}];I!=null&&(C.push({x:kc(I.x),y:kc(I.y)}),S.push({x:C[1].x(0),y:C[1].y(0)}));let T=performance.now();const{width:M,height:R}=this[fe],F=this.getBoundingClientRect(),N=z=>{for(const[te,ne]of S.entries()){const{style:ue}=v[te];ue.transform=`translateX(${M*ne.x}px) translateY(${R*ne.y}px)`,z==="pointerdown"?ue.opacity="1":z==="pointerup"&&(ue.opacity="0");const pe={pointerId:te-5678,pointerType:"touch",target:w,clientX:M*ne.x+F.x,clientY:R*ne.y+F.y,altKey:!0};w.dispatchEvent(new PointerEvent(z,pe))}},L=()=>{const z=this[yp];if(z!==mn.AUTOMATIC||!w.isConnected){for(const ne of this[qE])ne.style.opacity="0";N("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:z}})),document.removeEventListener("visibilitychange",P);return}const te=Math.min(1,(performance.now()-T)/b);for(const[ne,ue]of S.entries())ue.x=C[ne].x(te),ue.y=C[ne].y(te);N("pointermove"),te<1?requestAnimationFrame(L):(N("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:mn.AUTOMATIC}})),document.removeEventListener("visibilitychange",P))},P=()=>{let z=0;document.visibilityState==="hidden"?z=performance.now()-T:T=performance.now()-z};document.addEventListener("visibilitychange",P),N("pointerdown"),this[yp]=mn.AUTOMATIC,requestAnimationFrame(L)}[(e=YE,t=gp,n=qE,i=cf,r=Cu,a=fc,o=Ep,l=No,c=yp,h=Ht,u=jE,d=xu,A=XE,p=wu,g=Pr,jw)](b){const x=this[Ht],I=this[fe];I.framedFoVDeg=b[0]*180/Math.PI,x.changeSource=mn.NONE,x.setFieldOfView(I.adjustedFoV(I.framedFoVDeg)),this[pc]()}[Ww](b){const x=this[Ht];if(this[wu]){const{theta:I,phi:w}=this.getCameraOrbit();b[0]=I,b[1]=w,this[wu]=!1}x.changeSource=mn.NONE,x.setOrbit(b[0],b[1],b[2]),this[pc]()}[Jw](b){this[Ht].applyOptions({minimumAzimuthalAngle:b[0],minimumPolarAngle:b[1],minimumRadius:b[2]}),this.jumpCameraToGoal()}[Kw](b){this[Ht].applyOptions({maximumAzimuthalAngle:b[0],maximumPolarAngle:b[1],maximumRadius:b[2]}),this[qw](b[2]),this.jumpCameraToGoal()}[Zw](b){this[Ht].applyOptions({minimumFieldOfView:b[0]*180/Math.PI}),this.jumpCameraToGoal()}[eS](b){const x=this[fe].adjustedFoV(b[0]*180/Math.PI);this[Ht].applyOptions({maximumFieldOfView:x}),this.jumpCameraToGoal()}[Xw](b){const[x,I,w]=b;this[Vt].arRenderer.isPresenting||this[fe].setTarget(x,I,w),this[Ht].changeSource=mn.NONE,this[Vt].arRenderer.updateTarget(),this[pc]()}[mr](b,x){if(super[mr](b,x),this[Vt].isPresenting||!this[Sl]())return;const I=this[Ht],w=this[fe],v=performance.now();if(this[No]&&this.loaded&&v>this[Zu]+this.interactionPromptThreshold&&(this[No]=!1,this[fc]=v,this[YE].classList.add("visible")),isFinite(this[fc])&&this.interactionPromptStyle===VE.WIGGLE){const T=(v-this[fc])/k6%1,M=U6(T),R=O6(T);if(this[gp].style.opacity=`${R}`,M!==this[Cu]){const F=M*w.width*.05,N=(M-this[Cu])*Math.PI/16;this[gp].style.transform=`translateX(${F}px)`,I.changeSource=mn.AUTOMATIC,I.adjustOrbit(N,0,0),this[Cu]=M}}const C=I.update(b,x),S=w.updateTarget(x);(C||S)&&this[WE]()}[mp](){this[No]=!1,this[YE].classList.remove("visible"),this[fc]=1/0}[qw](b){const x=Math.max(this[fe].farRadius(),b),I=0,w=Math.abs(2*x);this[Ht].updateNearFar(I,w)}[Vw](){const{theta:b,phi:x}=this[Ht].getCameraSpherical(this[jE]),I=(4+Math.floor((b%i9+n9)/l2))%4,w=Math.floor(x/t9),v=Y6[I],S=`${q6[w]}${v}`,T=S;T in this[Pr]?this[tg](this[Pr][T]):this[tg](`View from stage ${S}`)}get[Oc](){let b=j6;return"interaction-prompt"in this[Pr]&&(b=`. ${this[Pr]["interaction-prompt"]}`),super[Oc].replace(/\.$/,"")+(this.cameraControls?b:"")}async[ng](b){const x=this[Ht],I=this[fe],w=I.adjustedFoV(I.framedFoVDeg);super[ng](b);const v=I.adjustedFoV(I.framedFoVDeg)/w,C=x.getFieldOfView()*(isFinite(v)?v:1);x.updateAspect(this[fe].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[Ht].setFieldOfView(C),this.jumpCameraToGoal()}[Er](){super[Er](),this[XE]?this[wu]=!0:this[XE]=!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=pc,f=WE,_=Iu,Yw)](){if(typeof this.a11y=="string")if(this.a11y.startsWith("{"))try{this[Pr]=JSON.parse(this.a11y)}catch(b){console.warn("Error parsing a11y JSON:",b)}else this.a11y.length>0?console.warn("Error not supported format, should be a JSON string:",this.a11y):this[Pr]={};else typeof this.a11y=="object"&&this.a11y!=null?this[Pr]=Object.assign({},this.a11y):this[Pr]={};this[Us].setAttribute("aria-label",this[Oc])}}return Qn([q({type:Boolean,attribute:"camera-controls"})],E.prototype,"cameraControls",void 0),Qn([Oa({intrinsics:o2,observeEffects:!0,updateHandler:Ww}),q({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],E.prototype,"cameraOrbit",void 0),Qn([Oa({intrinsics:e9,observeEffects:!0,updateHandler:Xw}),q({type:String,attribute:"camera-target",hasChanged:()=>!0})],E.prototype,"cameraTarget",void 0),Qn([Oa({intrinsics:$w,observeEffects:!0,updateHandler:jw}),q({type:String,attribute:"field-of-view",hasChanged:()=>!0})],E.prototype,"fieldOfView",void 0),Qn([Oa({intrinsics:K6,updateHandler:Jw}),q({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],E.prototype,"minCameraOrbit",void 0),Qn([Oa({intrinsics:Z6,updateHandler:Kw}),q({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],E.prototype,"maxCameraOrbit",void 0),Qn([Oa({intrinsics:J6,updateHandler:Zw}),q({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],E.prototype,"minFieldOfView",void 0),Qn([Oa({intrinsics:$w,updateHandler:eS}),q({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],E.prototype,"maxFieldOfView",void 0),Qn([q({type:Number,attribute:"interaction-prompt-threshold"})],E.prototype,"interactionPromptThreshold",void 0),Qn([q({type:String,attribute:"interaction-prompt"})],E.prototype,"interactionPrompt",void 0),Qn([q({type:String,attribute:"interaction-prompt-style"})],E.prototype,"interactionPromptStyle",void 0),Qn([q({type:Number,attribute:"orbit-sensitivity"})],E.prototype,"orbitSensitivity",void 0),Qn([q({type:Number,attribute:"zoom-sensitivity"})],E.prototype,"zoomSensitivity",void 0),Qn([q({type:Number,attribute:"pan-sensitivity"})],E.prototype,"panSensitivity",void 0),Qn([q({type:String,attribute:"touch-action"})],E.prototype,"touchAction",void 0),Qn([q({type:Boolean,attribute:"disable-zoom"})],E.prototype,"disableZoom",void 0),Qn([q({type:Boolean,attribute:"disable-pan"})],E.prototype,"disablePan",void 0),Qn([q({type:Boolean,attribute:"disable-tap"})],E.prototype,"disableTap",void 0),Qn([q({type:Number,attribute:"interpolation-decay"})],E.prototype,"interpolationDecay",void 0),Qn([q()],E.prototype,"a11y",void 0),E};/* @license
|
|
16842
16842
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16843
16843
|
* you may not use this file except in compliance with the License.
|
|
16844
16844
|
* You may obtain a copy of the License at
|
|
@@ -16850,7 +16850,7 @@ canvas {
|
|
|
16850
16850
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16851
16851
|
* See the License for the specific language governing permissions and
|
|
16852
16852
|
* limitations under the License.
|
|
16853
|
-
*/const s9=.018,tS=2,r9=300,a9=new Ie,nS=new Q,iS=Object.freeze({minimumRadius:0,maximumRadius:1/0,minimumPolarAngle:0,maximumPolarAngle:Math.PI,minimumAzimuthalAngle:-1/0,maximumAzimuthalAngle:1/0,minimumFieldOfView:10,maximumFieldOfView:45,touchAction:"none"}),_p=Math.PI/8,bp=.04,vp=10,mn={USER_INTERACTION:"user-interaction",NONE:"none",AUTOMATIC:"automatic"};class o9 extends Ws{constructor(e,t,n){super(),this.camera=e,this.element=t,this.scene=n,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.inputSensitivity=1,this.changeSource=mn.NONE,this._interactionEnabled=!1,this._disableZoom=!1,this.isUserPointing=!1,this.enablePan=!0,this.enableTap=!0,this.panProjection=new it,this.panPerPixel=0,this.spherical=new Vc,this.goalSpherical=new Vc,this.thetaDamper=new Bi,this.phiDamper=new Bi,this.radiusDamper=new Bi,this.logFov=Math.log(iS.maximumFieldOfView),this.goalLogFov=this.logFov,this.fovDamper=new Bi,this.touchMode=null,this.pointers=[],this.startTime=0,this.startPointerPosition={clientX:0,clientY:0},this.lastSeparation=0,this.touchDecided=!1,this.onContext=i=>{if(this.enablePan)i.preventDefault();else for(const r of this.pointers)this.onPointerUp(new PointerEvent("pointercancel",Object.assign(Object.assign({},this.startPointerPosition),{pointerId:r.id})))},this.touchModeZoom=(i,r)=>{if(!this._disableZoom){const a=this.twoTouchDistance(this.pointers[0],this.pointers[1]),o=bp*this.zoomSensitivity*(this.lastSeparation-a)*50/this.scene.height;this.lastSeparation=a,this.userAdjustOrbit(0,0,o)}this.panPerPixel>0&&this.movePan(i,r)},this.disableScroll=i=>{i.preventDefault()},this.touchModeRotate=(i,r)=>{const{touchAction:a}=this._options;if(!this.touchDecided&&a!=="none"){this.touchDecided=!0;const o=Math.abs(i),l=Math.abs(r);if(this.changeSource===mn.USER_INTERACTION&&(a==="pan-y"&&l>o||a==="pan-x"&&o>l)){this.touchMode=null;return}else this.element.addEventListener("touchmove",this.disableScroll,{passive:!1})}this.handleSinglePointerMove(i,r)},this.onPointerDown=i=>{if(this.pointers.length>2)return;const{element:r}=this;this.pointers.length===0&&(r.addEventListener("pointermove",this.onPointerMove),r.addEventListener("pointerup",this.onPointerUp),this.touchMode=null,this.touchDecided=!1,this.startPointerPosition.clientX=i.clientX,this.startPointerPosition.clientY=i.clientY,this.startTime=performance.now());try{r.setPointerCapture(i.pointerId)}catch{}this.pointers.push({clientX:i.clientX,clientY:i.clientY,id:i.pointerId}),this.isUserPointing=!1,i.pointerType==="touch"?(this.changeSource=i.altKey?mn.AUTOMATIC:mn.USER_INTERACTION,this.onTouchChange(i)):(this.changeSource=mn.USER_INTERACTION,this.onMouseDown(i)),this.changeSource===mn.USER_INTERACTION&&this.dispatchEvent({type:"user-interaction"})},this.onPointerMove=i=>{const r=this.pointers.find(c=>c.id===i.pointerId);if(r==null)return;if(i.pointerType==="mouse"&&i.buttons===0){this.onPointerUp(i);return}const a=this.pointers.length,o=(i.clientX-r.clientX)/a,l=(i.clientY-r.clientY)/a;o===0&&l===0||(r.clientX=i.clientX,r.clientY=i.clientY,i.pointerType==="touch"?(this.changeSource=i.altKey?mn.AUTOMATIC:mn.USER_INTERACTION,this.touchMode!==null&&this.touchMode(o,l)):(this.changeSource=mn.USER_INTERACTION,this.panPerPixel>0?this.movePan(o,l):this.handleSinglePointerMove(o,l)))},this.onPointerUp=i=>{const{element:r}=this,a=this.pointers.findIndex(o=>o.id===i.pointerId);a!==-1&&this.pointers.splice(a,1),this.panPerPixel>0&&!i.altKey&&this.resetRadius(),this.pointers.length===0?(r.removeEventListener("pointermove",this.onPointerMove),r.removeEventListener("pointerup",this.onPointerUp),r.removeEventListener("touchmove",this.disableScroll),this.enablePan&&this.enableTap&&this.recenter(i)):this.touchMode!==null&&this.onTouchChange(i),this.scene.element[cf].style.opacity=0,r.style.cursor="grab",this.panPerPixel=0,this.isUserPointing&&this.dispatchEvent({type:"pointer-change-end"})},this.onWheel=i=>{this.changeSource=mn.USER_INTERACTION;const r=i.deltaY*(i.deltaMode==1?18:1)*bp*this.zoomSensitivity/30;this.userAdjustOrbit(0,0,r),i.preventDefault(),this.dispatchEvent({type:"user-interaction"})},this.onKeyDown=i=>{const{changeSource:r}=this;this.changeSource=mn.USER_INTERACTION,(i.shiftKey&&this.enablePan?this.panKeyCodeHandler(i):this.orbitZoomKeyCodeHandler(i))?(i.preventDefault(),this.dispatchEvent({type:"user-interaction"})):this.changeSource=r},this._options=Object.assign({},iS),this.setOrbit(0,Math.PI/2,1),this.setFieldOfView(100),this.jumpToGoal()}get interactionEnabled(){return this._interactionEnabled}enableInteraction(){if(this._interactionEnabled===!1){const{element:e}=this;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointercancel",this.onPointerUp),this._disableZoom||e.addEventListener("wheel",this.onWheel),e.addEventListener("keydown",this.onKeyDown),e.addEventListener("touchmove",()=>{},{passive:!1}),e.addEventListener("contextmenu",this.onContext),this.element.style.cursor="grab",this._interactionEnabled=!0,this.updateTouchActionStyle()}}disableInteraction(){if(this._interactionEnabled===!0){const{element:e}=this;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("contextmenu",this.onContext),e.style.cursor="",this.touchMode=null,this._interactionEnabled=!1,this.updateTouchActionStyle()}}get options(){return this._options}set disableZoom(e){this._disableZoom!=e&&(this._disableZoom=e,e===!0?this.element.removeEventListener("wheel",this.onWheel):this.element.addEventListener("wheel",this.onWheel),this.updateTouchActionStyle())}getCameraSpherical(e=new Vc){return e.copy(this.spherical)}getFieldOfView(){return this.camera.fov}applyOptions(e){Object.assign(this._options,e),this.setOrbit(),this.setFieldOfView(Math.exp(this.goalLogFov))}updateNearFar(e,t){this.camera.far=t===0?2:t,this.camera.near=Math.max(e,this.camera.far/1e3),this.camera.updateProjectionMatrix()}updateAspect(e){this.camera.aspect=e,this.camera.updateProjectionMatrix()}setOrbit(e=this.goalSpherical.theta,t=this.goalSpherical.phi,n=this.goalSpherical.radius){const{minimumAzimuthalAngle:i,maximumAzimuthalAngle:r,minimumPolarAngle:a,maximumPolarAngle:o,minimumRadius:l,maximumRadius:c}=this._options,{theta:h,phi:u,radius:d}=this.goalSpherical,A=or(e,i,r);!isFinite(i)&&!isFinite(r)&&(this.spherical.theta=this.wrapAngle(this.spherical.theta-A)+A);const p=or(t,a,o),g=or(n,l,c);return A===h&&p===u&&g===d||!isFinite(A)||!isFinite(p)||!isFinite(g)?!1:(this.goalSpherical.theta=A,this.goalSpherical.phi=p,this.goalSpherical.radius=g,this.goalSpherical.makeSafe(),!0)}setRadius(e){this.goalSpherical.radius=e,this.setOrbit()}setFieldOfView(e){const{minimumFieldOfView:t,maximumFieldOfView:n}=this._options;e=or(e,t,n),this.goalLogFov=Math.log(e)}setDamperDecayTime(e){this.thetaDamper.setDecayTime(e),this.phiDamper.setDecayTime(e),this.radiusDamper.setDecayTime(e),this.fovDamper.setDecayTime(e)}adjustOrbit(e,t,n){const{theta:i,phi:r,radius:a}=this.goalSpherical,{minimumRadius:o,maximumRadius:l,minimumFieldOfView:c,maximumFieldOfView:h}=this._options,u=this.spherical.theta-i,d=Math.PI-.001,A=i-or(e,-d-u,d-u),p=r-t,g=n===0?0:((n>0?l:o)-a)/(Math.log(n>0?h:c)-this.goalLogFov),m=a+n*(isFinite(g)?g:(l-o)*2);if(this.setOrbit(A,p,m),n!==0){const f=this.goalLogFov+n;this.setFieldOfView(Math.exp(f))}}jumpToGoal(){this.update(0,qR)}update(e,t){if(this.isStationary())return!1;const{maximumPolarAngle:n,maximumRadius:i}=this._options,r=this.spherical.theta-this.goalSpherical.theta;return Math.abs(r)>Math.PI&&!isFinite(this._options.minimumAzimuthalAngle)&&!isFinite(this._options.maximumAzimuthalAngle)&&(this.spherical.theta-=Math.sign(r)*2*Math.PI),this.spherical.theta=this.thetaDamper.update(this.spherical.theta,this.goalSpherical.theta,t,Math.PI),this.spherical.phi=this.phiDamper.update(this.spherical.phi,this.goalSpherical.phi,t,n),this.spherical.radius=this.radiusDamper.update(this.spherical.radius,this.goalSpherical.radius,t,i),this.logFov=this.fovDamper.update(this.logFov,this.goalLogFov,t,1),this.moveCamera(),!0}updateTouchActionStyle(){const{style:e}=this.element;if(this._interactionEnabled){const{touchAction:t}=this._options;this._disableZoom&&t!=="none"?e.touchAction="manipulation":e.touchAction=t}else e.touchAction=""}isStationary(){return this.goalSpherical.theta===this.spherical.theta&&this.goalSpherical.phi===this.spherical.phi&&this.goalSpherical.radius===this.spherical.radius&&this.goalLogFov===this.logFov}moveCamera(){this.spherical.makeSafe(),this.camera.position.setFromSpherical(this.spherical),this.camera.setRotationFromEuler(new zi(this.spherical.phi-Math.PI/2,this.spherical.theta,0,"YXZ")),this.camera.fov!==Math.exp(this.logFov)&&(this.camera.fov=Math.exp(this.logFov),this.camera.updateProjectionMatrix())}userAdjustOrbit(e,t,n){this.adjustOrbit(e*this.orbitSensitivity*this.inputSensitivity,t*this.orbitSensitivity*this.inputSensitivity,n*this.inputSensitivity)}wrapAngle(e){const t=(e+Math.PI)/(2*Math.PI);return(t-Math.floor(t))*2*Math.PI-Math.PI}pixelLengthToSphericalAngle(e){return 2*Math.PI*e/this.scene.height}twoTouchDistance(e,t){const{clientX:n,clientY:i}=e,{clientX:r,clientY:a}=t,o=r-n,l=a-i;return Math.sqrt(o*o+l*l)}handleSinglePointerMove(e,t){const n=this.pixelLengthToSphericalAngle(e),i=this.pixelLengthToSphericalAngle(t);this.isUserPointing===!1&&(this.isUserPointing=!0,this.dispatchEvent({type:"pointer-change-start"})),this.userAdjustOrbit(n,i,0)}initializePan(){const{theta:e,phi:t}=this.spherical,n=e-this.scene.yaw;this.panPerPixel=s9*this.panSensitivity/this.scene.height,this.panProjection.set(-Math.cos(n),-Math.cos(t)*Math.sin(n),0,0,Math.sin(t),0,Math.sin(n),-Math.cos(t)*Math.cos(n),0)}movePan(e,t){const{scene:n}=this,i=nS.set(e,t,0).multiplyScalar(this.inputSensitivity),r=this.spherical.radius*Math.exp(this.logFov)*this.panPerPixel;i.multiplyScalar(r);const a=n.getTarget();a.add(i.applyMatrix3(this.panProjection)),n.boundingSphere.clampPoint(a,a),n.setTarget(a.x,a.y,a.z)}recenter(e){if(performance.now()>this.startTime+r9||Math.abs(e.clientX-this.startPointerPosition.clientX)>tS||Math.abs(e.clientY-this.startPointerPosition.clientY)>tS)return;const{scene:t}=this,n=t.positionAndNormalFromPoint(t.getNDC(e.clientX,e.clientY));if(n==null){const{cameraTarget:i}=t.element;t.element.cameraTarget="",t.element.cameraTarget=i,this.userAdjustOrbit(0,0,1)}else t.target.worldToLocal(n.position),t.setTarget(n.position.x,n.position.y,n.position.z)}resetRadius(){const{scene:e}=this,t=e.positionAndNormalFromPoint(a9.set(0,0));if(t==null)return;e.target.worldToLocal(t.position);const n=e.getTarget(),{theta:i,phi:r}=this.spherical,a=i-e.yaw,o=nS.set(Math.sin(r)*Math.sin(a),Math.cos(r),Math.sin(r)*Math.cos(a)),l=o.dot(t.position.sub(n));n.add(o.multiplyScalar(l)),e.setTarget(n.x,n.y,n.z),this.setOrbit(void 0,void 0,this.goalSpherical.radius-l)}onTouchChange(e){if(this.pointers.length===1)this.touchMode=this.touchModeRotate;else{if(this._disableZoom){this.touchMode=null,this.element.removeEventListener("touchmove",this.disableScroll);return}this.touchMode=this.touchDecided&&this.touchMode===null?null:this.touchModeZoom,this.touchDecided=!0,this.element.addEventListener("touchmove",this.disableScroll,{passive:!1}),this.lastSeparation=this.twoTouchDistance(this.pointers[0],this.pointers[1]),this.enablePan&&this.touchMode!=null&&(this.initializePan(),e.altKey||(this.scene.element[cf].style.opacity=1))}}onMouseDown(e){this.panPerPixel=0,this.enablePan&&(e.button===2||e.ctrlKey||e.metaKey||e.shiftKey)&&(this.initializePan(),this.scene.element[cf].style.opacity=1),this.element.style.cursor="grabbing"}orbitZoomKeyCodeHandler(e){let t=!0;switch(e.key){case"PageUp":this.userAdjustOrbit(0,0,bp*this.zoomSensitivity);break;case"PageDown":this.userAdjustOrbit(0,0,-1*bp*this.zoomSensitivity);break;case"ArrowUp":this.userAdjustOrbit(0,-_p,0);break;case"ArrowDown":this.userAdjustOrbit(0,_p,0);break;case"ArrowLeft":this.userAdjustOrbit(-_p,0,0);break;case"ArrowRight":this.userAdjustOrbit(_p,0,0);break;default:t=!1;break}return t}panKeyCodeHandler(e){this.initializePan();let t=!0;switch(e.key){case"ArrowUp":this.movePan(0,-1*vp);break;case"ArrowDown":this.movePan(0,vp);break;case"ArrowLeft":this.movePan(-1*vp,0);break;case"ArrowRight":this.movePan(vp,0);break;default:t=!1;break}return t}}/* @license
|
|
16853
|
+
*/const r9=.018,tS=2,a9=300,o9=new Ie,nS=new Q,iS=Object.freeze({minimumRadius:0,maximumRadius:1/0,minimumPolarAngle:0,maximumPolarAngle:Math.PI,minimumAzimuthalAngle:-1/0,maximumAzimuthalAngle:1/0,minimumFieldOfView:10,maximumFieldOfView:45,touchAction:"none"}),_p=Math.PI/8,bp=.04,vp=10,mn={USER_INTERACTION:"user-interaction",NONE:"none",AUTOMATIC:"automatic"};class l9 extends Ws{constructor(e,t,n){super(),this.camera=e,this.element=t,this.scene=n,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.inputSensitivity=1,this.changeSource=mn.NONE,this._interactionEnabled=!1,this._disableZoom=!1,this.isUserPointing=!1,this.enablePan=!0,this.enableTap=!0,this.panProjection=new it,this.panPerPixel=0,this.spherical=new Vc,this.goalSpherical=new Vc,this.thetaDamper=new Bi,this.phiDamper=new Bi,this.radiusDamper=new Bi,this.logFov=Math.log(iS.maximumFieldOfView),this.goalLogFov=this.logFov,this.fovDamper=new Bi,this.touchMode=null,this.pointers=[],this.startTime=0,this.startPointerPosition={clientX:0,clientY:0},this.lastSeparation=0,this.touchDecided=!1,this.onContext=i=>{if(this.enablePan)i.preventDefault();else for(const r of this.pointers)this.onPointerUp(new PointerEvent("pointercancel",Object.assign(Object.assign({},this.startPointerPosition),{pointerId:r.id})))},this.touchModeZoom=(i,r)=>{if(!this._disableZoom){const a=this.twoTouchDistance(this.pointers[0],this.pointers[1]),o=bp*this.zoomSensitivity*(this.lastSeparation-a)*50/this.scene.height;this.lastSeparation=a,this.userAdjustOrbit(0,0,o)}this.panPerPixel>0&&this.movePan(i,r)},this.disableScroll=i=>{i.preventDefault()},this.touchModeRotate=(i,r)=>{const{touchAction:a}=this._options;if(!this.touchDecided&&a!=="none"){this.touchDecided=!0;const o=Math.abs(i),l=Math.abs(r);if(this.changeSource===mn.USER_INTERACTION&&(a==="pan-y"&&l>o||a==="pan-x"&&o>l)){this.touchMode=null;return}else this.element.addEventListener("touchmove",this.disableScroll,{passive:!1})}this.handleSinglePointerMove(i,r)},this.onPointerDown=i=>{if(this.pointers.length>2)return;const{element:r}=this;this.pointers.length===0&&(r.addEventListener("pointermove",this.onPointerMove),r.addEventListener("pointerup",this.onPointerUp),this.touchMode=null,this.touchDecided=!1,this.startPointerPosition.clientX=i.clientX,this.startPointerPosition.clientY=i.clientY,this.startTime=performance.now());try{r.setPointerCapture(i.pointerId)}catch{}this.pointers.push({clientX:i.clientX,clientY:i.clientY,id:i.pointerId}),this.isUserPointing=!1,i.pointerType==="touch"?(this.changeSource=i.altKey?mn.AUTOMATIC:mn.USER_INTERACTION,this.onTouchChange(i)):(this.changeSource=mn.USER_INTERACTION,this.onMouseDown(i)),this.changeSource===mn.USER_INTERACTION&&this.dispatchEvent({type:"user-interaction"})},this.onPointerMove=i=>{const r=this.pointers.find(c=>c.id===i.pointerId);if(r==null)return;if(i.pointerType==="mouse"&&i.buttons===0){this.onPointerUp(i);return}const a=this.pointers.length,o=(i.clientX-r.clientX)/a,l=(i.clientY-r.clientY)/a;o===0&&l===0||(r.clientX=i.clientX,r.clientY=i.clientY,i.pointerType==="touch"?(this.changeSource=i.altKey?mn.AUTOMATIC:mn.USER_INTERACTION,this.touchMode!==null&&this.touchMode(o,l)):(this.changeSource=mn.USER_INTERACTION,this.panPerPixel>0?this.movePan(o,l):this.handleSinglePointerMove(o,l)))},this.onPointerUp=i=>{const{element:r}=this,a=this.pointers.findIndex(o=>o.id===i.pointerId);a!==-1&&this.pointers.splice(a,1),this.panPerPixel>0&&!i.altKey&&this.resetRadius(),this.pointers.length===0?(r.removeEventListener("pointermove",this.onPointerMove),r.removeEventListener("pointerup",this.onPointerUp),r.removeEventListener("touchmove",this.disableScroll),this.enablePan&&this.enableTap&&this.recenter(i)):this.touchMode!==null&&this.onTouchChange(i),this.scene.element[cf].style.opacity=0,r.style.cursor="grab",this.panPerPixel=0,this.isUserPointing&&this.dispatchEvent({type:"pointer-change-end"})},this.onWheel=i=>{this.changeSource=mn.USER_INTERACTION;const r=i.deltaY*(i.deltaMode==1?18:1)*bp*this.zoomSensitivity/30;this.userAdjustOrbit(0,0,r),i.preventDefault(),this.dispatchEvent({type:"user-interaction"})},this.onKeyDown=i=>{const{changeSource:r}=this;this.changeSource=mn.USER_INTERACTION,(i.shiftKey&&this.enablePan?this.panKeyCodeHandler(i):this.orbitZoomKeyCodeHandler(i))?(i.preventDefault(),this.dispatchEvent({type:"user-interaction"})):this.changeSource=r},this._options=Object.assign({},iS),this.setOrbit(0,Math.PI/2,1),this.setFieldOfView(100),this.jumpToGoal()}get interactionEnabled(){return this._interactionEnabled}enableInteraction(){if(this._interactionEnabled===!1){const{element:e}=this;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointercancel",this.onPointerUp),this._disableZoom||e.addEventListener("wheel",this.onWheel),e.addEventListener("keydown",this.onKeyDown),e.addEventListener("touchmove",()=>{},{passive:!1}),e.addEventListener("contextmenu",this.onContext),this.element.style.cursor="grab",this._interactionEnabled=!0,this.updateTouchActionStyle()}}disableInteraction(){if(this._interactionEnabled===!0){const{element:e}=this;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("contextmenu",this.onContext),e.style.cursor="",this.touchMode=null,this._interactionEnabled=!1,this.updateTouchActionStyle()}}get options(){return this._options}set disableZoom(e){this._disableZoom!=e&&(this._disableZoom=e,e===!0?this.element.removeEventListener("wheel",this.onWheel):this.element.addEventListener("wheel",this.onWheel),this.updateTouchActionStyle())}getCameraSpherical(e=new Vc){return e.copy(this.spherical)}getFieldOfView(){return this.camera.fov}applyOptions(e){Object.assign(this._options,e),this.setOrbit(),this.setFieldOfView(Math.exp(this.goalLogFov))}updateNearFar(e,t){this.camera.far=t===0?2:t,this.camera.near=Math.max(e,this.camera.far/1e3),this.camera.updateProjectionMatrix()}updateAspect(e){this.camera.aspect=e,this.camera.updateProjectionMatrix()}setOrbit(e=this.goalSpherical.theta,t=this.goalSpherical.phi,n=this.goalSpherical.radius){const{minimumAzimuthalAngle:i,maximumAzimuthalAngle:r,minimumPolarAngle:a,maximumPolarAngle:o,minimumRadius:l,maximumRadius:c}=this._options,{theta:h,phi:u,radius:d}=this.goalSpherical,A=or(e,i,r);!isFinite(i)&&!isFinite(r)&&(this.spherical.theta=this.wrapAngle(this.spherical.theta-A)+A);const p=or(t,a,o),g=or(n,l,c);return A===h&&p===u&&g===d||!isFinite(A)||!isFinite(p)||!isFinite(g)?!1:(this.goalSpherical.theta=A,this.goalSpherical.phi=p,this.goalSpherical.radius=g,this.goalSpherical.makeSafe(),!0)}setRadius(e){this.goalSpherical.radius=e,this.setOrbit()}setFieldOfView(e){const{minimumFieldOfView:t,maximumFieldOfView:n}=this._options;e=or(e,t,n),this.goalLogFov=Math.log(e)}setDamperDecayTime(e){this.thetaDamper.setDecayTime(e),this.phiDamper.setDecayTime(e),this.radiusDamper.setDecayTime(e),this.fovDamper.setDecayTime(e)}adjustOrbit(e,t,n){const{theta:i,phi:r,radius:a}=this.goalSpherical,{minimumRadius:o,maximumRadius:l,minimumFieldOfView:c,maximumFieldOfView:h}=this._options,u=this.spherical.theta-i,d=Math.PI-.001,A=i-or(e,-d-u,d-u),p=r-t,g=n===0?0:((n>0?l:o)-a)/(Math.log(n>0?h:c)-this.goalLogFov),m=a+n*(isFinite(g)?g:(l-o)*2);if(this.setOrbit(A,p,m),n!==0){const f=this.goalLogFov+n;this.setFieldOfView(Math.exp(f))}}jumpToGoal(){this.update(0,qR)}update(e,t){if(this.isStationary())return!1;const{maximumPolarAngle:n,maximumRadius:i}=this._options,r=this.spherical.theta-this.goalSpherical.theta;return Math.abs(r)>Math.PI&&!isFinite(this._options.minimumAzimuthalAngle)&&!isFinite(this._options.maximumAzimuthalAngle)&&(this.spherical.theta-=Math.sign(r)*2*Math.PI),this.spherical.theta=this.thetaDamper.update(this.spherical.theta,this.goalSpherical.theta,t,Math.PI),this.spherical.phi=this.phiDamper.update(this.spherical.phi,this.goalSpherical.phi,t,n),this.spherical.radius=this.radiusDamper.update(this.spherical.radius,this.goalSpherical.radius,t,i),this.logFov=this.fovDamper.update(this.logFov,this.goalLogFov,t,1),this.moveCamera(),!0}updateTouchActionStyle(){const{style:e}=this.element;if(this._interactionEnabled){const{touchAction:t}=this._options;this._disableZoom&&t!=="none"?e.touchAction="manipulation":e.touchAction=t}else e.touchAction=""}isStationary(){return this.goalSpherical.theta===this.spherical.theta&&this.goalSpherical.phi===this.spherical.phi&&this.goalSpherical.radius===this.spherical.radius&&this.goalLogFov===this.logFov}moveCamera(){this.spherical.makeSafe(),this.camera.position.setFromSpherical(this.spherical),this.camera.setRotationFromEuler(new zi(this.spherical.phi-Math.PI/2,this.spherical.theta,0,"YXZ")),this.camera.fov!==Math.exp(this.logFov)&&(this.camera.fov=Math.exp(this.logFov),this.camera.updateProjectionMatrix())}userAdjustOrbit(e,t,n){this.adjustOrbit(e*this.orbitSensitivity*this.inputSensitivity,t*this.orbitSensitivity*this.inputSensitivity,n*this.inputSensitivity)}wrapAngle(e){const t=(e+Math.PI)/(2*Math.PI);return(t-Math.floor(t))*2*Math.PI-Math.PI}pixelLengthToSphericalAngle(e){return 2*Math.PI*e/this.scene.height}twoTouchDistance(e,t){const{clientX:n,clientY:i}=e,{clientX:r,clientY:a}=t,o=r-n,l=a-i;return Math.sqrt(o*o+l*l)}handleSinglePointerMove(e,t){const n=this.pixelLengthToSphericalAngle(e),i=this.pixelLengthToSphericalAngle(t);this.isUserPointing===!1&&(this.isUserPointing=!0,this.dispatchEvent({type:"pointer-change-start"})),this.userAdjustOrbit(n,i,0)}initializePan(){const{theta:e,phi:t}=this.spherical,n=e-this.scene.yaw;this.panPerPixel=r9*this.panSensitivity/this.scene.height,this.panProjection.set(-Math.cos(n),-Math.cos(t)*Math.sin(n),0,0,Math.sin(t),0,Math.sin(n),-Math.cos(t)*Math.cos(n),0)}movePan(e,t){const{scene:n}=this,i=nS.set(e,t,0).multiplyScalar(this.inputSensitivity),r=this.spherical.radius*Math.exp(this.logFov)*this.panPerPixel;i.multiplyScalar(r);const a=n.getTarget();a.add(i.applyMatrix3(this.panProjection)),n.boundingSphere.clampPoint(a,a),n.setTarget(a.x,a.y,a.z)}recenter(e){if(performance.now()>this.startTime+a9||Math.abs(e.clientX-this.startPointerPosition.clientX)>tS||Math.abs(e.clientY-this.startPointerPosition.clientY)>tS)return;const{scene:t}=this,n=t.positionAndNormalFromPoint(t.getNDC(e.clientX,e.clientY));if(n==null){const{cameraTarget:i}=t.element;t.element.cameraTarget="",t.element.cameraTarget=i,this.userAdjustOrbit(0,0,1)}else t.target.worldToLocal(n.position),t.setTarget(n.position.x,n.position.y,n.position.z)}resetRadius(){const{scene:e}=this,t=e.positionAndNormalFromPoint(o9.set(0,0));if(t==null)return;e.target.worldToLocal(t.position);const n=e.getTarget(),{theta:i,phi:r}=this.spherical,a=i-e.yaw,o=nS.set(Math.sin(r)*Math.sin(a),Math.cos(r),Math.sin(r)*Math.cos(a)),l=o.dot(t.position.sub(n));n.add(o.multiplyScalar(l)),e.setTarget(n.x,n.y,n.z),this.setOrbit(void 0,void 0,this.goalSpherical.radius-l)}onTouchChange(e){if(this.pointers.length===1)this.touchMode=this.touchModeRotate;else{if(this._disableZoom){this.touchMode=null,this.element.removeEventListener("touchmove",this.disableScroll);return}this.touchMode=this.touchDecided&&this.touchMode===null?null:this.touchModeZoom,this.touchDecided=!0,this.element.addEventListener("touchmove",this.disableScroll,{passive:!1}),this.lastSeparation=this.twoTouchDistance(this.pointers[0],this.pointers[1]),this.enablePan&&this.touchMode!=null&&(this.initializePan(),e.altKey||(this.scene.element[cf].style.opacity=1))}}onMouseDown(e){this.panPerPixel=0,this.enablePan&&(e.button===2||e.ctrlKey||e.metaKey||e.shiftKey)&&(this.initializePan(),this.scene.element[cf].style.opacity=1),this.element.style.cursor="grabbing"}orbitZoomKeyCodeHandler(e){let t=!0;switch(e.key){case"PageUp":this.userAdjustOrbit(0,0,bp*this.zoomSensitivity);break;case"PageDown":this.userAdjustOrbit(0,0,-1*bp*this.zoomSensitivity);break;case"ArrowUp":this.userAdjustOrbit(0,-_p,0);break;case"ArrowDown":this.userAdjustOrbit(0,_p,0);break;case"ArrowLeft":this.userAdjustOrbit(-_p,0,0);break;case"ArrowRight":this.userAdjustOrbit(_p,0,0);break;default:t=!1;break}return t}panKeyCodeHandler(e){this.initializePan();let t=!0;switch(e.key){case"ArrowUp":this.movePan(0,-1*vp);break;case"ArrowDown":this.movePan(0,vp);break;case"ArrowLeft":this.movePan(-1*vp,0);break;case"ArrowRight":this.movePan(vp,0);break;default:t=!1;break}return t}}/* @license
|
|
16854
16854
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16855
16855
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16856
16856
|
* you may not use this file except in compliance with the License.
|
|
@@ -16863,7 +16863,7 @@ canvas {
|
|
|
16863
16863
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16864
16864
|
* See the License for the specific language governing permissions and
|
|
16865
16865
|
* limitations under the License.
|
|
16866
|
-
*/const l9=30,sS=.8,rS=1.5,c9=20,h9=.2,u9=.25,d9=10,gc=150,aS=5,A9=.1,ja={NOT_PRESENTING:"not-presenting",SESSION_STARTED:"session-started",OBJECT_PLACED:"object-placed",FAILED:"failed"},A0={TRACKING:"tracking",NOT_TRACKING:"not-tracking"},Su=new Q,mc=new Nt,p9=new ze,f9=new Q,g9=new Bn(45,1,.1,100),oS=new bn().setFromPoints([new Q(0,0,0),new Q(0,0,-1)]),m9=new xs;class E9 extends Ws{constructor(e){super(),this.renderer=e,this.currentSession=null,this.placeOnWall=!1,this.placementBox=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.controller1=null,this.controller2=null,this.selectedController=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new Q,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastDragPosition=new Q,this.relativeOrientation=new Nt,this.scaleLine=new _l(oS),this.firstRatio=0,this.lastAngle=0,this.goalPosition=new Q,this.goalYaw=0,this.goalScale=1,this.xDamper=new Bi,this.yDamper=new Bi,this.zDamper=new Bi,this.yawDamper=new Bi,this.pitchDamper=new Bi,this.rollDamper=new Bi,this.scaleDamper=new Bi,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onControllerSelectStart=t=>{const n=this.presentedScene,i=t.target;if(this.placementBox.controllerIntersection(n,i)!=null)this.selectedController!=null&&(this.selectedController.userData.line.visible=!1,n.canScale&&(this.isTwoFingering=!0,this.firstRatio=this.controllerSeparation()/n.pivot.scale.x,this.scaleLine.visible=!0)),i.attach(n.pivot),this.selectedController=i,n.setShadowIntensity(.01);else{const r=i===this.controller1?this.controller2:this.controller1;this.relativeOrientation.copy(i.quaternion).invert().multiply(n.pivot.getWorldQuaternion(mc)),r.userData.turning=!1,i.userData.turning=!0,i.userData.line.visible=!1}},this.onControllerSelectEnd=t=>{const n=t.target;if(n.userData.turning=!1,n.userData.line.visible=!0,this.isTwoFingering=!1,this.scaleLine.visible=!1,this.selectedController!=null&&this.selectedController!=n)return;const i=this.presentedScene;i.attach(i.pivot),this.selectedController=null,this.goalYaw=Math.atan2(i.pivot.matrix.elements[8],i.pivot.matrix.elements[10]),this.goalPosition.x=i.pivot.position.x,this.goalPosition.z=i.pivot.position.z},this.onUpdateScene=()=>{this.placementBox!=null&&this.isPresenting&&(this.placementBox.dispose(),this.placementBox=new Tw(this.presentedScene,this.placeOnWall?"back":"bottom"))},this.onSelectStart=t=>{const n=this.transientHitTestSource;if(n==null)return;const i=this.frame.getHitTestResultsForTransientInput(n),r=this.presentedScene,a=this.placementBox;if(i.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]*rS)}else if(i.length===2){a.show=!0,this.isTwoFingering=!0;const{separation:o}=this.fingerPolar(i);this.firstRatio=o/r.pivot.scale.x}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!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(){fw();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 fw(),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,h)=>{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 WH(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 i=await this.resolveARSession();i.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 i.requestReferenceSpace("viewer");this.xrMode=i.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=c9*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)});i.requestHitTestSource({space:a,offsetRay:l}).then(c=>{this.initialHitSource=c}),this.xrMode!=="screen-space"&&(this.setupControllers(),this.xDamper.setDecayTime(gc),this.yDamper.setDecayTime(gc),this.zDamper.setDecayTime(gc),this.yawDamper.setDecayTime(gc),this.pitchDamper.setDecayTime(gc),this.rollDamper.setDecayTime(gc)),this.currentSession=i,this.placementBox=new Tw(e,this.placeOnWall?"back":"bottom"),this.placementComplete=!1,this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:ja.SESSION_STARTED})}setupControllers(){this.controller1=this.threeRenderer.xr.getController(0),this.controller1.addEventListener("selectstart",this.onControllerSelectStart),this.controller1.addEventListener("selectend",this.onControllerSelectEnd),this.controller2=this.threeRenderer.xr.getController(1),this.controller2.addEventListener("selectstart",this.onControllerSelectStart),this.controller2.addEventListener("selectend",this.onControllerSelectEnd);const e=this.presentedScene;if(e.add(this.controller1),e.add(this.controller2),!this.controller1.userData.line){const t=new _l(oS);t.name="line",t.scale.z=aS,this.controller1.userData.turning=!1,this.controller1.userData.line=t,this.controller1.add(t),this.controller2.userData.turning=!1;const n=t.clone();this.controller2.userData.line=n,this.controller2.add(n),this.scaleLine.name="scale line",this.scaleLine.visible=!1,this.controller1.add(this.scaleLine);const{size:i}=e,r=A9/Math.max(i.x,i.y,i.z),a=new je(m9);a.name="box",a.scale.copy(i).multiplyScalar(r),a.visible=!1,this.controller1.userData.box=a,e.add(a);const o=a.clone();this.controller2.userData.box=o,e.add(o)}}hover(e){if(this.xrMode==="screen-space"||this.selectedController==e)return!1;const t=this.presentedScene,n=this.placementBox.controllerIntersection(t,e);return e.userData.box.visible=(n==null||e.userData.turning)&&!this.isTwoFingering,e.userData.line.scale.z=n==null?aS:n.distance,n!=null}controllerSeparation(){return this.controller1.position.distanceTo(this.controller2.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)}}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),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[Wu],a[ju]);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:h,height:u}=a.getBoundingClientRect();t.setSize(h,u),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 i=this.transientHitTestSource;i!=null&&(i.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!=="screen-space"&&(this.controller1!=null&&(this.controller1.userData.turning=!1,this.controller1.userData.box.visible=!1,this.controller1.userData.line.visible=!0,this.controller1.removeEventListener("selectstart",this.onControllerSelectStart),this.controller1.removeEventListener("selectend",this.onControllerSelectEnd),this.controller1.removeFromParent(),this.controller1=null),this.controller2!=null&&(this.controller2.userData.turning=!1,this.controller2.userData.box.visible=!1,this.controller2.userData.line.visible=!0,this.controller2.removeEventListener("selectstart",this.onControllerSelectStart),this.controller2.removeEventListener("selectend",this.onControllerSelectEnd),this.controller2.removeFromParent(),this.controller2=null),this.selectedController=null,this.scaleLine.visible=!1),this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,this.resolveCleanup!=null&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:ja.NOT_PRESENTING})}updateView(e){const t=this.presentedScene,n=this.threeRenderer.xr;n.updateCamera(g9),t.xrCamera=n.getCamera();const{elements:i}=t.getCamera().matrixWorld;if(t.orientHotspots(Math.atan2(i[1],i[5])),this.initialized||(this.placeInitially(),this.initialized=!0),e.requestViewportScale&&e.recommendedViewportScale){const a=e.recommendedViewportScale;e.requestViewportScale(Math.max(a,u9))}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:i}=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(Su);e.yaw=Math.atan2(-c.x,-c.z)-l,this.goalYaw=e.yaw;const h=Math.max(1,2*e.boundingSphere.radius);i.copy(r.position).add(c.multiplyScalar(h)),this.updateTarget();const u=e.getTarget();if(i.add(u).sub(this.oldTarget),this.goalPosition.copy(i),e.setHotspotsVisibility(!0),this.xrMode==="screen-space"){const{session:d}=this.frame;d.addEventListener("selectstart",this.onSelectStart),d.addEventListener("selectend",this.onSelectEnd),d.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then(A=>{this.transientHitTestSource=A})}}getTouchLocation(){const{axes:e}=this.inputSource.gamepad;let t=this.placementBox.getExpandedHit(this.presentedScene,e[0],e[1]);return t!=null&&(Su.copy(t).sub(this.presentedScene.getCamera().position),Su.length()>d9)?null:t}getHitPoint(e){const t=this.threeRenderer.xr.getReferenceSpace(),n=e.getPose(t);if(n==null)return null;const i=p9.fromArray(n.transform.matrix);return this.placeOnWall===!0&&(this.goalYaw=Math.atan2(i.elements[4],i.elements[6])),i.elements[5]>.75!==this.placeOnWall?f9.setFromMatrixPosition(i):null}moveToFloor(e){const t=this.initialHitSource;if(t==null)return;const n=e.getHitTestResults(t);if(n.length==0)return;const i=n[0],r=this.getHitPoint(i);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:ja.OBJECT_PLACED}))}fingerPolar(e){const t=e[0].inputSource.gamepad.axes,n=e[1].inputSource.gamepad.axes,i=n[0]-t[0],r=n[1]-t[1],a=Math.atan2(r,i);let o=this.lastAngle-a;return o>Math.PI?o-=2*Math.PI:o<-Math.PI&&(o+=2*Math.PI),this.lastAngle=a,{separation:Math.sqrt(i*i+r*r),deltaYaw:o}}setScale(e){const t=e/this.firstRatio;this.goalScale=Math.abs(t-1)<h9?1:t}processInput(e){const t=this.transientHitTestSource;if(t==null||!this.isTranslating&&!this.isTwoFingering&&!this.isRotating)return;const n=e.getHitTestResultsForTransientInput(t),i=this.presentedScene,r=i.pivot.scale.x;if(this.isTwoFingering){if(n.length<2)this.isTwoFingering=!1;else{const{separation:a,deltaYaw:o}=this.fingerPolar(n);this.placeOnWall===!1&&(this.goalYaw+=o),i.canScale&&this.setScale(a)}return}else if(n.length===2){this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!0;const{separation:a}=this.fingerPolar(n);this.firstRatio=a/r;return}if(this.isRotating){const a=this.inputSource.gamepad.axes[0]*rS;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.placeOnWall===!1){const l=o.y-this.lastDragPosition.y;if(l<0){this.placementBox.offsetHeight=l/r,this.presentedScene.setShadowOffset(l);const c=Su.copy(i.getCamera().position),h=-l/(c.y-o.y);c.multiplyScalar(h),o.multiplyScalar(1-h).add(c)}}this.goalPosition.add(o),this.lastDragPosition.copy(o)}})}moveScene(e){const t=this.presentedScene,{pivot:n}=t,i=this.placementBox;if(i.updateOpacity(e),this.controller1&&(this.controller1.userData.turning&&(n.quaternion.copy(this.controller1.quaternion).multiply(this.relativeOrientation),this.selectedController&&this.selectedController===this.controller2&&n.quaternion.premultiply(mc.copy(this.controller2.quaternion).invert())),this.controller1.userData.box.position.copy(this.controller1.position),n.getWorldQuaternion(this.controller1.userData.box.quaternion)),this.controller2&&(this.controller2.userData.turning&&(n.quaternion.copy(this.controller2.quaternion).multiply(this.relativeOrientation),this.selectedController&&this.selectedController===this.controller1&&n.quaternion.premultiply(mc.copy(this.controller1.quaternion).invert())),this.controller2.userData.box.position.copy(this.controller2.position),n.getWorldQuaternion(this.controller2.userData.box.quaternion)),this.controller1&&this.controller2&&this.isTwoFingering){const d=this.controllerSeparation();this.setScale(d),this.scaleLine.scale.z=-d,this.scaleLine.lookAt(this.controller2.position)}const r=t.pivot.scale.x;if(this.goalScale!==r){const d=this.scaleDamper.update(r,this.goalScale,e,1);t.pivot.scale.set(d,d,d)}if(n.parent!==t)return;const{position:a}=n,o=t.boundingSphere.radius,l=this.goalPosition;let c=mn.NONE;if(!l.equals(a)){c=mn.USER_INTERACTION;let{x:d,y:A,z:p}=a;if(d=this.xDamper.update(d,l.x,e,o),A=this.yDamper.update(A,l.y,e,o),p=this.zDamper.update(p,l.z,e,o),a.set(d,A,p),this.xrMode==="screen-space"&&!this.isTranslating){const g=l.y-A;this.placementComplete&&this.placeOnWall===!1?(i.offsetHeight=g/t.pivot.scale.x,t.setShadowOffset(g)):g===0&&(this.placementComplete=!0,i.show=!1,t.setShadowIntensity(sS))}this.xrMode!=="screen-space"&&l.equals(a)&&t.setShadowIntensity(sS)}t.updateTarget(e),mc.setFromAxisAngle(Su.set(0,1,0),this.goalYaw);const h=t.pivot.quaternion.angleTo(mc),u=h-this.yawDamper.update(h,0,e,Math.PI);t.pivot.quaternion.rotateTowards(mc,u),t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:c}}))}onWebXRFrame(e,t){if(this.xrMode!=="screen-space"){const o=this.hover(this.controller1),l=this.hover(this.controller2);this.placementBox.show=(o||l)&&!this.isTwoFingering}this.frame=t,++this.frames;const n=this.threeRenderer.xr.getReferenceSpace(),i=t.getViewerPose(n);i==null&&this.tracking===!0&&this.frames>l9&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:A0.NOT_TRACKING}));const r=this.presentedScene;if(i==null||r==null||!r.element.loaded){this.threeRenderer.clear();return}this.tracking===!1&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:A0.TRACKING}));let a=!0;for(const o of i.views){if(this.updateView(o),a){this.moveToFloor(t),this.processInput(t);const l=e-this.lastTick;this.moveScene(l),this.renderer.preRender(r,e,l),this.lastTick=e,r.renderShadow(this.threeRenderer)}this.threeRenderer.render(r,r.getCamera()),a=!1}}}/* @license
|
|
16866
|
+
*/const c9=30,sS=.8,rS=1.5,h9=20,u9=.2,d9=.25,A9=10,gc=150,aS=5,p9=.1,ja={NOT_PRESENTING:"not-presenting",SESSION_STARTED:"session-started",OBJECT_PLACED:"object-placed",FAILED:"failed"},A0={TRACKING:"tracking",NOT_TRACKING:"not-tracking"},Su=new Q,mc=new Nt,f9=new ze,g9=new Q,m9=new Bn(45,1,.1,100),oS=new bn().setFromPoints([new Q(0,0,0),new Q(0,0,-1)]),E9=new xs;class y9 extends Ws{constructor(e){super(),this.renderer=e,this.currentSession=null,this.placeOnWall=!1,this.placementBox=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.controller1=null,this.controller2=null,this.selectedController=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new Q,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastDragPosition=new Q,this.relativeOrientation=new Nt,this.scaleLine=new _l(oS),this.firstRatio=0,this.lastAngle=0,this.goalPosition=new Q,this.goalYaw=0,this.goalScale=1,this.xDamper=new Bi,this.yDamper=new Bi,this.zDamper=new Bi,this.yawDamper=new Bi,this.pitchDamper=new Bi,this.rollDamper=new Bi,this.scaleDamper=new Bi,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onControllerSelectStart=t=>{const n=this.presentedScene,i=t.target;if(this.placementBox.controllerIntersection(n,i)!=null)this.selectedController!=null&&(this.selectedController.userData.line.visible=!1,n.canScale&&(this.isTwoFingering=!0,this.firstRatio=this.controllerSeparation()/n.pivot.scale.x,this.scaleLine.visible=!0)),i.attach(n.pivot),this.selectedController=i,n.setShadowIntensity(.01);else{const r=i===this.controller1?this.controller2:this.controller1;this.relativeOrientation.copy(i.quaternion).invert().multiply(n.pivot.getWorldQuaternion(mc)),r.userData.turning=!1,i.userData.turning=!0,i.userData.line.visible=!1}},this.onControllerSelectEnd=t=>{const n=t.target;if(n.userData.turning=!1,n.userData.line.visible=!0,this.isTwoFingering=!1,this.scaleLine.visible=!1,this.selectedController!=null&&this.selectedController!=n)return;const i=this.presentedScene;i.attach(i.pivot),this.selectedController=null,this.goalYaw=Math.atan2(i.pivot.matrix.elements[8],i.pivot.matrix.elements[10]),this.goalPosition.x=i.pivot.position.x,this.goalPosition.z=i.pivot.position.z},this.onUpdateScene=()=>{this.placementBox!=null&&this.isPresenting&&(this.placementBox.dispose(),this.placementBox=new Tw(this.presentedScene,this.placeOnWall?"back":"bottom"))},this.onSelectStart=t=>{const n=this.transientHitTestSource;if(n==null)return;const i=this.frame.getHitTestResultsForTransientInput(n),r=this.presentedScene,a=this.placementBox;if(i.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]*rS)}else if(i.length===2){a.show=!0,this.isTwoFingering=!0;const{separation:o}=this.fingerPolar(i);this.firstRatio=o/r.pivot.scale.x}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!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(){fw();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 fw(),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,h)=>{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 WH(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 i=await this.resolveARSession();i.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 i.requestReferenceSpace("viewer");this.xrMode=i.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=h9*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)});i.requestHitTestSource({space:a,offsetRay:l}).then(c=>{this.initialHitSource=c}),this.xrMode!=="screen-space"&&(this.setupControllers(),this.xDamper.setDecayTime(gc),this.yDamper.setDecayTime(gc),this.zDamper.setDecayTime(gc),this.yawDamper.setDecayTime(gc),this.pitchDamper.setDecayTime(gc),this.rollDamper.setDecayTime(gc)),this.currentSession=i,this.placementBox=new Tw(e,this.placeOnWall?"back":"bottom"),this.placementComplete=!1,this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:ja.SESSION_STARTED})}setupControllers(){this.controller1=this.threeRenderer.xr.getController(0),this.controller1.addEventListener("selectstart",this.onControllerSelectStart),this.controller1.addEventListener("selectend",this.onControllerSelectEnd),this.controller2=this.threeRenderer.xr.getController(1),this.controller2.addEventListener("selectstart",this.onControllerSelectStart),this.controller2.addEventListener("selectend",this.onControllerSelectEnd);const e=this.presentedScene;if(e.add(this.controller1),e.add(this.controller2),!this.controller1.userData.line){const t=new _l(oS);t.name="line",t.scale.z=aS,this.controller1.userData.turning=!1,this.controller1.userData.line=t,this.controller1.add(t),this.controller2.userData.turning=!1;const n=t.clone();this.controller2.userData.line=n,this.controller2.add(n),this.scaleLine.name="scale line",this.scaleLine.visible=!1,this.controller1.add(this.scaleLine);const{size:i}=e,r=p9/Math.max(i.x,i.y,i.z),a=new je(E9);a.name="box",a.scale.copy(i).multiplyScalar(r),a.visible=!1,this.controller1.userData.box=a,e.add(a);const o=a.clone();this.controller2.userData.box=o,e.add(o)}}hover(e){if(this.xrMode==="screen-space"||this.selectedController==e)return!1;const t=this.presentedScene,n=this.placementBox.controllerIntersection(t,e);return e.userData.box.visible=(n==null||e.userData.turning)&&!this.isTwoFingering,e.userData.line.scale.z=n==null?aS:n.distance,n!=null}controllerSeparation(){return this.controller1.position.distanceTo(this.controller2.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)}}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),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[Wu],a[ju]);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:h,height:u}=a.getBoundingClientRect();t.setSize(h,u),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 i=this.transientHitTestSource;i!=null&&(i.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!=="screen-space"&&(this.controller1!=null&&(this.controller1.userData.turning=!1,this.controller1.userData.box.visible=!1,this.controller1.userData.line.visible=!0,this.controller1.removeEventListener("selectstart",this.onControllerSelectStart),this.controller1.removeEventListener("selectend",this.onControllerSelectEnd),this.controller1.removeFromParent(),this.controller1=null),this.controller2!=null&&(this.controller2.userData.turning=!1,this.controller2.userData.box.visible=!1,this.controller2.userData.line.visible=!0,this.controller2.removeEventListener("selectstart",this.onControllerSelectStart),this.controller2.removeEventListener("selectend",this.onControllerSelectEnd),this.controller2.removeFromParent(),this.controller2=null),this.selectedController=null,this.scaleLine.visible=!1),this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,this.resolveCleanup!=null&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:ja.NOT_PRESENTING})}updateView(e){const t=this.presentedScene,n=this.threeRenderer.xr;n.updateCamera(m9),t.xrCamera=n.getCamera();const{elements:i}=t.getCamera().matrixWorld;if(t.orientHotspots(Math.atan2(i[1],i[5])),this.initialized||(this.placeInitially(),this.initialized=!0),e.requestViewportScale&&e.recommendedViewportScale){const a=e.recommendedViewportScale;e.requestViewportScale(Math.max(a,d9))}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:i}=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(Su);e.yaw=Math.atan2(-c.x,-c.z)-l,this.goalYaw=e.yaw;const h=Math.max(1,2*e.boundingSphere.radius);i.copy(r.position).add(c.multiplyScalar(h)),this.updateTarget();const u=e.getTarget();if(i.add(u).sub(this.oldTarget),this.goalPosition.copy(i),e.setHotspotsVisibility(!0),this.xrMode==="screen-space"){const{session:d}=this.frame;d.addEventListener("selectstart",this.onSelectStart),d.addEventListener("selectend",this.onSelectEnd),d.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then(A=>{this.transientHitTestSource=A})}}getTouchLocation(){const{axes:e}=this.inputSource.gamepad;let t=this.placementBox.getExpandedHit(this.presentedScene,e[0],e[1]);return t!=null&&(Su.copy(t).sub(this.presentedScene.getCamera().position),Su.length()>A9)?null:t}getHitPoint(e){const t=this.threeRenderer.xr.getReferenceSpace(),n=e.getPose(t);if(n==null)return null;const i=f9.fromArray(n.transform.matrix);return this.placeOnWall===!0&&(this.goalYaw=Math.atan2(i.elements[4],i.elements[6])),i.elements[5]>.75!==this.placeOnWall?g9.setFromMatrixPosition(i):null}moveToFloor(e){const t=this.initialHitSource;if(t==null)return;const n=e.getHitTestResults(t);if(n.length==0)return;const i=n[0],r=this.getHitPoint(i);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:ja.OBJECT_PLACED}))}fingerPolar(e){const t=e[0].inputSource.gamepad.axes,n=e[1].inputSource.gamepad.axes,i=n[0]-t[0],r=n[1]-t[1],a=Math.atan2(r,i);let o=this.lastAngle-a;return o>Math.PI?o-=2*Math.PI:o<-Math.PI&&(o+=2*Math.PI),this.lastAngle=a,{separation:Math.sqrt(i*i+r*r),deltaYaw:o}}setScale(e){const t=e/this.firstRatio;this.goalScale=Math.abs(t-1)<u9?1:t}processInput(e){const t=this.transientHitTestSource;if(t==null||!this.isTranslating&&!this.isTwoFingering&&!this.isRotating)return;const n=e.getHitTestResultsForTransientInput(t),i=this.presentedScene,r=i.pivot.scale.x;if(this.isTwoFingering){if(n.length<2)this.isTwoFingering=!1;else{const{separation:a,deltaYaw:o}=this.fingerPolar(n);this.placeOnWall===!1&&(this.goalYaw+=o),i.canScale&&this.setScale(a)}return}else if(n.length===2){this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!0;const{separation:a}=this.fingerPolar(n);this.firstRatio=a/r;return}if(this.isRotating){const a=this.inputSource.gamepad.axes[0]*rS;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.placeOnWall===!1){const l=o.y-this.lastDragPosition.y;if(l<0){this.placementBox.offsetHeight=l/r,this.presentedScene.setShadowOffset(l);const c=Su.copy(i.getCamera().position),h=-l/(c.y-o.y);c.multiplyScalar(h),o.multiplyScalar(1-h).add(c)}}this.goalPosition.add(o),this.lastDragPosition.copy(o)}})}moveScene(e){const t=this.presentedScene,{pivot:n}=t,i=this.placementBox;if(i.updateOpacity(e),this.controller1&&(this.controller1.userData.turning&&(n.quaternion.copy(this.controller1.quaternion).multiply(this.relativeOrientation),this.selectedController&&this.selectedController===this.controller2&&n.quaternion.premultiply(mc.copy(this.controller2.quaternion).invert())),this.controller1.userData.box.position.copy(this.controller1.position),n.getWorldQuaternion(this.controller1.userData.box.quaternion)),this.controller2&&(this.controller2.userData.turning&&(n.quaternion.copy(this.controller2.quaternion).multiply(this.relativeOrientation),this.selectedController&&this.selectedController===this.controller1&&n.quaternion.premultiply(mc.copy(this.controller1.quaternion).invert())),this.controller2.userData.box.position.copy(this.controller2.position),n.getWorldQuaternion(this.controller2.userData.box.quaternion)),this.controller1&&this.controller2&&this.isTwoFingering){const d=this.controllerSeparation();this.setScale(d),this.scaleLine.scale.z=-d,this.scaleLine.lookAt(this.controller2.position)}const r=t.pivot.scale.x;if(this.goalScale!==r){const d=this.scaleDamper.update(r,this.goalScale,e,1);t.pivot.scale.set(d,d,d)}if(n.parent!==t)return;const{position:a}=n,o=t.boundingSphere.radius,l=this.goalPosition;let c=mn.NONE;if(!l.equals(a)){c=mn.USER_INTERACTION;let{x:d,y:A,z:p}=a;if(d=this.xDamper.update(d,l.x,e,o),A=this.yDamper.update(A,l.y,e,o),p=this.zDamper.update(p,l.z,e,o),a.set(d,A,p),this.xrMode==="screen-space"&&!this.isTranslating){const g=l.y-A;this.placementComplete&&this.placeOnWall===!1?(i.offsetHeight=g/t.pivot.scale.x,t.setShadowOffset(g)):g===0&&(this.placementComplete=!0,i.show=!1,t.setShadowIntensity(sS))}this.xrMode!=="screen-space"&&l.equals(a)&&t.setShadowIntensity(sS)}t.updateTarget(e),mc.setFromAxisAngle(Su.set(0,1,0),this.goalYaw);const h=t.pivot.quaternion.angleTo(mc),u=h-this.yawDamper.update(h,0,e,Math.PI);t.pivot.quaternion.rotateTowards(mc,u),t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:c}}))}onWebXRFrame(e,t){if(this.xrMode!=="screen-space"){const o=this.hover(this.controller1),l=this.hover(this.controller2);this.placementBox.show=(o||l)&&!this.isTwoFingering}this.frame=t,++this.frames;const n=this.threeRenderer.xr.getReferenceSpace(),i=t.getViewerPose(n);i==null&&this.tracking===!0&&this.frames>c9&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:A0.NOT_TRACKING}));const r=this.presentedScene;if(i==null||r==null||!r.element.loaded){this.threeRenderer.clear();return}this.tracking===!1&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:A0.TRACKING}));let a=!0;for(const o of i.views){if(this.updateView(o),a){this.moveToFloor(t),this.processInput(t);const l=e-this.lastTick;this.moveScene(l),this.renderer.preRender(r,e,l),this.lastTick=e,r.renderShadow(this.threeRenderer)}this.threeRenderer.render(r,r.getCamera()),a=!1}}}/* @license
|
|
16867
16867
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
16868
16868
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16869
16869
|
* you may not use this file except in compliance with the License.
|
|
@@ -16876,7 +16876,7 @@ canvas {
|
|
|
16876
16876
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16877
16877
|
* See the License for the specific language governing permissions and
|
|
16878
16878
|
* limitations under the License.
|
|
16879
|
-
*/const lS=Symbol("prepared"),Kf=Symbol("prepare"),nr=Symbol("preparedGLTF"),Zf=Symbol("clone");class
|
|
16879
|
+
*/const lS=Symbol("prepared"),Kf=Symbol("prepare"),nr=Symbol("preparedGLTF"),Zf=Symbol("clone");class _9{static prepare(e){if(e.scene==null)throw new Error("Model does not have a scene");if(e[lS])return e;const t=this[Kf](e);return t[lS]=!0,t}static[Kf](e){const{scene:t}=e,n=[t];return Object.assign(Object.assign({},e),{scene:t,scenes:n})}get parser(){return this[nr].parser}get animations(){return this[nr].animations}get scene(){return this[nr].scene}get scenes(){return this[nr].scenes}get cameras(){return this[nr].cameras}get asset(){return this[nr].asset}get userData(){return this[nr].userData}constructor(e){this[nr]=e}clone(){const e=this.constructor,t=this[Zf]();return new e(t)}dispose(){this.scenes.forEach(e=>{e.traverse(t=>{const n=t;if(!n.material)return;(Array.isArray(n.material)?n.material:[n.material]).forEach(r=>{for(const a in r){const o=r[a];if(o instanceof tn){const l=o.source.data;l.close!=null&&l.close(),o.dispose()}}r.dispose()}),n.geometry.dispose()})})}[Zf](){const e=this[nr],t=YH(this.scene);b9(t,this.scene);const n=[t],i=e.userData?Object.assign({},e.userData):{};return Object.assign(Object.assign({},e),{scene:t,scenes:n,userData:i})}}const b9=(s,e)=>{c2(s,e,(t,n)=>{n.userData.variantMaterials!==void 0&&(t.userData.variantMaterials=new Map(n.userData.variantMaterials)),n.userData.variantData!==void 0&&(t.userData.variantData=n.userData.variantData),n.userData.originalMaterial!==void 0&&(t.userData.originalMaterial=n.userData.originalMaterial)})},c2=(s,e,t)=>{t(s,e);for(let n=0;n<s.children.length;n++)c2(s.children[n],e.children[n],t)},cS=Symbol("threeGLTF"),hS=Symbol("gltf"),uS=Symbol("gltfElementMap"),dS=Symbol("threeObjectMap"),AS=Symbol("parallelTraverseThreeScene"),pS=Symbol("correlateOriginalThreeGLTF"),fS=Symbol("correlateCloneThreeGLTF");class Yd{static from(e,t){return t!=null?this[fS](e,t):this[pS](e)}static[pS](e){const t=e.parser.json,n=e.parser.associations,i=new Map,r={name:"Default"},a={index:-1};for(const o of n.keys())o instanceof ss&&n.get(o)==null&&(a.index<0&&(t.materials==null&&(t.materials=[]),a.index=t.materials.length,t.materials.push(r)),o.name=r.name,n.set(o,{materials:a.index}));for(const[o,l]of n){l&&(o.userData=o.userData||{},o.userData.associations=l);for(const c in l)if(c!=null&&c!=="primitives"){const h=c,d=(t[h]||[])[l[h]];if(d==null)continue;let A=i.get(d);A==null&&(A=new Set,i.set(d,A)),A.add(o)}}return new Yd(e,t,n,i)}static[fS](e,t){const n=t.threeGLTF,i=t.gltf,r=JSON.parse(JSON.stringify(i)),a=new Map,o=new Map;for(let l=0;l<n.scenes.length;l++)this[AS](n.scenes[l],e.scenes[l],(c,h)=>{const u=t.threeObjectMap.get(c);if(u!=null){for(const d in u)if(d!=null&&d!=="primitives"){const A=d,p=u[A],g=r[A][p],m=a.get(h)||{};m[A]=p,a.set(h,m);const f=o.get(g)||new Set;f.add(h),o.set(g,f)}}});return new Yd(e,r,a,o)}static[AS](e,t,n){const i=(r,a)=>{if(n(r,a),r.isObject3D){const o=r,l=a;if(o.material)if(Array.isArray(o.material))for(let c=0;c<o.material.length;++c)n(o.material[c],l.material[c]);else n(o.material,l.material);for(let c=0;c<r.children.length;++c)i(r.children[c],a.children[c])}};i(e,t)}get threeGLTF(){return this[cS]}get gltf(){return this[hS]}get gltfElementMap(){return this[uS]}get threeObjectMap(){return this[dS]}constructor(e,t,n,i){this[cS]=e,this[hS]=t,this[uS]=i,this[dS]=n}}/* @license
|
|
16880
16880
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
16881
16881
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16882
16882
|
* you may not use this file except in compliance with the License.
|
|
@@ -16889,14 +16889,14 @@ canvas {
|
|
|
16889
16889
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16890
16890
|
* See the License for the specific language governing permissions and
|
|
16891
16891
|
* limitations under the License.
|
|
16892
|
-
*/const Bu=Symbol("correlatedSceneGraph");class b9 extends y9{static[Kf](e){const t=super[Kf](e);t[Bu]==null&&(t[Bu]=Yd.from(t));const{scene:n}=t,i=new Hi(void 0,1/0);return n.traverse(r=>{r.renderOrder=1e3,r.frustumCulled=!1,r.name||(r.name=r.uuid);const a=r;if(a.material){const{geometry:o}=a;a.castShadow=!0,a.isSkinnedMesh&&(o.boundingSphere=i,o.boundingBox=null);const l=a.material;if(l.isMeshBasicMaterial===!0&&(l.toneMapped=!1),l.shadowSide=Vs,l.aoMap){const{gltf:c,threeObjectMap:h}=t[Bu],u=h.get(l);if(c.materials!=null&&u!=null&&u.materials!=null){const d=c.materials[u.materials];d.occlusionTexture&&d.occlusionTexture.texCoord===0&&o.attributes.uv!=null&&o.setAttribute("uv2",o.attributes.uv)}}}}),t}get correlatedSceneGraph(){return this[nr][Bu]}[Zf](){const e=super[Zf](),t=new Map;return e.scene.traverse(n=>{const i=n;if(i.material){const a=i.material;if(a!=null){if(t.has(a.uuid)){i.material=t.get(a.uuid);return}i.material=a.clone(),t.set(a.uuid,i.material)}}const r=n;r.target!==void 0&&r.add(r.target)}),e[Bu]=Yd.from(e,this.correlatedSceneGraph),e}}const h2=(s,e,t)=>{let n;switch(s){case Zt:n=new Uint8ClampedArray(e*t*4);break;case yn:n=new Uint16Array(e*t*4);break;case Di:n=new Uint32Array(e*t*4);break;case k0:n=new Int8Array(e*t*4);break;case U0:n=new Int16Array(e*t*4);break;case og:n=new Int32Array(e*t*4);break;case En:n=new Float32Array(e*t*4);break;default:throw new Error("Unsupported data type")}return n};let Ip;const v9=(s,e,t,n)=>{if(Ip!==void 0)return Ip;const i=new Nn(1,1,n);e.setRenderTarget(i);const r=new je(new js,new Un({color:16777215}));e.render(r,t),e.setRenderTarget(null);const a=h2(s,i.width,i.height);return e.readRenderTargetPixels(i,0,0,i.width,i.height,a),i.dispose(),r.geometry.dispose(),r.material.dispose(),Ip=a[0]!==0,Ip};class zb{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(e){this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace=e.colorSpace;const t={format:Lt,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:e.renderTargetOptions?.anisotropy!==void 0?e.renderTargetOptions?.anisotropy:1,generateMipmaps:e.renderTargetOptions?.generateMipmaps!==void 0?e.renderTargetOptions?.generateMipmaps:!1,magFilter:e.renderTargetOptions?.magFilter!==void 0?e.renderTargetOptions?.magFilter:xt,minFilter:e.renderTargetOptions?.minFilter!==void 0?e.renderTargetOptions?.minFilter:xt,samples:e.renderTargetOptions?.samples!==void 0?e.renderTargetOptions?.samples:void 0,wrapS:e.renderTargetOptions?.wrapS!==void 0?e.renderTargetOptions?.wrapS:xn,wrapT:e.renderTargetOptions?.wrapT!==void 0?e.renderTargetOptions?.wrapT:xn};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=zb.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new co,this._camera=new ba,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!v9(this._type,this._renderer,this._camera,t)){let n;switch(this._type){case yn:n=this._renderer.extensions.has("EXT_color_buffer_float")?En:void 0;break}n!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${En}`),this._type=n):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new je(new js,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Nn(this.width,this.height,t),this._renderTarget.texture.mapping=e.renderTargetOptions?.mapping!==void 0?e.renderTargetOptions?.mapping:nh}static instantiateRenderer(){const e=new Rf;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=h2(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const t=new Th(this.toArray(),this.width,this.height,Lt,this._type,e?.mapping||nh,e?.wrapS||xn,e?.wrapT||xn,e?.magFilter||xt,e?.minFilter||xt,e?.anisotropy||1,nn);return t.generateMipmaps=e?.generateMipmaps!==void 0?e?.generateMipmaps:!1,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof Tn&&Object.values(this.material.uniforms).forEach(t=>{t.value instanceof tn&&t.value.dispose()}),Object.values(this.material).forEach(t=>{t instanceof tn&&t.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}class u2 extends Error{}class d2 extends Error{}const Tu=(s,e,t)=>{const n=new RegExp(`${e}="([^"]*)"`,"i").exec(s);if(n)return n[1];const i=new RegExp(`<${e}[^>]*>([\\s\\S]*?)</${e}>`,"i").exec(s);if(i){const r=i[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return r&&r.length===3?r.map(a=>a.replace(/<\/?rdf:li>/g,"")):i[1].trim()}if(t!==void 0)return t;throw new Error(`Can't find ${e} in gainmap metadata`)},I9=s=>{let e;typeof TextDecoder<"u"?e=new TextDecoder().decode(s):e=s.toString();let t=e.indexOf("<x:xmpmeta");for(;t!==-1;){const n=e.indexOf("x:xmpmeta>",t),i=e.slice(t,n+10);try{const r=Tu(i,"hdrgm:GainMapMin","0"),a=Tu(i,"hdrgm:GainMapMax"),o=Tu(i,"hdrgm:Gamma","1"),l=Tu(i,"hdrgm:OffsetSDR","0.015625"),c=Tu(i,"hdrgm:OffsetHDR","0.015625"),h=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(i),u=h?h[1]:"0",d=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(i);if(!d)throw new Error("Incomplete gainmap metadata");const A=d[1];return{gainMapMin:Array.isArray(r)?r.map(p=>parseFloat(p)):[parseFloat(r),parseFloat(r),parseFloat(r)],gainMapMax:Array.isArray(a)?a.map(p=>parseFloat(p)):[parseFloat(a),parseFloat(a),parseFloat(a)],gamma:Array.isArray(o)?o.map(p=>parseFloat(p)):[parseFloat(o),parseFloat(o),parseFloat(o)],offsetSdr:Array.isArray(l)?l.map(p=>parseFloat(p)):[parseFloat(l),parseFloat(l),parseFloat(l)],offsetHdr:Array.isArray(c)?c.map(p=>parseFloat(p)):[parseFloat(c),parseFloat(c),parseFloat(c)],hdrCapacityMin:parseFloat(u),hdrCapacityMax:parseFloat(A)}}catch{}t=e.indexOf("<x:xmpmeta",n)}};class C9{options;constructor(e){this.options={debug:e&&e.debug!==void 0?e.debug:!1,extractFII:e&&e.extractFII!==void 0?e.extractFII:!0,extractNonFII:e&&e.extractNonFII!==void 0?e.extractNonFII:!0}}extract(e){return new Promise((t,n)=>{const i=this.options.debug,r=new DataView(e.buffer);if(r.getUint16(0)!==65496){n(new Error("Not a valid jpeg"));return}const a=r.byteLength;let o=2,l=0,c;for(;o<a;){if(++l>250){n(new Error(`Found no marker after ${l} loops 😵`));return}if(r.getUint8(o)!==255){n(new Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${r.getUint8(o).toString(16)}`));return}if(c=r.getUint8(o+1),i&&console.log(`Marker: ${c.toString(16)}`),c===226){i&&console.log("Found APP2 marker (0xffe2)");const h=o+4;if(r.getUint32(h)===1297106432){const u=h+4;let d;if(r.getUint16(u)===18761)d=!1;else if(r.getUint16(u)===19789)d=!0;else{n(new Error("No valid endianness marker found in TIFF header"));return}if(r.getUint16(u+2,!d)!==42){n(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const A=r.getUint32(u+4,!d);if(A<8){n(new Error("Not valid TIFF data! (First offset less than 8)"));return}const p=u+A,g=r.getUint16(p,!d),m=p+2;let f=0;for(let b=m;b<m+12*g;b+=12)r.getUint16(b,!d)===45057&&(f=r.getUint32(b+8,!d));const E=p+2+g*12+4,y=[];for(let b=E;b<E+f*16;b+=16){const x={MPType:r.getUint32(b,!d),size:r.getUint32(b+4,!d),dataOffset:r.getUint32(b+8,!d),dependantImages:r.getUint32(b+12,!d),start:-1,end:-1,isFII:!1};x.dataOffset?(x.start=u+x.dataOffset,x.isFII=!1):(x.start=0,x.isFII=!0),x.end=x.start+x.size,y.push(x)}if(this.options.extractNonFII&&y.length){const b=new Blob([r]),x=[];for(const I of y){if(I.isFII&&!this.options.extractFII)continue;const w=b.slice(I.start,I.end+1,"image/jpeg");x.push(w)}t(x)}}}o+=2+r.getUint16(o+2)}})}}const x9=async s=>{const e=I9(s);if(!e)throw new d2("Gain map XMP metadata not found");const n=await new C9({extractFII:!0,extractNonFII:!0}).extract(s);if(n.length!==2)throw new u2("Gain map recovery image not found");return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:e}},gS=s=>new Promise((e,t)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=i=>{t(i)},n.src=URL.createObjectURL(s)});class w9 extends Xs{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new CT}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new tn,sdr:new tn});return this._config.createQuadRenderer({width:16,height:16,type:yn,colorSpace:nn,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,n){const i=t?new Blob([t],{type:"image/jpeg"}):void 0,r=new Blob([e],{type:"image/jpeg"});let a,o,l=!1;if(typeof createImageBitmap>"u"){const c=await Promise.all([i?gS(i):Promise.resolve(void 0),gS(r)]);o=c[0],a=c[1],l=n==="flipY"}else{const c=await Promise.all([i?createImageBitmap(i,{imageOrientation:n||"flipY"}):Promise.resolve(void 0),createImageBitmap(r,{imageOrientation:n||"flipY"})]);o=c[0],a=c[1]}return{sdrImage:a,gainMapImage:o,needsFlip:l}}createTextures(e,t,n){const i=new tn(t||new ImageData(2,2),nh,xn,xn,xt,Ky,Lt,Zt,1,nn);i.flipY=n,i.needsUpdate=!0;const r=new tn(e,nh,xn,xn,xt,Ky,Lt,Zt,1,Yt);return r.flipY=n,r.needsUpdate=!0,{gainMap:i,sdr:r}}updateQuadRenderer(e,t,n,i,r){e.width=t.width,e.height=t.height,e.material.gainMap=n,e.material.sdr=i,e.material.gainMapMin=r.gainMapMin,e.material.gainMapMax=r.gainMapMax,e.material.offsetHdr=r.offsetHdr,e.material.offsetSdr=r.offsetSdr,e.material.gamma=r.gamma,e.material.hdrCapacityMin=r.hdrCapacityMin,e.material.hdrCapacityMax=r.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,r.hdrCapacityMax),e.material.needsUpdate=!0}}const S9=`
|
|
16892
|
+
*/const Bu=Symbol("correlatedSceneGraph");class v9 extends _9{static[Kf](e){const t=super[Kf](e);t[Bu]==null&&(t[Bu]=Yd.from(t));const{scene:n}=t,i=new Hi(void 0,1/0);return n.traverse(r=>{r.renderOrder=1e3,r.frustumCulled=!1,r.name||(r.name=r.uuid);const a=r;if(a.material){const{geometry:o}=a;a.castShadow=!0,a.isSkinnedMesh&&(o.boundingSphere=i,o.boundingBox=null);const l=a.material;if(l.isMeshBasicMaterial===!0&&(l.toneMapped=!1),l.shadowSide=Vs,l.aoMap){const{gltf:c,threeObjectMap:h}=t[Bu],u=h.get(l);if(c.materials!=null&&u!=null&&u.materials!=null){const d=c.materials[u.materials];d.occlusionTexture&&d.occlusionTexture.texCoord===0&&o.attributes.uv!=null&&o.setAttribute("uv2",o.attributes.uv)}}}}),t}get correlatedSceneGraph(){return this[nr][Bu]}[Zf](){const e=super[Zf](),t=new Map;return e.scene.traverse(n=>{const i=n;if(i.material){const a=i.material;if(a!=null){if(t.has(a.uuid)){i.material=t.get(a.uuid);return}i.material=a.clone(),t.set(a.uuid,i.material)}}const r=n;r.target!==void 0&&r.add(r.target)}),e[Bu]=Yd.from(e,this.correlatedSceneGraph),e}}const h2=(s,e,t)=>{let n;switch(s){case Zt:n=new Uint8ClampedArray(e*t*4);break;case yn:n=new Uint16Array(e*t*4);break;case Di:n=new Uint32Array(e*t*4);break;case k0:n=new Int8Array(e*t*4);break;case U0:n=new Int16Array(e*t*4);break;case og:n=new Int32Array(e*t*4);break;case En:n=new Float32Array(e*t*4);break;default:throw new Error("Unsupported data type")}return n};let Ip;const I9=(s,e,t,n)=>{if(Ip!==void 0)return Ip;const i=new Nn(1,1,n);e.setRenderTarget(i);const r=new je(new js,new Un({color:16777215}));e.render(r,t),e.setRenderTarget(null);const a=h2(s,i.width,i.height);return e.readRenderTargetPixels(i,0,0,i.width,i.height,a),i.dispose(),r.geometry.dispose(),r.material.dispose(),Ip=a[0]!==0,Ip};class zb{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(e){this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace=e.colorSpace;const t={format:Lt,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:e.renderTargetOptions?.anisotropy!==void 0?e.renderTargetOptions?.anisotropy:1,generateMipmaps:e.renderTargetOptions?.generateMipmaps!==void 0?e.renderTargetOptions?.generateMipmaps:!1,magFilter:e.renderTargetOptions?.magFilter!==void 0?e.renderTargetOptions?.magFilter:xt,minFilter:e.renderTargetOptions?.minFilter!==void 0?e.renderTargetOptions?.minFilter:xt,samples:e.renderTargetOptions?.samples!==void 0?e.renderTargetOptions?.samples:void 0,wrapS:e.renderTargetOptions?.wrapS!==void 0?e.renderTargetOptions?.wrapS:xn,wrapT:e.renderTargetOptions?.wrapT!==void 0?e.renderTargetOptions?.wrapT:xn};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=zb.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new co,this._camera=new ba,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!I9(this._type,this._renderer,this._camera,t)){let n;switch(this._type){case yn:n=this._renderer.extensions.has("EXT_color_buffer_float")?En:void 0;break}n!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${En}`),this._type=n):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new je(new js,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Nn(this.width,this.height,t),this._renderTarget.texture.mapping=e.renderTargetOptions?.mapping!==void 0?e.renderTargetOptions?.mapping:nh}static instantiateRenderer(){const e=new Rf;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=h2(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const t=new Th(this.toArray(),this.width,this.height,Lt,this._type,e?.mapping||nh,e?.wrapS||xn,e?.wrapT||xn,e?.magFilter||xt,e?.minFilter||xt,e?.anisotropy||1,nn);return t.generateMipmaps=e?.generateMipmaps!==void 0?e?.generateMipmaps:!1,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof Tn&&Object.values(this.material.uniforms).forEach(t=>{t.value instanceof tn&&t.value.dispose()}),Object.values(this.material).forEach(t=>{t instanceof tn&&t.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}class u2 extends Error{}class d2 extends Error{}const Tu=(s,e,t)=>{const n=new RegExp(`${e}="([^"]*)"`,"i").exec(s);if(n)return n[1];const i=new RegExp(`<${e}[^>]*>([\\s\\S]*?)</${e}>`,"i").exec(s);if(i){const r=i[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return r&&r.length===3?r.map(a=>a.replace(/<\/?rdf:li>/g,"")):i[1].trim()}if(t!==void 0)return t;throw new Error(`Can't find ${e} in gainmap metadata`)},C9=s=>{let e;typeof TextDecoder<"u"?e=new TextDecoder().decode(s):e=s.toString();let t=e.indexOf("<x:xmpmeta");for(;t!==-1;){const n=e.indexOf("x:xmpmeta>",t),i=e.slice(t,n+10);try{const r=Tu(i,"hdrgm:GainMapMin","0"),a=Tu(i,"hdrgm:GainMapMax"),o=Tu(i,"hdrgm:Gamma","1"),l=Tu(i,"hdrgm:OffsetSDR","0.015625"),c=Tu(i,"hdrgm:OffsetHDR","0.015625"),h=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(i),u=h?h[1]:"0",d=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(i);if(!d)throw new Error("Incomplete gainmap metadata");const A=d[1];return{gainMapMin:Array.isArray(r)?r.map(p=>parseFloat(p)):[parseFloat(r),parseFloat(r),parseFloat(r)],gainMapMax:Array.isArray(a)?a.map(p=>parseFloat(p)):[parseFloat(a),parseFloat(a),parseFloat(a)],gamma:Array.isArray(o)?o.map(p=>parseFloat(p)):[parseFloat(o),parseFloat(o),parseFloat(o)],offsetSdr:Array.isArray(l)?l.map(p=>parseFloat(p)):[parseFloat(l),parseFloat(l),parseFloat(l)],offsetHdr:Array.isArray(c)?c.map(p=>parseFloat(p)):[parseFloat(c),parseFloat(c),parseFloat(c)],hdrCapacityMin:parseFloat(u),hdrCapacityMax:parseFloat(A)}}catch{}t=e.indexOf("<x:xmpmeta",n)}};class x9{options;constructor(e){this.options={debug:e&&e.debug!==void 0?e.debug:!1,extractFII:e&&e.extractFII!==void 0?e.extractFII:!0,extractNonFII:e&&e.extractNonFII!==void 0?e.extractNonFII:!0}}extract(e){return new Promise((t,n)=>{const i=this.options.debug,r=new DataView(e.buffer);if(r.getUint16(0)!==65496){n(new Error("Not a valid jpeg"));return}const a=r.byteLength;let o=2,l=0,c;for(;o<a;){if(++l>250){n(new Error(`Found no marker after ${l} loops 😵`));return}if(r.getUint8(o)!==255){n(new Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${r.getUint8(o).toString(16)}`));return}if(c=r.getUint8(o+1),i&&console.log(`Marker: ${c.toString(16)}`),c===226){i&&console.log("Found APP2 marker (0xffe2)");const h=o+4;if(r.getUint32(h)===1297106432){const u=h+4;let d;if(r.getUint16(u)===18761)d=!1;else if(r.getUint16(u)===19789)d=!0;else{n(new Error("No valid endianness marker found in TIFF header"));return}if(r.getUint16(u+2,!d)!==42){n(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const A=r.getUint32(u+4,!d);if(A<8){n(new Error("Not valid TIFF data! (First offset less than 8)"));return}const p=u+A,g=r.getUint16(p,!d),m=p+2;let f=0;for(let b=m;b<m+12*g;b+=12)r.getUint16(b,!d)===45057&&(f=r.getUint32(b+8,!d));const E=p+2+g*12+4,y=[];for(let b=E;b<E+f*16;b+=16){const x={MPType:r.getUint32(b,!d),size:r.getUint32(b+4,!d),dataOffset:r.getUint32(b+8,!d),dependantImages:r.getUint32(b+12,!d),start:-1,end:-1,isFII:!1};x.dataOffset?(x.start=u+x.dataOffset,x.isFII=!1):(x.start=0,x.isFII=!0),x.end=x.start+x.size,y.push(x)}if(this.options.extractNonFII&&y.length){const b=new Blob([r]),x=[];for(const I of y){if(I.isFII&&!this.options.extractFII)continue;const w=b.slice(I.start,I.end+1,"image/jpeg");x.push(w)}t(x)}}}o+=2+r.getUint16(o+2)}})}}const w9=async s=>{const e=C9(s);if(!e)throw new d2("Gain map XMP metadata not found");const n=await new x9({extractFII:!0,extractNonFII:!0}).extract(s);if(n.length!==2)throw new u2("Gain map recovery image not found");return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:e}},gS=s=>new Promise((e,t)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=i=>{t(i)},n.src=URL.createObjectURL(s)});class S9 extends Xs{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new CT}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new tn,sdr:new tn});return this._config.createQuadRenderer({width:16,height:16,type:yn,colorSpace:nn,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,n){const i=t?new Blob([t],{type:"image/jpeg"}):void 0,r=new Blob([e],{type:"image/jpeg"});let a,o,l=!1;if(typeof createImageBitmap>"u"){const c=await Promise.all([i?gS(i):Promise.resolve(void 0),gS(r)]);o=c[0],a=c[1],l=n==="flipY"}else{const c=await Promise.all([i?createImageBitmap(i,{imageOrientation:n||"flipY"}):Promise.resolve(void 0),createImageBitmap(r,{imageOrientation:n||"flipY"})]);o=c[0],a=c[1]}return{sdrImage:a,gainMapImage:o,needsFlip:l}}createTextures(e,t,n){const i=new tn(t||new ImageData(2,2),nh,xn,xn,xt,Ky,Lt,Zt,1,nn);i.flipY=n,i.needsUpdate=!0;const r=new tn(e,nh,xn,xn,xt,Ky,Lt,Zt,1,Yt);return r.flipY=n,r.needsUpdate=!0,{gainMap:i,sdr:r}}updateQuadRenderer(e,t,n,i,r){e.width=t.width,e.height=t.height,e.material.gainMap=n,e.material.sdr=i,e.material.gainMapMin=r.gainMapMin,e.material.gainMapMax=r.gainMapMax,e.material.offsetHdr=r.offsetHdr,e.material.offsetSdr=r.offsetSdr,e.material.gamma=r.gamma,e.material.hdrCapacityMin=r.hdrCapacityMin,e.material.hdrCapacityMax=r.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,r.hdrCapacityMax),e.material.needsUpdate=!0}}const B9=`
|
|
16893
16893
|
varying vec2 vUv;
|
|
16894
16894
|
|
|
16895
16895
|
void main() {
|
|
16896
16896
|
vUv = uv;
|
|
16897
16897
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
16898
16898
|
}
|
|
16899
|
-
`,
|
|
16899
|
+
`,T9=`
|
|
16900
16900
|
// min half float value
|
|
16901
16901
|
#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )
|
|
16902
16902
|
// max half float value
|
|
@@ -16922,7 +16922,7 @@ void main() {
|
|
|
16922
16922
|
vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));
|
|
16923
16923
|
gl_FragColor = vec4( clampedHdrColor , 1.0 );
|
|
16924
16924
|
}
|
|
16925
|
-
`;class
|
|
16925
|
+
`;class M9 extends Tn{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:n,gainMapMin:i,gainMapMax:r,maxDisplayBoost:a,hdrCapacityMin:o,hdrCapacityMax:l,sdr:c,gainMap:h}){super({name:"GainMapDecoderMaterial",vertexShader:B9,fragmentShader:T9,uniforms:{sdr:{value:c},gainMap:{value:h},gamma:{value:new Q(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new Q().fromArray(t)},offsetSdr:{value:new Q().fromArray(n)},gainMapMin:{value:new Q().fromArray(i)},gainMapMax:{value:new Q().fromArray(r)},weightFactor:{value:(Math.log2(a)-o)/(l-o)}},blending:Hs,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=a,this._hdrCapacityMin=o,this._hdrCapacityMax=l,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){const e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){const t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){const e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}class R9 extends S9{constructor(e,t){super({renderer:e,createMaterial:n=>new M9(n),createQuadRenderer:n=>new zb(n)},t)}async render(e,t,n,i){const{sdrImage:r,gainMapImage:a,needsFlip:o}=await this.processImages(n,i,"flipY"),{gainMap:l,sdr:c}=this.createTextures(r,a,o);this.updateQuadRenderer(e,r,l,c,t),e.render()}}class D9 extends R9{load(e,t,n,i){const r=this.prepareQuadRenderer(),a=new dr(this._internalLoadingManager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(this.withCredentials),this.manager.itemStart(e),a.load(e,async o=>{if(typeof o=="string")throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const l=new Uint8Array(o);let c,h,u;try{const d=await w9(l);c=d.sdr,h=d.gainMap,u=d.metadata}catch(d){if(d instanceof d2||d instanceof u2)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),u={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},c=l;else throw d}try{await this.render(r,u,c.buffer,h?.buffer)}catch(d){this.manager.itemError(e),typeof i=="function"&&i(d),r.disposeOnDemandRenderer();return}typeof t=="function"&&t(r),this.manager.itemEnd(e),r.disposeOnDemandRenderer()},n,o=>{this.manager.itemError(e),typeof i=="function"&&i(o)}),r}}/* @license
|
|
16926
16926
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
16927
16927
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16928
16928
|
* you may not use this file except in compliance with the License.
|
|
@@ -16935,7 +16935,7 @@ void main() {
|
|
|
16935
16935
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16936
16936
|
* See the License for the specific language governing permissions and
|
|
16937
16937
|
* limitations under the License.
|
|
16938
|
-
*/const
|
|
16938
|
+
*/const Q9={topLight:{intensity:500,position:[.418,16.199,.3]},room:{position:[-.757,13.219,.717],scale:[31.713,28.305,28.591]},boxes:[{position:[-10.906,2.009,1.846],rotation:-.195,scale:[2.328,7.905,4.651]},{position:[-5.607,-.754,-.758],rotation:.994,scale:[1.97,1.534,3.955]},{position:[6.167,.857,7.803],rotation:.561,scale:[3.927,6.285,3.687]},{position:[-2.017,.018,6.124],rotation:.333,scale:[2.002,4.566,2.064]},{position:[2.291,-.756,-2.621],rotation:-.286,scale:[1.546,1.552,1.496]},{position:[-2.193,-.369,-5.547],rotation:.516,scale:[3.875,3.487,2.986]}],lights:[{intensity:50,position:[-16.116,14.37,8.208],scale:[.1,2.428,2.739]},{intensity:50,position:[-16.109,18.021,-8.207],scale:[.1,2.425,2.751]},{intensity:17,position:[14.904,12.198,-1.832],scale:[.15,4.265,6.331]},{intensity:43,position:[-.462,8.89,14.52],scale:[4.38,5.441,.088]},{intensity:20,position:[3.235,11.486,-12.541],scale:[2.5,2,.1]},{intensity:100,position:[0,20,0],scale:[1,.1,1]}]},L9={topLight:{intensity:400,position:[.5,14,.5]},room:{position:[0,13.2,0],scale:[31.5,28.5,31.5]},boxes:[{position:[-10.906,-1,1.846],rotation:-.195,scale:[2.328,7.905,4.651]},{position:[-5.607,-.754,-.758],rotation:.994,scale:[1.97,1.534,3.955]},{position:[6.167,-.16,7.803],rotation:.561,scale:[3.927,6.285,3.687]},{position:[-2.017,.018,6.124],rotation:.333,scale:[2.002,4.566,2.064]},{position:[2.291,-.756,-2.621],rotation:-.286,scale:[1.546,1.552,1.496]},{position:[-2.193,-.369,-5.547],rotation:.516,scale:[3.875,3.487,2.986]}],lights:[{intensity:80,position:[-14,10,8],scale:[.1,2.5,2.5]},{intensity:80,position:[-14,14,-4],scale:[.1,2.5,2.5]},{intensity:23,position:[14,12,0],scale:[.1,5,5]},{intensity:16,position:[0,9,14],scale:[5,5,.1]},{intensity:80,position:[7,8,-14],scale:[2.5,2.5,.1]},{intensity:80,position:[-7,16,-14],scale:[2.5,2.5,.1]},{intensity:1,position:[0,20,0],scale:[.1,.1,.1]}]};class mS extends co{constructor(e){super(),this.position.y=-3.5;const t=new xs;t.deleteAttribute("uv");const n=new bl({metalness:0,side:si}),i=new bl({metalness:0}),r=e=="legacy"?Q9:L9,a=new xT(16777215,r.topLight.intensity,28,2);a.position.set(...r.topLight.position),this.add(a);const o=new je(t,n);o.position.set(...r.room.position),o.scale.set(...r.room.scale),this.add(o);for(const l of r.boxes){const c=new je(t,i);c.position.set(...l.position),c.rotation.set(0,l.rotation,0),c.scale.set(...l.scale),this.add(c)}for(const l of r.lights){const c=new je(t,this.createAreaLightMaterial(l.intensity));c.position.set(...l.position),c.scale.set(...l.scale),this.add(c)}}createAreaLightMaterial(e){const t=new Un;return t.color.setScalar(e),t}}/* @license
|
|
16939
16939
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
16940
16940
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
16941
16941
|
* you may not use this file except in compliance with the License.
|
|
@@ -16948,7 +16948,7 @@ void main() {
|
|
|
16948
16948
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16949
16949
|
* See the License for the specific language governing permissions and
|
|
16950
16950
|
* limitations under the License.
|
|
16951
|
-
*/const
|
|
16951
|
+
*/const N9=.04,Ec=20,P9=/\.hdr(\.js)?$/;class ES{constructor(e){this.threeRenderer=e,this.lottieLoaderUrl="",this._ldrLoader=null,this._imageLoader=null,this._hdrLoader=null,this._lottieLoader=null,this.generatedEnvironmentMap=null,this.generatedEnvironmentMapAlt=null,this.skyboxCache=new Map,this.blurMaterial=null,this.blurScene=null}ldrLoader(e){return this._ldrLoader==null&&(this._ldrLoader=new ib),this._ldrLoader.setWithCredentials(e),this._ldrLoader}imageLoader(e){return this._imageLoader==null&&(this._imageLoader=new D9(this.threeRenderer)),this._imageLoader.setWithCredentials(e),this._imageLoader}hdrLoader(e){return this._hdrLoader==null&&(this._hdrLoader=new h1,this._hdrLoader.setDataType(yn)),this._hdrLoader.setWithCredentials(e),this._hdrLoader}async getLottieLoader(e){if(this._lottieLoader==null){const{LottieLoader:t}=await import(this.lottieLoaderUrl);this._lottieLoader=new t}return this._lottieLoader.setWithCredentials(e),this._lottieLoader}async loadImage(e,t){const n=await new Promise((i,r)=>this.ldrLoader(t).load(e,i,()=>{},r));return n.name=e,n.flipY=!1,n}async loadLottie(e,t,n){const i=await this.getLottieLoader(n);i.setQuality(t);const r=await new Promise((a,o)=>i.load(e,a,()=>{},o));return r.name=e,r}async loadEquirect(e,t=!1,n=()=>{}){try{const i=P9.test(e),r=i?this.hdrLoader(t):this.imageLoader(t),a=await new Promise((o,l)=>r.load(e,c=>{const{renderTarget:h}=c;if(h!=null){const{texture:u}=h;c.dispose(!1),o(u)}else o(c)},c=>{n(c.loaded/c.total*.9)},l));return n(1),a.name=e,a.mapping=Sd,i||(a.colorSpace=Yt),a}finally{n&&n(1)}}async generateEnvironmentMapAndSkybox(e=null,t=null,n=()=>{},i=!1){const r=t!=="legacy";(t==="legacy"||t==="neutral")&&(t=null),t=VR(t);let a=Promise.resolve(null),o;e&&(a=this.loadEquirectFromUrl(e,i,n)),t?o=this.loadEquirectFromUrl(t,i,n):e?o=this.loadEquirectFromUrl(e,i,n):o=r?this.loadGeneratedEnvironmentMapAlt():this.loadGeneratedEnvironmentMap();const[l,c]=await Promise.all([o,a]);if(l==null)throw new Error("Failed to load environment map.");return{environmentMap:l,skybox:c}}async loadEquirectFromUrl(e,t,n){if(!this.skyboxCache.has(e)){const i=this.loadEquirect(e,t,n);this.skyboxCache.set(e,i)}return this.skyboxCache.get(e)}async GenerateEnvironmentMap(e,t){await r6();const n=this.threeRenderer,i=new cg(256,{generateMipmaps:!1,type:yn,format:Lt,colorSpace:nn,depthBuffer:!0}),r=new Sf(.1,100,i),a=r.renderTarget.texture;a.name=t;const o=n.outputColorSpace,l=n.toneMapping;return n.toneMapping=cr,n.outputColorSpace=nn,r.update(n,e),this.blurCubemap(i,N9),n.toneMapping=l,n.outputColorSpace=o,a}async loadGeneratedEnvironmentMap(){return this.generatedEnvironmentMap==null&&(this.generatedEnvironmentMap=this.GenerateEnvironmentMap(new mS("legacy"),"legacy")),this.generatedEnvironmentMap}async loadGeneratedEnvironmentMapAlt(){return this.generatedEnvironmentMapAlt==null&&(this.generatedEnvironmentMapAlt=this.GenerateEnvironmentMap(new mS("neutral"),"neutral")),this.generatedEnvironmentMapAlt}blurCubemap(e,t){if(this.blurMaterial==null){this.blurMaterial=this.getBlurShader(Ec);const i=new xs,r=new je(i,this.blurMaterial);this.blurScene=new co,this.blurScene.add(r)}const n=e.clone();this.halfblur(e,n,t,"latitudinal"),this.halfblur(n,e,t,"longitudinal")}halfblur(e,t,n,i){const a=e.width,o=isFinite(n)?Math.PI/(2*a):2*Math.PI/(2*Ec-1),l=n/o,c=isFinite(n)?1+Math.floor(3*l):Ec;c>Ec&&console.warn(`sigmaRadians, ${n}, is too large and will clip, as it requested ${c} samples when the maximum is set to ${Ec}`);const h=[];let u=0;for(let p=0;p<Ec;++p){const g=p/l,m=Math.exp(-g*g/2);h.push(m),p==0?u+=m:p<c&&(u+=2*m)}for(let p=0;p<h.length;p++)h[p]=h[p]/u;const d=this.blurMaterial.uniforms;d.envMap.value=e.texture,d.samples.value=c,d.weights.value=h,d.latitudinal.value=i==="latitudinal",d.dTheta.value=o,new Sf(.1,100,t).update(this.threeRenderer,this.blurScene)}getBlurShader(e){const t=new Float32Array(e),n=new Q(0,1,0);return new Tn({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},poleAxis:{value:n}},vertexShader:`
|
|
16952
16952
|
|
|
16953
16953
|
varying vec3 vOutputDirection;
|
|
16954
16954
|
|
|
@@ -17022,7 +17022,7 @@ void main() {
|
|
|
17022
17022
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17023
17023
|
* See the License for the specific language governing permissions and
|
|
17024
17024
|
* limitations under the License.
|
|
17025
|
-
*/const
|
|
17025
|
+
*/const F9=.2,JE=40,KE=60,yS=5,yc=[1,.79,.62,.5,.4,.31,.25],k9=3,_S="high-performance",U9=1.3;class zs extends Ws{static get singleton(){return this._singleton||(this._singleton=new zs({powerPreference:(self.ModelViewerElement||{}).powerPreference||_S,debug:mw()})),this._singleton}static resetSingleton(){const e=this._singleton.dispose();for(const t of e)t.disconnectedCallback();this._singleton=new zs({powerPreference:(self.ModelViewerElement||{}).powerPreference||_S,debug:mw()});for(const t of e)t.connectedCallback()}get canRender(){return this.threeRenderer!=null}get scaleFactor(){return yc[this.scaleStep]}set minScale(e){let t=1;for(;t<yc.length&&!(yc[t]<e);)++t;this.lastStep=t-1}constructor(e){super(),this.loader=new wi(v9),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=k9,this.avgFrameDuration=(KE+JE)/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=new ES(this.threeRenderer);for(const n of this.scenes)n.element[Jf]()},this.dpr=window.devicePixelRatio,this.canvas3D=document.createElement("canvas"),this.canvas3D.id="webgl-canvas",this.canvas3D.classList.add("show");try{this.threeRenderer=new Rf({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=wd}catch(t){console.warn(t)}this.arRenderer=new y9(this),this.textureUtils=this.canRender?new ES(this.threeRenderer):null,wi.initializeKTX2Loader(this.threeRenderer),this.canvas3D.addEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.addEventListener("webglcontextrestored",this.onWebGLContextRestored),this.updateRendererSize()}registerScene(e){this.scenes.add(e),e.forceRescale();const t=new Ie;this.threeRenderer.getSize(t),e.canvas.width=t.x,e.canvas.height=t.y,this.canRender&&this.scenes.size>0&&this.threeRenderer.setAnimationLoop((n,i)=>this.render(n,i))}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[y0]}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 i=t>1;if(n!=null){const r=i&&!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=i}updateRendererSize(){var e;const t=window.devicePixelRatio;if(t!==this.dpr)for(const r of this.scenes){const{element:a}=r;a[Mc](a.getBoundingClientRect())}let n=0,i=0;for(const r of this.scenes)n=Math.max(n,r.width),i=Math.max(i,r.height);if(!(n===this.width&&i===this.height&&t===this.dpr)){this.width=n,this.height=i,this.dpr=t,n=Math.ceil(n*t),i=Math.ceil(i*t),this.canRender&&this.threeRenderer.setSize(n,i,!1);for(const r of this.scenes){const{canvas:a}=r;a.width=n,a.height=i,r.forceRescale(),(e=r.effectRenderer)===null||e===void 0||e.setSize(n,i)}}}updateRendererScale(e){const t=this.scaleStep;this.avgFrameDuration+=or(F9*(e-this.avgFrameDuration),-yS,yS),this.avgFrameDuration>KE?++this.scaleStep:this.avgFrameDuration<JE&&this.scaleStep>0&&--this.scaleStep,this.scaleStep=Math.min(this.scaleStep,this.lastStep),t!==this.scaleStep&&(this.avgFrameDuration=(KE+JE)/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=yc[e.scaleStep],n=Math.ceil(this.width/t),i=Math.ceil(this.height/t),{style:r}=e.canvas;r.width=`${n}px`,r.height=`${i}px`,this.canvas3D.style.width=`${n}px`,this.canvas3D.style.height=`${i}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*yc[this.lastStep],pixelWidth:Math.ceil(e.width*a),pixelHeight:Math.ceil(e.height*a),reason:o}}))}sceneSize(e){const{dpr:t}=this,n=yc[e.scaleStep],i=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:i,height:r}}copyPixels(e,t,n){const i=e.context;if(i==null){console.log("could not acquire 2d context");return}i.clearRect(0,0,t,n),i.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(){return this.arRenderer.isPresenting}preRender(e,t,n){const{element:i,exposure:r,toneMapping:a}=e;i[mr](t,n);const o=typeof r=="number"&&!Number.isNaN(r),l=i.environmentImage,c=i.skyboxImage,h=a===wd&&(l==="neutral"||l==="legacy"||!l&&!c);this.threeRenderer.toneMappingExposure=(o?r:1)*(h?U9:1)}render(e,t){if(t!=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:i}=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:h,projectionMatrix:u}=c,d=h.elements.slice(),A=r.getTarget();d[12]+=A.x,d[13]+=A.y,d[14]+=A.z,r.externalRenderer.render({viewMatrix:d,projectionMatrix:u.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):i.parentElement!==r.canvas.parentElement&&(r.canvas.parentElement.appendChild(i),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
|
|
17026
17026
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17027
17027
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17028
17028
|
* you may not use this file except in compliance with the License.
|
|
@@ -17048,7 +17048,7 @@ void main() {
|
|
|
17048
17048
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17049
17049
|
* See the License for the specific language governing permissions and
|
|
17050
17050
|
* limitations under the License.
|
|
17051
|
-
*/const bS=new Un,
|
|
17051
|
+
*/const bS=new Un,O9=new js(2,2);let G9=0;const xi=Symbol("threeTexture"),vS=Symbol("threeTextures");let z9=class extends cA{get[xi](){var e;return(e=this[ft])===null||e===void 0?void 0:e.values().next().value}get[vS](){return this[ft]}constructor(e,t){super(e,new Set(t?[t]:[])),this[xi].image.src||(this[xi].image.src=t.name?t.name:"adhoc_image"+G9++),this[xi].image.name||(this[xi].image.name=t&&t.image&&t.image.src?t.image.src.split("/").pop():"adhoc_image")}get name(){return this[xi].image.name||""}get uri(){return this[xi].image.src}get bufferView(){return this[xi].image.bufferView}get element(){const e=this[xi];if(e&&(e.isCanvasTexture||e.isVideoTexture))return e.image}get animation(){const e=this[xi];if(e&&e.isCanvasTexture&&e.animation)return e.animation}get type(){return this.uri!=null?"external":"embedded"}set name(e){for(const t of this[vS])t.image.name=e}update(){const e=this[xi];e&&e.isCanvasTexture&&!e.animation&&(this[xi].needsUpdate=!0,this[Gt]())}async createThumbnail(e,t){const n=new co;bS.map=this[xi];const i=new je(O9,bS);n.add(i);const r=new ba(-1,1,1,-1,0,1),{threeRenderer:a}=zs.singleton,o=new Nn(e,t);a.setRenderTarget(o),a.render(n,r),a.setRenderTarget(null);const l=new Uint8Array(e*t*4);a.readRenderTargetPixels(o,0,0,e,t,l),io.width=e,io.height=t;const c=io.getContext("2d"),h=c.createImageData(e,t);return h.data.set(l),c.putImageData(h,0,0),new Promise(async(u,d)=>{io.toBlob(A=>{if(!A)return d("Failed to capture thumbnail.");u(URL.createObjectURL(A))},"image/png")})}};var Wn;(function(s){s[s.Nearest=9728]="Nearest",s[s.Linear=9729]="Linear",s[s.NearestMipmapNearest=9984]="NearestMipmapNearest",s[s.LinearMipmapNearest=9985]="LinearMipmapNearest",s[s.NearestMipmapLinear=9986]="NearestMipmapLinear",s[s.LinearMipmapLinear=9987]="LinearMipmapLinear"})(Wn||(Wn={}));var lo;(function(s){s[s.ClampToEdge=33071]="ClampToEdge",s[s.MirroredRepeat=33648]="MirroredRepeat",s[s.Repeat=10497]="Repeat"})(lo||(lo={}));/* @license
|
|
17052
17052
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17053
17053
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17054
17054
|
* you may not use this file except in compliance with the License.
|
|
@@ -17061,7 +17061,7 @@ void main() {
|
|
|
17061
17061
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17062
17062
|
* See the License for the specific language governing permissions and
|
|
17063
17063
|
* limitations under the License.
|
|
17064
|
-
*/const IS=new Map([[lo.Repeat,Ys],[lo.ClampToEdge,xn],[lo.MirroredRepeat,yl]]),p0=new Map([[Ys,lo.Repeat],[xn,lo.ClampToEdge],[yl,lo.MirroredRepeat]]),
|
|
17064
|
+
*/const IS=new Map([[lo.Repeat,Ys],[lo.ClampToEdge,xn],[lo.MirroredRepeat,yl]]),p0=new Map([[Ys,lo.Repeat],[xn,lo.ClampToEdge],[yl,lo.MirroredRepeat]]),H9=new Map([[Wn.Nearest,dn],[Wn.Linear,xt],[Wn.NearestMipmapNearest,jd],[Wn.LinearMipmapNearest,hl],[Wn.NearestMipmapLinear,Ja],[Wn.LinearMipmapLinear,Ri]]),A2=new Map([[dn,Wn.Nearest],[xt,Wn.Linear],[jd,Wn.NearestMipmapNearest],[hl,Wn.LinearMipmapNearest],[Ja,Wn.NearestMipmapLinear],[Ri,Wn.LinearMipmapLinear]]),$9=new Map([[Wn.Nearest,dn],[Wn.Linear,xt]]),p2=new Map([[dn,Wn.Nearest],[xt,Wn.Linear]]),V9=s=>A2.has(s),Y9=s=>p2.has(s),q9=s=>p0.has(s),W9=(s,e)=>{switch(s){case"minFilter":return V9(e);case"magFilter":return Y9(e);case"wrapS":case"wrapT":return q9(e);case"rotation":case"repeat":case"offset":return!0;default:throw new Error(`Cannot configure property "${s}" on Sampler`)}},Fr=Symbol("threeTexture"),CS=Symbol("threeTextures"),Pa=Symbol("setProperty");class j9 extends cA{get[Fr](){var e;return(e=this[ft])===null||e===void 0?void 0:e.values().next().value}get[CS](){return this[ft]}constructor(e,t){super(e,new Set(t?[t]:[]))}get name(){return this[Fr].name||""}get minFilter(){return A2.get(this[Fr].minFilter)}get magFilter(){return p2.get(this[Fr].magFilter)}get wrapS(){return p0.get(this[Fr].wrapS)}get wrapT(){return p0.get(this[Fr].wrapT)}get rotation(){return this[Fr].rotation}get scale(){return _0(this[Fr].repeat)}get offset(){return _0(this[Fr].offset)}setMinFilter(e){this[Pa]("minFilter",H9.get(e))}setMagFilter(e){this[Pa]("magFilter",$9.get(e))}setWrapS(e){this[Pa]("wrapS",IS.get(e))}setWrapT(e){this[Pa]("wrapT",IS.get(e))}setRotation(e){e==null&&(e=0),this[Pa]("rotation",e)}setScale(e){e==null&&(e={u:1,v:1}),this[Pa]("repeat",new Ie(e.u,e.v))}setOffset(e){e==null&&(e={u:0,v:0}),this[Pa]("offset",new Ie(e.u,e.v))}[Pa](e,t){if(W9(e,t))for(const n of this[CS])n[e]=t,n.needsUpdate=!0;this[Gt]()}}/* @license
|
|
17065
17065
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17066
17066
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17067
17067
|
* you may not use this file except in compliance with the License.
|
|
@@ -17074,7 +17074,7 @@ void main() {
|
|
|
17074
17074
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17075
17075
|
* See the License for the specific language governing permissions and
|
|
17076
17076
|
* limitations under the License.
|
|
17077
|
-
*/const xS=Symbol("image"),wS=Symbol("sampler"),SS=Symbol("threeTexture");class f2 extends cA{get[SS](){var e;return(e=this[ft])===null||e===void 0?void 0:e.values().next().value}constructor(e,t){super(e,new Set(t?[t]:[])),this[wS]=new
|
|
17077
|
+
*/const xS=Symbol("image"),wS=Symbol("sampler"),SS=Symbol("threeTexture");class f2 extends cA{get[SS](){var e;return(e=this[ft])===null||e===void 0?void 0:e.values().next().value}constructor(e,t){super(e,new Set(t?[t]:[])),this[wS]=new j9(e,t),this[xS]=new z9(e,t)}get name(){return this[SS].name||""}set name(e){for(const t of this[ft])t.name=e}get sampler(){return this[wS]}get source(){return this[xS]}}/* @license
|
|
17078
17078
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17079
17079
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17080
17080
|
* you may not use this file except in compliance with the License.
|
|
@@ -17100,7 +17100,7 @@ void main() {
|
|
|
17100
17100
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17101
17101
|
* See the License for the specific language governing permissions and
|
|
17102
17102
|
* limitations under the License.
|
|
17103
|
-
*/const Mu=Symbol("threeMaterial"),Cp=Symbol("threeMaterials"),TS=Symbol("baseColorTexture"),MS=Symbol("metallicRoughnessTexture");class
|
|
17103
|
+
*/const Mu=Symbol("threeMaterial"),Cp=Symbol("threeMaterials"),TS=Symbol("baseColorTexture"),MS=Symbol("metallicRoughnessTexture");class X9 extends cA{get[Cp](){return this[ft]}get[Mu](){var e;return(e=this[ft])===null||e===void 0?void 0:e.values().next().value}constructor(e,t){super(e,t);const{map:n,metalnessMap:i}=t.values().next().value;this[TS]=new Uc(e,Ze.Base,n,t),this[MS]=new Uc(e,Ze.MetallicRoughness,i,t)}get baseColorFactor(){const e=[0,0,0,this[Mu].opacity];return this[Mu].color.toArray(e),e}get metallicFactor(){return this[Mu].metalness}get roughnessFactor(){return this[Mu].roughness}get baseColorTexture(){return this[TS]}get metallicRoughnessTexture(){return this[MS]}setBaseColorFactor(e){const t=new Me;e instanceof Array?t.fromArray(e):t.set(e);for(const n of this[Cp])n.color.set(t),e instanceof Array&&e.length>3?n.opacity=e[3]:(e=[0,0,0,n.opacity],t.toArray(e));this[Gt]()}setMetallicFactor(e){for(const t of this[Cp])t.metalness=e;this[Gt]()}setRoughnessFactor(e){for(const t of this[Cp])t.roughness=e;this[Gt]()}}/* @license
|
|
17104
17104
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17105
17105
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17106
17106
|
* you may not use this file except in compliance with the License.
|
|
@@ -17113,7 +17113,7 @@ void main() {
|
|
|
17113
17113
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17114
17114
|
* See the License for the specific language governing permissions and
|
|
17115
17115
|
* limitations under the License.
|
|
17116
|
-
*/var RS,DS;const QS=Symbol("pbrMetallicRoughness"),LS=Symbol("normalTexture"),NS=Symbol("occlusionTexture"),PS=Symbol("emissiveTexture"),rn=Symbol("backingThreeMaterial"),FS=Symbol("applyAlphaCutoff"),ey=Symbol("getAlphaMode"),bc=Symbol("lazyLoadGLTFInfo"),ty=Symbol("initialize"),f0=Symbol("getLoadedMaterial"),Ue=Symbol("ensureMaterialIsLoaded"),kS=Symbol("gltfIndex"),Ku=Symbol("setActive"),Jc=Symbol("variantIndices"),ny=Symbol("isActive"),US=Symbol("modelVariants"),iy=Symbol("name"),Oi=Symbol("pbrTextures");class sy extends cA{get[(RS=Jc,DS=Oi,rn)](){return this[ft].values().next().value}constructor(e,t,n,i,r,a,o=void 0){super(e,r),this[RS]=new Set,this[DS]=new Map,this[kS]=t,this[ny]=n,this[US]=i,this[iy]=a,o==null?this[ty]():this[bc]=o}[ty](){const e=this[Gt],t=this[ft];this[QS]=new
|
|
17116
|
+
*/var RS,DS;const QS=Symbol("pbrMetallicRoughness"),LS=Symbol("normalTexture"),NS=Symbol("occlusionTexture"),PS=Symbol("emissiveTexture"),rn=Symbol("backingThreeMaterial"),FS=Symbol("applyAlphaCutoff"),ey=Symbol("getAlphaMode"),bc=Symbol("lazyLoadGLTFInfo"),ty=Symbol("initialize"),f0=Symbol("getLoadedMaterial"),Ue=Symbol("ensureMaterialIsLoaded"),kS=Symbol("gltfIndex"),Ku=Symbol("setActive"),Jc=Symbol("variantIndices"),ny=Symbol("isActive"),US=Symbol("modelVariants"),iy=Symbol("name"),Oi=Symbol("pbrTextures");class sy extends cA{get[(RS=Jc,DS=Oi,rn)](){return this[ft].values().next().value}constructor(e,t,n,i,r,a,o=void 0){super(e,r),this[RS]=new Set,this[DS]=new Map,this[kS]=t,this[ny]=n,this[US]=i,this[iy]=a,o==null?this[ty]():this[bc]=o}[ty](){const e=this[Gt],t=this[ft];this[QS]=new X9(e,t);const{normalMap:n,aoMap:i,emissiveMap:r}=t.values().next().value;this[LS]=new Uc(e,Ze.Normal,n,t),this[NS]=new Uc(e,Ze.Occlusion,i,t),this[PS]=new Uc(e,Ze.Emissive,r,t);const a=o=>{this[Oi].set(o,new Uc(e,o,null,t))};a(Ze.Clearcoat),a(Ze.ClearcoatRoughness),a(Ze.ClearcoatNormal),a(Ze.SheenColor),a(Ze.SheenRoughness),a(Ze.Transmission),a(Ze.Thickness),a(Ze.Specular),a(Ze.SpecularColor),a(Ze.Iridescence),a(Ze.IridescenceThickness),a(Ze.Anisotropy)}async[f0](){if(this[bc]!=null){const e=await this[bc].doLazyLoad();return this[ty](),this[bc]=void 0,this.ensureLoaded=async()=>{},e}return null}colorFromRgb(e){const t=new Me;return e instanceof Array?t.fromArray(e):t.set(e),t}[Ue](){if(this[bc]!=null)throw new Error(`Material "${this.name}" has not been loaded, call 'await
|
|
17117
17117
|
myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[f0]()}get isLoaded(){return this[bc]==null}get isActive(){return this[ny]}[Ku](e){this[ny]=e}get name(){return this[iy]||""}set name(e){if(this[iy]=e,this[ft]!=null)for(const t of this[ft])t.name=e}get pbrMetallicRoughness(){return this[Ue](),this[QS]}get normalTexture(){return this[Ue](),this[LS]}get occlusionTexture(){return this[Ue](),this[NS]}get emissiveTexture(){return this[Ue](),this[PS]}get emissiveFactor(){return this[Ue](),this[rn].emissive.toArray()}get index(){return this[kS]}hasVariant(e){const t=this[US].get(e);return t!=null&&this[Jc].has(t.index)}setEmissiveFactor(e){this[Ue]();const t=this.colorFromRgb(e);for(const n of this[ft])n.emissive.set(t);this[Gt]()}[ey](){return this[rn].transparent?"BLEND":this[rn].alphaTest>0?"MASK":"OPAQUE"}[FS](){this[Ue]();for(const e of this[ft])this[ey]()==="MASK"?e.alphaTest==null&&(e.alphaTest=.5):e.alphaTest=void 0,e.needsUpdate=!0}setAlphaCutoff(e){this[Ue]();for(const t of this[ft])t.alphaTest=e,t.needsUpdate=!0;this[FS](),this[Gt]()}getAlphaCutoff(){return this[Ue](),this[rn].alphaTest}setDoubleSided(e){this[Ue]();for(const t of this[ft])t.side=e?Ln:Vs,t.needsUpdate=!0;this[Gt]()}getDoubleSided(){return this[Ue](),this[rn].side==Ln}setAlphaMode(e){this[Ue]();const t=(n,i)=>{n.transparent=i,n.depthWrite=!i};for(const n of this[ft])t(n,e==="BLEND"),e==="MASK"?n.alphaTest=.5:n.alphaTest=void 0,n.needsUpdate=!0;this[Gt]()}getAlphaMode(){return this[Ue](),this[ey]()}get emissiveStrength(){return this[Ue](),this[rn].emissiveIntensity}setEmissiveStrength(e){this[Ue]();for(const t of this[ft])t.emissiveIntensity=e;this[Gt]()}get clearcoatFactor(){return this[Ue](),this[rn].clearcoat}get clearcoatRoughnessFactor(){return this[Ue](),this[rn].clearcoatRoughness}get clearcoatTexture(){return this[Ue](),this[Oi].get(Ze.Clearcoat)}get clearcoatRoughnessTexture(){return this[Ue](),this[Oi].get(Ze.ClearcoatRoughness)}get clearcoatNormalTexture(){return this[Ue](),this[Oi].get(Ze.ClearcoatNormal)}get clearcoatNormalScale(){return this[Ue](),this[rn].clearcoatNormalScale.x}setClearcoatFactor(e){this[Ue]();for(const t of this[ft])t.clearcoat=e;this[Gt]()}setClearcoatRoughnessFactor(e){this[Ue]();for(const t of this[ft])t.clearcoatRoughness=e;this[Gt]()}setClearcoatNormalScale(e){this[Ue]();for(const t of this[ft])t.clearcoatNormalScale=new Ie(e,e);this[Gt]()}get ior(){return this[Ue](),this[rn].ior}setIor(e){this[Ue]();for(const t of this[ft])t.ior=e;this[Gt]()}get sheenColorFactor(){return this[Ue](),this[rn].sheenColor.toArray()}get sheenColorTexture(){return this[Ue](),this[Oi].get(Ze.SheenColor)}get sheenRoughnessFactor(){return this[Ue](),this[rn].sheenRoughness}get sheenRoughnessTexture(){return this[Ue](),this[Oi].get(Ze.SheenRoughness)}setSheenColorFactor(e){this[Ue]();const t=this.colorFromRgb(e);for(const n of this[ft])n.sheenColor.set(t),n.sheen=1;this[Gt]()}setSheenRoughnessFactor(e){this[Ue]();for(const t of this[ft])t.sheenRoughness=e,t.sheen=1;this[Gt]()}get transmissionFactor(){return this[Ue](),this[rn].transmission}get transmissionTexture(){return this[Ue](),this[Oi].get(Ze.Transmission)}setTransmissionFactor(e){this[Ue]();for(const t of this[ft])t.transmission=e;this[Gt]()}get thicknessFactor(){return this[Ue](),this[rn].thickness}get thicknessTexture(){return this[Ue](),this[Oi].get(Ze.Thickness)}get attenuationDistance(){return this[Ue](),this[rn].attenuationDistance}get attenuationColor(){return this[Ue](),this[rn].attenuationColor.toArray()}setThicknessFactor(e){this[Ue]();for(const t of this[ft])t.thickness=e;this[Gt]()}setAttenuationDistance(e){this[Ue]();for(const t of this[ft])t.attenuationDistance=e;this[Gt]()}setAttenuationColor(e){this[Ue]();const t=this.colorFromRgb(e);for(const n of this[ft])n.attenuationColor.set(t);this[Gt]()}get specularFactor(){return this[Ue](),this[rn].specularIntensity}get specularTexture(){return this[Ue](),this[Oi].get(Ze.Specular)}get specularColorFactor(){return this[Ue](),this[rn].specularColor.toArray()}get specularColorTexture(){return this[Ue](),this[Oi].get(Ze.SheenColor)}setSpecularFactor(e){this[Ue]();for(const t of this[ft])t.specularIntensity=e;this[Gt]()}setSpecularColorFactor(e){this[Ue]();const t=this.colorFromRgb(e);for(const n of this[ft])n.specularColor.set(t);this[Gt]()}get iridescenceFactor(){return this[Ue](),this[rn].iridescence}get iridescenceTexture(){return this[Ue](),this[Oi].get(Ze.Iridescence)}get iridescenceIor(){return this[Ue](),this[rn].iridescenceIOR}get iridescenceThicknessMinimum(){return this[Ue](),this[rn].iridescenceThicknessRange[0]}get iridescenceThicknessMaximum(){return this[Ue](),this[rn].iridescenceThicknessRange[1]}get iridescenceThicknessTexture(){return this[Ue](),this[Oi].get(Ze.IridescenceThickness)}setIridescenceFactor(e){this[Ue]();for(const t of this[ft])t.iridescence=e;this[Gt]()}setIridescenceIor(e){this[Ue]();for(const t of this[ft])t.iridescenceIOR=e;this[Gt]()}setIridescenceThicknessMinimum(e){this[Ue]();for(const t of this[ft])t.iridescenceThicknessRange[0]=e;this[Gt]()}setIridescenceThicknessMaximum(e){this[Ue]();for(const t of this[ft])t.iridescenceThicknessRange[1]=e;this[Gt]()}get anisotropyStrength(){return this[Ue](),this[rn].anisotropy}get anisotropyRotation(){return this[Ue](),this[rn].anisotropyRotation}get anisotropyTexture(){return this[Ue](),this[Oi].get(Ze.Anisotropy)}setAnisotropyStrength(e){this[Ue]();for(const t of this[ft])t.anisotropy=e;this[Gt]()}setAnisotropyRotation(e){this[Ue]();for(const t of this[ft])t.anisotropyRotation=e;this[Gt]()}}let y2=class{constructor(e){this.name="",this.children=new Array,this.name=e}};class ry extends y2{constructor(e,t,n,i){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}=i;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 _ of m.variants){const{name:E}=g[_];this.variantToMaterialMap.set(_,f),f[Jc].add(_),n.has(E)||n.set(E,{name:E,index:_})}}}}async setActiveMaterial(e){const t=this.materials.get(e);if(e!==this.activeMaterialIdx){const n=t[ft],i=await t[f0]();i!=null?this.mesh.material=i: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 i=this.modelVariants.get(t).index;return e[Jc].add(i),this.variantToMaterialMap.set(i,e),this.materials.set(e.index,e),this.updateVariantUserData(i,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[Jc].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[ft].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
|
|
17118
17118
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17119
17119
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
@@ -17127,7 +17127,7 @@ void main() {
|
|
|
17127
17127
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17128
17128
|
* See the License for the specific language governing permissions and
|
|
17129
17129
|
* limitations under the License.
|
|
17130
|
-
*/var OS,GS,zS,HS,$S,VS;const Po=Symbol("materials"),xp=Symbol("hierarchy"),YS=Symbol("roots"),kr=Symbol("primitives"),_2=Symbol("prepareVariantsForExport"),b2=Symbol("switchVariant"),v2=Symbol("materialFromPoint"),g0=Symbol("nodeFromPoint"),I2=Symbol("nodeFromIndex"),li=Symbol("variantData"),m0=Symbol("availableVariants"),ay=Symbol("modelOnUpdate"),qS=Symbol("cloneMaterial");class
|
|
17130
|
+
*/var OS,GS,zS,HS,$S,VS;const Po=Symbol("materials"),xp=Symbol("hierarchy"),YS=Symbol("roots"),kr=Symbol("primitives"),_2=Symbol("prepareVariantsForExport"),b2=Symbol("switchVariant"),v2=Symbol("materialFromPoint"),g0=Symbol("nodeFromPoint"),I2=Symbol("nodeFromIndex"),li=Symbol("variantData"),m0=Symbol("availableVariants"),ay=Symbol("modelOnUpdate"),qS=Symbol("cloneMaterial");class J9{constructor(e,t,n,i){this.gltf=e,this.gltfElementMap=t,this.mapKey=n,this.doLazyLoad=i}}class K9{constructor(e,t=()=>{}){this[OS]=new Array,this[GS]=new Array,this[zS]=new Array,this[HS]=new Array,this[$S]=()=>{},this[VS]=new Map,this[ay]=t;const{gltf:n,threeGLTF:i,gltfElementMap:r}=e;for(const[l,c]of n.materials.entries()){const h=r.get(c);if(h!=null)this[Po].push(new sy(t,l,!0,this[li],h,c.name));else{const d=(n.materials||[])[l],A=new Set;r.set(d,A);const p=async()=>{const g=await i.parser.getDependency("material",l);return A.add(g),g};this[Po].push(new sy(t,l,!1,this[li],A,c.name,new J9(n,r,d,p)))}}const a=new Map,o=new Array;for(const l of i.scene.children)o.push(l);for(;o.length>0;){const l=o.pop();let c=null;l instanceof je?(c=new ry(l,this.materials,this[li],e),this[kr].push(c)):c=new y2(l.name);const h=a.get(l);h!=null?h.children.push(c):this[YS].push(c),this[xp].push(c);for(const u of l.children)o.push(u),a.set(l,c)}}get materials(){return this[Po]}[(OS=Po,GS=xp,zS=YS,HS=kr,$S=ay,VS=li,m0)](){const e=Array.from(this[li].values());return e.sort((t,n)=>t.index-n.index),e.map(t=>t.name)}getMaterialByName(e){const t=this[Po].filter(n=>n.name===e);return t.length>0?t[0]:null}[I2](e,t){const n=this[xp].find(i=>{if(i instanceof ry){const{meshes:r,primitives:a}=i.mesh.userData.associations;if(r==e&&a==t)return!0}return!1});return n??null}[g0](e){return this[xp].find(t=>t instanceof ry&&t.mesh===e.object)}[v2](e){return this[g0](e).getActiveMaterial()}async[b2](e){for(const t of this[kr])await t.enableVariant(e);for(const t of this.materials)t[Ku](!1);for(const t of this[kr])this.materials[t.getActiveMaterial().index][Ku](!0)}async[_2](){const e=new Array;for(const t of this[kr])e.push(t.instantiateVariants());await Promise.all(e)}[qS](e,t){const n=this.materials[e];n.isLoaded||console.error(`Cloning an unloaded material,
|
|
17131
17131
|
call 'material.ensureLoaded() before cloning the material.`);const i=n[ft],r=new Set;for(const[o,l]of i.entries()){const c=l.clone();c.name=t+(i.size>1?"_inst"+o:""),r.add(c)}const a=new sy(this[ay],this[Po].length,!1,this[li],r,t);return this[Po].push(a),a}createMaterialInstanceForVariant(e,t,n,i=!0){let r=null;for(const a of this[kr]){const o=this[li].get(n);o!=null&&a.variantInfo.has(o.index)||a.getMaterial(e)!=null&&(this.hasVariant(n)||this.createVariant(n),r==null&&(r=this[qS](e,t)),a.addVariant(r,n))}if(i&&r!=null){r[Ku](!0),this.materials[e][Ku](!1);for(const a of this[kr])a.enableVariant(n)}return r}createVariant(e){this[li].has(e)?console.warn(`Variant '${e}'' already exists`):this[li].set(e,{name:e,index:this[li].size})}hasVariant(e){return this[li].has(e)}setMaterialToVariant(e,t){if(this[m0]().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[kr]){const i=n.getMaterial(e);i!=null&&n.addVariant(i,t)}}updateVariantName(e,t){const n=this[li].get(e);n!=null&&(n.name=t,this[li].set(t,n),this[li].delete(e))}deleteVariant(e){const t=this[li].get(e);if(t!=null){for(const n of this.materials)n.hasVariant(e)&&n[Jc].delete(t.index);for(const n of this[kr])n.deleteVariant(t.index);this[li].delete(e)}}}/* @license
|
|
17132
17132
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17133
17133
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
@@ -17141,7 +17141,7 @@ void main() {
|
|
|
17141
17141
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17142
17142
|
* See the License for the specific language governing permissions and
|
|
17143
17143
|
* limitations under the License.
|
|
17144
|
-
*/var oy=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const hf=Symbol("currentGLTF"),uf=Symbol("originalGltfJson"),Vo=Symbol("model"),ly=Symbol("getOnUpdateMethod"),Ru=Symbol("buildTexture"),
|
|
17144
|
+
*/var oy=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const hf=Symbol("currentGLTF"),uf=Symbol("originalGltfJson"),Vo=Symbol("model"),ly=Symbol("getOnUpdateMethod"),Ru=Symbol("buildTexture"),Z9=s=>{var e,t,n;class i extends s{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[Vo]}get availableVariants(){return this.model?this.model[m0]():[]}get originalGltfJson(){return this[uf]}[(e=Vo,t=hf,n=uf,ly)](){return()=>{this[Xn]()}}[Ru](a){return a.colorSpace=Yt,a.wrapS=Ys,a.wrapT=Ys,new f2(this[ly](),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[Ru](c)}async createLottieTexture(a,o=1){const{textureUtils:l}=this[Vt],c=await l.loadLottie(a,o,this.withCredentials);return this[Ru](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 dL(o);return this[Ru](l)}createCanvasTexture(){const a=document.createElement("canvas"),o=new fL(a);return this[Ru](o)}async updated(a){if(super.updated(a),a.has("variantName")){const o=this[wl].beginActivity("variant-update");o(.1);const l=this[Vo],{variantName:c}=this;l!=null&&(await l[b2](c),this[Xn](),this.dispatchEvent(new CustomEvent("variant-applied"))),o(1)}if(a.has("orientation")||a.has("scale")){if(!this.loaded)return;const o=this[fe];o.applyTransform(),o.updateBoundingBox(),o.updateShadow(),this[Vt].arRenderer.onUpdateScene(),this[Xn]()}}[Er](){super[Er]();const{currentGLTF:a}=this[fe];if(a!=null){const{correlatedSceneGraph:o}=a;o!=null&&a!==this[hf]&&(this[Vo]=new K9(o,this[ly]()),this[uf]=JSON.parse(JSON.stringify(o.gltf))),"variants"in a.userData&&this.requestUpdate("variantName")}this[hf]=a}async exportScene(a){const o=this[fe];return new Promise(async(l,c)=>{const h={binary:!0,onlyVisible:!0,maxTextureSize:1/0,includeCustomExtensions:!1,forceIndices:!1};Object.assign(h,a),h.animations=o.animations,h.truncateDrawRange=!0;const u=o.shadow;let d=!1;u!=null&&(d=u.visible,u.visible=!1),await this[Vo][_2](),new Ud().register(p=>new I6(p)).parse(o.model,p=>l(new Blob([h.binary?p:JSON.stringify(p)],{type:h.binary?"application/octet-stream":"application/json"})),()=>c("glTF export failed"),h),u!=null&&(u.visible=d)})}materialFromPoint(a,o){const l=this[Vo];if(l==null)return null;const c=this[fe],h=c.getNDC(a,o),u=c.hitFromPoint(h);return u==null||u.face==null?null:l[v2](u)}}return oy([q({type:String,attribute:"variant-name"})],i.prototype,"variantName",void 0),oy([q({type:String,attribute:"orientation"})],i.prototype,"orientation",void 0),oy([q({type:String,attribute:"scale"})],i.prototype,"scale",void 0),i};/* @license
|
|
17145
17145
|
* Copyright 2023 Google LLC. All Rights Reserved.
|
|
17146
17146
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17147
17147
|
* you may not use this file except in compliance with the License.
|
|
@@ -17154,7 +17154,7 @@ void main() {
|
|
|
17154
17154
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17155
17155
|
* See the License for the specific language governing permissions and
|
|
17156
17156
|
* limitations under the License.
|
|
17157
|
-
*/class
|
|
17157
|
+
*/class eW extends je{constructor(){super(void 0,new Un({depthWrite:!1})),this.height=0,this.radius=0,this.resolution=0,this.userData.noHit=!0}get map(){return this.material.map}set map(e){this.material.map=e}isUsable(){return this.height>0&&this.radius>0&&this.geometry!=null&&this.map!=null}updateGeometry(e=this.height,t=this.radius,n=128){(e!=this.height||t!=this.radius||n!=this.resolution)&&(this.height=e,this.radius=t,this.resolution=n,e>0&&t>0&&(this.geometry.dispose(),this.geometry=tW(e,t,n)))}}function tW(s,e,t){const n=new hg(e,2*t,t);n.scale(1,1,-1);const i=n.getAttribute("position"),r=new Q;for(let a=0;a<i.count;++a)if(r.fromBufferAttribute(i,a),r.y<0){const o=-s*3/2,l=r.y<o?-s/r.y:1-r.y*r.y/(3*o*o);r.multiplyScalar(l),r.toArray(i.array,3*a)}return i.needsUpdate=!0,n}/* @license
|
|
17158
17158
|
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
17159
17159
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17160
17160
|
* you may not use this file except in compliance with the License.
|
|
@@ -17180,7 +17180,7 @@ void main() {
|
|
|
17180
17180
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17181
17181
|
* See the License for the specific language governing permissions and
|
|
17182
17182
|
* limitations under the License.
|
|
17183
|
-
*/const XS=9,
|
|
17183
|
+
*/const XS=9,nW=6,uy=2,iW=.3;class sW extends St{constructor(e,t,n){super(),this.camera=new ba,this.renderTarget=null,this.renderTargetBlur=null,this.depthMaterial=new nb,this.horizontalBlurMaterial=new Tn(A1),this.verticalBlurMaterial=new Tn(p1),this.intensity=0,this.softness=1,this.boundingBox=new Cn,this.size=new Q,this.maxDimension=0,this.isAnimated=!1,this.needsUpdate=!1;const{camera:i}=this;i.rotation.x=Math.PI/2,i.left=-.5,i.right=.5,i.bottom=-.5,i.top=.5,this.add(i);const r=new js,a=new Un({opacity:1,transparent:!0,side:si});this.floor=new je(r,a),this.floor.userData.noHit=!0,i.add(this.floor),this.blurPlane=new je(r),this.blurPlane.visible=!1,i.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=Ln,this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1,this.setScene(e,t,n)}setScene(e,t,n){const{boundingBox:i,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?uy:1),this.boundingBox.getCenter(o),n==="back"){const{min:l,max:c}=i;[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=i.min.y,c=i.max.y;r.y=this.maxDimension,i.expandByVector(r.subScalar(this.maxDimension).multiplyScalar(-.5)),i.min.y=l,i.max.y=c,r.set(this.maxDimension,c-l,this.maxDimension)}n==="bottom"?o.y=i.min.y:o.z=i.min.y,this.setSoftness(t)}setSoftness(e){this.softness=e;const{size:t,camera:n}=this,i=this.isAnimated?uy:1,r=i*Math.pow(2,XS-e*(XS-nW));this.setMapSize(r);const a=t.y/2,o=t.y*i;n.near=0,n.far=ix(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*=uy);const n=Math.floor(t.x>t.z?e:e*t.x/t.z),i=Math.floor(t.x>t.z?e*t.z/t.x:e),r=10,a=r+n,o=r+i;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:Lt};this.renderTarget=new Nn(a,o,l),this.renderTargetBlur=new Nn(a,o,l),this.floor.material.map=this.renderTarget.texture}this.camera.scale.set(t.x*(1+r/n),t.z*(1+r/i),1),this.needsUpdate=!0}setIntensity(e){this.intensity=e,e>0?(this.visible=!0,this.floor.visible=!0,this.floor.material.opacity=e*ix(iW,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 i=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=i,e.setRenderTarget(r),e.setClearAlpha(n)}blurShadow(e){const{camera:t,horizontalBlurMaterial:n,verticalBlurMaterial:i,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=i,i.uniforms.v.value=1/this.renderTarget.height,i.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
|
|
17184
17184
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17185
17185
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17186
17186
|
* you may not use this file except in compliance with the License.
|
|
@@ -17193,7 +17193,7 @@ void main() {
|
|
|
17193
17193
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17194
17194
|
* See the License for the specific language governing permissions and
|
|
17195
17195
|
* limitations under the License.
|
|
17196
|
-
*/const JS=10,dy=100,Ay=new Q,KS=new Q,ZS=new Q,Bp=new lb,sW=new Q,Du=new Ie;class rW extends co{constructor({canvas:e,element:t,width:n,height:i}){super(),this.annotationRenderer=new d1,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 Bn(45,1,.1,100),this.xrCamera=null,this.url=null,this.pivot=new St,this.target=new St,this.animationNames=[],this.boundingBox=new Cn,this.boundingSphere=new Hi,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=wd,this.canScale=!0,this.isDirty=!1,this.goalTarget=new Q,this.targetDamperX=new Bi,this.targetDamperY=new Bi,this.targetDamperZ=new Bi,this._currentGLTF=null,this._model=null,this.cancelPendingSourceChange=null,this.animationsByName=new Map,this.currentAnimationAction=null,this.groundedSkybox=new Z9,this.name="ModelScene",this.element=t,this.canvas=e,this.camera=new Bn(45,1,.1,100),this.camera.name="MainCamera",this.add(this.pivot),this.pivot.name="Pivot",this.pivot.add(this.target),this.setSize(n,i),this.target.name="Target",this.mixer=new wT(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(async(o,l)=>{this.cancelPendingSourceChange=()=>l();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:i}=n,r=new Map,a=[];for(const o of i)r.set(o.name,o),a.push(o.name);this.animations=i,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[hf]=null,this.element[uf]=null,this.element[Vo]=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 Cn;e.traverse(n=>{const i=n;if(!i.material||!i.material.transparent)return;t.setFromObject(i);const a=t.getSize(sW),o=Math.min(a.x,a.y,a.z);Math.max(a.x,a.y,a.z)<dy*o||this.markBakedShadow(i)})}checkBakedShadows(){const{min:e,max:t}=this.boundingBox,n=new Cn;this.boundingBox.getSize(this.size);for(const i of this.bakedShadows)n.setFromObject(i),!(n.min.y<e.y+this.size.y/dy&&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/dy&&n.min.x<=e.x&&n.max.x>=t.x&&n.min.y<=e.y&&n.max.y>=t.y||this.unmarkBakedShadow(i))}applyTransform(){const{model:e}=this;if(e==null)return;const t=ua(this.element.orientation)[0].terms,n=lr(t[0]).number,i=lr(t[1]).number,r=lr(t[2]).number;e.quaternion.setFromEuler(new zi(i,r,n,"YXZ"));const a=ua(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,i)=>n.expandByPoint(i);this.setBakedShadowVisibility(!1),this.boundingBox=jA(e,t,new Cn),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach(n=>this.unmarkBakedShadow(n)),this.boundingBox=jA(e,t,new Cn)),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(jA(e,n,0));const i=(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=jA(e,i,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)Du.set(e/window.screen.width,t/window.screen.height);else{const n=this.element.getBoundingClientRect();Du.set((e-n.x)/this.width,(t-n.y)/this.height)}return Du.multiplyScalar(2).subScalar(1),Du.y*=-1,Du}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?JS:1)}setGroundedSkybox(){const e=ua(this.element.skyboxHeight)[0].terms[0],t=lr(e).number,n=JS*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(qR)}updateTarget(e){const t=this.goalTarget,n=this.target.position;if(t.equals(n))return!1;{const i=this.boundingSphere.radius/10;let{x:r,y:a,z:o}=n;return r=this.targetDamperX.update(r,t.x,e,i),a=this.targetDamperY.update(a,t.y,e,i),o=this.targetDamperZ.update(o,t.z,e,i),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:i}=this.position;this.yaw=Math.atan2(e-n,t-i)}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===vf&&(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=ul,i=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);l.timeScale!=this.element.timeScale&&(l.timeScale=this.element.timeScale),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,i),l.enabled=!0,l.clampWhenFinished=!0,l.play()}catch(o){console.error(o)}}appendAnimation(e="",t=ul,n=1/0,i=1,r=1,a=!1,o=!1,l=!0,c=null,h=!1){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:u}=this;if(u==null||u.length===0)return;let d=null;const A=1.25;if(e&&(d=this.animationsByName.get(e)),d!=null){typeof n=="string"?isNaN(n)?(n=1/0,console.warn("Invalid repetitionCount value, repetitionCount is set to Infinity")):n=Math.max(parseInt(n),1):typeof n=="number"&&n<1&&(n=1),n===1&&t!==ah&&(t=ah),typeof i=="string"&&(isNaN(i)?(i=1,console.warn("Invalid weight value, weight is set to 1")):i=parseFloat(i)),typeof r=="string"&&(isNaN(r)?(r=1,console.warn("Invalid timeScale value, timeScale is set to 1")):r=parseFloat(r)),typeof a=="string"&&(a.toLowerCase().trim()==="true"?a=!0:a.toLowerCase().trim()==="false"?a=!1:isNaN(a)?(a=!1,console.warn("Invalid fade value, fade is set to false")):a=parseFloat(a)),typeof o=="string"&&(o.toLowerCase().trim()==="true"?o=!0:o.toLowerCase().trim()==="false"?o=!1:isNaN(o)?(o=!1,console.warn("Invalid warp value, warp is set to false")):o=parseFloat(o)),typeof c=="string"&&(isNaN(c)||(c=parseFloat(c)));try{const p=this.mixer.existingAction(d)||this.mixer.clipAction(d,this),g=p.timeScale;h&&this.appendedAnimations.includes(e)&&(this.markedAnimations.map(m=>m.name).includes(e)||this.markedAnimations.push({name:e,loopMode:t,repetitionCount:n})),typeof c=="number"&&(p.time=Math.min(Math.max(c,0),d.duration)),typeof a=="boolean"&&a?p.fadeIn(A):typeof a=="number"?p.fadeIn(Math.max(a,0)):i>=0&&(p.weight=Math.min(Math.max(i,0),1)),typeof o=="boolean"&&o?p.warp(l?g:0,r,A):typeof o=="number"?p.warp(l?g:0,r,Math.max(o,0)):p.timeScale=r,p.isRunning()||(p.time==d.duration&&p.stop(),p.setLoop(t,n),p.paused=!1,p.enabled=!0,p.clampWhenFinished=!0,p.play()),this.appendedAnimations.includes(e)||this.element[fe].appendedAnimations.push(e)}catch(p){console.error(p)}}}detachAnimation(e="",t=!0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:n}=this;if(n==null||n.length===0)return;let i=null;const r=1.5;if(e&&(i=this.animationsByName.get(e)),i!=null){typeof t=="string"&&(t.toLowerCase().trim()==="true"?t=!0:t.toLowerCase().trim()==="false"?t=!1:isNaN(t)?(t=!0,console.warn("Invalid fade value, fade is set to true")):t=parseFloat(t));try{const a=this.mixer.existingAction(i)||this.mixer.clipAction(i,this);typeof t=="boolean"&&t?a.fadeOut(r):typeof t=="number"?a.fadeOut(Math.max(t,0)):a.stop();const o=this.element[fe].appendedAnimations.filter(l=>l!==e);this.element[fe].appendedAnimations=o}catch(a){console.error(a)}}}updateAnimationLoop(e="",t=ul,n=1/0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:i}=this;if(i==null||i.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 iW(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 Bp.intersectObject(e,!0).find(n=>n.object.visible&&!n.object.userData.noHit)}hitFromController(e,t=this){return Bp.setFromXRController(e),this.getHit(t)}hitFromPoint(e,t=this){return Bp.setFromCamera(e,this.getCamera()),this.getHit(t)}positionAndNormalFromPoint(e,t=this){var n;const i=this.hitFromPoint(e,t);if(i==null)return null;const r=i.point,a=i.face!=null?i.face.normal.clone().applyNormalMatrix(new it().getNormalMatrix(i.object.matrixWorld)):Bp.ray.direction.clone().multiplyScalar(-1),o=(n=i.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 i=this.hitFromPoint(e,t);if(i==null||i.face==null)return null;const r=n[g0](i),{meshes:a,primitives:o}=r.mesh.userData.associations,l=new Q,c=new Q,h=new Q,{a:u,b:d,c:A}=i.face,p=i.object;p.getVertexPosition(u,l),p.getVertexPosition(d,c),p.getVertexPosition(A,h);const g=new es(l,c,h),m=new Q;return g.getBarycoord(p.worldToLocal(i.point),m),`${a} ${o} ${u} ${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,i=t.length;n<i;n++){const r=t[n];r instanceof C2&&e(r)}}updateSurfaceHotspot(e){if(e.surface==null||this.element.model==null)return;const t=ua(e.surface)[0].terms;if(t.length!=8){console.warn(e.surface+" does not have exactly 8 numbers.");return}const n=this.element.model[I2](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 i=n.mesh.geometry.attributes.position.count,r=new Q(t[2].number,t[3].number,t[4].number);if(r.x>=i||r.y>=i||r.z>=i){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=>{Ay.copy(e),KS.setFromMatrixPosition(t.matrixWorld),Ay.sub(KS),ZS.copy(t.normal).transformDirection(this.target.matrixWorld),Ay.dot(ZS)<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:i}=this,{alt:r,poster:a,iosSrc:o}=i;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
|
|
17196
|
+
*/const JS=10,dy=100,Ay=new Q,KS=new Q,ZS=new Q,Bp=new lb,rW=new Q,Du=new Ie;class aW extends co{constructor({canvas:e,element:t,width:n,height:i}){super(),this.annotationRenderer=new d1,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 Bn(45,1,.1,100),this.xrCamera=null,this.url=null,this.pivot=new St,this.target=new St,this.animationNames=[],this.boundingBox=new Cn,this.boundingSphere=new Hi,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=wd,this.canScale=!0,this.isDirty=!1,this.goalTarget=new Q,this.targetDamperX=new Bi,this.targetDamperY=new Bi,this.targetDamperZ=new Bi,this._currentGLTF=null,this._model=null,this.cancelPendingSourceChange=null,this.animationsByName=new Map,this.currentAnimationAction=null,this.groundedSkybox=new eW,this.name="ModelScene",this.element=t,this.canvas=e,this.camera=new Bn(45,1,.1,100),this.camera.name="MainCamera",this.add(this.pivot),this.pivot.name="Pivot",this.pivot.add(this.target),this.setSize(n,i),this.target.name="Target",this.mixer=new wT(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(async(o,l)=>{this.cancelPendingSourceChange=()=>l();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:i}=n,r=new Map,a=[];for(const o of i)r.set(o.name,o),a.push(o.name);this.animations=i,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[hf]=null,this.element[uf]=null,this.element[Vo]=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 Cn;e.traverse(n=>{const i=n;if(!i.material||!i.material.transparent)return;t.setFromObject(i);const a=t.getSize(rW),o=Math.min(a.x,a.y,a.z);Math.max(a.x,a.y,a.z)<dy*o||this.markBakedShadow(i)})}checkBakedShadows(){const{min:e,max:t}=this.boundingBox,n=new Cn;this.boundingBox.getSize(this.size);for(const i of this.bakedShadows)n.setFromObject(i),!(n.min.y<e.y+this.size.y/dy&&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/dy&&n.min.x<=e.x&&n.max.x>=t.x&&n.min.y<=e.y&&n.max.y>=t.y||this.unmarkBakedShadow(i))}applyTransform(){const{model:e}=this;if(e==null)return;const t=ua(this.element.orientation)[0].terms,n=lr(t[0]).number,i=lr(t[1]).number,r=lr(t[2]).number;e.quaternion.setFromEuler(new zi(i,r,n,"YXZ"));const a=ua(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,i)=>n.expandByPoint(i);this.setBakedShadowVisibility(!1),this.boundingBox=jA(e,t,new Cn),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach(n=>this.unmarkBakedShadow(n)),this.boundingBox=jA(e,t,new Cn)),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(jA(e,n,0));const i=(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=jA(e,i,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)Du.set(e/window.screen.width,t/window.screen.height);else{const n=this.element.getBoundingClientRect();Du.set((e-n.x)/this.width,(t-n.y)/this.height)}return Du.multiplyScalar(2).subScalar(1),Du.y*=-1,Du}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?JS:1)}setGroundedSkybox(){const e=ua(this.element.skyboxHeight)[0].terms[0],t=lr(e).number,n=JS*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(qR)}updateTarget(e){const t=this.goalTarget,n=this.target.position;if(t.equals(n))return!1;{const i=this.boundingSphere.radius/10;let{x:r,y:a,z:o}=n;return r=this.targetDamperX.update(r,t.x,e,i),a=this.targetDamperY.update(a,t.y,e,i),o=this.targetDamperZ.update(o,t.z,e,i),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:i}=this.position;this.yaw=Math.atan2(e-n,t-i)}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===vf&&(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=ul,i=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);l.timeScale!=this.element.timeScale&&(l.timeScale=this.element.timeScale),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,i),l.enabled=!0,l.clampWhenFinished=!0,l.play()}catch(o){console.error(o)}}appendAnimation(e="",t=ul,n=1/0,i=1,r=1,a=!1,o=!1,l=!0,c=null,h=!1){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:u}=this;if(u==null||u.length===0)return;let d=null;const A=1.25;if(e&&(d=this.animationsByName.get(e)),d!=null){typeof n=="string"?isNaN(n)?(n=1/0,console.warn("Invalid repetitionCount value, repetitionCount is set to Infinity")):n=Math.max(parseInt(n),1):typeof n=="number"&&n<1&&(n=1),n===1&&t!==ah&&(t=ah),typeof i=="string"&&(isNaN(i)?(i=1,console.warn("Invalid weight value, weight is set to 1")):i=parseFloat(i)),typeof r=="string"&&(isNaN(r)?(r=1,console.warn("Invalid timeScale value, timeScale is set to 1")):r=parseFloat(r)),typeof a=="string"&&(a.toLowerCase().trim()==="true"?a=!0:a.toLowerCase().trim()==="false"?a=!1:isNaN(a)?(a=!1,console.warn("Invalid fade value, fade is set to false")):a=parseFloat(a)),typeof o=="string"&&(o.toLowerCase().trim()==="true"?o=!0:o.toLowerCase().trim()==="false"?o=!1:isNaN(o)?(o=!1,console.warn("Invalid warp value, warp is set to false")):o=parseFloat(o)),typeof c=="string"&&(isNaN(c)||(c=parseFloat(c)));try{const p=this.mixer.existingAction(d)||this.mixer.clipAction(d,this),g=p.timeScale;h&&this.appendedAnimations.includes(e)&&(this.markedAnimations.map(m=>m.name).includes(e)||this.markedAnimations.push({name:e,loopMode:t,repetitionCount:n})),typeof c=="number"&&(p.time=Math.min(Math.max(c,0),d.duration)),typeof a=="boolean"&&a?p.fadeIn(A):typeof a=="number"?p.fadeIn(Math.max(a,0)):i>=0&&(p.weight=Math.min(Math.max(i,0),1)),typeof o=="boolean"&&o?p.warp(l?g:0,r,A):typeof o=="number"?p.warp(l?g:0,r,Math.max(o,0)):p.timeScale=r,p.isRunning()||(p.time==d.duration&&p.stop(),p.setLoop(t,n),p.paused=!1,p.enabled=!0,p.clampWhenFinished=!0,p.play()),this.appendedAnimations.includes(e)||this.element[fe].appendedAnimations.push(e)}catch(p){console.error(p)}}}detachAnimation(e="",t=!0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:n}=this;if(n==null||n.length===0)return;let i=null;const r=1.5;if(e&&(i=this.animationsByName.get(e)),i!=null){typeof t=="string"&&(t.toLowerCase().trim()==="true"?t=!0:t.toLowerCase().trim()==="false"?t=!1:isNaN(t)?(t=!0,console.warn("Invalid fade value, fade is set to true")):t=parseFloat(t));try{const a=this.mixer.existingAction(i)||this.mixer.clipAction(i,this);typeof t=="boolean"&&t?a.fadeOut(r):typeof t=="number"?a.fadeOut(Math.max(t,0)):a.stop();const o=this.element[fe].appendedAnimations.filter(l=>l!==e);this.element[fe].appendedAnimations=o}catch(a){console.error(a)}}}updateAnimationLoop(e="",t=ul,n=1/0){if(this._currentGLTF==null||e===this.element.animationName)return;const{animations:i}=this;if(i==null||i.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 sW(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 Bp.intersectObject(e,!0).find(n=>n.object.visible&&!n.object.userData.noHit)}hitFromController(e,t=this){return Bp.setFromXRController(e),this.getHit(t)}hitFromPoint(e,t=this){return Bp.setFromCamera(e,this.getCamera()),this.getHit(t)}positionAndNormalFromPoint(e,t=this){var n;const i=this.hitFromPoint(e,t);if(i==null)return null;const r=i.point,a=i.face!=null?i.face.normal.clone().applyNormalMatrix(new it().getNormalMatrix(i.object.matrixWorld)):Bp.ray.direction.clone().multiplyScalar(-1),o=(n=i.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 i=this.hitFromPoint(e,t);if(i==null||i.face==null)return null;const r=n[g0](i),{meshes:a,primitives:o}=r.mesh.userData.associations,l=new Q,c=new Q,h=new Q,{a:u,b:d,c:A}=i.face,p=i.object;p.getVertexPosition(u,l),p.getVertexPosition(d,c),p.getVertexPosition(A,h);const g=new es(l,c,h),m=new Q;return g.getBarycoord(p.worldToLocal(i.point),m),`${a} ${o} ${u} ${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,i=t.length;n<i;n++){const r=t[n];r instanceof C2&&e(r)}}updateSurfaceHotspot(e){if(e.surface==null||this.element.model==null)return;const t=ua(e.surface)[0].terms;if(t.length!=8){console.warn(e.surface+" does not have exactly 8 numbers.");return}const n=this.element.model[I2](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 i=n.mesh.geometry.attributes.position.count,r=new Q(t[2].number,t[3].number,t[4].number);if(r.x>=i||r.y>=i||r.z>=i){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=>{Ay.copy(e),KS.setFromMatrixPosition(t.matrixWorld),Ay.sub(KS),ZS.copy(t.normal).transformDirection(this.target.matrixWorld),Ay.dot(ZS)<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:i}=this,{alt:r,poster:a,iosSrc:o}=i;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
|
|
17197
17197
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17198
17198
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17199
17199
|
* you may not use this file except in compliance with the License.
|
|
@@ -17206,7 +17206,7 @@ void main() {
|
|
|
17206
17206
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17207
17207
|
* See the License for the specific language governing permissions and
|
|
17208
17208
|
* limitations under the License.
|
|
17209
|
-
*/class
|
|
17209
|
+
*/class oW extends EventTarget{constructor(){super(...arguments),this.ongoingActivities=new Set,this.totalProgress=0}get ongoingActivityCount(){return this.ongoingActivities.size}beginActivity(e){const t={progress:0,completed:!1};return this.ongoingActivities.add(t),this.ongoingActivityCount===1&&this.announceTotalProgress(t,0,e),n=>{let i;return i=Math.max(or(n,0,1),t.progress),i!==t.progress&&this.announceTotalProgress(t,i,e),t.progress}}announceTotalProgress(e,t,n){let i=0,r=0;t==1&&(e.completed=!0);for(const l of this.ongoingActivities){const{progress:c}=l;i+=1-c,l.completed&&r++}const a=e.progress;e.progress=t,this.totalProgress+=(t-a)*(1-this.totalProgress)/i;const o=r===this.ongoingActivityCount?1:this.totalProgress;this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:o,reason:n}})),r===this.ongoingActivityCount&&(this.totalProgress=0,this.ongoingActivities.clear())}}/* @license
|
|
17210
17210
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17211
17211
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17212
17212
|
* you may not use this file except in compliance with the License.
|
|
@@ -17219,7 +17219,7 @@ void main() {
|
|
|
17219
17219
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17220
17220
|
* See the License for the specific language governing permissions and
|
|
17221
17221
|
* limitations under the License.
|
|
17222
|
-
*/var Fg=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},eB,tB,nB,iB,sB,rB,aB,oB,lB,cB,hB,uB,dB;const
|
|
17222
|
+
*/var Fg=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},eB,tB,nB,iB,sB,rB,aB,oB,lB,cB,hB,uB,dB;const lW=10,cW=50,hW=0,uW=300,dW=150,io=document.createElement("canvas"),py=Symbol("fallbackResizeHandler"),AB=Symbol("defaultAriaLabel"),Tp=Symbol("resizeObserver"),vc=Symbol("clearModelTimeout"),fy=Symbol("onContextLost"),Ic=Symbol("loaded"),gy=Symbol("status"),my=Symbol("onFocus"),Ey=Symbol("onBlur"),Mc=Symbol("updateSize"),Mp=Symbol("intersectionObserver"),Yo=Symbol("isElementInViewport"),eg=Symbol("announceModelVisibility"),Oc=Symbol("ariaLabel"),E0=Symbol("altDefaulted"),Qu=Symbol("statusElement"),tg=Symbol("updateStatus"),Zu=Symbol("loadedTime"),Kc=Symbol("updateSource"),pB=Symbol("markLoaded"),df=Symbol("container"),Us=Symbol("input"),y0=Symbol("canvas"),fe=Symbol("scene"),Xn=Symbol("needsRender"),mr=Symbol("tick"),Er=Symbol("onModelLoad"),ng=Symbol("onResize"),Vt=Symbol("renderer"),wl=Symbol("progressTracker"),fB=Symbol("getLoaded"),Sl=Symbol("getModelIsVisible"),Sh=Symbol("shouldAttemptPreload"),Xa=s=>({x:s.x,y:s.y,z:s.z,toString(){return`${this.x}m ${this.y}m ${this.z}m`}}),_0=s=>({u:s.x,v:s.y,toString(){return`${this.u} ${this.v}`}});class hA extends Xo{static get is(){return"model-viewer"}static set modelCacheSize(e){wi[za].evictionThreshold=e}static get modelCacheSize(){return wi[za].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."),zs.singleton.minScale=e}static get minimumRenderScale(){return zs.singleton.minScale}get loaded(){return this[fB]()}get[(eB=Yo,tB=Ic,nB=Zu,iB=gy,sB=vc,rB=py,aB=eg,oB=Tp,lB=Mp,cB=wl,Vt)](){return zs.singleton}get modelIsVisible(){return this[Sl]()}constructor(){super(),this.alt=null,this.src=null,this.withCredentials=!1,this.generateSchema=!1,this[eB]=!1,this[tB]=!1,this[nB]=0,this[iB]="",this[sB]=null,this[rB]=gw(()=>{const i=this.getBoundingClientRect();this[Mc](i)},cW),this[aB]=gw(i=>{const r=this.modelIsVisible;r!==i&&this.dispatchEvent(new CustomEvent("model-visibility",{detail:{visible:r}}))},hW),this[oB]=null,this[lB]=null,this[cB]=new oW,this[hB]=()=>{this[Qu].textContent=this[gy]},this[uB]=()=>{this[Qu].textContent=""},this[dB]=i=>{this.dispatchEvent(new CustomEvent("error",{detail:{type:"webglcontextlost",sourceError:i.sourceEvent}}))},this.attachShadow({mode:"open"});const e=this.shadowRoot;g6(e),this[df]=e.querySelector(".container"),this[Us]=e.querySelector(".userInput"),this[y0]=e.querySelector("canvas"),this[Qu]=e.querySelector("#status"),this[AB]=this[Us].getAttribute("aria-label");let t,n;if(this.isConnected){const i=this.getBoundingClientRect();t=i.width,n=i.height}else t=uW,n=dW;this[fe]=new aW({canvas:this[y0],element:this,width:t,height:n}),Promise.resolve().then(()=>{this[Mc](this.getBoundingClientRect())}),QE&&(this[Tp]=new ResizeObserver(i=>{if(!this[Vt].isPresenting)for(let r of i)r.target===this&&this[Mc](r.contentRect)})),LE?this[Mp]=new IntersectionObserver(i=>{for(let r of i)if(r.target===this){const a=this.modelIsVisible;this[Yo]=r.isIntersecting,this[eg](a),this[Yo]&&!this.loaded&&this[Kc]()}},{root:null,rootMargin:"0px",threshold:1e-5}):this[Yo]=!0}connectedCallback(){super.connectedCallback&&super.connectedCallback(),QE?this[Tp].observe(this):self.addEventListener("resize",this[py]),LE&&this[Mp].observe(this),this.addEventListener("focus",this[my]),this.addEventListener("blur",this[Ey]);const e=this[Vt];e.addEventListener("contextlost",this[fy]),e.registerScene(this[fe]),this[vc]!=null&&(self.clearTimeout(this[vc]),this[vc]=null,this.requestUpdate("src",null))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),QE?this[Tp].unobserve(this):self.removeEventListener("resize",this[py]),LE&&this[Mp].unobserve(this),this.removeEventListener("focus",this[my]),this.removeEventListener("blur",this[Ey]);const e=this[Vt];e.removeEventListener("contextlost",this[fy]),e.unregisterScene(this[fe]),this[vc]=self.setTimeout(()=>{this[fe].dispose(),this[vc]=null},lW)}updated(e){super.updated(e),e.has("src")&&(this.src==null?(this[Ic]=!1,this[Zu]=0,this[fe].reset()):this.src!==this[fe].url&&(this[Ic]=!1,this[Zu]=0,this[Kc]())),e.has("alt")&&this[Us].setAttribute("aria-label",this[Oc]),e.has("generateSchema")&&(this.generateSchema?this[fe].updateSchema(this.src):this[fe].updateSchema(null))}toDataURL(e,t){return this[Vt].displayCanvas(this[fe]).toDataURL(e,t)}async toBlob(e){const t=e?e.mimeType:void 0,n=e?e.qualityArgument:void 0,i=e?e.idealAspect:void 0,{width:r,height:a,idealAspect:o,aspect:l}=this[fe],{dpr:c,scaleFactor:h}=this[Vt];let u=r*h*c,d=a*h*c,A=0,p=0;if(i===!0)if(o>l){const g=d;d=Math.round(u/o),p=(g-d)/2}else{const g=u;u=Math.round(d*o),A=(g-u)/2}io.width=u,io.height=d;try{return new Promise(async(g,m)=>{io.getContext("2d").drawImage(this[Vt].displayCanvas(this[fe]),A,p,u,d,0,0,u,d),io.toBlob(f=>{if(!f)return m(new Error("Unable to retrieve canvas blob"));g(f)},t,n)})}finally{this[Mc]({width:r,height:a})}}registerEffectComposer(e){e.setRenderer(this[Vt].threeRenderer),e.setMainCamera(this[fe].getCamera()),e.setMainScene(this[fe]),this[fe].effectRenderer=e}unregisterEffectComposer(){this[fe].effectRenderer=null}registerRenderer(e){this[fe].externalRenderer=e}unregisterRenderer(){this[fe].externalRenderer=null}get[Oc](){return this[E0]}get[E0](){return this.alt==null||this.alt==="null"?this[AB]:this.alt}[fB](){return this[Ic]}[Sl](){return this.loaded&&this[Yo]}[Sh](){return!!this.src&&this[Yo]}[Mc]({width:e,height:t}){e===0||t===0||(this[df].style.width=`${e}px`,this[df].style.height=`${t}px`,this[ng]({width:e,height:t}))}[mr](e,t){var n;(n=this[fe].effectRenderer)===null||n===void 0||n.beforeRender(e,t)}[pB](){this[Ic]||(this[Ic]=!0,this[Zu]=performance.now())}[Xn](){this[fe].queueRender()}[Er](){}[tg](e){this[gy]=e;const t=this.getRootNode();t!=null&&t.activeElement===this&&this[Qu].textContent!=e&&(this[Qu].textContent=e)}[(hB=my,uB=Ey,ng)](e){this[fe].setSize(e.width,e.height)}async[(dB=fy,Kc)](){const e=this[fe];if(this.loaded||!this[Sh]()||this.src===e.url)return;this.generateSchema&&e.updateSchema(this.src),this[tg]("Loading"),e.stopAnimation();const t=this[wl].beginActivity("model-load"),n=this.src;try{const i=e.setSource(n,a=>t(or(a,0,1)*.95)),r=this[Jf]();await Promise.all([i,r]),this[pB](),this[Er](),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent("before-render"))}),await new Promise(a=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:{url:n}})),a()})})})}catch(i){this.dispatchEvent(new CustomEvent("error",{detail:{type:"loadfailure",sourceError:i}}))}finally{t(1)}}}Fg([q({type:String})],hA.prototype,"alt",void 0);Fg([q({type:String})],hA.prototype,"src",void 0);Fg([q({type:Boolean,attribute:"with-credentials"})],hA.prototype,"withCredentials",void 0);Fg([q({type:Boolean,attribute:"generate-schema"})],hA.prototype,"generateSchema",void 0);/* @license
|
|
17223
17223
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17224
17224
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17225
17225
|
* you may not use this file except in compliance with the License.
|
|
@@ -17232,7 +17232,7 @@ void main() {
|
|
|
17232
17232
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17233
17233
|
* See the License for the specific language governing permissions and
|
|
17234
17234
|
* limitations under the License.
|
|
17235
|
-
*/var yy=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const gB=1e3,Rp=Symbol("changeAnimation"),mB=Symbol("appendAnimation"),EB=Symbol("detachAnimation"),Xi=Symbol("paused"),
|
|
17235
|
+
*/var yy=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const gB=1e3,Rp=Symbol("changeAnimation"),mB=Symbol("appendAnimation"),EB=Symbol("detachAnimation"),Xi=Symbol("paused"),AW={repetitions:1/0,pingpong:!1},pW={pingpong:!1,repetitions:null,weight:1,timeScale:1,fade:!1,warp:!1,relativeWarp:!0,time:null},fW={fade:!0},gW=s=>{var e;class t extends s{constructor(...i){super(i),this.autoplay=!1,this.animationName=void 0,this.animationCrossfadeDuration=300,this[e]=!0,this[fe].subscribeMixerEvent("loop",r=>{const a=r.action._loopCount,o=r.action._clip.name,l=r.action._clip.uuid,c=this[fe].markedAnimations.find(h=>h.name===o);if(c){this[fe].updateAnimationLoop(c.name,c.loopMode,c.repetitionCount);const h=this[fe].markedAnimations.filter(u=>u.name!==o);this[fe].markedAnimations=h}this.dispatchEvent(new CustomEvent("loop",{detail:{count:a,name:o,uuid:l}}))}),this[fe].subscribeMixerEvent("finished",r=>{if(!this[fe].appendedAnimations.includes(r.action._clip.name))this[Xi]=!0;else{const a=this[fe].appendedAnimations.filter(o=>o!==r.action._clip.name);this[fe].appendedAnimations=a}this.dispatchEvent(new CustomEvent("finished"))})}get availableAnimations(){return this.loaded?this[fe].animationNames:[]}get duration(){return this[fe].duration}get paused(){return this[Xi]}get currentTime(){return this[fe].animationTime}get appendedAnimations(){return this[fe].appendedAnimations}set currentTime(i){this[fe].animationTime=i,this[Xn]()}get timeScale(){return this[fe].animationTimeScale}set timeScale(i){this[fe].animationTimeScale=i}pause(){this[Xi]||(this[Xi]=!0,this.dispatchEvent(new CustomEvent("pause")))}play(i){this.availableAnimations.length>0&&(this[Xi]=!1,this[Rp](i),this.dispatchEvent(new CustomEvent("play")))}appendAnimation(i,r){this.availableAnimations.length>0&&(this[Xi]=!1,this[mB](i,r),this.dispatchEvent(new CustomEvent("append-animation")))}detachAnimation(i,r){this.availableAnimations.length>0&&(this[Xi]=!1,this[EB](i,r),this.dispatchEvent(new CustomEvent("detach-animation")))}[(e=Xi,Er)](){super[Er](),this[Xi]=!0,this.animationName!=null&&this[Rp](),this.autoplay&&this.play()}[mr](i,r){super[mr](i,r),!(this[Xi]||!this[Sl]()&&!this[Vt].isPresenting)&&(this[fe].updateAnimation(r/gB),this[Xn]())}updated(i){super.updated(i),i.has("autoplay")&&this.autoplay&&this.play(),i.has("animationName")&&this[Rp]()}[Rp](i=AW){var r;const a=(r=i.repetitions)!==null&&r!==void 0?r:1/0,o=i.pingpong?vf:a===1?ah:ul;this[fe].playAnimation(this.animationName,this.animationCrossfadeDuration/gB,o,a),this[Xi]&&(this[fe].updateAnimation(0),this[Xn]())}[mB](i="",r=pW){var a;const o=(a=r.repetitions)!==null&&a!==void 0?a:1/0,l=r.pingpong?vf:o===1?ah:ul,c=!!r.repetitions||"pingpong"in r;this[fe].appendAnimation(i||this.animationName,l,o,r.weight,r.timeScale,r.fade,r.warp,r.relativeWarp,r.time,c),this[Xi]&&(this[fe].updateAnimation(0),this[Xn]())}[EB](i="",r=fW){this[fe].detachAnimation(i||this.animationName,r.fade),this[Xi]&&(this[fe].updateAnimation(0),this[Xn]())}}return yy([q({type:Boolean})],t.prototype,"autoplay",void 0),yy([q({type:String,attribute:"animation-name"})],t.prototype,"animationName",void 0),yy([q({type:Number,attribute:"animation-crossfade-duration"})],t.prototype,"animationCrossfadeDuration",void 0),t};/* @license
|
|
17236
17236
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17237
17237
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17238
17238
|
* you may not use this file except in compliance with the License.
|
|
@@ -17245,7 +17245,7 @@ void main() {
|
|
|
17245
17245
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17246
17246
|
* See the License for the specific language governing permissions and
|
|
17247
17247
|
* limitations under the License.
|
|
17248
|
-
*/const Fo=Symbol("hotspotMap"),_y=Symbol("mutationCallback"),Lu=Symbol("observer"),by=Symbol("addHotspot"),yB=Symbol("removeHotspot"),vy=new ze,
|
|
17248
|
+
*/const Fo=Symbol("hotspotMap"),_y=Symbol("mutationCallback"),Lu=Symbol("observer"),by=Symbol("addHotspot"),yB=Symbol("removeHotspot"),vy=new ze,mW=s=>{var e,t,n;class i extends s{constructor(){super(...arguments),this[e]=new Map,this[t]=a=>{a.forEach(o=>{(!(o instanceof MutationRecord)||o.type==="childList")&&(o.addedNodes.forEach(l=>{this[by](l)}),o.removedNodes.forEach(l=>{this[yB](l)}),this[Xn]())})},this[n]=new MutationObserver(this[_y])}connectedCallback(){super.connectedCallback();for(let o=0;o<this.children.length;++o)this[by](this.children[o]);const{ShadyDOM:a}=self;a==null?this[Lu].observe(this,{childList:!0}):this[Lu]=a.observeChildren(this,this[_y])}disconnectedCallback(){super.disconnectedCallback();const{ShadyDOM:a}=self;a==null?this[Lu].disconnect():a.unobserveChildren(this[Lu])}[(e=Fo,t=_y,n=Lu,Er)](){super[Er]();const a=this[fe];a.forHotspots(o=>{a.updateSurfaceHotspot(o)})}[mr](a,o){super[mr](a,o);const l=this[fe],{annotationRenderer:c}=l,h=l.getCamera();l.shouldRender()&&(l.animateSurfaceHotspots(),l.updateHotspotsVisibility(h.position),c.domElement.style.display="",c.render(l,h))}updateHotspot(a){const o=this[Fo].get(a.name);o!=null&&(o.updatePosition(a.position),o.updateNormal(a.normal),o.surface=a.surface,this[fe].updateSurfaceHotspot(o),this[Xn]())}queryHotspot(a){const o=this[Fo].get(a);if(o==null)return null;const l=Xa(o.position),c=Xa(o.normal),h=o.facingCamera,u=this[fe],d=u.getCamera(),A=new Q;A.setFromMatrixPosition(o.matrixWorld),A.project(d);const p=u.width/2,g=u.height/2;A.x=A.x*p+p,A.y=-(A.y*g)+g;const m=Xa(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:h}}positionAndNormalFromPoint(a,o){const l=this[fe],c=l.getNDC(a,o),h=l.positionAndNormalFromPoint(c);if(h==null)return null;vy.copy(l.target.matrixWorld).invert();const u=Xa(h.position.applyMatrix4(vy)),d=Xa(h.normal.transformDirection(vy));let A=null;return h.uv!=null&&(A=_0(h.uv)),{position:u,normal:d,uv:A}}surfaceFromPoint(a,o){const l=this[fe],c=l.getNDC(a,o);return l.surfaceFromPoint(c)}[by](a){if(!(a instanceof HTMLElement&&a.slot.indexOf("hotspot")===0))return;let o=this[Fo].get(a.slot);o!=null?o.increment():(o=new C2({name:a.slot,position:a.dataset.position,normal:a.dataset.normal,surface:a.dataset.surface}),this[Fo].set(a.slot,o),this[fe].addHotspot(o)),this[fe].queueRender()}[yB](a){if(!(a instanceof HTMLElement))return;const o=this[Fo].get(a.slot);o&&(o.decrement()&&(this[fe].removeHotspot(o),this[Fo].delete(a.slot)),this[fe].queueRender())}}return i};/* @license
|
|
17249
17249
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17250
17250
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17251
17251
|
* you may not use this file except in compliance with the License.
|
|
@@ -17258,7 +17258,7 @@ void main() {
|
|
|
17258
17258
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17259
17259
|
* See the License for the specific language governing permissions and
|
|
17260
17260
|
* limitations under the License.
|
|
17261
|
-
*/const
|
|
17261
|
+
*/const EW=s=>e=>{try{const t=ua(e),n=(t.length?t[0].terms:[]).filter(i=>i&&i.type==="ident").map(i=>i.value).filter(i=>s.indexOf(i)>-1);return new Set(n)}catch{}return new Set};/* @license
|
|
17262
17262
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17263
17263
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17264
17264
|
* you may not use this file except in compliance with the License.
|
|
@@ -17271,7 +17271,7 @@ void main() {
|
|
|
17271
17271
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17272
17272
|
* See the License for the specific language governing permissions and
|
|
17273
17273
|
* limitations under the License.
|
|
17274
|
-
*/var ko=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};let _B=!1,bB=!1;const vB="#model-viewer-no-ar-fallback",EW
|
|
17274
|
+
*/var ko=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};let _B=!1,bB=!1;const vB="#model-viewer-no-ar-fallback",yW=EW(["quick-look","scene-viewer","webxr","none"]),_W="webxr scene-viewer quick-look",us={QUICK_LOOK:"quick-look",SCENE_VIEWER:"scene-viewer",WEBXR:"webxr",NONE:"none"},Ur=Symbol("arButtonContainer"),IB=Symbol("enterARWithWebXR"),CB=Symbol("openSceneViewer"),xB=Symbol("openIOSARQuickLook"),bW=Symbol("canActivateAR"),Dp=Symbol("arMode"),Iy=Symbol("arModes"),Cc=Symbol("arAnchor"),Qp=Symbol("preload"),Lp=Symbol("onARButtonContainerClick"),Cy=Symbol("onARStatus"),xy=Symbol("onARTracking"),wy=Symbol("onARTap"),Nu=Symbol("selectARMode"),Sy=Symbol("triggerLoad"),vW=s=>{var e,t,n,i,r,a,o,l,c,h;class u extends s{constructor(){super(...arguments),this.ar=!1,this.arScale="auto",this.arUsdzMaxTextureSize="auto",this.arPlacement="floor",this.arModes=_W,this.iosSrc=null,this.xrEnvironment=!1,this[e]=!1,this[t]=this.shadowRoot.querySelector(".ar-button"),this[n]=document.createElement("a"),this[i]=new Set,this[r]=us.NONE,this[a]=!1,this[o]=A=>{A.preventDefault(),this.activateAR()},this[l]=({status:A})=>{(A===ja.NOT_PRESENTING||this[Vt].arRenderer.presentedScene===this[fe])&&(this.setAttribute("ar-status",A),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:A}})),A===ja.NOT_PRESENTING?this.removeAttribute("ar-tracking"):A===ja.SESSION_STARTED&&this.setAttribute("ar-tracking",A0.TRACKING))},this[c]=({status:A})=>{this.setAttribute("ar-tracking",A),this.dispatchEvent(new CustomEvent("ar-tracking",{detail:{status:A}}))},this[h]=A=>{A.data=="_apple_ar_quicklook_button_tapped"&&this.dispatchEvent(new CustomEvent("quick-look-button-tapped"))}}get canActivateAR(){return this[Dp]!==us.NONE}connectedCallback(){super.connectedCallback(),this[Vt].arRenderer.addEventListener("status",this[Cy]),this.setAttribute("ar-status",ja.NOT_PRESENTING),this[Vt].arRenderer.addEventListener("tracking",this[xy]),this[Cc].addEventListener("message",this[wy])}disconnectedCallback(){super.disconnectedCallback(),this[Vt].arRenderer.removeEventListener("status",this[Cy]),this[Vt].arRenderer.removeEventListener("tracking",this[xy]),this[Cc].removeEventListener("message",this[wy])}update(A){super.update(A),A.has("arScale")&&(this[fe].canScale=this.arScale!=="fixed"),A.has("arPlacement")&&(this[fe].updateShadow(),this[Xn]()),A.has("arModes")&&(this[Iy]=yW(this.arModes)),(A.has("ar")||A.has("arModes")||A.has("src")||A.has("iosSrc")||A.has("arUsdzMaxTextureSize"))&&this[Nu]()}async activateAR(){switch(this[Dp]){case us.QUICK_LOOK:await this[xB]();break;case us.WEBXR:await this[IB]();break;case us.SCENE_VIEWER:this[CB]();break;default:console.warn("No AR Mode can be activated. This is probably due to missing configuration or device capabilities");break}}async[(e=bW,t=Ur,n=Cc,i=Iy,r=Dp,a=Qp,o=Lp,l=Cy,c=xy,h=wy,Nu)](){var A;let p=us.NONE;if(this.ar){if(this.src!=null)for(const g of this[Iy]){if(g==="webxr"&&jf&&!_B&&await this[Vt].arRenderer.supportsPresentation()){p=us.WEBXR;break}if(g==="scene-viewer"&&!bB&&(t6||navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&(!((A=(await navigator.userAgentData.getHighEntropyValues(["formFactor"])).formFactor)===null||A===void 0)&&A.includes("XR")))){p=us.SCENE_VIEWER;break}if(g==="quick-look"&&Xf){p=us.QUICK_LOOK;break}}p===us.NONE&&this.iosSrc!=null&&Xf&&(p=us.QUICK_LOOK)}if(p!==us.NONE)this[Ur].classList.add("enabled"),this[Ur].addEventListener("click",this[Lp]);else if(this[Ur].classList.contains("enabled")){this[Ur].removeEventListener("click",this[Lp]),this[Ur].classList.remove("enabled");const g=ja.FAILED;this.setAttribute("ar-status",g),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:g}}))}this[Dp]=p}async[IB](){console.log("Attempting to present in AR with WebXR..."),await this[Sy]();try{this[Ur].removeEventListener("click",this[Lp]);const{arRenderer:A}=this[Vt];A.placeOnWall=this.arPlacement==="wall",await A.present(this[fe],this.xrEnvironment)}catch(A){console.warn("Error while trying to present in AR with WebXR"),console.error(A),await this[Vt].arRenderer.stopPresenting(),_B=!0,console.warn("Falling back to next ar-mode"),await this[Nu](),this.activateAR()}finally{this[Nu]()}}async[Sy](){this.loaded||(this[Qp]=!0,this[Kc](),await a6(this,"load"),this[Qp]=!1)}[Sh](){return super[Sh]()||this[Qp]}[CB](){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=vB,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 E=new URL(m.get("sound"),A);m.set("sound",E.toString())}if(m.has("link")){const E=new URL(m.get("link"),A);m.set("link",E.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;`,_=()=>{self.location.hash===vB&&(bB=!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[Nu]())};self.addEventListener("hashchange",_,{once:!0}),this[Cc].setAttribute("href",f),console.log("Attempting to present in AR with Scene Viewer..."),this[Cc].click()}async[xB](){const A=!this.iosSrc;this[Ur].classList.remove("enabled");const p=A?await this.prepareUSDZ():this.iosSrc,g=new URL(p,self.location.toString());if(A){const _=self.location.toString(),E=new URL(_),y=new URL(this.src,E);y.hash&&(g.hash=y.hash)}this.arScale==="fixed"&&(g.hash&&(g.hash+="&"),g.hash+="allowsContentScaling=0");const m=this[Cc];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[Ur].classList.add("enabled")}async prepareUSDZ(){const A=this[wl].beginActivity("usdz-conversion");await this[Sy]();const{model:p,shadow:g,target:m}=this[fe];if(p==null)return"";let f=!1;g!=null&&(f=g.visible,g.visible=!1),A(.2);const _=new Uz;m.remove(p),p.position.copy(m.position),p.updateWorldMatrix(!1,!0);const E=await _.parseAsync(p,{maxTextureSize:isNaN(this.arUsdzMaxTextureSize)?1/0:Math.max(parseInt(this.arUsdzMaxTextureSize),16)});p.position.set(0,0,0),m.add(p);const y=new Blob([E],{type:"model/vnd.usdz+zip"}),b=URL.createObjectURL(y);return A(1),g!=null&&(g.visible=f),b}}return ko([q({type:Boolean,attribute:"ar"})],u.prototype,"ar",void 0),ko([q({type:String,attribute:"ar-scale"})],u.prototype,"arScale",void 0),ko([q({type:String,attribute:"ar-usdz-max-texture-size"})],u.prototype,"arUsdzMaxTextureSize",void 0),ko([q({type:String,attribute:"ar-placement"})],u.prototype,"arPlacement",void 0),ko([q({type:String,attribute:"ar-modes"})],u.prototype,"arModes",void 0),ko([q({type:String,attribute:"ios-src"})],u.prototype,"iosSrc",void 0),ko([q({type:Boolean,attribute:"xr-environment"})],u.prototype,"xrEnvironment",void 0),u};/* @license
|
|
17275
17275
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17276
17276
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17277
17277
|
* you may not use this file except in compliance with the License.
|
|
@@ -17284,7 +17284,7 @@ void main() {
|
|
|
17284
17284
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17285
17285
|
* See the License for the specific language governing permissions and
|
|
17286
17286
|
* limitations under the License.
|
|
17287
|
-
*/var By=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const
|
|
17287
|
+
*/var By=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const IW=100,CW="https://www.gstatic.com/draco/versioned/decoders/1.5.6/",xW="https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/",wW="https://cdn.jsdelivr.net/npm/three@0.149.0/examples/jsm/loaders/LottieLoader.js",Ty={AUTO:"auto"},wB={AUTO:"auto",EAGER:"eager"},xc=Symbol("defaultProgressBarElement"),My=Symbol("posterContainerElement"),wc=Symbol("defaultPosterElement"),Pu=Symbol("shouldDismissPoster"),Ry=Symbol("hidePoster"),Np=Symbol("modelIsRevealed"),Dy=Symbol("updateProgressBar"),SW=Symbol("ariaLabelCallToAction"),Qy=Symbol("onProgress"),BW=s=>{var e,t,n,i,r,a,o,l;class c extends s{static set dracoDecoderLocation(u){wi.setDRACODecoderLocation(u)}static get dracoDecoderLocation(){return wi.getDRACODecoderLocation()}static set ktx2TranscoderLocation(u){wi.setKTX2TranscoderLocation(u)}static get ktx2TranscoderLocation(){return wi.getKTX2TranscoderLocation()}static set meshoptDecoderLocation(u){wi.setMeshoptDecoderLocation(u)}static get meshoptDecoderLocation(){return wi.getMeshoptDecoderLocation()}static set lottieLoaderLocation(u){zs.singleton.textureUtils.lottieLoaderUrl=u}static get lottieLoaderLocation(){return zs.singleton.textureUtils.lottieLoaderUrl}static mapURLs(u){zs.singleton.loader[zo].manager.setURLModifier(u)}dismissPoster(){this.loaded?this[Ry]():(this[Pu]=!0,this[Kc]())}showPoster(){const u=this[My];if(u.classList.contains("show"))return;u.classList.add("show"),this[Us].classList.remove("show");const d=this[wc];d.removeAttribute("tabindex"),d.removeAttribute("aria-hidden");const A=this.modelIsVisible;this[Np]=!1,this[eg](A)}getDimensions(){return Xa(this[fe].size)}getBoundingBoxCenter(){return Xa(this[fe].boundingBox.getCenter(new Q))}constructor(...u){super(...u),this.poster=null,this.reveal=Ty.AUTO,this.loading=wB.AUTO,this[e]=!1,this[t]=!1,this[n]=this.shadowRoot.querySelector(".slot.poster"),this[i]=this.shadowRoot.querySelector("#default-poster"),this[r]=this.shadowRoot.querySelector("#default-progress-bar > .bar"),this[a]=this[wc].getAttribute("aria-label"),this[o]=s6(m=>{const f=this[xc].parentNode;requestAnimationFrame(()=>{this[xc].style.transform=`scaleX(${m})`,m===0&&(f.removeChild(this[xc]),f.appendChild(this[xc])),this[xc].classList.toggle("hide",m===1)})},IW),this[l]=m=>{const f=m.detail.totalProgress,_=m.detail.reason;f===1&&(this[Dy].flush(),this.loaded&&(this[Pu]||this.reveal===Ty.AUTO)&&this[Ry]()),this[Dy](f),this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:f,reason:_}}))};const d=self.ModelViewerElement||{},A=d.dracoDecoderLocation||CW;wi.setDRACODecoderLocation(A);const p=d.ktx2TranscoderLocation||xW;wi.setKTX2TranscoderLocation(p),d.meshoptDecoderLocation&&wi.setMeshoptDecoderLocation(d.meshoptDecoderLocation);const g=d.lottieLoaderLocation||wW;zs.singleton.textureUtils.lottieLoaderUrl=g}connectedCallback(){super.connectedCallback(),this.loaded||this.showPoster(),this[wl].addEventListener("progress",this[Qy])}disconnectedCallback(){super.disconnectedCallback(),this[wl].removeEventListener("progress",this[Qy])}async updated(u){super.updated(u),u.has("poster")&&this.poster!=null&&(this[wc].style.backgroundImage=`url(${this.poster})`),u.has("alt")&&this[wc].setAttribute("aria-label",this[E0]),(u.has("reveal")||u.has("loading"))&&this[Kc]()}[(e=Np,t=Pu,n=My,i=wc,r=xc,a=SW,o=Dy,l=Qy,Sh)](){return!!this.src&&(this[Pu]||this.loading===wB.EAGER||this.reveal===Ty.AUTO&&this[Yo])}[Ry](){this[Pu]=!1;const u=this[My];if(!u.classList.contains("show"))return;u.classList.remove("show"),this[Us].classList.add("show");const d=this.modelIsVisible;this[Np]=!0,this[eg](d);const A=this.getRootNode();A&&A.activeElement===this&&this[Us].focus();const p=this[wc];p.setAttribute("aria-hidden","true"),p.tabIndex=-1,this.dispatchEvent(new CustomEvent("poster-dismissed"))}[Sl](){return super[Sl]()&&this[Np]}}return By([q({type:String})],c.prototype,"poster",void 0),By([q({type:String})],c.prototype,"reveal",void 0),By([q({type:String})],c.prototype,"loading",void 0),c};/* @license
|
|
17288
17288
|
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
17289
17289
|
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
17290
17290
|
* you may not use this file except in compliance with the License.
|
|
@@ -17297,7 +17297,7 @@ void main() {
|
|
|
17297
17297
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17298
17298
|
* See the License for the specific language governing permissions and
|
|
17299
17299
|
* limitations under the License.
|
|
17300
|
-
*/var Ly=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const
|
|
17300
|
+
*/var Ly=function(s,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,e,t,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const TW=Math.PI/32,MW=3e3,RW={basis:[Pg(pi(TW,"rad"))],keywords:{auto:[null]}},Sc=Symbol("autoRotateStartTime"),Ny=Symbol("radiansPerSecond"),SB=Symbol("syncRotationRate"),Py=Symbol("onCameraChange"),DW=s=>{var e,t,n;class i extends s{constructor(){super(...arguments),this.autoRotate=!1,this.autoRotateDelay=MW,this.rotationPerSecond="auto",this[e]=performance.now(),this[t]=0,this[n]=a=>{this.autoRotate&&a.detail.source==="user-interaction"&&(this[Sc]=performance.now())}}connectedCallback(){super.connectedCallback(),this.addEventListener("camera-change",this[Py]),this[Sc]=performance.now()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("camera-change",this[Py]),this[Sc]=performance.now()}updated(a){super.updated(a),a.has("autoRotate")&&(this[Sc]=performance.now())}[(e=Sc,t=Ny,SB)](a){this[Ny]=a[0]}[mr](a,o){if(super[mr](a,o),!this.autoRotate||!this[Sl]()||this[Vt].isPresenting)return;const l=Math.min(o,a-this[Sc]-this.autoRotateDelay);l>0&&(this[fe].yaw=this.turntableRotation+this[Ny]*l*.001)}get turntableRotation(){return this[fe].yaw}resetTurntableRotation(a=0){this[fe].yaw=a}}return n=Py,Ly([q({type:Boolean,attribute:"auto-rotate"})],i.prototype,"autoRotate",void 0),Ly([q({type:Number,attribute:"auto-rotate-delay"})],i.prototype,"autoRotateDelay",void 0),Ly([Oa({intrinsics:RW,updateHandler:SB}),q({type:String,attribute:"rotation-per-second"})],i.prototype,"rotationPerSecond",void 0),i};var QW=Object.defineProperty,kl=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&QW(e,t,i),i};const LW=mW(Z9(DW(u6(s9(vW(BW(gW(hA)))))))),yo=class Af extends Tl{constructor(){super(),this._loggerContext="VIEW IN YOUR SPACE MANAGER",this.__arLink="",this.glbSrc="",this.usdzSrc="",this.debug=!1,this.__registerModelViewerWebComponent()}static{this.webComponentName="view-in-your-space-manager"}static{this.styles=[st`
|
|
17301
17301
|
:host {
|
|
17302
17302
|
position: absolute;
|
|
17303
17303
|
top: 0;
|
|
@@ -17316,7 +17316,7 @@ void main() {
|
|
|
17316
17316
|
.model-viewer.hide {
|
|
17317
17317
|
visibility: hidden;
|
|
17318
17318
|
}
|
|
17319
|
-
`]}__registerModelViewerWebComponent(){this.canLaunchAr()&&(window.customElements.get("model-viewer")||window.customElements.define("model-viewer",
|
|
17319
|
+
`]}__registerModelViewerWebComponent(){this.canLaunchAr()&&(window.customElements.get("model-viewer")||window.customElements.define("model-viewer",LW))}static setupWebComponent(){window.customElements.get(Af.webComponentName)||window.customElements.define(Af.webComponentName,Af)}get arLink(){return this.__arLink}showArModal(){this.arModalElem.showModal();const e=new Hr(!0,Hr.PANEL_TYPE.AR,Hr.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}showQr(){this.qrModalElem.showModal();const e=new Hr(!0,Hr.PANEL_TYPE.QR,Hr.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}async resolveSrcUrl(){if(this.glbSrc="",this.usdzSrc="",jf){const e=await this.appWcRef.getGlbUrlForAr();if(e===null){window.epigraph.logger.error({title:"Error getting the GLB for AR session"});return}this.glbSrc=e}else Xf&&(this.usdzSrc=await this.appWcRef.getUsdzUrlForAr(),this.glbSrc="https://asset.myepigraph.com/solutions-assets/__PIPELINE__/assets/3d-assets/proxyGeo/null-proxy.glb")}async launchAR(){if(this.canLaunchAr()){const e=new uD([]);this.appWcRef.epigraphAnalytics.sendEvent(e),this.showArModal(),await this.resolveSrcUrl()}else{const e=It.generateShareableUrl({baseUrl:this.appWcRef.baseUrlOverride,identifier:this.appWcRef.identifier,identifierType:this.appWcRef.identifierType,arCompatible:!0}),t=await this.appWcRef.qrCodeGenerator.generateQrCode({text:e.href});this.qrModalElem.qrCodeImage=t,this.showQr()}return Promise.resolve(!0)}async onArModalPermissionsClicked(){await this.modelViewerElem.activateAR()}canLaunchAr(){return pw&&(jf||d0||Xf)}isARSessionActive(){return this.modelViewerElem.getAttribute("ar-status")==="presenting"}getMinimumRequirementsString(){let e="";return pw&&($R?e="iOS 16 and above":d0&&(e="Android 12 and above")),e}onArModalClose(){const e=new $r(!0,$r.PANEL_TYPE.AR,$r.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(e)}__renderArModal(){return ae`<epg-modal-ar
|
|
17320
17320
|
id="arModal"
|
|
17321
17321
|
powered-by-epigraph
|
|
17322
17322
|
@epgOnLaunchArClicked=${this.onArModalPermissionsClicked.bind(this)}
|
|
@@ -17344,7 +17344,7 @@ void main() {
|
|
|
17344
17344
|
`:ae`
|
|
17345
17345
|
${super.render()}
|
|
17346
17346
|
${this.__renderQrModal()}
|
|
17347
|
-
`}};kl([Pt("#modelViewer")],yo.prototype,"modelViewerElem");kl([Pt("#arModal")],yo.prototype,"arModalElem");kl([Pt("#qrModal")],yo.prototype,"qrModalElem");kl([q({attribute:!1})],yo.prototype,"appWcRef");kl([q({type:String,attribute:"glb-src"})],yo.prototype,"glbSrc");kl([q({type:String,attribute:"usdz-src"})],yo.prototype,"usdzSrc");kl([q({type:Boolean,attribute:"debug"})],yo.prototype,"debug");let LW=yo;class pt{constructor(e,t,n=""){this.__name="app:generic:event",this.__eventsManager=e,this.__name=t,this.__detail=n}get name(){return this.__name}get detail(){return this.__detail}fire(e){const t=new CustomEvent(this.__name,{detail:e??this.__detail});this.__eventsManager.eventHubRef.dispatchEvent(t)}}class NW extends EventTarget{constructor(e){super(),this._loggerContext="EVENTS MANAGER",window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext}),e?this.eventHubRef=e:this.eventHubRef=this,this.assetLoadProgress=new pt(this,"assetLoadProgress",""),this.experienceUpdatedEvent=new pt(this,"experienceUpdated",""),this.productSettingUpdatedEvent=new pt(this,"productSettingUpdatedEvent",""),this.productSettingsShadowTypeUpdatedEvent=new pt(this,"productSettingsShadowTypeUpdatedEvent",""),this.productSettingsSavedEvent=new pt(this,"productsettingssavedevent",""),this.appReadyEvent=new pt(this,"appReady",""),this.appFailedEvent=new pt(this,"appFailed",""),this.productClassChangedEvent=new pt(this,"productClassChanged",""),this.productChangedEvent=new pt(this,"productChanged",""),this.variantChangedEvent=new pt(this,"variantChanged",""),this.structureNodeAddedEvent=new pt(this,"structureNodeAdded",""),this.structureNodeRemovedEvent=new pt(this,"structureNodeRemoved",""),this.structureChangedEvent=new pt(this,"structureChanged",""),this.showNodeLoadingIcon=new pt(this,"nodeLoadingShow",""),this.hideNodeLoadingIcon=new pt(this,"nodeLoadingHide",""),this.cameraFitEvent=new pt(this,"cameraFit",""),this.hotspotsUpdatedEvent=new pt(this,"hotspotsUpdated",""),this.hotspotsVisibilityChanged=new pt(this,"hotspotsVisibilityChanged",""),this.hotspotClickedEvent=new pt(this,"hotspotClicked",""),this.hotspotOpenEvent=new pt(this,"hotspotOpen",""),this.hotspotClosedEvent=new pt(this,"hotspotClosed",""),this.hotspotNextEvent=new pt(this,"hotspotNext",""),this.hotspotPreviousEvent=new pt(this,"hotspotPrevious",""),this.sceneBoundsChanged=new pt(this,"sceneBoundsChanged",""),this.dimensionsPositionChanged=new pt(this,"dimensionsPositionChanged",""),this.dimensionsValueChanged=new pt(this,"dimensionsValueChanged",""),this.dimensionsVisibilityChanged=new pt(this,"dimensionsVisibilityChanged",""),this.arModelReadyEvent=new pt(this,"arGlbReady",""),this.cartChangedEvent=new pt(this,"cartChanged",""),this.sceneRestartedEvent=new pt(this,"sceneRestarted",""),this.pickerFoundPosition=new pt(this,"pickerFoundPosition",""),this.frameUpdated=new pt(this,"frameUpdated",""),this.cameraControlsStart=new pt(this,"cameraControlsStart",""),this.inputStart=new pt(this,"inputStart",""),this.inputMove=new pt(this,"inputMove",""),this.inputEnd=new pt(this,"inputEnd",""),this.cameraMoveToTransform=new pt(this,"cameraMoveToTransform",""),this.debugChanged=new pt(this,"debugChanged",""),this.showSettingsChanged=new pt(this,"showSettingsChanged",""),this.webComponentResized=new pt(this,"webcomponentresized")}}class PW{constructor(e,t){this.__assets=new Map,this.__appWcRef=t,this.__config=e}async initialize(){for(const e in this.__config){const t=new rR(this.__config[e],this.__appWcRef);this.__assets.set(e,t)}}async loadAllProxies(){for(const e of this.__assets.values())await e.loadProxyGltf()}async loadAllRenderAssets(){for(const e of this.__assets.values())await e.loadRenderGltf(!0)}getAssetByName(e){return this.__assets.get(e)}getFirstAsset(){return this.__assets.values().next().value}hasAnyAssetWithSplat(){for(const e of Object.values(this.__config))if(e.renderSplat)return!0;return!1}}class FW{constructor(e){this.__assetClass=e.assetClass,this.__asset=e.asset,this.__assetId=e.assetId,this.__finish=e.finish,this.__productOptionValue=e.productOptionValue}get assetClass(){return this.__assetClass}get asset(){return this.__asset}get assetId(){return this.__assetId}get finish(){return this.__finish}get productOptionValue(){return this.__productOptionValue}}class kW{constructor(e,t){this.__productParts=[],this.__id=e.id,this.__name=e.name,this.__productId=t,this.__sku=e.sku,this.__upc=e.upc,this.__asin=e.asin,this.__shopifyVariantId=e.shopifyVariantId,this.__uuid=e.uuid,this.parseProductParts(e.productParts)}get id(){return this.__id}get name(){return this.__name}get productId(){return this.__productId}get sku(){return this.__sku}get upc(){return this.__upc}get asin(){return this.__asin}get shopifyVariantId(){return this.__shopifyVariantId}get uuid(){return this.__uuid}get productParts(){return this.__productParts}parseProductParts(e){for(const t of e){const n=new FW(t);this.__productParts.push(n)}}}class UW{constructor(e,t){this.__productVariants=new Map,this.__productVariantNames=new Map,this.__productVariantSkus=new Map,this.__productVariantUpcs=new Map,this.__productVariantAsins=new Map,this.__productVariantShopifyVariantIds=new Map,this.__productVariantUuids=new Map,this.__productId=t;for(const n of e){const i=new kW(n,this.__productId);i&&this.addProductVariant(i)}}addProductVariant(e){this.__productVariants.set(e.id,e),this.__productVariantNames.set(e.name,e),e.sku&&this.__productVariantSkus.set(e.sku,e),e.upc&&this.__productVariantUpcs.set(e.upc,e),e.asin&&this.__productVariantAsins.set(e.asin,e),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.set(e.shopifyVariantId,e),e.uuid&&this.__productVariantUuids.set(e.uuid,e)}removeProductVariant(e){e.sku&&this.__productVariantSkus.delete(e.sku),e.upc&&this.__productVariantUpcs.delete(e.upc),e.asin&&this.__productVariantAsins.delete(e.asin),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.delete(e.shopifyVariantId),this.__productVariantNames.delete(e.name),this.__productVariants.delete(e.id)}getAllProductVariants(){return Array.from(this.__productVariants.values())}getAllProductVariantIds(){return Array.from(this.__productVariants.keys())}getAllProductVariantNames(){return Array.from(this.__productVariantNames.keys())}getProductVariantById(e){return this.__productVariants.get(e)}getProductVariantByName(e){return this.__productVariantNames.get(e)}getProductVariantBySku(e){return this.__productVariantSkus.get(e)}getProductVariantByUpc(e){return this.__productVariantUpcs.get(e)}getProductVariantByAsin(e){return this.__productVariantAsins.get(e)}getProductVariantByShopifyVariantId(e){return this.__productVariantShopifyVariantIds.get(e)}getProductVariantByUuid(e){return this.__productVariantUuids.get(e)}getProductVariantByIdentifierAndType(e,t){switch(t){case qo.SKU:return this.getProductVariantBySku(e);case qo.SHOPIFY_VARIANT_ID:return this.getProductVariantByShopifyVariantId(e);case qo.ASIN:return this.getProductVariantByAsin(e);case qo.UPC:return this.getProductVariantByUpc(e);case qo.EXPERIENCE_ID:return;case qo.PRODUCT_VARIANT_UUID:return this.getProductVariantByUuid(e);default:return}}}class OW extends sR{constructor(e){super(e),this._materialVariantMappings={}}async _parseLoadedGltf(){await super._parseLoadedGltf();const e=this.resource?.scene;if(e===void 0||e.children.length<=0)return;const t=e.children[0],n=this.finishNamesFromAsset;for(const i of t.userData.gltfExtensions.KHR_materials_variants.mappings){const r=n[i.variants[0]];this._materialVariantMappings[r]=i.material}}async getMaterialForFinishId(e){return this._materialVariantMappings[e]===void 0?null:await this.resource?.parser.getDependency("material",this._materialVariantMappings[e])}}class GW{constructor(e){this.__appWcRef=e,this.__materialLibraries=new Map}get materialLibraries(){return this.__materialLibraries}makeEmpty(e={}){const t=Object.keys(e);for(const n of this.__materialLibraries.keys())t.includes(n)||this.__materialLibraries.delete(n)}async addMaterialLibrary(e,t){const n=new OW({id:e,uri:t,preload:!1,appWcRef:this.__appWcRef});return this.__materialLibraries.set(n.id,n),n}}class zW{constructor(){this.__defaultValues={postEffect:{ao:!1},render:{envMap:"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/env-maps/neutral.hdr",envMapRotation:{x:0,y:0,z:0},mode:ga.GEO,splatMode:{blurAmount:1,preBlurAmount:1}},camera:{initial:null,backgroundColor:"#ffffff",backgroundAlpha:1,focalLength:35,nearClip:.01,farClip:1e3,canPan:!0,canZoom:!0,minDistance:2,maxDistance:8,infinitePolarAngle:!1,minPolarAngle:0,maxPolarAngle:6.25,infiniteAzimuthAngle:!0,minAzimuthAngle:0,maxAzimuthAngle:6.25},renderQuality:{antiAlias:!0},screenshots:{enabled:!1},shadows:{shadowType:Ed.ACCUMULATIVE,accumulativeShadows:{shadowMaterial:{opacity:.8,alphaTest:.75,color:"#000000",blend:1},shadowParams:{frames:30,scale:10,radius:.8,ambient:.5},light:{direction:{x:3,y:5,z:3}}},contactShadows:{planeLength:3,planeWidth:3,cameraHeight:1,intensity:1,softness:1}},hotspots:{showNavigationButtons:!0}},this.deepCopyProductSettings(this.__defaultValues)}asJson(){return this.__values}deepCopyProductSettings(e){this.__values=JSON.parse(JSON.stringify(this.__defaultValues)),e.render&&(e.render.envMap&&(this.__values.render.envMap=e.render.envMap),e.render.envMapRotation&&(this.__values.render.envMapRotation=e.render.envMapRotation),e.render.mode&&(this.__values.render.mode=e.render.mode),e.render.splatMode&&(e.render.splatMode.blurAmount&&(this.__values.render.splatMode.blurAmount=e.render.splatMode.blurAmount),e.render.splatMode.preBlurAmount&&(this.__values.render.splatMode.preBlurAmount=e.render.splatMode.preBlurAmount))),e.camera&&(e.camera.initial&&(this.__values.camera.initial=e.camera.initial),e.camera.backgroundColor&&(this.__values.camera.backgroundColor=e.camera.backgroundColor),e.camera.backgroundAlpha&&(this.__values.camera.backgroundAlpha=e.camera.backgroundAlpha),e.camera.focalLength&&(this.__values.camera.focalLength=e.camera.focalLength),e.camera.canPan!==void 0&&(this.__values.camera.canPan=e.camera.canPan),e.camera.canZoom!==void 0&&(this.__values.camera.canZoom=e.camera.canZoom),e.camera.minDistance&&(this.__values.camera.minDistance=e.camera.minDistance),e.camera.maxDistance&&(this.__values.camera.maxDistance=e.camera.maxDistance),e.camera.infinitePolarAngle&&(this.__values.camera.infinitePolarAngle=e.camera.infinitePolarAngle),e.camera.minPolarAngle&&(this.__values.camera.minPolarAngle=e.camera.minPolarAngle),e.camera.maxPolarAngle&&(this.__values.camera.maxPolarAngle=e.camera.maxPolarAngle),e.camera.infiniteAzimuthAngle&&(this.__values.camera.infiniteAzimuthAngle=e.camera.infiniteAzimuthAngle),e.camera.minAzimuthAngle&&(this.__values.camera.minAzimuthAngle=e.camera.minAzimuthAngle),e.camera.maxAzimuthAngle&&(this.__values.camera.maxAzimuthAngle=e.camera.maxAzimuthAngle)),e.postEffect&&(this.__values.postEffect=e.postEffect),e.renderQuality&&(this.__values.renderQuality=e.renderQuality),e.screenshots&&(this.__values.screenshots=e.screenshots),e.shadows?.shadowType&&(this.__values.shadows.shadowType=e.shadows.shadowType),e.shadows?.accumulativeShadows&&(this.__values.shadows.accumulativeShadows=e.shadows.accumulativeShadows),e.shadows?.contactShadows&&(e.shadows.contactShadows.cameraHeight&&(this.__values.shadows.contactShadows.cameraHeight=e.shadows.contactShadows.cameraHeight),e.shadows.contactShadows.intensity&&(this.__values.shadows.contactShadows.intensity=e.shadows.contactShadows.intensity),e.shadows.contactShadows.planeLength&&(this.__values.shadows.contactShadows.planeLength=e.shadows.contactShadows.planeLength),e.shadows.contactShadows.planeWidth&&(this.__values.shadows.contactShadows.planeWidth=e.shadows.contactShadows.planeWidth),e.shadows.contactShadows.softness&&(this.__values.shadows.contactShadows.softness=e.shadows.contactShadows.softness)),e.hotspots?.showNavigationButtons!==void 0&&(this.__values.hotspots.showNavigationButtons=e.hotspots.showNavigationButtons)}get postEffect(){return this.__values.postEffect}get render(){return this.__values.render}get camera(){return this.__values.camera}get renderQuality(){return this.__values.renderQuality}get screenshots(){return this.__values.screenshots}get shadows(){return this.__values.shadows}get hotspots(){return this.__values.hotspots}}class HW{constructor({nexusApiResultPayload:e,appWcRef:t}){this.__needsRootPlug=!1,window.epigraph.logger.info({title:"nexusApiPayload",details:e}),this._appWcRef=t,this._data=e,this.__materialLibraryCollection=new GW(this._appWcRef),this._data.product_data.settings&&(this._appWcRef.productSettings.deepCopyProductSettings(this._data.product_data.settings),this._appWcRef.eventsManager.productSettingUpdatedEvent.fire());const n=this._data.product_data.assets;if(Object.values(n).length===1){const i=Object.values(n)[0];i?.proxyGeo?window.epigraph.logger.warn({title:"Single asset experience detected and a proxy was provided. Please ensure that the proxy provided has a root plug in it. Expand for the asset config used...",details:i,contextOverride:"ASSET COLLECTION"}):(i.proxyGeo="https://asset.myepigraph.com/solutions-assets/__PIPELINE__/assets/3d-assets/proxyGeo/null-proxy.glb",this.__needsRootPlug=!0,i.autoGenerateProxyEntity=!0)}}get materialLibraryCollection(){return this.__materialLibraryCollection}get settings(){return this._data.settings}get currentAssetVersion(){return this._data.product_data.product.currentAssetVersion}get productSettings(){return this._data.product_data.settings}get channelName(){return this._data.settings.channel.name}get channelSettings(){return this._data.settings.channel.channel_settings}async __parseMaterialLibraries(){const e=this._data?.brand?.material_libraries;if(!e){this.__materialLibraryCollection.makeEmpty();return}this.__materialLibraryCollection.makeEmpty(e);for(const[t,n]of Object.entries(e))await this.__materialLibraryCollection.addMaterialLibrary(t,n.url)}async __parseAssets(){return this.__assetCollection=new PW(this._data.product_data.assets,this._appWcRef),await this.__assetCollection.initialize(),this.__needsRootPlug&&this.__assetCollection.getFirstAsset()?.proxyGltf?.plugs.push(new Ao({name:"root@plug",isPrimary:!0,connectionId:"root",position:new Q,rotation:new zi})),this.__assetCollection}getAssetCollection(){return this.__assetCollection}__parseProductVariants(){this.__productVariantCollection=new UW(this._data.product_data.product.productVariants,this._data.product_data.product.id)}get productVariantCollection(){return this.__productVariantCollection}async initialize(){await this.__parseMaterialLibraries(),await this.__parseAssets(),await this.__parseProductVariants()}}var vd=function(){var s=0,e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",e.addEventListener("click",function(h){h.preventDefault(),n(++s%e.children.length)},!1);function t(h){return e.appendChild(h.dom),h}function n(h){for(var u=0;u<e.children.length;u++)e.children[u].style.display=u===h?"block":"none";s=h}var i=(performance||Date).now(),r=i,a=0,o=t(new vd.Panel("FPS","#0ff","#002")),l=t(new vd.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=t(new vd.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:e,addPanel:t,showPanel:n,begin:function(){i=(performance||Date).now()},end:function(){a++;var h=(performance||Date).now();if(l.update(h-i,200),h>=r+1e3&&(o.update(a*1e3/(h-r),100),r=h,a=0,c)){var u=performance.memory;c.update(u.usedJSHeapSize/1048576,u.jsHeapSizeLimit/1048576)}return h},update:function(){i=this.end()},domElement:e,setMode:n}};vd.Panel=function(s,e,t){var n=1/0,i=0,r=Math.round,a=r(window.devicePixelRatio||1),o=80*a,l=48*a,c=3*a,h=2*a,u=3*a,d=15*a,A=74*a,p=30*a,g=document.createElement("canvas");g.width=o,g.height=l,g.style.cssText="width:80px;height:48px";var m=g.getContext("2d");return m.font="bold "+9*a+"px Helvetica,Arial,sans-serif",m.textBaseline="top",m.fillStyle=t,m.fillRect(0,0,o,l),m.fillStyle=e,m.fillText(s,c,h),m.fillRect(u,d,A,p),m.fillStyle=t,m.globalAlpha=.9,m.fillRect(u,d,A,p),{dom:g,update:function(f,_){n=Math.min(n,f),i=Math.max(i,f),m.fillStyle=t,m.globalAlpha=1,m.fillRect(0,0,o,d),m.fillStyle=e,m.fillText(r(f)+" "+s+" ("+r(n)+"-"+r(i)+")",c,h),m.drawImage(g,u+a,d,A-a,p,u,d,A-a,p),m.fillRect(u+A-a,d,a,p),m.fillStyle=t,m.globalAlpha=.9,m.fillRect(u+A-a,d,a,r((1-f/_)*p))}}};class Ns extends Tl{constructor(){super(),this._loggerContext="DEBUG MANAGER",this.stats=new vd}static{this.webComponentName="debug-manager"}static setupWebComponent(){window.customElements.get(Ns.webComponentName)||window.customElements.define(Ns.webComponentName,Ns)}static{this.styles=st`
|
|
17347
|
+
`}};kl([Pt("#modelViewer")],yo.prototype,"modelViewerElem");kl([Pt("#arModal")],yo.prototype,"arModalElem");kl([Pt("#qrModal")],yo.prototype,"qrModalElem");kl([q({attribute:!1})],yo.prototype,"appWcRef");kl([q({type:String,attribute:"glb-src"})],yo.prototype,"glbSrc");kl([q({type:String,attribute:"usdz-src"})],yo.prototype,"usdzSrc");kl([q({type:Boolean,attribute:"debug"})],yo.prototype,"debug");let NW=yo;class pt{constructor(e,t,n=""){this.__name="app:generic:event",this.__eventsManager=e,this.__name=t,this.__detail=n}get name(){return this.__name}get detail(){return this.__detail}fire(e){const t=new CustomEvent(this.__name,{detail:e??this.__detail});this.__eventsManager.eventHubRef.dispatchEvent(t)}}class PW extends EventTarget{constructor(e){super(),this._loggerContext="EVENTS MANAGER",window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext}),e?this.eventHubRef=e:this.eventHubRef=this,this.assetLoadProgress=new pt(this,"assetLoadProgress",""),this.experienceUpdatedEvent=new pt(this,"experienceUpdated",""),this.productSettingUpdatedEvent=new pt(this,"productSettingUpdatedEvent",""),this.productSettingsShadowTypeUpdatedEvent=new pt(this,"productSettingsShadowTypeUpdatedEvent",""),this.productSettingsSavedEvent=new pt(this,"productsettingssavedevent",""),this.appReadyEvent=new pt(this,"appReady",""),this.appFailedEvent=new pt(this,"appFailed",""),this.productClassChangedEvent=new pt(this,"productClassChanged",""),this.productChangedEvent=new pt(this,"productChanged",""),this.variantChangedEvent=new pt(this,"variantChanged",""),this.structureNodeAddedEvent=new pt(this,"structureNodeAdded",""),this.structureNodeRemovedEvent=new pt(this,"structureNodeRemoved",""),this.structureChangedEvent=new pt(this,"structureChanged",""),this.showNodeLoadingIcon=new pt(this,"nodeLoadingShow",""),this.hideNodeLoadingIcon=new pt(this,"nodeLoadingHide",""),this.cameraFitEvent=new pt(this,"cameraFit",""),this.hotspotsUpdatedEvent=new pt(this,"hotspotsUpdated",""),this.hotspotsVisibilityChanged=new pt(this,"hotspotsVisibilityChanged",""),this.hotspotClickedEvent=new pt(this,"hotspotClicked",""),this.hotspotOpenEvent=new pt(this,"hotspotOpen",""),this.hotspotClosedEvent=new pt(this,"hotspotClosed",""),this.hotspotNextEvent=new pt(this,"hotspotNext",""),this.hotspotPreviousEvent=new pt(this,"hotspotPrevious",""),this.sceneBoundsChanged=new pt(this,"sceneBoundsChanged",""),this.dimensionsPositionChanged=new pt(this,"dimensionsPositionChanged",""),this.dimensionsValueChanged=new pt(this,"dimensionsValueChanged",""),this.dimensionsVisibilityChanged=new pt(this,"dimensionsVisibilityChanged",""),this.arModelReadyEvent=new pt(this,"arGlbReady",""),this.cartChangedEvent=new pt(this,"cartChanged",""),this.sceneRestartedEvent=new pt(this,"sceneRestarted",""),this.pickerFoundPosition=new pt(this,"pickerFoundPosition",""),this.frameUpdated=new pt(this,"frameUpdated",""),this.cameraControlsStart=new pt(this,"cameraControlsStart",""),this.inputStart=new pt(this,"inputStart",""),this.inputMove=new pt(this,"inputMove",""),this.inputEnd=new pt(this,"inputEnd",""),this.cameraMoveToTransform=new pt(this,"cameraMoveToTransform",""),this.debugChanged=new pt(this,"debugChanged",""),this.showSettingsChanged=new pt(this,"showSettingsChanged",""),this.webComponentResized=new pt(this,"webcomponentresized")}}class FW{constructor(e,t){this.__assets=new Map,this.__appWcRef=t,this.__config=e}async initialize(){for(const e in this.__config){const t=new rR(this.__config[e],this.__appWcRef);this.__assets.set(e,t)}}async loadAllProxies(){for(const e of this.__assets.values())await e.loadProxyGltf()}async loadAllRenderAssets(){for(const e of this.__assets.values())await e.loadRenderGltf(!0)}getAssetByName(e){return this.__assets.get(e)}getFirstAsset(){return this.__assets.values().next().value}hasAnyAssetWithSplat(){for(const e of Object.values(this.__config))if(e.renderSplat)return!0;return!1}}class kW{constructor(e){this.__assetClass=e.assetClass,this.__asset=e.asset,this.__assetId=e.assetId,this.__finish=e.finish,this.__productOptionValue=e.productOptionValue}get assetClass(){return this.__assetClass}get asset(){return this.__asset}get assetId(){return this.__assetId}get finish(){return this.__finish}get productOptionValue(){return this.__productOptionValue}}class UW{constructor(e,t){this.__productParts=[],this.__id=e.id,this.__name=e.name,this.__productId=t,this.__sku=e.sku,this.__upc=e.upc,this.__asin=e.asin,this.__shopifyVariantId=e.shopifyVariantId,this.__uuid=e.uuid,this.parseProductParts(e.productParts)}get id(){return this.__id}get name(){return this.__name}get productId(){return this.__productId}get sku(){return this.__sku}get upc(){return this.__upc}get asin(){return this.__asin}get shopifyVariantId(){return this.__shopifyVariantId}get uuid(){return this.__uuid}get productParts(){return this.__productParts}parseProductParts(e){for(const t of e){const n=new kW(t);this.__productParts.push(n)}}}class OW{constructor(e,t){this.__productVariants=new Map,this.__productVariantNames=new Map,this.__productVariantSkus=new Map,this.__productVariantUpcs=new Map,this.__productVariantAsins=new Map,this.__productVariantShopifyVariantIds=new Map,this.__productVariantUuids=new Map,this.__productId=t;for(const n of e){const i=new UW(n,this.__productId);i&&this.addProductVariant(i)}}addProductVariant(e){this.__productVariants.set(e.id,e),this.__productVariantNames.set(e.name,e),e.sku&&this.__productVariantSkus.set(e.sku,e),e.upc&&this.__productVariantUpcs.set(e.upc,e),e.asin&&this.__productVariantAsins.set(e.asin,e),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.set(e.shopifyVariantId,e),e.uuid&&this.__productVariantUuids.set(e.uuid,e)}removeProductVariant(e){e.sku&&this.__productVariantSkus.delete(e.sku),e.upc&&this.__productVariantUpcs.delete(e.upc),e.asin&&this.__productVariantAsins.delete(e.asin),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.delete(e.shopifyVariantId),this.__productVariantNames.delete(e.name),this.__productVariants.delete(e.id)}getAllProductVariants(){return Array.from(this.__productVariants.values())}getAllProductVariantIds(){return Array.from(this.__productVariants.keys())}getAllProductVariantNames(){return Array.from(this.__productVariantNames.keys())}getProductVariantById(e){return this.__productVariants.get(e)}getProductVariantByName(e){return this.__productVariantNames.get(e)}getProductVariantBySku(e){return this.__productVariantSkus.get(e)}getProductVariantByUpc(e){return this.__productVariantUpcs.get(e)}getProductVariantByAsin(e){return this.__productVariantAsins.get(e)}getProductVariantByShopifyVariantId(e){return this.__productVariantShopifyVariantIds.get(e)}getProductVariantByUuid(e){return this.__productVariantUuids.get(e)}getProductVariantByIdentifierAndType(e,t){switch(t){case qo.SKU:return this.getProductVariantBySku(e);case qo.SHOPIFY_VARIANT_ID:return this.getProductVariantByShopifyVariantId(e);case qo.ASIN:return this.getProductVariantByAsin(e);case qo.UPC:return this.getProductVariantByUpc(e);case qo.EXPERIENCE_ID:return;case qo.PRODUCT_VARIANT_UUID:return this.getProductVariantByUuid(e);default:return}}}class GW extends sR{constructor(e){super(e),this._materialVariantMappings={}}async _parseLoadedGltf(){await super._parseLoadedGltf();const e=this.resource?.scene;if(e===void 0||e.children.length<=0)return;const t=e.children[0],n=this.finishNamesFromAsset;for(const i of t.userData.gltfExtensions.KHR_materials_variants.mappings){const r=n[i.variants[0]];this._materialVariantMappings[r]=i.material}}async getMaterialForFinishId(e){return this._materialVariantMappings[e]===void 0?null:await this.resource?.parser.getDependency("material",this._materialVariantMappings[e])}}class zW{constructor(e){this.__appWcRef=e,this.__materialLibraries=new Map}get materialLibraries(){return this.__materialLibraries}makeEmpty(e={}){const t=Object.keys(e);for(const n of this.__materialLibraries.keys())t.includes(n)||this.__materialLibraries.delete(n)}async addMaterialLibrary(e,t){const n=new GW({id:e,uri:t,preload:!1,appWcRef:this.__appWcRef});return this.__materialLibraries.set(n.id,n),n}}class HW{constructor(){this.__defaultValues={postEffect:{ao:!1},render:{envMap:"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/env-maps/neutral.hdr",envMapRotation:{x:0,y:0,z:0},mode:ga.GEO,splatMode:{blurAmount:1,preBlurAmount:1}},camera:{initial:null,backgroundColor:"#ffffff",backgroundAlpha:1,focalLength:35,nearClip:.01,farClip:1e3,canPan:!0,canZoom:!0,minDistance:2,maxDistance:8,infinitePolarAngle:!1,minPolarAngle:0,maxPolarAngle:6.25,infiniteAzimuthAngle:!0,minAzimuthAngle:0,maxAzimuthAngle:6.25},renderQuality:{antiAlias:!0},screenshots:{enabled:!1},shadows:{shadowType:Ed.ACCUMULATIVE,accumulativeShadows:{shadowMaterial:{opacity:.8,alphaTest:.75,color:"#000000",blend:1},shadowParams:{frames:30,scale:10,radius:.8,ambient:.5},light:{direction:{x:3,y:5,z:3}}},contactShadows:{planeLength:3,planeWidth:3,cameraHeight:1,intensity:1,softness:1}},hotspots:{showNavigationButtons:!0}},this.deepCopyProductSettings(this.__defaultValues)}asJson(){return this.__values}deepCopyProductSettings(e){this.__values=JSON.parse(JSON.stringify(this.__defaultValues)),e.render&&(e.render.envMap&&(this.__values.render.envMap=e.render.envMap),e.render.envMapRotation&&(this.__values.render.envMapRotation=e.render.envMapRotation),e.render.mode&&(this.__values.render.mode=e.render.mode),e.render.splatMode&&(e.render.splatMode.blurAmount&&(this.__values.render.splatMode.blurAmount=e.render.splatMode.blurAmount),e.render.splatMode.preBlurAmount&&(this.__values.render.splatMode.preBlurAmount=e.render.splatMode.preBlurAmount))),e.camera&&(e.camera.initial&&(this.__values.camera.initial=e.camera.initial),e.camera.backgroundColor&&(this.__values.camera.backgroundColor=e.camera.backgroundColor),e.camera.backgroundAlpha&&(this.__values.camera.backgroundAlpha=e.camera.backgroundAlpha),e.camera.focalLength&&(this.__values.camera.focalLength=e.camera.focalLength),e.camera.canPan!==void 0&&(this.__values.camera.canPan=e.camera.canPan),e.camera.canZoom!==void 0&&(this.__values.camera.canZoom=e.camera.canZoom),e.camera.minDistance&&(this.__values.camera.minDistance=e.camera.minDistance),e.camera.maxDistance&&(this.__values.camera.maxDistance=e.camera.maxDistance),e.camera.infinitePolarAngle&&(this.__values.camera.infinitePolarAngle=e.camera.infinitePolarAngle),e.camera.minPolarAngle&&(this.__values.camera.minPolarAngle=e.camera.minPolarAngle),e.camera.maxPolarAngle&&(this.__values.camera.maxPolarAngle=e.camera.maxPolarAngle),e.camera.infiniteAzimuthAngle&&(this.__values.camera.infiniteAzimuthAngle=e.camera.infiniteAzimuthAngle),e.camera.minAzimuthAngle&&(this.__values.camera.minAzimuthAngle=e.camera.minAzimuthAngle),e.camera.maxAzimuthAngle&&(this.__values.camera.maxAzimuthAngle=e.camera.maxAzimuthAngle)),e.postEffect&&(this.__values.postEffect=e.postEffect),e.renderQuality&&(this.__values.renderQuality=e.renderQuality),e.screenshots&&(this.__values.screenshots=e.screenshots),e.shadows?.shadowType&&(this.__values.shadows.shadowType=e.shadows.shadowType),e.shadows?.accumulativeShadows&&(this.__values.shadows.accumulativeShadows=e.shadows.accumulativeShadows),e.shadows?.contactShadows&&(e.shadows.contactShadows.cameraHeight&&(this.__values.shadows.contactShadows.cameraHeight=e.shadows.contactShadows.cameraHeight),e.shadows.contactShadows.intensity&&(this.__values.shadows.contactShadows.intensity=e.shadows.contactShadows.intensity),e.shadows.contactShadows.planeLength&&(this.__values.shadows.contactShadows.planeLength=e.shadows.contactShadows.planeLength),e.shadows.contactShadows.planeWidth&&(this.__values.shadows.contactShadows.planeWidth=e.shadows.contactShadows.planeWidth),e.shadows.contactShadows.softness&&(this.__values.shadows.contactShadows.softness=e.shadows.contactShadows.softness)),e.hotspots?.showNavigationButtons!==void 0&&(this.__values.hotspots.showNavigationButtons=e.hotspots.showNavigationButtons)}get postEffect(){return this.__values.postEffect}get render(){return this.__values.render}get camera(){return this.__values.camera}get renderQuality(){return this.__values.renderQuality}get screenshots(){return this.__values.screenshots}get shadows(){return this.__values.shadows}get hotspots(){return this.__values.hotspots}}class $W{constructor({nexusApiResultPayload:e,appWcRef:t}){this.__needsRootPlug=!1,window.epigraph.logger.info({title:"nexusApiPayload",details:e}),this._appWcRef=t,this._data=e,this.__materialLibraryCollection=new zW(this._appWcRef),this._data.product_data.settings&&(this._appWcRef.productSettings.deepCopyProductSettings(this._data.product_data.settings),this._appWcRef.eventsManager.productSettingUpdatedEvent.fire());const n=this._data.product_data.assets;if(Object.values(n).length===1){const i=Object.values(n)[0];i?.proxyGeo?window.epigraph.logger.warn({title:"Single asset experience detected and a proxy was provided. Please ensure that the proxy provided has a root plug in it. Expand for the asset config used...",details:i,contextOverride:"ASSET COLLECTION"}):(i.proxyGeo="https://asset.myepigraph.com/solutions-assets/__PIPELINE__/assets/3d-assets/proxyGeo/null-proxy.glb",this.__needsRootPlug=!0,i.autoGenerateProxyEntity=!0)}}get materialLibraryCollection(){return this.__materialLibraryCollection}get settings(){return this._data.settings}get currentAssetVersion(){return this._data.product_data.product.currentAssetVersion}get productSettings(){return this._data.product_data.settings}get channelName(){return this._data.settings.channel.name}get channelSettings(){return this._data.settings.channel.channel_settings}async __parseMaterialLibraries(){const e=this._data?.brand?.material_libraries;if(!e){this.__materialLibraryCollection.makeEmpty();return}this.__materialLibraryCollection.makeEmpty(e);for(const[t,n]of Object.entries(e))await this.__materialLibraryCollection.addMaterialLibrary(t,n.url)}async __parseAssets(){return this.__assetCollection=new FW(this._data.product_data.assets,this._appWcRef),await this.__assetCollection.initialize(),this.__needsRootPlug&&this.__assetCollection.getFirstAsset()?.proxyGltf?.plugs.push(new Ao({name:"root@plug",isPrimary:!0,connectionId:"root",position:new Q,rotation:new zi})),this.__assetCollection}getAssetCollection(){return this.__assetCollection}__parseProductVariants(){this.__productVariantCollection=new OW(this._data.product_data.product.productVariants,this._data.product_data.product.id)}get productVariantCollection(){return this.__productVariantCollection}async initialize(){await this.__parseMaterialLibraries(),await this.__parseAssets(),await this.__parseProductVariants()}}var vd=function(){var s=0,e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",e.addEventListener("click",function(h){h.preventDefault(),n(++s%e.children.length)},!1);function t(h){return e.appendChild(h.dom),h}function n(h){for(var u=0;u<e.children.length;u++)e.children[u].style.display=u===h?"block":"none";s=h}var i=(performance||Date).now(),r=i,a=0,o=t(new vd.Panel("FPS","#0ff","#002")),l=t(new vd.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=t(new vd.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:e,addPanel:t,showPanel:n,begin:function(){i=(performance||Date).now()},end:function(){a++;var h=(performance||Date).now();if(l.update(h-i,200),h>=r+1e3&&(o.update(a*1e3/(h-r),100),r=h,a=0,c)){var u=performance.memory;c.update(u.usedJSHeapSize/1048576,u.jsHeapSizeLimit/1048576)}return h},update:function(){i=this.end()},domElement:e,setMode:n}};vd.Panel=function(s,e,t){var n=1/0,i=0,r=Math.round,a=r(window.devicePixelRatio||1),o=80*a,l=48*a,c=3*a,h=2*a,u=3*a,d=15*a,A=74*a,p=30*a,g=document.createElement("canvas");g.width=o,g.height=l,g.style.cssText="width:80px;height:48px";var m=g.getContext("2d");return m.font="bold "+9*a+"px Helvetica,Arial,sans-serif",m.textBaseline="top",m.fillStyle=t,m.fillRect(0,0,o,l),m.fillStyle=e,m.fillText(s,c,h),m.fillRect(u,d,A,p),m.fillStyle=t,m.globalAlpha=.9,m.fillRect(u,d,A,p),{dom:g,update:function(f,_){n=Math.min(n,f),i=Math.max(i,f),m.fillStyle=t,m.globalAlpha=1,m.fillRect(0,0,o,d),m.fillStyle=e,m.fillText(r(f)+" "+s+" ("+r(n)+"-"+r(i)+")",c,h),m.drawImage(g,u+a,d,A-a,p,u,d,A-a,p),m.fillRect(u+A-a,d,a,p),m.fillStyle=t,m.globalAlpha=.9,m.fillRect(u+A-a,d,a,r((1-f/_)*p))}}};class Ns extends Tl{constructor(){super(),this._loggerContext="DEBUG MANAGER",this.stats=new vd}static{this.webComponentName="debug-manager"}static setupWebComponent(){window.customElements.get(Ns.webComponentName)||window.customElements.define(Ns.webComponentName,Ns)}static{this.styles=st`
|
|
17348
17348
|
.debug-label {
|
|
17349
17349
|
position: absolute;
|
|
17350
17350
|
top: 0%;
|
|
@@ -17362,10 +17362,10 @@ void main() {
|
|
|
17362
17362
|
* @version 0.17.0
|
|
17363
17363
|
* @author George Michael Brower
|
|
17364
17364
|
* @license MIT
|
|
17365
|
-
*/class fr{constructor(e,t,n,i,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(i),this.$name=document.createElement("div"),this.$name.classList.add("name"),fr.nextNameID=fr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++fr.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 $W extends fr{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 b0(s){let e,t;return(e=s.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=s.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=s.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 VW={isPrimitive:!0,match:s=>typeof s=="string",fromHexString:b0,toHexString:b0},qd={isPrimitive:!0,match:s=>typeof s=="number",fromHexString:s=>parseInt(s.substring(1),16),toHexString:s=>"#"+s.toString(16).padStart(6,0)},YW={isPrimitive:!1,match:Array.isArray,fromHexString(s,e,t=1){const n=qd.fromHexString(s);e[0]=(n>>16&255)/255*t,e[1]=(n>>8&255)/255*t,e[2]=(255&n)/255*t},toHexString:([s,e,t],n=1)=>qd.toHexString(s*(n=255/n)<<16^e*n<<8^t*n<<0)},qW={isPrimitive:!1,match:s=>Object(s)===s,fromHexString(s,e,t=1){const n=qd.fromHexString(s);e.r=(n>>16&255)/255*t,e.g=(n>>8&255)/255*t,e.b=(255&n)/255*t},toHexString:({r:s,g:e,b:t},n=1)=>qd.toHexString(s*(n=255/n)<<16^e*n<<8^t*n<<0)},WW=[VW,qd,YW,qW];class jW extends fr{constructor(e,t,n,i){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,WW.find(a=>a.match(r))),this._rgbScale=i,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=b0(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 Fy extends fr{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",i=>{i.preventDefault(),this.getValue().call(this.object)}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class XW extends fr{constructor(e,t,n,i,r,a){super(e,t,n,"number"),this._initInput(),this.min(i),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=h=>{const u=parseFloat(this.$input.value);isNaN(u)||(this._snapClampSetValue(u+h),this.$input.value=this.getValue())};let t,n,i,r,a,o=!1;const l=h=>{if(o){const u=h.clientX-t,d=h.clientY-n;Math.abs(d)>5?(h.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(u)>5&&c()}if(!o){const u=h.clientY-i;a-=u*this._step*this._arrowKeyMultiplier(h),r+a>this._max?a=this._max-r:r+a<this._min&&(a=this._min-r),this._snapClampSetValue(r+a)}i=h.clientY},c=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",c)};this.$input.addEventListener("input",()=>{let h=parseFloat(this.$input.value);isNaN(h)||(this._stepExplicit&&(h=this._snap(h)),this.setValue(this._clamp(h)))}),this.$input.addEventListener("keydown",h=>{h.code==="Enter"&&this.$input.blur(),h.code==="ArrowUp"&&(h.preventDefault(),e(this._step*this._arrowKeyMultiplier(h))),h.code==="ArrowDown"&&(h.preventDefault(),e(this._step*this._arrowKeyMultiplier(h)*-1))}),this.$input.addEventListener("wheel",h=>{this._inputFocused&&(h.preventDefault(),e(this._step*this._normalizeMouseWheel(h)))},{passive:!1}),this.$input.addEventListener("mousedown",h=>{t=h.clientX,n=i=h.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,_=this._min,E=this._max,(g-m)/(f-m)*(E-_)+_);var g,m,f,_,E;this._snapClampSetValue(p)},t=d=>{e(d.clientX)},n=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};let i,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-i,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)},h=this._callOnFinishChange.bind(this);let u;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?(i=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(u),u=setTimeout(h,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 JW extends fr{constructor(e,t,n,i){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(i)?i:Object.values(i),this._names=Array.isArray(i)?i:Object.keys(i),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 KW extends fr{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",i=>{i.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 BB=!1;class Hb{constructor({parent:e,autoPlace:t=e===void 0,container:n,width:i,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"),!BB&&a&&((function(l){const c=document.createElement("style");c.innerHTML=l;const h=document.querySelector("head link[rel=stylesheet], head style");h?document.head.insertBefore(c,h):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)}}'),BB=!0),n?n.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),i&&this.domElement.style.setProperty("--width",i+"px"),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation())}add(e,t,n,i,r){if(Object(n)===n)return new JW(this,e,t,n);const a=e[t];switch(typeof a){case"number":return new XW(this,e,t,n,i,r);case"boolean":return new $W(this,e,t);case"string":return new KW(this,e,t);case"function":return new Fy(this,e,t)}console.error(`gui.add failed
|
|
17365
|
+
*/class fr{constructor(e,t,n,i,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(i),this.$name=document.createElement("div"),this.$name.classList.add("name"),fr.nextNameID=fr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++fr.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 VW extends fr{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 b0(s){let e,t;return(e=s.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=s.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=s.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 YW={isPrimitive:!0,match:s=>typeof s=="string",fromHexString:b0,toHexString:b0},qd={isPrimitive:!0,match:s=>typeof s=="number",fromHexString:s=>parseInt(s.substring(1),16),toHexString:s=>"#"+s.toString(16).padStart(6,0)},qW={isPrimitive:!1,match:Array.isArray,fromHexString(s,e,t=1){const n=qd.fromHexString(s);e[0]=(n>>16&255)/255*t,e[1]=(n>>8&255)/255*t,e[2]=(255&n)/255*t},toHexString:([s,e,t],n=1)=>qd.toHexString(s*(n=255/n)<<16^e*n<<8^t*n<<0)},WW={isPrimitive:!1,match:s=>Object(s)===s,fromHexString(s,e,t=1){const n=qd.fromHexString(s);e.r=(n>>16&255)/255*t,e.g=(n>>8&255)/255*t,e.b=(255&n)/255*t},toHexString:({r:s,g:e,b:t},n=1)=>qd.toHexString(s*(n=255/n)<<16^e*n<<8^t*n<<0)},jW=[YW,qd,qW,WW];class XW extends fr{constructor(e,t,n,i){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,jW.find(a=>a.match(r))),this._rgbScale=i,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=b0(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 Fy extends fr{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",i=>{i.preventDefault(),this.getValue().call(this.object)}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class JW extends fr{constructor(e,t,n,i,r,a){super(e,t,n,"number"),this._initInput(),this.min(i),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=h=>{const u=parseFloat(this.$input.value);isNaN(u)||(this._snapClampSetValue(u+h),this.$input.value=this.getValue())};let t,n,i,r,a,o=!1;const l=h=>{if(o){const u=h.clientX-t,d=h.clientY-n;Math.abs(d)>5?(h.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(u)>5&&c()}if(!o){const u=h.clientY-i;a-=u*this._step*this._arrowKeyMultiplier(h),r+a>this._max?a=this._max-r:r+a<this._min&&(a=this._min-r),this._snapClampSetValue(r+a)}i=h.clientY},c=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",c)};this.$input.addEventListener("input",()=>{let h=parseFloat(this.$input.value);isNaN(h)||(this._stepExplicit&&(h=this._snap(h)),this.setValue(this._clamp(h)))}),this.$input.addEventListener("keydown",h=>{h.code==="Enter"&&this.$input.blur(),h.code==="ArrowUp"&&(h.preventDefault(),e(this._step*this._arrowKeyMultiplier(h))),h.code==="ArrowDown"&&(h.preventDefault(),e(this._step*this._arrowKeyMultiplier(h)*-1))}),this.$input.addEventListener("wheel",h=>{this._inputFocused&&(h.preventDefault(),e(this._step*this._normalizeMouseWheel(h)))},{passive:!1}),this.$input.addEventListener("mousedown",h=>{t=h.clientX,n=i=h.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,_=this._min,E=this._max,(g-m)/(f-m)*(E-_)+_);var g,m,f,_,E;this._snapClampSetValue(p)},t=d=>{e(d.clientX)},n=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};let i,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-i,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)},h=this._callOnFinishChange.bind(this);let u;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?(i=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(u),u=setTimeout(h,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 KW extends fr{constructor(e,t,n,i){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(i)?i:Object.values(i),this._names=Array.isArray(i)?i:Object.keys(i),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 ZW extends fr{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",i=>{i.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 BB=!1;class Hb{constructor({parent:e,autoPlace:t=e===void 0,container:n,width:i,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"),!BB&&a&&((function(l){const c=document.createElement("style");c.innerHTML=l;const h=document.querySelector("head link[rel=stylesheet], head style");h?document.head.insertBefore(c,h):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)}}'),BB=!0),n?n.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),i&&this.domElement.style.setProperty("--width",i+"px"),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation())}add(e,t,n,i,r){if(Object(n)===n)return new KW(this,e,t,n);const a=e[t];switch(typeof a){case"number":return new JW(this,e,t,n,i,r);case"boolean":return new VW(this,e,t);case"string":return new ZW(this,e,t);case"function":return new Fy(this,e,t)}console.error(`gui.add failed
|
|
17366
17366
|
property:`,t,`
|
|
17367
17367
|
object:`,e,`
|
|
17368
|
-
value:`,a)}addColor(e,t,n=1){return new jW(this,e,t,n)}addFolder(e){return new Hb({parent:this,title:e})}load(e,t=!0){return e.controllers&&this.controllers.forEach(n=>{n instanceof Fy||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 Fy)){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 i=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=i+"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 Id extends Tl{constructor(){super(),this._loggerContext="SETTINGS MANAGER"}static{this.webComponentName="settings-manager"}static setupWebComponent(){window.customElements.get(Id.webComponentName)||window.customElements.define(Id.webComponentName,Id)}static{this.styles=st``}firstUpdated(){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.events.productSettingUpdatedEvent.fire()}),e.add(t,"backgroundAlpha",0,1).name("Background Alpha").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"focalLength",10,300).name("Focal Length").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"nearClip",0,3).name("Near Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"farClip",0,1e4).name("Far Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canPan").name("Can Pan").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canZoom").name("Can Zoom").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minDistance",0,100).name("Min Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxDistance",0,100).name("Max Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infinitePolarAngle").name("Infinite Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minPolarAngle",0,6.25).step(.01).name("Min Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxPolarAngle",0,6.25).step(.01).name("Max Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infiniteAzimuthAngle").name("Infinite Azimuth Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minAzimuthAngle",0,6.25).name("Min Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxAzimuthAngle",0,6.25).name("Max Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(this,"setCurrentCameraAsInitial").name("Set Current Camera As Initial")}__addShadowTypeSettingsGui(e){e.add(this.productSettings.shadows,"shadowType",[Ed.NONE,Ed.ACCUMULATIVE,Ed.CONTACT]).name("Shadow Type").onFinishChange(t=>{this.events.productSettingsShadowTypeUpdatedEvent.fire({shadowType:t})})}__addAcuumulativeShadowSettingsGui(e){const t=e.addFolder("Accumulative Shadow Settings"),n=this.productSettings.shadows.accumulativeShadows,i=n.shadowMaterial;t.add(i,"opacity",0,1).name("Opacity").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(i,"alphaTest",0,1).name("Alpha Test").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.addColor(i,"color").name("Color").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(i,"blend",0,40).name("Blend").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(n.shadowParams,"frames",2,100,1).name("Frames").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(n.shadowParams,"scale",.5,30).name("Scale").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(n.shadowParams,"radius",.1,5).name("Radius").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(n.shadowParams,"ambient",0,1).name("Ambient").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire());const r=t.addFolder("Light Direction");r.add(n.light.direction,"x",-10,10).name("X").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),r.add(n.light.direction,"y",-10,10).name("Y").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),r.add(n.light.direction,"z",-10,10).name("Z").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.close()}__addContactShadowSettingsGui(e){const t=e.addFolder("Contact Shadow Settings"),n=this.productSettings.shadows.contactShadows;t.add(n,"planeLength",0,20).name("Plane Length").onFinishChange(i=>{n.planeLength=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"planeWidth",0,20).name("Plane Width").onFinishChange(i=>{n.planeWidth=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"cameraHeight",0,20).name("Camera Height").onFinishChange(i=>{n.cameraHeight=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"intensity",0,3).name("Intensity").onFinishChange(i=>{n.intensity=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"softness",0,3).name("Softness").onFinishChange(i=>{n.softness=i,this.events.productSettingUpdatedEvent.fire()}),t.close()}__addGui(){this.gui=new Hb({autoPlace:!1,container:this.appWcRef.appUiContainerElemRef,injectStyles:!1,title:"Experience Settings"}),this.gui.add(this,"saveSettings").name("Save Settings").$widget.classList.add("save-settings-button");const e=this.gui.addFolder("Camera");this.__addCameraSettingsGui(e),e.close();const t=this.gui.addFolder("Shadows");this.__addShadowTypeSettingsGui(t),this.__addAcuumulativeShadowSettingsGui(t),this.__addContactShadowSettingsGui(t),t.close()}setCurrentCameraAsInitial(){this.productSettings.camera.initial=this.appWcRef.cameraManager.getCurrentCameraTransforms()}saveSettings(){this.events.productSettingsSavedEvent.fire({updatedSettings:this.productSettings.asJson()})}show(){this.gui?.show()}hide(){this.gui?.hide()}connectedCallback(){super.connectedCallback(),this.show()}disconnectedCallback(){this.hide(),super.disconnectedCallback()}}var ZW=Object.defineProperty,ot=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&ZW(e,t,i),i},qo=(s=>(s.NONE="",s.SKU="sku",s.SHOPIFY_VARIANT_ID="shopify_variant_id",s.ASIN="asin",s.UPC="upc",s.EXPERIENCE_ID="experience_id",s.PRODUCT_VARIANT_UUID="product_variant_uuid",s))(qo||{});const rt=class ed extends rD{constructor(){let e=nd.PRODUCTION;super(window.__APP_VERSION__,e),this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us",modal:"https://www.epigraph.us"},this.sessionState="default",this.isAppReady=!1,this.sku=zt.sku.defaultValue.toString(),this.shopify_variant_id=zt.shopifyVariantId.defaultValue.toString(),this.upc=zt.upc.defaultValue.toString(),this.asin=zt.asin.defaultValue.toString(),this.experience_id=zt.experienceId.defaultValue.toString(),this.product_variant_uuid=zt.productVariantUuid.defaultValue.toString(),this.customVersionId="",this.gaMeasurementId="",this.modalView=!1,this.hide=!1,this.isLoading=!0,this.apiMode="production",this.debug=!1,this.showSettings=!1,this.dimensionsUnit=zt.dimensionsUnit.defaultValue.toString(),this.dimensionsUnitSymbol=zt.dimensionsUnitSymbol.defaultValue.toString(),this.areDimensionsActive=!1,this.areHotspotsActive=!1,this.isHelpVisible=!1,this.baseUrlOverride=zt.baseUrlOverride.defaultValue.toString(),this.isPortraitOrientation=!1,this.didARAutoLaunch=!1,this.transparentBackground=!1,this.splashScreenLogo=zt.splashScreenLogo.defaultValue.toString(),this.splashScreenText=zt.splashScreenText.defaultValue.toString(),this.hideUi=!1,this.playInteractionPrompt=!1,this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this._hasActiveHotspot=!1,this._isToolsetLargerThanTheLeftBottomQuadrant=!1,this._loadingProgress=0,this._loadTimeBegin=performance.now(),this._loggerContext="EPIGRAPH THREED CODE",this._epigraphAnalytics=new pD(null,null),this._identifier="",this._identifierType="",this._isDevEnv=!1,this._isStagingEnv=!1,this._productSettings=new zW,this._boundingSphereCenter=new Q,this._loaders=new bd,this._activeAnimations=new Map,this._animationFadeDurationInMiliseconds=1e3,this._isSceneInteractedWith=!1,this.__glbBlobUrl="",this.__usdzBlobUrl="",this.__hasSceneChanged=!1,this.__canvasSize={width:0,height:0},this.__raycaster=new lb,this.__pointer=new Ie,this.__viewStateGrid=new ST(40,190,0,12829635)}static{this.webComponentName="epigraph-threed-core"}static setupWebComponent(){window.customElements.get(ed.webComponentName)||window.customElements.define(ed.webComponentName,ed)}static{this.styles=[st`
|
|
17368
|
+
value:`,a)}addColor(e,t,n=1){return new XW(this,e,t,n)}addFolder(e){return new Hb({parent:this,title:e})}load(e,t=!0){return e.controllers&&this.controllers.forEach(n=>{n instanceof Fy||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 Fy)){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 i=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=i+"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 Id extends Tl{constructor(){super(),this._loggerContext="SETTINGS MANAGER"}static{this.webComponentName="settings-manager"}static setupWebComponent(){window.customElements.get(Id.webComponentName)||window.customElements.define(Id.webComponentName,Id)}static{this.styles=st``}firstUpdated(){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.events.productSettingUpdatedEvent.fire()}),e.add(t,"backgroundAlpha",0,1).name("Background Alpha").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"focalLength",10,300).name("Focal Length").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"nearClip",0,3).name("Near Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"farClip",0,1e4).name("Far Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canPan").name("Can Pan").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canZoom").name("Can Zoom").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minDistance",0,100).name("Min Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxDistance",0,100).name("Max Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infinitePolarAngle").name("Infinite Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minPolarAngle",0,6.25).step(.01).name("Min Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxPolarAngle",0,6.25).step(.01).name("Max Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infiniteAzimuthAngle").name("Infinite Azimuth Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minAzimuthAngle",0,6.25).name("Min Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxAzimuthAngle",0,6.25).name("Max Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(this,"setCurrentCameraAsInitial").name("Set Current Camera As Initial")}__addShadowTypeSettingsGui(e){e.add(this.productSettings.shadows,"shadowType",[Ed.NONE,Ed.ACCUMULATIVE,Ed.CONTACT]).name("Shadow Type").onFinishChange(t=>{this.events.productSettingsShadowTypeUpdatedEvent.fire({shadowType:t})})}__addAcuumulativeShadowSettingsGui(e){const t=e.addFolder("Accumulative Shadow Settings"),n=this.productSettings.shadows.accumulativeShadows,i=n.shadowMaterial;t.add(i,"opacity",0,1).name("Opacity").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(i,"alphaTest",0,1).name("Alpha Test").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.addColor(i,"color").name("Color").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(i,"blend",0,40).name("Blend").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(n.shadowParams,"frames",2,100,1).name("Frames").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(n.shadowParams,"scale",.5,30).name("Scale").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(n.shadowParams,"radius",.1,5).name("Radius").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(n.shadowParams,"ambient",0,1).name("Ambient").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire());const r=t.addFolder("Light Direction");r.add(n.light.direction,"x",-10,10).name("X").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),r.add(n.light.direction,"y",-10,10).name("Y").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),r.add(n.light.direction,"z",-10,10).name("Z").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.close()}__addContactShadowSettingsGui(e){const t=e.addFolder("Contact Shadow Settings"),n=this.productSettings.shadows.contactShadows;t.add(n,"planeLength",0,20).name("Plane Length").onFinishChange(i=>{n.planeLength=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"planeWidth",0,20).name("Plane Width").onFinishChange(i=>{n.planeWidth=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"cameraHeight",0,20).name("Camera Height").onFinishChange(i=>{n.cameraHeight=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"intensity",0,3).name("Intensity").onFinishChange(i=>{n.intensity=i,this.events.productSettingUpdatedEvent.fire()}),t.add(n,"softness",0,3).name("Softness").onFinishChange(i=>{n.softness=i,this.events.productSettingUpdatedEvent.fire()}),t.close()}__addGui(){this.gui=new Hb({autoPlace:!1,container:this.appWcRef.appUiContainerElemRef,injectStyles:!1,title:"Experience Settings"}),this.gui.add(this,"saveSettings").name("Save Settings").$widget.classList.add("save-settings-button");const e=this.gui.addFolder("Camera");this.__addCameraSettingsGui(e),e.close();const t=this.gui.addFolder("Shadows");this.__addShadowTypeSettingsGui(t),this.__addAcuumulativeShadowSettingsGui(t),this.__addContactShadowSettingsGui(t),t.close()}setCurrentCameraAsInitial(){this.productSettings.camera.initial=this.appWcRef.cameraManager.getCurrentCameraTransforms()}saveSettings(){this.events.productSettingsSavedEvent.fire({updatedSettings:this.productSettings.asJson()})}show(){this.gui?.show()}hide(){this.gui?.hide()}connectedCallback(){super.connectedCallback(),this.show()}disconnectedCallback(){this.hide(),super.disconnectedCallback()}}var ej=Object.defineProperty,ot=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&ej(e,t,i),i},qo=(s=>(s.NONE="",s.SKU="sku",s.SHOPIFY_VARIANT_ID="shopify_variant_id",s.ASIN="asin",s.UPC="upc",s.EXPERIENCE_ID="experience_id",s.PRODUCT_VARIANT_UUID="product_variant_uuid",s))(qo||{});const rt=class ed extends rD{constructor(){let e=nd.PRODUCTION;super(window.__APP_VERSION__,e),this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us",modal:"https://www.epigraph.us"},this.sessionState="default",this.isAppReady=!1,this.sku=zt.sku.defaultValue.toString(),this.shopify_variant_id=zt.shopifyVariantId.defaultValue.toString(),this.upc=zt.upc.defaultValue.toString(),this.asin=zt.asin.defaultValue.toString(),this.experience_id=zt.experienceId.defaultValue.toString(),this.product_variant_uuid=zt.productVariantUuid.defaultValue.toString(),this.customVersionId="",this.gaMeasurementId="",this.modalView=!1,this.hide=!1,this.isLoading=!0,this.apiMode="production",this.debug=!1,this.showSettings=!1,this.dimensionsUnit=zt.dimensionsUnit.defaultValue.toString(),this.dimensionsUnitSymbol=zt.dimensionsUnitSymbol.defaultValue.toString(),this.areDimensionsActive=!1,this.areHotspotsActive=!1,this.isHelpVisible=!1,this.baseUrlOverride=zt.baseUrlOverride.defaultValue.toString(),this.isPortraitOrientation=!1,this.didARAutoLaunch=!1,this.transparentBackground=!1,this.splashScreenLogo=zt.splashScreenLogo.defaultValue.toString(),this.splashScreenText=zt.splashScreenText.defaultValue.toString(),this.hideUi=!1,this.playInteractionPrompt=!1,this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this._hasActiveHotspot=!1,this._isToolsetLargerThanTheLeftBottomQuadrant=!1,this._loadingProgress=0,this._loadTimeBegin=performance.now(),this._loggerContext="EPIGRAPH THREED CODE",this._epigraphAnalytics=new pD(null,null),this._identifier="",this._identifierType="",this._isDevEnv=!1,this._isStagingEnv=!1,this._productSettings=new HW,this._boundingSphereCenter=new Q,this._loaders=new bd,this._activeAnimations=new Map,this._animationFadeDurationInMiliseconds=1e3,this._isSceneInteractedWith=!1,this.__glbBlobUrl="",this.__usdzBlobUrl="",this.__hasSceneChanged=!1,this.__canvasSize={width:0,height:0},this.__raycaster=new lb,this.__pointer=new Ie,this.__viewStateGrid=new ST(40,190,0,12829635)}static{this.webComponentName="epigraph-threed-core"}static setupWebComponent(){window.customElements.get(ed.webComponentName)||window.customElements.define(ed.webComponentName,ed)}static{this.styles=[st`
|
|
17369
17369
|
:host {
|
|
17370
17370
|
all: initial;
|
|
17371
17371
|
display: flex;
|
|
@@ -18081,7 +18081,7 @@ void main() {
|
|
|
18081
18081
|
<div id="appCanvasContainer" class="app-canvas-container">
|
|
18082
18082
|
<span id="cameraAimIndicator" class="camera-aim-indicator hide"></span>
|
|
18083
18083
|
</div>
|
|
18084
|
-
`:me}getWebComponentName(){return ed.webComponentName}async _resolveIdentifierAndType(){this.sku?(this._identifierType="sku",this._identifier=this.sku):this.shopify_variant_id?(this._identifierType="shopify_variant_id",this._identifier=this.shopify_variant_id):this.upc?(this._identifierType="upc",this._identifier=this.upc):this.asin?(this._identifierType="asin",this._identifier=this.asin):this.experience_id?(this._identifierType="experience_id",this._identifier=this.experience_id):this.product_variant_uuid&&(this._identifierType="product_variant_uuid",this._identifier=this.product_variant_uuid)}async _onAuthenticationFailed(e){window.epigraph.logger.error({title:"AUTHENTICATION FAILED: Expand for details...",details:e,contextOverride:this._loggerContext}),this.onLoadFailed(sv.MODULE_FAILED_ERRORS.AUTHENTICATION_FAILED,{errorCode:$3.AuthenticationFailedError,message:e}),await this.disconnectedCallback()}async setupRenderEngine(){window.epigraph.logger.info({title:"Initiliazing Render Engine"}),this._renderEngine=new
|
|
18084
|
+
`:me}getWebComponentName(){return ed.webComponentName}async _resolveIdentifierAndType(){this.sku?(this._identifierType="sku",this._identifier=this.sku):this.shopify_variant_id?(this._identifierType="shopify_variant_id",this._identifier=this.shopify_variant_id):this.upc?(this._identifierType="upc",this._identifier=this.upc):this.asin?(this._identifierType="asin",this._identifier=this.asin):this.experience_id?(this._identifierType="experience_id",this._identifier=this.experience_id):this.product_variant_uuid&&(this._identifierType="product_variant_uuid",this._identifier=this.product_variant_uuid)}async _onAuthenticationFailed(e){window.epigraph.logger.error({title:"AUTHENTICATION FAILED: Expand for details...",details:e,contextOverride:this._loggerContext}),this.onLoadFailed(sv.MODULE_FAILED_ERRORS.AUTHENTICATION_FAILED,{errorCode:$3.AuthenticationFailedError,message:e}),await this.disconnectedCallback()}async setupRenderEngine(){window.epigraph.logger.info({title:"Initiliazing Render Engine"}),this._renderEngine=new A5(this);const{canvasHtmlElem:e,screenshotRenderer:t,textRendererElem:n}=await this._renderEngine.setup();this.appCanvasContainerElemRef.appendChild(e),this.appCanvasContainerElemRef.appendChild(n),t?.domElement&&this.appCanvasContainerElemRef.appendChild(t.domElement),new ResizeObserver(this.__onWebComponentResize.bind(this)).observe(this.appCanvasContainerElemRef)}_showCustomViewInYourSpaceButton(){this._getSlottedElements(this.customViewInYourSpaceButtonSlotElem).forEach(t=>{const n=t;n.style.visibility="visible",n.style.transition="opacity 0.5s ease-in-out",n.style.opacity="1"})}_hideCustomViewInYourSpaceButton(){this._getSlottedElements(this.customViewInYourSpaceButtonSlotElem).forEach(t=>{const n=t,i=500;n.style.transition=`opacity ${i/1e3}s ease-in-out`,n.style.opacity="0",setTimeout(()=>n.style.visibility="hidden",i)})}_sendAnalyticsEventsOnModuleLoadStart(){const e=new dD(!1);this._epigraphAnalytics.sendEvent(e)}_sendAnalyticsEventsOnModuleLoadFinish(){const e=this.timeElapsedSinceLoadBegin,t=new AD(!1,e);this._epigraphAnalytics.sendEvent(t);const n=window.epigraph.isSessionWebGL2Compatible();let i;this.viewInYourSpaceManager.canLaunchAr()?i=n?Kh.SUPPORT_TYPE.AR_WEBGL2:Kh.SUPPORT_TYPE.AR:i=n?Kh.SUPPORT_TYPE.QR_WEBGL2:Kh.SUPPORT_TYPE.QR;const r=new Kh(i);this._epigraphAnalytics.sendEvent(r)}_onNewExperienceLoadStart(){this.isLoading=!0,this._loadingProgress=0,this._hideCustomViewInYourSpaceButton(),this.showSplashScreen(),this.hotspotsManager?.activeHotspot&&this.hotspotsManager.closeActiveHotspot(),this._sendAnalyticsEventsOnModuleLoadStart()}_onNewExperienceLoadFinish(){this._onSceneHierarchyUpdate(),this.isLoading=!1,this._showCustomViewInYourSpaceButton(),this._eventsManager.experienceUpdatedEvent.fire(),this._eventsManager.appReadyEvent.fire(),this.productSettings.camera.initial?.skipCameraFit||this.cameraManager.fitCameraToSceneBounds(),this.hideSplashScreen(),setTimeout(()=>{this._isSceneInteractedWith||(this.playInteractionPrompt=!0)},3e3),this._sendAnalyticsEventsOnModuleLoadFinish()}toggleDimensions(){this.dimensionsManager.enabled?this.hideDimensions():this.showDimensions()}_onDimensionsToolControlClick(e){e.stopPropagation(),e.preventDefault();const t=e.target;t.active?this.showDimensions():this.hideDimensions();const n=new xa(xa.BUTTON_TYPE.DIMENSION_TOGGLE,t.id);this._epigraphAnalytics.sendEvent(n)}_onViewInYourSpaceToolControlClick(e){e.stopPropagation(),e.preventDefault();const t=e.target;this.launchAR();const n=new xa(xa.BUTTON_TYPE.AR_VIEW,t.id);this._epigraphAnalytics.sendEvent(n)}async _onSceneHierarchyUpdate(e=!1){if(this.sceneManager.recalculateSceneBounds(),this.featuresToEnable.hotspots&&this._repopulateHotspots(),e)return Promise.resolve([]);await this._cameraManager.fitCameraToSceneBounds()}_renderAppManagers(){return ae`
|
|
18085
18085
|
<div id="appManagersContainer" class="app-managers-container">
|
|
18086
18086
|
${this._renderDimensionsManager()}
|
|
18087
18087
|
|
|
@@ -18206,7 +18206,7 @@ void main() {
|
|
|
18206
18206
|
.loadingLogoSrc=${this.splashScreenLogo}
|
|
18207
18207
|
.loadingLabel=${this.splashScreenText}
|
|
18208
18208
|
></epg-loader-scene>
|
|
18209
|
-
`}async _resetSession(){this._autoGeneratedProxyMesh?.scale.set(1,1,1),this._autoGeneratedProxyMesh?.position.set(0,0,0),this._autoGeneratedProxyMesh?.updateMatrixWorld(),await this.renderEngine.emptyScene()}_setupEventListeners(){window.epigraph.logger.info({title:"Setting up event listeners for this app."}),this.addEventListener(this.eventsManager.sceneBoundsChanged.name,()=>{this.cameraManager.fitCameraToSceneBounds()}),this.addEventListener(this.eventsManager.structureNodeAddedEvent.name,()=>{this._onSceneHierarchyUpdate()}),this.addEventListener(this.eventsManager.experienceUpdatedEvent.name,()=>{this.renderEngine.accumulativeShadows&&!this.renderEngine.accumulativeShadows.camera&&(this.renderEngine.accumulativeShadows.camera=this.cameraManager.getCameras().main),this.renderEngine.accumulativeShadows?.reset(),this.renderEngine.contactShadows&&this.renderEngine.contactShadows.updateSettings(this.productSettings.shadows.contactShadows),this.cameraManager.updateCameraSettings(this.productSettings.camera),this.productSettings.camera.initial&&this.cameraManager.moveCameraToLocation({newCameraTransforms:this.productSettings.camera.initial,transition:!0}).then(()=>{this.productSettings.camera.initial?.skipCameraFit||this.cameraManager.fitCameraToSceneBounds()})}),this.addEventListener(this.eventsManager.dimensionsPositionChanged.name,this.__onDimensionsPositionChanged),this.addEventListener(this.eventsManager.cameraControlsStart.name,(e=>{switch(e.detail.type){case"rotate":(this.sessionState==="default"||this.sessionState==="cameraUpdate")&&(this.style.cursor="grabbing");break;case"pan":(this.sessionState==="default"||this.sessionState==="cameraUpdate")&&(this.style.cursor="move"),this.showCameraAim();break}this.hotspotsManager&&this.hotspotsManager.activeHotspot&&this.sessionState==="default"&&this.hotspotsManager.closeActiveHotspot()})),this.addEventListener(this.eventsManager.inputEnd.name,()=>{(this.sessionState==="default"||this.sessionState==="cameraUpdate")&&(this.style.cursor="grab"),this.hideCameraAim()}),this.addEventListener(this.eventsManager.hotspotOpenEvent.name,()=>{this.hideDimensions(!0)}),this.addEventListener(this.eventsManager.assetLoadProgress.name,(e=>{this._loadingProgress=e.detail.progress})),this.addEventListener(this.eventsManager.hotspotOpenEvent.name,(e=>{this._hasActiveHotspot=!0,this._resolveAnimationsOnHotspotEntry(e.detail.hotspot)})),this.addEventListener(this.eventsManager.hotspotNextEvent.name,(e=>{this._resolveAnimationsOnHotspotEntry(e.detail.hotspot)})),this.addEventListener(this.eventsManager.hotspotPreviousEvent.name,(e=>{this._resolveAnimationsOnHotspotEntry(e.detail.hotspot)})),this.addEventListener(this.eventsManager.hotspotClosedEvent.name,(e=>{this._hasActiveHotspot=!1;const t=this.hotspotsManager.hotspots.get(e.detail.hotspotId),n=t?.animation,i=t?.assetId;if(!n||!i)return;const r=n.loop,a=n.exit;r&&this.stopAnimationByNameAndAssetId(r,i);let o;a?o=this.playAnimationByNameAndAssetId({animationName:a,assetId:i}):o=this.playAnimationByNameAndAssetId({animationName:n.entry,assetId:i,reverse:!0}),setTimeout(()=>{o?.targetAnimationAction.reset(),this._activeAnimations.delete(o?.animationName??"")},this._animationFadeDurationInMiliseconds)})),this.appCanvasContainerElemRef.onpointerdown=e=>{this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.hideHelp(),this.eventsManager.inputStart.fire({event:e})},this.appCanvasContainerElemRef.onpointermove=e=>{this.eventsManager.inputMove.fire({event:e})},this.appCanvasContainerElemRef.onpointerup=e=>{this.eventsManager.inputEnd.fire({event:e})},this.appCanvasContainerElemRef.onpointerout=e=>{this.eventsManager.inputEnd.fire({event:e})},this.cameraManager.mainCameraControls.addEventListener("update",this._onCameraPositionUpdate.bind(this)),this.hotspotsManager?.addEventListener("pointerdown",()=>{this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.hideHelp()})}_onCameraPositionUpdate(){this.hotspotsManager?.enabled&&this.hotspotsManager.recalculateHotspotPositions()}_setupAutoGeneratedProxyContainers(){const e=new xs,t=new Un({color:65280,opacity:.5,transparent:!0});this._autoGeneratedProxyMesh=new je(e,t)}get productSettings(){return this._productSettings}async _setup(){window.epigraph.logger.table({title:"Setting up..."}),this._eventsManager=new
|
|
18209
|
+
`}async _resetSession(){this._autoGeneratedProxyMesh?.scale.set(1,1,1),this._autoGeneratedProxyMesh?.position.set(0,0,0),this._autoGeneratedProxyMesh?.updateMatrixWorld(),await this.renderEngine.emptyScene()}_setupEventListeners(){window.epigraph.logger.info({title:"Setting up event listeners for this app."}),this.addEventListener(this.eventsManager.sceneBoundsChanged.name,()=>{this.cameraManager.fitCameraToSceneBounds()}),this.addEventListener(this.eventsManager.structureNodeAddedEvent.name,()=>{this._onSceneHierarchyUpdate()}),this.addEventListener(this.eventsManager.experienceUpdatedEvent.name,()=>{this.renderEngine.accumulativeShadows&&!this.renderEngine.accumulativeShadows.camera&&(this.renderEngine.accumulativeShadows.camera=this.cameraManager.getCameras().main),this.renderEngine.accumulativeShadows?.reset(),this.renderEngine.contactShadows&&this.renderEngine.contactShadows.updateSettings(this.productSettings.shadows.contactShadows),this.cameraManager.updateCameraSettings(this.productSettings.camera),this.productSettings.camera.initial&&this.cameraManager.moveCameraToLocation({newCameraTransforms:this.productSettings.camera.initial,transition:!0}).then(()=>{this.productSettings.camera.initial?.skipCameraFit||this.cameraManager.fitCameraToSceneBounds()})}),this.addEventListener(this.eventsManager.dimensionsPositionChanged.name,this.__onDimensionsPositionChanged),this.addEventListener(this.eventsManager.cameraControlsStart.name,(e=>{switch(e.detail.type){case"rotate":(this.sessionState==="default"||this.sessionState==="cameraUpdate")&&(this.style.cursor="grabbing");break;case"pan":(this.sessionState==="default"||this.sessionState==="cameraUpdate")&&(this.style.cursor="move"),this.showCameraAim();break}this.hotspotsManager&&this.hotspotsManager.activeHotspot&&this.sessionState==="default"&&this.hotspotsManager.closeActiveHotspot()})),this.addEventListener(this.eventsManager.inputEnd.name,()=>{(this.sessionState==="default"||this.sessionState==="cameraUpdate")&&(this.style.cursor="grab"),this.hideCameraAim()}),this.addEventListener(this.eventsManager.hotspotOpenEvent.name,()=>{this.hideDimensions(!0)}),this.addEventListener(this.eventsManager.assetLoadProgress.name,(e=>{this._loadingProgress=e.detail.progress})),this.addEventListener(this.eventsManager.hotspotOpenEvent.name,(e=>{this._hasActiveHotspot=!0,this._resolveAnimationsOnHotspotEntry(e.detail.hotspot)})),this.addEventListener(this.eventsManager.hotspotNextEvent.name,(e=>{this._resolveAnimationsOnHotspotEntry(e.detail.hotspot)})),this.addEventListener(this.eventsManager.hotspotPreviousEvent.name,(e=>{this._resolveAnimationsOnHotspotEntry(e.detail.hotspot)})),this.addEventListener(this.eventsManager.hotspotClosedEvent.name,(e=>{this._hasActiveHotspot=!1;const t=this.hotspotsManager.hotspots.get(e.detail.hotspotId),n=t?.animation,i=t?.assetId;if(!n||!i)return;const r=n.loop,a=n.exit;r&&this.stopAnimationByNameAndAssetId(r,i);let o;a?o=this.playAnimationByNameAndAssetId({animationName:a,assetId:i}):o=this.playAnimationByNameAndAssetId({animationName:n.entry,assetId:i,reverse:!0}),setTimeout(()=>{o?.targetAnimationAction.reset(),this._activeAnimations.delete(o?.animationName??"")},this._animationFadeDurationInMiliseconds)})),this.appCanvasContainerElemRef.onpointerdown=e=>{this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.hideHelp(),this.eventsManager.inputStart.fire({event:e})},this.appCanvasContainerElemRef.onpointermove=e=>{this.eventsManager.inputMove.fire({event:e})},this.appCanvasContainerElemRef.onpointerup=e=>{this.eventsManager.inputEnd.fire({event:e})},this.appCanvasContainerElemRef.onpointerout=e=>{this.eventsManager.inputEnd.fire({event:e})},this.cameraManager.mainCameraControls.addEventListener("update",this._onCameraPositionUpdate.bind(this)),this.hotspotsManager?.addEventListener("pointerdown",()=>{this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.hideHelp()})}_onCameraPositionUpdate(){this.hotspotsManager?.enabled&&this.hotspotsManager.recalculateHotspotPositions()}_setupAutoGeneratedProxyContainers(){const e=new xs,t=new Un({color:65280,opacity:.5,transparent:!0});this._autoGeneratedProxyMesh=new je(e,t)}get productSettings(){return this._productSettings}async _setup(){window.epigraph.logger.table({title:"Setting up..."}),this._eventsManager=new PW(this),this._sceneManager=new FV(this),this._sceneManager.initialize(),this._cameraManager=new zf({appWcRef:this}),this._cameraManager.initialize();const e=this._sceneManager.sceneStructure.setupRootEntity().catch(t=>{this.onLoadFailed(T0.SCENE_LOAD_ERROR,t)});await this.setupRenderEngine(),await e,await this._cameraManager.setup({mainRenderer:this.renderEngine.mainRenderer,screenshotRenderer:this.renderEngine.screenshotRenderer,cameraSettings:this.productSettings.camera}),this._setupAutoGeneratedProxyContainers(),this._setupEventListeners()}_resolveAnimationsOnHotspotEntry(e){this.stopAllAnimations();const t=e.animation,n=e.assetId;if(!t||!n)return;this._activeAnimations.get(t.entry)||this.playAnimationByNameAndAssetId({animationName:t.entry,assetId:n,clampWhenFinished:!0}),setTimeout(()=>{this._activeAnimations.delete(t.entry),this._activeAnimations.get(t.loop)?.loop||this.playAnimationByNameAndAssetId({animationName:t.loop,assetId:n,loop:!0})},this._animationFadeDurationInMiliseconds)}_renderDimensionsManager(){let e=me;return this.featuresToEnable.dimensions&&(C5.setupWebComponent(),e=ae`
|
|
18210
18210
|
<dimensions-manager
|
|
18211
18211
|
id="dimensionsManager"
|
|
18212
18212
|
.appWcRef=${this}
|
|
@@ -18214,7 +18214,7 @@ void main() {
|
|
|
18214
18214
|
.dimensionsUnitSymbol=${this.dimensionsUnitSymbol}
|
|
18215
18215
|
?enabled=${this.areDimensionsActive}
|
|
18216
18216
|
></dimensions-manager>
|
|
18217
|
-
`),e}_renderHotspotsManager(){let e=me;return this.featuresToEnable.hotspots&&(
|
|
18217
|
+
`),e}_renderHotspotsManager(){let e=me;return this.featuresToEnable.hotspots&&(Kq.setupWebComponent(),e=ae`
|
|
18218
18218
|
<hotspots-manager
|
|
18219
18219
|
id="hotspotsManager"
|
|
18220
18220
|
class="hotspots-manager"
|
|
@@ -18235,7 +18235,7 @@ void main() {
|
|
|
18235
18235
|
.appWcRef=${this}
|
|
18236
18236
|
?enabled=${this.debug}
|
|
18237
18237
|
></debug-manager>
|
|
18238
|
-
`),e}_renderViewInYourSpaceManager(){let e=me;return this.featuresToEnable.viewInYourSpace&&(
|
|
18238
|
+
`),e}_renderViewInYourSpaceManager(){let e=me;return this.featuresToEnable.viewInYourSpace&&(NW.setupWebComponent(),e=ae`
|
|
18239
18239
|
<view-in-your-space-manager
|
|
18240
18240
|
id="viewInYourSpaceManager"
|
|
18241
18241
|
class="view-in-your-space-manager"
|
|
@@ -18246,7 +18246,7 @@ void main() {
|
|
|
18246
18246
|
<div class="view-in-your-space-button ${this._hasActiveHotspot?"hide":""}">
|
|
18247
18247
|
<slot name=${af.slotCustomViewInYourSpaceButton.name} @click=${this.launchAR}></slot>
|
|
18248
18248
|
</div>
|
|
18249
|
-
`}getAllHotspotsFromScene(){const e=[];return this.sceneManager.sceneStructure.traverse(t=>{if(t instanceof Al)for(const n of t.asset.hotspots)this.hotspotsManager.addHotspot(n,!1)}),e}_repopulateHotspots(){window.epigraph.logger.info({title:"Override to repopulate hotspots in scene on identifier changes"}),this.featuresToEnable.hotspots===!0&&this.hotspotsManager&&(this.hotspotsManager.removeAllHotspots(),this.getAllHotspotsFromScene(),this.updateHotspotsOrder(Array.from(this.hotspotsManager.hotspots.keys())))}_setupAnalytics(){this._isDevEnv||this._isStagingEnv||(this._nexusAnalyticsPlugin=new cD({trackingID:this.gaMeasurementId,experienceID:this.experience_id,solution:this.getWebComponentName(),sessionId:window.epigraph.epigraphSessionId,xPath:this.xPath,verboseLogging:this._isDevEnv,sendToStaging:this._isStagingEnv}),this._epigraphAnalytics.addEventPlugin(this._nexusAnalyticsPlugin),this.gaMeasurementId&&(this._ga4AnalyticsPlugin=new lD({trackingID:this.gaMeasurementId,experienceID:this.experience_id,solution:this.getWebComponentName(),verboseLogging:this._isDevEnv}),this._epigraphAnalytics.addEventPlugin(this._ga4AnalyticsPlugin)))}__onWebComponentResize(){if(!this.appCanvasContainerElemRef)return;const{width:e,height:t}=this.appCanvasContainerElemRef.getBoundingClientRect();if(!(e===0||t===0)){if(this.__canvasSize.width=e,this.__canvasSize.height=t,this.renderEngine.mainRenderer.setSize(e,t),this.renderEngine.textRenderer.setSize(e,t),this.renderEngine.effectsComposer.setSize(e,t),this.cameraManager){const n=this.renderEngine.canvas.clientWidth/this.renderEngine.canvas.clientHeight;this.cameraManager.getCameras().main.aspect=n,this.cameraManager.getCameras().main.updateProjectionMatrix(),this.cameraManager.getCameras().screenshot.aspect=n,this.cameraManager.getCameras().screenshot.updateProjectionMatrix()}this.dimensionsManager&&!this.hotspotsManager?.activeHotspot&&this.cameraManager.fitCameraToSceneBounds(!1),this.isPortraitOrientation=e<700,this.postRenderFrameUpdateInEngine(this.renderEngine.getClockDelta()),this.eventsManager.webComponentResized.fire()}}__onDimensionsPositionChanged(){this.renderEngine.updateDimensionLines(this.dimensionsManager.getCurrentDimensionsIndicatorState())}showSplashScreen(){this.splashScreenElem?.show()}hideSplashScreen(){this.splashScreenElem?.hide()}_setupVisibilityObserver(){new IntersectionObserver(()=>{this.isAppReady&&(window.epigraph.logger.info({title:"Component became visible, re-calculating scene hierarchy.",contextOverride:this._loggerContext}),this._onSceneHierarchyUpdate(),this.productSettings.camera.initial&&this.cameraManager.moveCameraToLocation({newCameraTransforms:this.productSettings.camera.initial,transition:!0}).then(()=>{this.productSettings.camera.initial?.skipCameraFit||this.cameraManager.fitCameraToSceneBounds()}))}).observe(this)}_setupResizeObservers(){new ResizeObserver(t=>{for(const n of t){const{width:i,height:r}=n.target.getBoundingClientRect(),a=i*.5,o=r*.5;if(a>230)this._isToolsetLargerThanTheLeftBottomQuadrant=!1;else{const l=this.toolsetElem?.getBoundingClientRect();if(!l)continue;const c=l.width>a,h=l.height>o;this._isToolsetLargerThanTheLeftBottomQuadrant=c||h}}}).observe(this)}async _postExperienceDataInitialization(){if(!this._identifier||!this._identifierType)return Promise.resolve(!0);if(this.productSettings.render.mode===ga.SPLAT&&this._renderEngine.sparkRenderer){const{preBlurAmount:i,blurAmount:r}=this.productSettings.render.splatMode;this._renderEngine.sparkRenderer.preBlurAmount=i,this._renderEngine.sparkRenderer.blurAmount=r}const e=this._experienceData.productVariantCollection.getProductVariantByIdentifierAndType(this._identifier,this._identifierType);if(!e)return Promise.reject(!1);const{envMap:t,envMapRotation:n}=this.productSettings.render;return await this.renderEngine.updateEnvMap(t,n),await this.spawnProductVariant(e)}async spawnProductVariant(e){if(!e.productParts)return Promise.reject(!1);for(const t of e.productParts)await this.spawnProductPart(t);return Promise.resolve(!0)}async spawnProductPart(e){let t=this.sceneManager.sceneStructure.getEntityForAssetId(e.assetId);if(!t){const i=this._experienceData.getAssetCollection().getAssetByName(e.asset);if(!i||(await i.load(),t=await this.spawnAssetInScene(i),!t))return Promise.reject(!1)}const n=e.finish;return n?(await t.selectAssetFinish(n),Promise.resolve(!0)):Promise.resolve(!1)}async _fetchExperienceDataConfig(){return null}async _buildExperienceData(){const e=await this._fetchExperienceDataConfig();if(e===null)return await this._onAuthenticationFailed("Unable to retrieve experience data config."),Promise.reject();if(!e.success)return await this._onAuthenticationFailed(e.message),Promise.reject();this._experienceData=new
|
|
18249
|
+
`}getAllHotspotsFromScene(){const e=[];return this.sceneManager.sceneStructure.traverse(t=>{if(t instanceof Al)for(const n of t.asset.hotspots)this.hotspotsManager.addHotspot(n,!1)}),e}_repopulateHotspots(){window.epigraph.logger.info({title:"Override to repopulate hotspots in scene on identifier changes"}),this.featuresToEnable.hotspots===!0&&this.hotspotsManager&&(this.hotspotsManager.removeAllHotspots(),this.getAllHotspotsFromScene(),this.updateHotspotsOrder(Array.from(this.hotspotsManager.hotspots.keys())))}_setupAnalytics(){this._isDevEnv||this._isStagingEnv||(this._nexusAnalyticsPlugin=new cD({trackingID:this.gaMeasurementId,experienceID:this.experience_id,solution:this.getWebComponentName(),sessionId:window.epigraph.epigraphSessionId,xPath:this.xPath,verboseLogging:this._isDevEnv,sendToStaging:this._isStagingEnv}),this._epigraphAnalytics.addEventPlugin(this._nexusAnalyticsPlugin),this.gaMeasurementId&&(this._ga4AnalyticsPlugin=new lD({trackingID:this.gaMeasurementId,experienceID:this.experience_id,solution:this.getWebComponentName(),verboseLogging:this._isDevEnv}),this._epigraphAnalytics.addEventPlugin(this._ga4AnalyticsPlugin)))}__onWebComponentResize(){if(!this.appCanvasContainerElemRef)return;const{width:e,height:t}=this.appCanvasContainerElemRef.getBoundingClientRect();if(!(e===0||t===0)){if(this.__canvasSize.width=e,this.__canvasSize.height=t,this.renderEngine.mainRenderer.setSize(e,t),this.renderEngine.textRenderer.setSize(e,t),this.renderEngine.effectsComposer.setSize(e,t),this.cameraManager){const n=this.renderEngine.canvas.clientWidth/this.renderEngine.canvas.clientHeight;this.cameraManager.getCameras().main.aspect=n,this.cameraManager.getCameras().main.updateProjectionMatrix(),this.cameraManager.getCameras().screenshot.aspect=n,this.cameraManager.getCameras().screenshot.updateProjectionMatrix()}this.dimensionsManager&&!this.hotspotsManager?.activeHotspot&&this.cameraManager.fitCameraToSceneBounds(!1),this.isPortraitOrientation=e<700,this.postRenderFrameUpdateInEngine(this.renderEngine.getClockDelta()),this.eventsManager.webComponentResized.fire()}}__onDimensionsPositionChanged(){this.renderEngine.updateDimensionLines(this.dimensionsManager.getCurrentDimensionsIndicatorState())}showSplashScreen(){this.splashScreenElem?.show()}hideSplashScreen(){this.splashScreenElem?.hide()}_setupVisibilityObserver(){new IntersectionObserver(()=>{this.isAppReady&&(window.epigraph.logger.info({title:"Component became visible, re-calculating scene hierarchy.",contextOverride:this._loggerContext}),this._onSceneHierarchyUpdate(),this.productSettings.camera.initial&&this.cameraManager.moveCameraToLocation({newCameraTransforms:this.productSettings.camera.initial,transition:!0}).then(()=>{this.productSettings.camera.initial?.skipCameraFit||this.cameraManager.fitCameraToSceneBounds()}))}).observe(this)}_setupResizeObservers(){new ResizeObserver(t=>{for(const n of t){const{width:i,height:r}=n.target.getBoundingClientRect(),a=i*.5,o=r*.5;if(a>230)this._isToolsetLargerThanTheLeftBottomQuadrant=!1;else{const l=this.toolsetElem?.getBoundingClientRect();if(!l)continue;const c=l.width>a,h=l.height>o;this._isToolsetLargerThanTheLeftBottomQuadrant=c||h}}}).observe(this)}async _postExperienceDataInitialization(){if(!this._identifier||!this._identifierType)return Promise.resolve(!0);if(this.productSettings.render.mode===ga.SPLAT&&this._renderEngine.sparkRenderer){const{preBlurAmount:i,blurAmount:r}=this.productSettings.render.splatMode;this._renderEngine.sparkRenderer.preBlurAmount=i,this._renderEngine.sparkRenderer.blurAmount=r}const e=this._experienceData.productVariantCollection.getProductVariantByIdentifierAndType(this._identifier,this._identifierType);if(!e)return Promise.reject(!1);const{envMap:t,envMapRotation:n}=this.productSettings.render;return await this.renderEngine.updateEnvMap(t,n),await this.spawnProductVariant(e)}async spawnProductVariant(e){if(!e.productParts)return Promise.reject(!1);for(const t of e.productParts)await this.spawnProductPart(t);return Promise.resolve(!0)}async spawnProductPart(e){let t=this.sceneManager.sceneStructure.getEntityForAssetId(e.assetId);if(!t){const i=this._experienceData.getAssetCollection().getAssetByName(e.asset);if(!i||(await i.load(),t=await this.spawnAssetInScene(i),!t))return Promise.reject(!1)}const n=e.finish;return n?(await t.selectAssetFinish(n),Promise.resolve(!0)):Promise.resolve(!1)}async _fetchExperienceDataConfig(){return null}async _buildExperienceData(){const e=await this._fetchExperienceDataConfig();if(e===null)return await this._onAuthenticationFailed("Unable to retrieve experience data config."),Promise.reject();if(!e.success)return await this._onAuthenticationFailed(e.message),Promise.reject();this._experienceData=new $W({nexusApiResultPayload:e.payload,appWcRef:this}),await this._experienceData.initialize();const t=this._experienceData.channelSettings.ga_measurement_id;!this.gaMeasurementId&&t&&(window.epigraph.logger.info({title:"GA Measurement ID set from experience data",details:t,contextOverride:this._loggerContext}),this.gaMeasurementId=t,this._setupAnalytics())}__checkIfCurrentExperienceHasIdentifier(e,t){let n=!1;switch(e){case"sku":this.experienceData?.productVariantCollection?.getProductVariantBySku(t)&&(n=!0);break;case"shopify_variant_id":this.experienceData?.productVariantCollection?.getProductVariantByShopifyVariantId(t)&&(n=!0);break;case"upc":this.experienceData?.productVariantCollection?.getProductVariantByUpc(t)&&(n=!0);break;case"asin":this.experienceData?.productVariantCollection?.getProductVariantByAsin(t)&&(n=!0);break;case"experience_id":break;case"product_variant_uuid":this.experienceData?.productVariantCollection?.getProductVariantByUuid(t)&&(n=!0);break}return n}__guessesWhyTheExperienceFailed(){const e=[];return this._experienceData.getAssetCollection().hasAnyAssetWithSplat()&&this.productSettings.render.mode!==ga.SPLAT&&e.push("Render Splat provided in one of the assets. Try switching the render mode to Splat in Render Settings."),e}async _clearAndLoadNewExperienceInScene(){this._onNewExperienceLoadStart(),this.__checkIfCurrentExperienceHasIdentifier(this.identifierType,this.identifier)===!1&&await this._buildExperienceData().catch(e=>(window.epigraph.logger.error({title:`Couldn't build experience data for "${this.identifierType}" - "${this.identifier}"`,details:e,contextOverride:this._loggerContext}),Promise.reject(e))),await this._resetSession(),await this._postExperienceDataInitialization().catch(e=>Promise.reject(e)),this.parsedUrlParams.get(td.AR)&&!this.didARAutoLaunch&&(await this.launchAR(),this.didARAutoLaunch=!0),this._onNewExperienceLoadFinish()}async _onIdentifierOrTypeChange(){this.isAppReady&&(await this._resolveIdentifierAndType(),!(!this._identifier||!this._identifierType)&&(window.epigraph.logger.info({title:"IDENTIFIER CHANGED",details:`${this._identifierType} = ${this._identifier}`}),this._nexusAnalyticsPlugin&&(this._nexusAnalyticsPlugin.experienceID=this._identifier),this._ga4AnalyticsPlugin&&(this._ga4AnalyticsPlugin.experienceID=this._identifier),await this._clearAndLoadNewExperienceInScene().catch(e=>(window.epigraph.logger.error({title:"Error while clearing the session and loading a new experience.",details:e}),window.epigraph.logger.warn({title:"BEST GUESSES FOR FAILURE BELOW:",details:this.__guessesWhyTheExperienceFailed(),contextOverride:this._loggerContext}),Promise.reject(e)))))}showCameraInteractionPromptIndicator(){this.cameraInteractionPromptIndicatorElemRef?.classList.add("show")}hideCameraInteractionPromptIndicator(){this.cameraInteractionPromptIndicatorElemRef?.classList.remove("show")}_onPlayInteractionPromptChange(){this.playInteractionPrompt?this.__onPlayInteractionPrompt():(this.hideCameraInteractionPromptIndicator(),this._cameraManager?.mainCameraControls?.stop&&this._cameraManager?.mainCameraControls?.stop())}connectedCallback(){super.connectedCallback(),this._loadTimeBegin=performance.now(),this.parsedUrlParams=It.parseUrlForEpigraphParams(this.baseUrlOverride),this._setupAnalytics()}firstUpdated(){this.modalView&&(this.hide=!0),this._setup().then(()=>{this.featuresToEnable.viewer===!0&&(this._setupResizeObservers(),this.hideSplashScreen()),window.epigraph.logger.info({title:"All Initializations Complete",contextOverride:this._loggerContext}),this.isAppReady=!0,this._onIdentifierOrTypeChange()}).catch(e=>{window.epigraph.logger.error({title:"Error while setup",details:e})})}updated(e){(e.has("sku")||e.has("shopify_variant_id")||e.has("upc")||e.has("asin")||e.has("experience_id")||e.has("product_variant_uuid")||e.has("customVersionId"))&&this._onIdentifierOrTypeChange(),e.has("playInteractionPrompt")&&this._onPlayInteractionPromptChange(),e.has("_isActiveHotspot")&&(this._hasActiveHotspot?this._hideCustomViewInYourSpaceButton():this._showCustomViewInYourSpaceButton()),e.has("debug")&&this.eventsManager.debugChanged.fire({value:this.debug}),e.has("showSettings")&&this.eventsManager.showSettingsChanged.fire({value:this.showSettings}),e.has("modalView")&&(this.hide=this.modalView)}_getSlottedElements(e){if(!this.customViewInYourSpaceButtonSlotElem)return[];const t=e.assignedElements();return[...t.length>0?t:e.children]}disconnectedCallback(){super.disconnectedCallback()}showFullScreenModal(){this.hide=!1}hideFullScreenModal(){this.hide=!0}render(){return ae`
|
|
18250
18250
|
${It.getCustomStylesTemplate()}
|
|
18251
18251
|
|
|
18252
18252
|
<epg-button-icon
|
|
@@ -18263,7 +18263,7 @@ void main() {
|
|
|
18263
18263
|
<slot name=${af.slotCustomViewInYourSpaceButton.name} @click=${this.launchAR}>
|
|
18264
18264
|
${this._renderSplashScreen()}
|
|
18265
18265
|
</slot>
|
|
18266
|
-
`}};ot([q({type:String,attribute:zt.sku.name})],rt.prototype,"sku");ot([q({type:String,attribute:zt.shopifyVariantId.name})],rt.prototype,"shopify_variant_id");ot([q({type:String,attribute:zt.upc.name})],rt.prototype,"upc");ot([q({type:String,attribute:zt.asin.name})],rt.prototype,"asin");ot([q({type:String,attribute:zt.experienceId.name})],rt.prototype,"experience_id");ot([q({type:String,attribute:zt.productVariantUuid.name})],rt.prototype,"product_variant_uuid");ot([q({type:String,attribute:zt.customVersionId.name})],rt.prototype,"customVersionId");ot([q({type:String,attribute:zt.gaMeasurementId.name})],rt.prototype,"gaMeasurementId");ot([q({type:Boolean,attribute:zt.modalView.name,reflect:!0})],rt.prototype,"modalView");ot([q({type:Boolean,attribute:zt.hide.name,reflect:!0})],rt.prototype,"hide");ot([q({type:Boolean,attribute:!1})],rt.prototype,"isLoading");ot([q({type:String,attribute:zt.apiMode.name})],rt.prototype,"apiMode");ot([q({type:Boolean,attribute:zt.debug.name,reflect:!0})],rt.prototype,"debug");ot([q({type:Boolean,attribute:zt.showSettings.name,reflect:!0})],rt.prototype,"showSettings");ot([q({type:String,attribute:zt.dimensionsUnit.name})],rt.prototype,"dimensionsUnit");ot([q({type:String,attribute:zt.dimensionsUnitSymbol.name})],rt.prototype,"dimensionsUnitSymbol");ot([q({type:Boolean,attribute:!1})],rt.prototype,"areDimensionsActive");ot([q({type:Boolean,attribute:!1})],rt.prototype,"areHotspotsActive");ot([q({type:Boolean,attribute:!1})],rt.prototype,"isHelpVisible");ot([q({type:String,attribute:zt.baseUrlOverride.name})],rt.prototype,"baseUrlOverride");ot([q({attribute:!1})],rt.prototype,"isPortraitOrientation");ot([q({attribute:!1})],rt.prototype,"didARAutoLaunch");ot([q({type:Boolean,attribute:zt.transparentBackground.name})],rt.prototype,"transparentBackground");ot([q({type:String,attribute:zt.splashScreenLogo.name})],rt.prototype,"splashScreenLogo");ot([q({type:String,attribute:zt.splashScreenText.name})],rt.prototype,"splashScreenText");ot([q({type:Boolean,attribute:"hide-ui",reflect:!0})],rt.prototype,"hideUi");ot([q({attribute:!1})],rt.prototype,"playInteractionPrompt");ot([q({attribute:!1})],rt.prototype,"featuresToEnable");ot([Pt("#appUiContainer")],rt.prototype,"appUiContainerElemRef");ot([Pt("#appCanvasContainer")],rt.prototype,"appCanvasContainerElemRef");ot([Pt("#cameraInteractionPromptIndicator")],rt.prototype,"cameraInteractionPromptIndicatorElemRef");ot([Pt("#cameraAimIndicator")],rt.prototype,"cameraAimElemRef");ot([Pt("#qrCodeGenerator")],rt.prototype,"qrCodeGenerator");ot([Pt("#splashScreen")],rt.prototype,"splashScreenElem");ot([Pt("#toolset")],rt.prototype,"toolsetElem");ot([Pt("#customViewInYourSpaceButtonSlotElem")],rt.prototype,"customViewInYourSpaceButtonSlotElem");ot([Pt("#viewInYourSpaceManager")],rt.prototype,"viewInYourSpaceManager");ot([Pt("#dimensionsManager")],rt.prototype,"dimensionsManager");ot([Pt("#helpOverlay")],rt.prototype,"helpOverlayElem");ot([Pt("#hotspotsManager")],rt.prototype,"hotspotsManager");ot([Pt("#debugManager")],rt.prototype,"debugManager");ot([Mn()],rt.prototype,"_hasActiveHotspot");ot([Mn()],rt.prototype,"_isToolsetLargerThanTheLeftBottomQuadrant");ot([Mn()],rt.prototype,"_loadingProgress");let $b=rt;const x2={label:{name:"label",defaultValue:"View In Your Space"}},
|
|
18266
|
+
`}};ot([q({type:String,attribute:zt.sku.name})],rt.prototype,"sku");ot([q({type:String,attribute:zt.shopifyVariantId.name})],rt.prototype,"shopify_variant_id");ot([q({type:String,attribute:zt.upc.name})],rt.prototype,"upc");ot([q({type:String,attribute:zt.asin.name})],rt.prototype,"asin");ot([q({type:String,attribute:zt.experienceId.name})],rt.prototype,"experience_id");ot([q({type:String,attribute:zt.productVariantUuid.name})],rt.prototype,"product_variant_uuid");ot([q({type:String,attribute:zt.customVersionId.name})],rt.prototype,"customVersionId");ot([q({type:String,attribute:zt.gaMeasurementId.name})],rt.prototype,"gaMeasurementId");ot([q({type:Boolean,attribute:zt.modalView.name,reflect:!0})],rt.prototype,"modalView");ot([q({type:Boolean,attribute:zt.hide.name,reflect:!0})],rt.prototype,"hide");ot([q({type:Boolean,attribute:!1})],rt.prototype,"isLoading");ot([q({type:String,attribute:zt.apiMode.name})],rt.prototype,"apiMode");ot([q({type:Boolean,attribute:zt.debug.name,reflect:!0})],rt.prototype,"debug");ot([q({type:Boolean,attribute:zt.showSettings.name,reflect:!0})],rt.prototype,"showSettings");ot([q({type:String,attribute:zt.dimensionsUnit.name})],rt.prototype,"dimensionsUnit");ot([q({type:String,attribute:zt.dimensionsUnitSymbol.name})],rt.prototype,"dimensionsUnitSymbol");ot([q({type:Boolean,attribute:!1})],rt.prototype,"areDimensionsActive");ot([q({type:Boolean,attribute:!1})],rt.prototype,"areHotspotsActive");ot([q({type:Boolean,attribute:!1})],rt.prototype,"isHelpVisible");ot([q({type:String,attribute:zt.baseUrlOverride.name})],rt.prototype,"baseUrlOverride");ot([q({attribute:!1})],rt.prototype,"isPortraitOrientation");ot([q({attribute:!1})],rt.prototype,"didARAutoLaunch");ot([q({type:Boolean,attribute:zt.transparentBackground.name})],rt.prototype,"transparentBackground");ot([q({type:String,attribute:zt.splashScreenLogo.name})],rt.prototype,"splashScreenLogo");ot([q({type:String,attribute:zt.splashScreenText.name})],rt.prototype,"splashScreenText");ot([q({type:Boolean,attribute:"hide-ui",reflect:!0})],rt.prototype,"hideUi");ot([q({attribute:!1})],rt.prototype,"playInteractionPrompt");ot([q({attribute:!1})],rt.prototype,"featuresToEnable");ot([Pt("#appUiContainer")],rt.prototype,"appUiContainerElemRef");ot([Pt("#appCanvasContainer")],rt.prototype,"appCanvasContainerElemRef");ot([Pt("#cameraInteractionPromptIndicator")],rt.prototype,"cameraInteractionPromptIndicatorElemRef");ot([Pt("#cameraAimIndicator")],rt.prototype,"cameraAimElemRef");ot([Pt("#qrCodeGenerator")],rt.prototype,"qrCodeGenerator");ot([Pt("#splashScreen")],rt.prototype,"splashScreenElem");ot([Pt("#toolset")],rt.prototype,"toolsetElem");ot([Pt("#customViewInYourSpaceButtonSlotElem")],rt.prototype,"customViewInYourSpaceButtonSlotElem");ot([Pt("#viewInYourSpaceManager")],rt.prototype,"viewInYourSpaceManager");ot([Pt("#dimensionsManager")],rt.prototype,"dimensionsManager");ot([Pt("#helpOverlay")],rt.prototype,"helpOverlayElem");ot([Pt("#hotspotsManager")],rt.prototype,"hotspotsManager");ot([Pt("#debugManager")],rt.prototype,"debugManager");ot([Mn()],rt.prototype,"_hasActiveHotspot");ot([Mn()],rt.prototype,"_isToolsetLargerThanTheLeftBottomQuadrant");ot([Mn()],rt.prototype,"_loadingProgress");let $b=rt;const x2={label:{name:"label",defaultValue:"View In Your Space"}},tj={...af};class w2{constructor(e){this._appWcRef=e}async launchAR(){return await this._appWcRef.launchAR()}async viewInYourSpace(){return await this.launchAR()}async getViewInYourSpaceUrl(){return""}async getViewInYourSpaceQR(){return""}canLaunchAR(){return this._appWcRef.viewInYourSpaceManager.canLaunchAr()}isARSessionActive(){return this._appWcRef.viewInYourSpaceManager.isARSessionActive()}getMinimumRequirementsString(){return this._appWcRef.viewInYourSpaceManager.getMinimumRequirementsString()}async selectFinishForAsset(e,t){return this._appWcRef.selectFinishForAssetName(e,t)}}var nj=Object.defineProperty,ij=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&nj(e,t,i),i};const S2=class Rc extends $b{constructor(){super(),this._loggerContext="EPIGRAPH BUTTON",this.featuresToEnable={viewer:!0,hotspots:!1,dimensions:!1,viewInYourSpace:!0,help:!1,sceneManager:!1},this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-icon&utm_content=button",modal:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-modal&utm_content=button"},this.label=x2.label.defaultValue.toString(),window.epigraph.logger.info({title:`Initializing ${Rc.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new w2(this)}static{this.webComponentName="epigraph-button"}static setupWebComponent(){window.customElements.get(Rc.webComponentName)||window.customElements.define(Rc.webComponentName,Rc)}static{this.styles=[super.styles,st`
|
|
18267
18267
|
:host {
|
|
18268
18268
|
--ar-button-display: none;
|
|
18269
18269
|
position: relative;
|
|
@@ -18296,17 +18296,17 @@ void main() {
|
|
|
18296
18296
|
id="customViewInYourSpaceButtonSlotElem"
|
|
18297
18297
|
@click=${this.launchAR}
|
|
18298
18298
|
class="slot-custom-view-in-your-space-button"
|
|
18299
|
-
name=${
|
|
18299
|
+
name=${tj.slotCustomViewInYourSpaceButton.name}
|
|
18300
18300
|
>
|
|
18301
18301
|
<epg-button-view-in-your-space
|
|
18302
18302
|
id="viewInYourSpaceButton"
|
|
18303
18303
|
?is-loading=${this.isLoading}
|
|
18304
18304
|
></epg-button-view-in-your-space>
|
|
18305
|
-
</slot>`}_renderPoweredByEpigraphButton(){return me}_renderToolset(){return me}};
|
|
18305
|
+
</slot>`}_renderPoweredByEpigraphButton(){return me}_renderToolset(){return me}};ij([q({type:String,attribute:x2.label.name})],S2.prototype,"label");let sj=S2;class B2 extends w2{constructor(e){super(e)}setCameraZoomLimits({minDistance:e,maxDistance:t}){this._appWcRef.cameraManager.setCameraZoomLimits({minDistance:e,maxDistance:t})}disableCameraZoomLimits(){this._appWcRef.cameraManager.disableCameraZoomLimits()}getCameraTransforms(){return this._appWcRef.cameraManager.getCurrentCameraTransforms()}setCameraTransforms(e){return void this._appWcRef.cameraManager.moveCameraToLocation({newCameraTransforms:e})}getCameraRotation(){return this._appWcRef.cameraManager.getCurrentCameraRotation()}async setCameraRotation(e,t){const{azimuthAngle:n,polarAngle:i,distance:r}=e;return await this._appWcRef.cameraManager.rotateCameraToLocation({azimuthAngle:n,polarAngle:i,distance:r,transition:t})}getCameraFocalLength(){return this._appWcRef.cameraManager.getCameraFocalLength()}setCameraFocalLength(e){this._appWcRef.cameraManager.setCameraFocalLength(e)}getPositionOnMeshFromPoint(e,t){return this._appWcRef.getPositionOnMeshFromPoint(e,t)}getIntersectionOnProductFromPoint(e,t){return this._appWcRef.getIntersectionOnProductFromPoint(e,t)}highlightEntityByAssetId(e){this._appWcRef.highlightEntityByAssetId(e)}unhighlightAllEntities(){this._appWcRef.unhighlightAllEntities()}showDimensions(){this._appWcRef.showDimensions()}hideDimensions(){this._appWcRef.hideDimensions()}areDimensionsVisible(){return this._appWcRef.areDimensionsActive}getDimensions(){return this._appWcRef.getDimensions()}toggleDimensions(){}getSceneAnimations(){return this._appWcRef.getSceneAnimations()}playAnimationByNameAndId({animationName:e,assetId:t,clampWhenFinished:n=!1,loop:i=!1,repetitions:r=1/0,reverse:a=!1}){this._appWcRef.playAnimationByNameAndAssetId({animationName:e,assetId:t,clampWhenFinished:n,loop:i,repetitions:r,reverse:a})}stopAnimationByNameAndAssetId(e,t){this._appWcRef.stopAnimationByNameAndAssetId(e,t)}pauseActiveAnimations(e){this._appWcRef.pauseActiveAnimations(e)}resumeActiveAnimations(){this._appWcRef.resumeActiveAnimations()}stopAllAnimations(){this._appWcRef.stopAllAnimations()}showHelp(){this._appWcRef.showHelp()}hideHelp(){this._appWcRef.hideHelp()}toggleHelp(){this._appWcRef.toggleHelp()}isHelpVisible(){return this._appWcRef.isHelpVisible}}var rj=Object.defineProperty,aj=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&rj(e,t,i),i};const T2=class Wo extends $b{constructor(){super(),this.featuresToEnable={viewer:!0,hotspots:!1,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-icon&utm_content=viewer",modal:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-modal&utm_content=viewer"},this._loggerContext=Wo.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Wo.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new B2(this)}static{this.webComponentName="epigraph-viewer"}static{this.styles=[super.styles,st`
|
|
18306
18306
|
:host {
|
|
18307
18307
|
position: relative;
|
|
18308
18308
|
}
|
|
18309
|
-
`]}static setupWebComponent(){window.customElements.get(Wo.webComponentName)||window.customElements.define(Wo.webComponentName,Wo)}getWebComponentName(){return Wo.webComponentName}firstUpdated(){const e=this.parsedUrlParams.get(Vn.identifierType),t=this.parsedUrlParams.get(Vn.identifier);e&&e&&this.setAttribute(String(e),String(t)),super.firstUpdated()}async _fetchExperienceDataConfig(){const e=new D0(It.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getViewerBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getViewerByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getViewerByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getViewerByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}};
|
|
18309
|
+
`]}static setupWebComponent(){window.customElements.get(Wo.webComponentName)||window.customElements.define(Wo.webComponentName,Wo)}getWebComponentName(){return Wo.webComponentName}firstUpdated(){const e=this.parsedUrlParams.get(Vn.identifierType),t=this.parsedUrlParams.get(Vn.identifier);e&&e&&this.setAttribute(String(e),String(t)),super.firstUpdated()}async _fetchExperienceDataConfig(){const e=new D0(It.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getViewerBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getViewerByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getViewerByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getViewerByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}};aj([Pt("#viewInYourSpaceButton")],T2.prototype,"viewInYourSpaceButtonElem");let M2=T2;class R2 extends B2{constructor(e){super(e),this._appWcRef=e}showHotspots(){this._appWcRef.showHotspots()}hideHotspots(){this._appWcRef.hideHotspots()}toggleHotspots(){this._appWcRef.toggleHotspots()}updateHotspotsOrder(e){this._appWcRef.updateHotspotsOrder(e)}addHotspot(e){this._appWcRef.hotspotsManager.addHotspot(e)}updateHotspot(e,t){this._appWcRef.hotspotsManager.updateHotspot(e,t)}removeHotspot(e){this._appWcRef.hotspotsManager.removeHotspot(e)}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:n=!1}){this._appWcRef.openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:n})}closeActiveHotspot(){this._appWcRef.closeActiveHotspot()}setActiveHotspotState(e){this._appWcRef.setActiveHotspotState(e)}nextHotspot(){return this._appWcRef.nextHotspot()}previousHotspot(){return this._appWcRef.previousHotspot()}getActiveHotspot(){return this._appWcRef.getActiveHotspot()}areHotspotsVisible(){return this._appWcRef.areHotspotsVisible()}getAllHotspots(){return this._appWcRef.getAllHotspots()}getAllHotspotIds(){return this._appWcRef.getAllHotspotIds()}getHotspotById(e){return this._appWcRef.getHotspotById(e)}enterPickerState(){this._appWcRef.enterPickerState()}enterViewState(){this._appWcRef.enterViewState()}enterDefaultState(){this._appWcRef.enterDefaultState()}}const oj={hideHotspotsOnStart:{name:"hide-hotspots-on-start"}};var lj=Object.defineProperty,cj=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(i=a(e,t,i)||i);return i&&lj(e,t,i),i};const D2=class jo extends M2{constructor(){super(),this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-icon&utm_content=tour",modal:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-modal&utm_content=tour"},this.hideHotspotsOnStart=!1,this._loggerContext=jo.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${jo.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new R2(this)}static{this.webComponentName="epigraph-tour"}static{this.styles=[super.styles]}static setupWebComponent(){window.customElements.get(jo.webComponentName)||window.customElements.define(jo.webComponentName,jo)}getWebComponentName(){return jo.webComponentName}async _fetchExperienceDataConfig(){const e=new D0(It.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getTourBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getTourByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getTourByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getTourByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}firstUpdated(){super.firstUpdated(),this.areHotspotsActive=!this.hideHotspotsOnStart}};cj([q({type:Boolean,attribute:oj.hideHotspotsOnStart.name})],D2.prototype,"hideHotspotsOnStart");let Q2=D2;class hj extends R2{constructor(e){super(e),this._appWcRef=e}}class Ha extends Q2{constructor(){super(),this._loggerContext=Ha.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Ha.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new hj(this)}static{this.webComponentName="epigraph-hotspot-tool"}static{this.styles=[super.styles]}static setupWebComponent(){window.customElements.get(Ha.webComponentName)||window.customElements.define(Ha.webComponentName,Ha)}getWebComponentName(){return Ha.webComponentName}async __onDebugToolControlClick(){this.debug=!this.debug}_renderDebugToolControl(){return ae`
|
|
18310
18310
|
<epg-tool-control
|
|
18311
18311
|
id="debugToolControl"
|
|
18312
18312
|
size="medium"
|
|
@@ -18358,4 +18358,4 @@ void main() {
|
|
|
18358
18358
|
<!-- Settings Tool -->
|
|
18359
18359
|
${this._renderShowSettingsToolControl()}
|
|
18360
18360
|
</epg-toolset>
|
|
18361
|
-
`}}$b.setupWebComponent();
|
|
18361
|
+
`}}$b.setupWebComponent();sj.setupWebComponent();M2.setupWebComponent();Q2.setupWebComponent();Ha.setupWebComponent();
|