@mapvx/web-components 0.9.0-dev.4 → 0.9.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cjs/{base-floor-selector-DCe13Fwr.cjs → base-floor-selector-C7uLaZEQ.cjs} +3 -3
  2. package/dist/cjs/{class-map-4EVzKJFA.cjs → class-map-BmxfuHe-.cjs} +3 -3
  3. package/dist/cjs/{compact-floor-selector-f3Vg-Mw8.cjs → compact-floor-selector-BC-kRiSf.cjs} +3 -3
  4. package/dist/cjs/{consume-DRfK7CRo.cjs → consume-D0KB6NRa.cjs} +3 -3
  5. package/dist/cjs/{custom-map-C6m88MK0.cjs → custom-map-CWj4Pliu.cjs} +3 -3
  6. package/dist/cjs/{enable-3d-attribute-BVi1YNhn.cjs → enable-3d-attribute-BfcFrDUP.cjs} +4 -4
  7. package/dist/cjs/{floor-selector-Bwt2wOIx.cjs → floor-selector-CQOa_c2I.cjs} +3 -3
  8. package/dist/cjs/index.cjs +3 -3
  9. package/dist/cjs/map-view-with-modal.cjs +3 -3
  10. package/dist/cjs/{qr-modal-YzX5h37X.cjs → qr-modal-Cdoa94GI.cjs} +5 -5
  11. package/dist/cjs/route-options-B8ee_2Hh.cjs +138 -0
  12. package/dist/cjs/route-view-totems.cjs +3 -3
  13. package/dist/cjs/{state-DPsEt4mp.cjs → state-lK9NebZE.cjs} +3 -3
  14. package/dist/es/assets/{base-floor-selector-DiAO1Sh5.js → base-floor-selector-9K_Zgc4Q.js} +3 -3
  15. package/dist/es/assets/{class-map-9gMciWNt.js → class-map-Cl_HZqif.js} +3 -3
  16. package/dist/es/assets/{compact-floor-selector-QyZe43Wr.js → compact-floor-selector-xdBCEZMp.js} +3 -3
  17. package/dist/es/assets/{consume-CZ6vRJK9.js → consume-BVCy2F1c.js} +3 -3
  18. package/dist/es/assets/{custom-map-KHVZBnO_.js → custom-map-BCAiVSzB.js} +3 -3
  19. package/dist/es/assets/{enable-3d-attribute-btpETT7S.js → enable-3d-attribute-BivvMWbS.js} +3 -3
  20. package/dist/es/assets/{floor-selector-LRSMd5xX.js → floor-selector-Hc-nAszb.js} +3 -3
  21. package/dist/es/assets/{qr-modal-Ckb-gpRO.js → qr-modal-DQO-8Zni.js} +5 -5
  22. package/dist/es/assets/{route-options-CRN8ecbF.js → route-options-DN6SQx_f.js} +9 -9
  23. package/dist/es/assets/{state-Dn5MwTcA.js → state-BB7jYDVb.js} +3 -3
  24. package/dist/es/index.js +3 -3
  25. package/dist/es/map-view-with-modal.js +3 -3
  26. package/dist/es/route-view-totems.js +3 -3
  27. package/dist/iife/map-view-with-modal.js +3 -3
  28. package/dist/iife/route-view-totems.js +9 -9
  29. package/dist/types/utils/qr-card-size.d.cts +78 -0
  30. package/dist/types/utils/qr-card-size.d.ts +78 -0
  31. package/package.json +1 -1
  32. package/dist/cjs/route-options-cUf4NVxm.cjs +0 -138
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b502fcef-edbc-5faf-b1de-e748059e34ac")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="44e794d3-6f08-54de-b652-848528f55dc5")}catch(e){}}();
3
3
  var MapVXRouteViewTotems=function(e){"use strict";var t="undefined"!=typeof document?document.currentScript:null;
4
4
  /**
5
5
  * @license
@@ -42,7 +42,7 @@ const ce=e=>(t,n)=>{void 0!==n?n.addInitializer(()=>{customElements.define(e,t)}
42
42
  * @license
43
43
  * Copyright 2018 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
- */const me=e=>e??W;class ge{constructor(){this.MEASUREMENT_ID="G-6XL8YD35QR",this.isInitialized=!1,this.sessionId=""}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}generateSessionId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}initialize(e){if(this.isInitialized)return;ge.component=e,this.sessionId=this.generateSessionId();const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${this.MEASUREMENT_ID}`,document.head.appendChild(t),window.dataLayer=window.dataLayer||[];window.gtag=window.gtag||((...e)=>{window.dataLayer.push(e)}),window.gtag("js",new Date),window.gtag("config",this.MEASUREMENT_ID,{send_page_view:!0,groups:"mapvx"}),this.isInitialized=!0}resetSessionId(){this.sessionId=this.generateSessionId()}trackPageView(e){this.isInitialized&&window.gtag("event","page_view",{page_title:e,page_location:window.location.href,page_path:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackEvent(e,t){this.isInitialized&&window.gtag("event",e,{...t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackUserTiming(e,t,n){this.isInitialized&&window.gtag("event","timing_complete",{name:t,value:n,event_category:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackException(e,t=!1){this.isInitialized&&window.gtag("event","exception",{description:e,fatal:t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}}const Ae="https://tiles.mapvx.com/tiles";const ye="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ve=globalThis,be="10.68.0";function xe(){return _e(ve),ve}function _e(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||be,t[be]=t[be]||{}}function we(e,t,n=ve){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[be]=r[be]||{};return i[e]||(i[e]=t())}const Ee=["debug","info","warn","error","log","assert","trace"],Ce={};function Se(e){if(!("console"in ve))return e();const t=ve.console,n={},r=Object.keys(Ce);r.forEach(e=>{const r=Ce[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Ie(){return Te().enabled}function Me(e,...t){ye&&Ie()&&Se(()=>{ve.console[e](`Sentry Logger [${e}]:`,...t)})}function Te(){return ye?we("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const De={enable:function(){Te().enabled=!0},disable:function(){Te().enabled=!1},isEnabled:Ie,log:function(...e){Me("log",...e)},warn:function(...e){Me("warn",...e)},error:function(...e){Me("error",...e)}},Pe="?",Be=/\(error: (.*)\)/,Re=/captureMessage|captureException/;function Fe(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const i=[],a=e.split("\n");for(let s=n;s<a.length;s++){let e=a[s];e.length>1024&&(e=e.slice(0,1024));const n=Be.test(e)?e.replace(Be,"$1"):e;if(!n.includes("Error: ")){for(const e of t){const t=e(n);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(Le(t).function||"")&&t.pop();t.reverse(),Re.test(Le(t).function||"")&&(t.pop(),Re.test(Le(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||Le(t).filename,function:e.function||Pe}))}(i.slice(r))}}function Le(e){return e[e.length-1]||{}}const ke="<anonymous>";function Oe(e){try{return e&&"function"==typeof e&&e.name||ke}catch{return ke}}function ze(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}const Ne={},Ue={};function Ve(e,t){return Ne[e]=Ne[e]||[],Ne[e].push(t),()=>{const n=Ne[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ge(e,t){if(!Ue[e]){Ue[e]=!0;try{t()}catch(qke){ye&&De.error(`Error while instrumenting ${e}`,qke)}}}function je(e,t){const n=e&&Ne[e];if(n)for(const r of n)try{r(t)}catch(qke){ye&&De.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Oe(r)}\nError:`,qke)}}let qe=null;function He(){qe=ve.onerror,ve.onerror=function(e,t,n,r,i){return je("error",{column:r,error:i,line:n,msg:e,url:t}),!!qe&&qe.apply(this,arguments)},ve.onerror.__SENTRY_INSTRUMENTED__=!0}let Qe=null;function We(){Qe=ve.onunhandledrejection,ve.onunhandledrejection=function(e){return je("unhandledrejection",e),!Qe||Qe.apply(this,arguments)},ve.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ke=Object.prototype.toString;function Ze(e){switch(Ke.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return st(e,Error)}}function Ye(e,t){return Ke.call(e)===`[object ${t}]`}function Xe(e){return Ye(e,"ErrorEvent")}function Je(e){return Ye(e,"DOMError")}function $e(e){return Ye(e,"String")}function et(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function tt(e){return null===e||et(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return Ye(e,"Object")}function rt(e){return"object"==typeof e&&null!==e}function it(e){return"undefined"!=typeof Event&&st(e,Event)}function at(e){return Boolean(e?.then&&"function"==typeof e.then)}function st(e,t){try{return e instanceof t}catch{return!1}}function ot(e){return"undefined"!=typeof Request&&st(e,Request)}function lt(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const i=n(r);"function"==typeof i&&ct(i,r);try{e[t]=i}catch{ye&&De.log(`Failed to replace method "${t}" in object`,e)}}function ut(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ye&&De.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ct(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ut(e,"__sentry_original__",t)}catch{}}function ht(e){return e.__sentry_original__}function dt(e){if(Ze(e))return{message:e.message,name:e.name,stack:e.stack,...pt(e)};if(it(e)){const{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...pt(e)}}return e}function pt(e){return rt(e)?Object.fromEntries(Object.entries(e)):{}}let ft;function mt(e){if(void 0!==ft)return ft?ft(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=ve;return t in n&&"function"==typeof n[t]?(ft=n[t],ft(e)):(ft=null,e())}function gt(){return mt(()=>Math.random())}function At(){return mt(()=>Date.now())}const yt=Symbol.for("sentry.skipNormalization"),vt=Symbol.for("sentry.overrideNormalizationDepth");let bt,xt;function _t(e,t=100,n=1/0){try{return Et("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function wt(e,t=3,n=102400){const r=_t(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?wt(e,t-1,n):r;var i}function Et(e,t,n=1/0,r=1/0,i=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[a,s]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const o=Ct(e,t);if(!o.startsWith("[object "))return o;if(function(e){return Boolean(e[yt])}(t))return t;const l=function(e){const t=e[vt];return"number"==typeof t?t:void 0}(t),u=void 0!==l?l:n;if(0===u)return o.replace("object ","");if(a(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return Et("",c.toJSON(),u-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const p=dt(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=r){h[f]="[MaxProperties ~]";break}const e=p[f];h[f]=Et(f,e,u-1,r,i),d++}return s(t),h}function Ct(e,t){try{if(bt){const e=bt(t);if(e)return e}if("undefined"!=typeof global&&t===global)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Oe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(n){return`**non-serializable** (${n})`}}function St(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function It(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];tt(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(Ct(0,t))}return n.join(t)}function Mt(e,t,n=!1){return!!$e(e)&&(Ye(t,"RegExp")?t.test(e):$e(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function Tt(e,t=[],n=!1){for(const r of t)if(Mt(e,r,n))return!0;return!1}function Dt(e=function(){const e=ve;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return mt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return xt||(xt="10000000100040008000100000000000"),xt.replace(/[018]/g,e=>(e^(16*gt()&15)>>e/4).toString(16))}function Pt(e){return e.exception?.values?.[0]}function Bt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Pt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Rt(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Ft(e,t){const n=Pt(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function Lt(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{ut(e,"__sentry_captured__",!0)}catch{}return!1}function kt(){return At()/1e3}let Ot;function zt(){return(Ot??(Ot=function(){const{performance:e}=ve;if(!e?.now||!e.timeOrigin)return kt;const t=e.timeOrigin;return()=>(t+mt(()=>e.now()))/1e3}()))()}function Nt(e){const t=zt(),n={sid:Dt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&Ut(n,e),n}function Ut(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||zt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Dt()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Vt(r[i],t[i],n-1));return r}function Gt(){return Dt()}function jt(){return Dt().substring(16)}function qt(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const Ht="_sentrySpan";function Qt(e,t){t?ut(e,Ht,function(e){try{const t=ve.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[Ht]}function Wt(e){return qt(e[Ht])}let Kt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gt(),sampleRand:gt()}}clone(){const t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Qt(t,Wt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ut(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,r=n instanceof e?n.getScopeData():nt(n)?t:void 0,{tags:i,attributes:a,extra:s,user:o,contexts:l,level:u,fingerprint:c=[],propagationContext:h,conversationId:d}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...a},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},o&&Object.keys(o).length&&(this._user=o),u&&(this._level=u),c.length&&(this._fingerprint=c),h&&(this._propagationContext=h),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Qt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gt(),sampleRand:gt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:kt(),...e,message:e.message?St(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Wt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Vt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||Dt();if(!this._client)return ye&&De.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||Dt();if(!this._client)return ye&&De.warn("No client configured on scope - will not capture message!"),r;const i=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||Dt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ye&&De.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};const Zt=e=>e instanceof Promise&&!e[Yt],Yt=Symbol("chained PromiseLike"),Xt=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];"function"==typeof i?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Yt]:!0}),t};let Jt=class{constructor(e,t){let n,r;n=e||new Kt,r=t||new Kt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(qke){throw this._popScope(),qke}return at(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Zt(r)&&Zt(e)?r:Xt(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function $t(){const e=_e(xe());return e.stack=e.stack||new Jt(we("defaultCurrentScope",()=>new Kt),we("defaultIsolationScope",()=>new Kt))}function en(e){return $t().withScope(e)}function tn(e,t){const n=$t();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function nn(e){return $t().withScope(()=>e($t().getIsolationScope()))}function rn(e){const t=_e(e);return t.acs?t.acs:{withIsolationScope:nn,withScope:en,withSetScope:tn,withSetIsolationScope:(e,t)=>nn(t),getCurrentScope:()=>$t().getScope(),getIsolationScope:()=>$t().getIsolationScope()}}function an(e,t){const{value:n,unit:r}="object"==typeof(i=e)&&null!=i&&!Array.isArray(i)&&Object.keys(i).includes("value")?e:{value:e,unit:void 0};var i;const a=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),s=r&&"string"==typeof r?{unit:r}:{};if(a)return{...a,...s};if(!t||"skip-undefined"===t&&void 0===n)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...s}}function sn(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const e=an(i,t);e&&(n[r]=e)}return n}function on(){return rn(xe()).getCurrentScope()}function ln(){return rn(xe()).getIsolationScope()}function un(){return on().getClient()}function cn(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,a={trace_id:n,span_id:i||jt()};return r&&(a.parent_span_id=r),a}const hn="sentry.op",dn="sentry.profile_id",pn="sentry.exclusive_time";function fn(e){const t=e;return{scope:t._sentryScope,isolationScope:qt(t._sentryIsolationScope)}}const mn="sentry-";function gn(e){const t=function(e){if(!e||!$e(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=An(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return An(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(mn)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function An(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const yn=/^o(\d+)\./,vn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function bn(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r?`${r}/`:r}${s}`}function xn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function _n(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(yn);return t?.[1]}(n)),r}function wn(e){const t="string"==typeof e?function(e){const t=vn.exec(e);if(!t)return void Se(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",a="",s="",o=""]=t.slice(1);let l="",u=o;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return xn({host:a,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}(e):xn(e);if(t&&function(e){if(!ye)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(De.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(De.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(De.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(De.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}let En=!1;function Cn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Tn(e).parent_span_id,a=fn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||jt():t,trace_id:n}}function Sn(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:1===n,attributes:i,...r})):void 0}function In(e){return"number"==typeof e?Mn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Mn(e.getTime()):zt()}function Mn(e){return e>9999999999?e/1e3:e}function Tn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:a,endTime:s,status:o,links:l}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Dn(e),start_timestamp:In(i),timestamp:In(s)||void 0,status:Pn(o),op:r[hn],origin:r["sentry.origin"],links:Sn(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dn(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Pn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const Bn=function(e){return e._sentryRootSpan||e};function Rn(){En||(Se(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),En=!0)}function Fn(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||un()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function Ln(e){De.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function kn(e,t){if(!t?.length)return!1;for(const n of t){if(Nn(n)){if(e.description&&Mt(e.description,n))return ye&&Ln(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const r=!n.name||e.description&&Mt(e.description,n.name),i=!n.op||e.op&&Mt(e.op,n.op),a=!n.attributes||Object.entries(n.attributes).every(([t,n])=>On(e.attributes?.[t],n));if(r&&i&&a)return ye&&Ln(e),!0}return!1}function On(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?Mt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function zn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function Nn(e){return"string"==typeof e||e instanceof RegExp}const Un=Symbol.for("sentry.nonRecordingSpan");const Vn="production";function Gn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Vn,release:n.release,public_key:r,trace_id:e,org_id:_n(t)};return t.emit("createDsc",i),i}function jn(e,t){const n=t.getPropagationContext();return n.dsc||Gn(n.traceId,e)}function qn(e){const t=un();if(!t)return{};const n=Bn(e),r=Tn(n),i=r.data,a=n.spanContext().traceState,s=a?.get("sentry.sample_rate")??i["sentry.sample_rate"]??i["sentry.previous_trace_sample_rate"];function o(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const l=n._frozenDsc;if(l)return o(l);const u=function(e){return!!e&&!0===e[Un]}(n),c=u&&"ignored"===n.dropReason;if(u&&(!Fn(t.getOptions())||c)){const e=fn(n).scope;if(e){const n={...jn(t,e)};return c&&(n.sampled="false"),o(n)}}const h=a?.get("sentry.dsc"),d=h&&gn(h);if(d)return o(d);const p=Gn(e.spanContext().traceId,t),f=i["sentry.source"]??i["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),Fn()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=a?.get("sentry.sample_rand")??fn(n).scope?.getPropagationContext().sampleRand.toString()),o(p),t.emit("createDsc",p,n),p}function Hn(e,t=[]){return[e,t]}function Qn(e,t){const[n,r]=e;return[n,[...r,t]]}function Wn(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Kn(e){const t=_e(ve);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Zn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[Kn(r),e]:r.push("string"==typeof e?Kn(e):e)}for(const a of n){const[e,t]=a;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(_t(t))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(r)}function Yn(e){const t="string"==typeof e.data?Kn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Xn={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Jn(e){return function(e){return e in Xn}(e)?Xn[e]:e}function $n(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function er(e,t,n,r){const i=$n(n),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(At()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bn(r)},...i&&{trace:i}}}(e,i,r,t);delete e.sdkProcessingMetadata;return Hn(s,[[{type:a},e]])}function tr(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(i).length&&(e.user={...i,...e.user});Object.keys(a).length&&(e.contexts={...a,...e.contexts});s&&(e.level=s);o&&"transaction"!==e.type&&(e.transaction=o)}(e,t),r&&function(e,t){e.contexts={trace:Cn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:qn(t),...e.sdkProcessingMetadata};const n=Bn(t),r=Tn(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function nr(e,t){const{extra:n,tags:r,attributes:i,user:a,contexts:s,level:o,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:p,transactionName:f,span:m}=t;rr(e,"extra",n),rr(e,"tags",r),rr(e,"attributes",i),rr(e,"user",a),rr(e,"contexts",s),e.sdkProcessingMetadata=Vt(e.sdkProcessingMetadata,l,2),o&&(e.level=o),f&&(e.transactionName=f),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function rr(e,t,n){e[t]=Vt(e[t],n,1)}function ir(e,t){const n=we("globalScope",()=>new Kt).getScopeData();return e&&nr(n,e.getScopeData()),t&&nr(n,t.getScopeData()),n}const ar="url.full",sr="user_agent.original";function or(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function lr(e){return new fr(t=>{t(e)})}function ur(e){return new fr((t,n)=>{n(e)})}let cr,hr,dr,pr,fr=class e{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(qke){r(qke)}else e(n)},t=>{if(n)try{e(n(t))}catch(qke){r(qke)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(at(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(qke){r(qke)}}};function mr(e,t,n,r=0){try{const i=gr(t,n,e,r);return at(i)?i:lr(i)}catch(T5){return ur(T5)}}function gr(e,t,n,r){const i=n[r];if(!e||!i)return e;const a=i({...e},t);return ye&&null===a&&De.log(`Event processor "${i.id||"?"}" dropped event`),at(a)?a.then(e=>gr(e,t,n,r+1)):gr(a,t,n,r+1)}function Ar(e,t,n,r,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Dt(),timestamp:t.timestamp||kt()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||Vn,!e.release&&r&&(e.release=r);!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&a&&(s.url=St(s.url,a));a&&e.exception?.values?.forEach(e=>{e.value&&(e.value=St(e.value,a))})}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,u),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ve._sentryDebugIds,n=ve._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(pr&&r.length===hr&&i.length===dr)return pr;hr=r.length,dr=i.length,pr={},cr||(cr={});const a=(t,n)=>{for(const r of t){const t=n[r],i=cr?.[r];if(i&&pr&&t)pr[i[0]]=t,cr&&(cr[r]=[i[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const i=n[e],a=i?.filename;if(a&&pr&&cr){pr[a]=t,cr[r]=[a,t];break}}}}};return t&&a(r,t),n&&a(i,n),pr}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(l,e.stackParser);const c=function(e,t){if(!t)return e;const n=e?e.clone():new Kt;return n.update(t),n}(r,n.captureContext);n.mechanism&&Ft(l,n.mechanism);const h=i?i.getEventProcessors():[],d=ir(a,c),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),tr(l,d);const f=[...h,...d.eventProcessors];return(n.data&&!0===n.data.__sentry__?lr(l):mr(f,l,n)).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}}))},...e.user&&{user:_t(e.user,t,n)},...e.contexts&&{contexts:_t(e.contexts,t,n)},...e.extra&&{extra:_t(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_t(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=_t(e.contexts.flags,3,n));return r}(e,s,o):e))}function yr(e){if(e)return function(e){return e instanceof Kt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>vr.includes(e))}(e)?{captureContext:e}:e}const vr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function br(e,t){return on().captureException(e,yr(t))}function xr(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return on().captureMessage(e,n,r)}function _r(e,t){return on().captureEvent(e,t)}function wr(e,t){ln().setTag(e,t)}function Er(e){const t=ln(),{user:n}=ir(t,on()),{userAgent:r}=ve.navigator||{},i=Nt({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return"ok"===a?.status&&Ut(a,{status:"exited"}),Cr(),t.setSession(i),i}function Cr(){const e=ln(),t=on().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Ut(e,t)}(t),Sr(),e.setSession()}function Sr(){const e=ln(),t=un(),n=e.getSession();n&&t&&t.captureSession(n)}function Ir(e=!1){e?Cr():Sr()}function Mr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Tr(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Dr=[];function Pr(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Br(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Rr(e,t,n){if(n[t.name])ye&&De.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Dr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Dr.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),ye&&De.log(`Integration installed: ${t.name}`)}}function Fr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Lr(){return"undefined"!=typeof window&&(!Fr()||function(){const e=ve.process;return"renderer"===e?.type}())}function kr(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Or(e,t){const n=t??function(e){return zr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[kr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);zr().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function zr(){return we("clientToLogBufferMap",()=>new WeakMap)}function Nr(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ur(e,t){const n=t??function(e){return Vr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[Nr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Vr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function Vr(){return we("clientToMetricBufferMap",()=>new WeakMap)}function Gr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:sn(n.attributes),links:n.links?.map(e=>({...e,attributes:sn(e.attributes)}))};var n}const jr=Symbol.for("SentryBufferFullError");function qr(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return ur(jr);const i=r();return t.add(i),i.then(()=>n(i),()=>n(i)),i},drain:function(e){if(!t.size)return lr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Mr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Hr(e,{statusCode:t,headers:n},r=At()){const i={...e},a=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(a)for(const o of a.trim().split(",")){const[e,t,,,n]=o.split(":",5),a=parseInt(e,10),s=1e3*(isNaN(a)?60:a);if(t)for(const o of t.split(";"))"metric_bucket"===o&&n&&!n.split(";").includes("custom")||(i[o]=r+s);else i.all=r+s}else s?i.all=r+function(e,t=At()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Qr(e,t,n=qr(e.bufferSize||64)){let r={};return{send:function(i){const a=[];if(Wn(i,(t,n)=>{const i=Jn(n);!function(e,t,n=At()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?a.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===a.length)return Promise.resolve({});const s=Hn(i[0],a),o=t=>{!function(e,t){return Wn(e,(e,n)=>t.includes(n))}(s,["client_report"])?Wn(s,(n,r)=>{e.recordDroppedEvent(t,Jn(r))}):ye&&De.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Zn(s)}).then(e=>413===e.statusCode?(ye&&De.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),o("send_error"),e):(ye&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&De.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Hr(r,e),e),e=>{throw o("network_error"),ye&&De.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===jr)return ye&&De.error("Skipped sending event because buffer is full."),o("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function Wr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const Kr=["forwarded","-ip","remote-","via","-user"];const Zr={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Yr(e){const t=null!=e.dataCollection?Zr:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Kr},httpHeaders:{request:{deny:Kr},response:{deny:Kr}},httpBodies:[],urlQueryParams:{deny:Kr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const Xr="Not capturing exception because it's already been captured.",Jr="Discarded session because of missing or non-string release",$r=Symbol.for("SentryInternalError"),ei=Symbol.for("SentryDoNotSendEventError");function ti(e){return{message:e,[$r]:!0}}function ni(e){return{message:e,[ei]:!0}}function ri(e){return rt(e)&&$r in e}function ii(e){return rt(e)&&ei in e}function ai(e,t,n,r,i){let a,s=0,o=!1;e.on(n,()=>{s=0,clearTimeout(a),o=!1}),e.on(t,t=>{if(s+=r(t),s>=8e5)i(e);else if(!o){const t=e.getOptions()._flushInterval??5e3;t>0&&(o=!0,a=Mr(setTimeout(()=>{i(e)},t)))}}),e.on("flush",()=>{i(e)})}let si=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=qr(e.transportOptions?.bufferSize??64),this._dataCollection=Yr(e),e.dsn?this._dsn=wn(e.dsn):ye&&De.warn("No DSN provided, client will not send events."),this._dsn){const t=Tr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&ai(this,"afterCaptureLog","flushLogs",hi,Or);(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ai(this,"afterCaptureMetric","flushMetrics",ci,Ur)}captureException(e,t,n){const r=Dt();if(Lt(e))return ye&&De.log(Xr),r;const i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),"error"),i.event_id}captureMessage(e,t,n,r){const i={event_id:Dt(),...n},a=et(e)?e:String(e),s=tt(e),o=s?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>o.then(e=>this._captureEvent(e,i,r)),s?"unknown":"error"),i.event_id}captureEvent(e,t,n){const r=Dt();if(t?.originalException&&Lt(t.originalException))return ye&&De.log(Xr),r;const i={event_id:r,...t},a=e.sdkProcessingMetadata||{},s=a.capturedSpanScope,o=a.capturedSpanIsolationScope,l=oi(e.type);return this._process(()=>this._captureEvent(e,i,s||n,o),l),i.event_id}captureSession(e){this.sendSession(e),Ut(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Rr(this,e,this._integrations),t||Br(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const a of e.spans)a.op?.startsWith("gen_ai.")?n.push(Gr(a)):r.push(a);if(0===n.length)return;e.spans=r;const i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}(e,this);let r=er(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])r=Qn(r,Yn(i));n&&(r=Qn(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=Vn}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(ye&&De.warn(Jr));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(ye&&De.warn(Jr));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const i=$n(n);return Hn({sent_at:new Date(At()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;ye&&De.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return ye&&De.error("Error while sending envelope:",t),{}}return ye&&De.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Rr(e,t,n)}),n}(this,e),Br(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception?.values;if(i){r=!0,n=!1;for(const e of i)if(!1===e.mechanism?.handled){n=!0;break}}const a="ok"===e.status;(a&&0===e.errors||a&&n)&&(Ut(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ar(i,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...cn(n)},...e.contexts};const r=jn(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=on(),r=ln()){return ye&&li(e)&&De.log(`Captured error event \`${Wr(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{ye&&(ii(e)?De.log(e.message):ri(e)?De.warn(e.message):De.warn(e))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:a}=i,s=ui(e),o=li(e),l=`before send for type \`${e.type||"error"}\``,u=void 0===a?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(a);if(o&&"number"==typeof u&&gt()>u)return this.recordDroppedEvent("sample_rate","error"),ur(ni(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));const c=oi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",c),ni("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:a,ignoreSpans:s}=t,o=(l=t.beforeSendSpan,!(l&&"function"==typeof l&&"_streamed"in l&&l._streamed)&&t.beforeSendSpan);var l;let u=n;if(li(u)&&i)return i(u,r);if(ui(u)){if(o||s){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:s,op:o}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:a,profile_id:s?.[dn],exclusive_time:s?.[pn],measurements:e.measurements,is_segment:!0}}(u);if(s?.length&&kn({description:t.description,op:t.op,attributes:t.data},s))return null;if(o){const e=o(t);e?u=Vt(n,{type:"transaction",timestamp:(c=e).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[dn]:c.profile_id},...c.exclusive_time&&{[pn]:c.exclusive_time}}}},measurements:c.measurements}):Rn()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(s?.length&&kn({description:e.description,op:e.op,attributes:e.data},s))zn(n,e);else if(o){const n=o(e);n?t.push(n):(Rn(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(a){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(u,r)}}var c;return u}(this,i,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(at(e))return e.then(e=>{if(!nt(e)&&null!==e)throw ti(n);return e},e=>{throw ti(`${t} rejected with ${e}`)});if(!nt(e)&&null!==e)throw ti(n);return e}(n,l)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",c),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw ni(`${l} returned \`null\`, will not send event.`)}const a=n.getSession()||r.getSession();if(o&&a&&this._updateSessionFromEvent(a,i),s){const e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const u=i.transaction_info;if(s&&u&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...u,source:e}}return this.sendEvent(i,t),i}).then(null,e=>{if(ii(e)||ri(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),ti(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===jr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){ye&&De.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ye&&De.log("No outcomes to send"));if(!this._dsn)return void(ye&&De.log("No dsn provided, will not send outcomes"));ye&&De.log("Sending outcomes:",e);const t=(n=e,Hn((r=this._options.tunnel&&bn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:kt(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}};function oi(e){return"replay_event"===e?"replay":e||"error"}function li(e){return void 0===e.type}function ui(e){return"transaction"===e.type}function ci(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+di(e.attributes)}function hi(e){let t=0;return e.message&&(t+=2*e.message.length),t+di(e.attributes)}function di(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*pi(e[0]):tt(e)?t+=pi(e):t+=100}),t}function pi(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function fi(e,t){!0===t.debug&&(ye?De.enable():Se(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));on().update(t.initialScope);const n=new e(t);return function(e){on().setClient(e)}(n),n.init(),n}function mi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function gi(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const Ai=100;function yi(e,t){const n=un(),r=ln();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ai}=n.getOptions();if(a<=0)return;const s={timestamp:kt(),...e},o=i?Se(()=>i(s,t)):s;null!==o&&(n.emit&&n.emit("beforeAddBreadcrumb",o,t),r.addBreadcrumb(o,a))}const vi=new WeakMap,bi=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=ht(this);let r;try{vi.has(un())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){vi.set(e,!0)}}),xi=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],_i=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=Ei(e,r)},processEvent(n,r,i){if(!t){const n=i.getOptions();t=Ei(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Tt(n,t)}(e,t.ignoreTransactions))return ye&&De.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Bt(e)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return Wr(e).some(e=>Tt(e,t))}(e,t.ignoreErrors))return ye&&De.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Bt(e)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return ye&&De.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Bt(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ci(e);return!!n&&Tt(n,t)}(e,t.denyUrls))return ye&&De.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ci(e);return!n||Tt(n,t)}(e,t.allowUrls))return ye&&De.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0}return!1}(n,t)?null:n}}},wi=(e={})=>({..._i(e),name:"InboundFilters"});function Ei(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xi],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ci(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return ye&&De.error(`Cannot extract url for event ${Bt(e)}`),null}}function Si(e,t,n,r,i,a){if(!i.exception?.values||!a||!st(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ii(e,t,r,a.originalException,n,i.exception.values,s,0))}function Ii(e,t,n,r,i,a,s,o){if(a.length>=n+1)return a;let l=[...a];if(st(r[i],Error)){Ti(s,o,r);const a=e(t,r[i]),u=l.length;Di(a,i,u,o),l=Ii(e,t,n,r[i],i,[a,...l],a,u)}return Mi(r)&&r.errors.forEach((a,u)=>{if(st(a,Error)){Ti(s,o,r);const c=e(t,a),h=l.length;Di(c,`errors[${u}]`,h,o),l=Ii(e,t,n,a,i,[c,...l],c,h)}}),l}function Mi(e){return Array.isArray(e.errors)}function Ti(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Mi(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Di(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Pi(e){return function(e){return Ze(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Bi=new Set([]);const Ri=new Set;function Fi(){"console"in ve&&Ee.forEach(function(e){!Ri.has(e)&&e in ve.console&&(Ri.add(e),lt(ve.console,e,function(t){return Ce[e]=t,function(...t){const n=t[0],r=Ce[e],i=Bi.size&&"string"==typeof n&&Tt(n,Bi);i||je("console",{args:t,level:e}),(!i||ye&&De.isEnabled())&&r?.apply(ve.console,t)}}))})}function Li(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ki=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Ni(t),r=Ni(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return ye&&De.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Oi(e,t){let n=ze(e),r=ze(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function zi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function Ni(e){return e.exception?.values?.[0]}const Ui=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=on().getScopeData(),n=ln().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:i}=Tn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!i?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function Vi(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Gi=ve;function ji(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Gi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(ji(Gi.fetch))return!0;let e=!1;const t=Gi.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ji(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ye&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Hi(e,t){const n="fetch",r=Ve(n,e);return Ge(n,()=>function(e,t=!1){if(t&&!qi())return;lt(ve,"fetch",function(e){return function(...t){const n=new Error,{method:r,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Wi(t),method:Qi(n,"method")?String(n.method).toUpperCase():ot(t)&&Qi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Wi(t),method:Qi(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:r,url:i},startTimestamp:1e3*zt(),virtualError:n,headers:Ki(t)};return je("fetch",{...a}),e.apply(ve,t).then(async e=>(je("fetch",{...a,endTimestamp:1e3*zt(),response:e}),e),e=>{je("fetch",{...a,endTimestamp:1e3*zt(),error:e}),Ze(e)&&void 0===e.stack&&(e.stack=n.stack,ut(e,"framesToPop",1));const t=un(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:ut(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}(0,t)),r}function Qi(e,t){return rt(e)&&!!e[t]}function Wi(e){return"string"==typeof e?e:e?Qi(e,"url")?e.url:e.toString?e.toString():"":""}function Ki(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(ot(t))return new Headers(t.headers)}catch{}}const Zi=ve;function Yi(){try{return Zi.document.location.href}catch{return""}}const Xi=ve;let Ji=0;function $i(){return Ji>0}function ea(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(ht(e))return e}catch{return e}const n=function(...n){ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)+1;try{const r=n.map(e=>ea(e,t));return e.apply(this,r)}catch(r){throw Ji++,setTimeout(()=>{Ji--}),function(...e){const t=rn(xe());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(e=>{e.addEventProcessor(e=>(t.mechanism&&(Rt(e,void 0),Ft(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),br(r)}),r}finally{ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ct(n,e),ut(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function ta(){const e=Yi(),{referrer:t}=Xi.document||{},{userAgent:n}=Xi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function na(e,t){const n=aa(e,t),r={type:la(t),value:ua(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ra(e,t,n,r){const i=un(),a=i?.getOptions().normalizeDepth,s=(o=t,Object.values(o).find(e=>e instanceof Error));var o;const l={__serialized__:wt(t,a)};if(s)return{exception:{values:[na(e,s)]},extra:l};const u={exception:{values:[{type:it(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:da(t,{isUnhandledRejection:r})}]},extra:l};if(n){const t=aa(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function ia(e,t){return{exception:{values:[na(e,t)]}}}function aa(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&sa.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch{}return[]}const sa=/Minified React error #\d+;/i;function oa(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function la(e){const t=e?.name;if(!t&&oa(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function ua(e){const t=e?.message;return oa(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Pi(t.error):Pi(e):"No error message"}function ca(e,t,n,r,i){let a;if(Xe(t)&&t.error){return ia(e,t.error)}if(Je(t)||Ye(t,"DOMException")){const i=t;if("stack"in t){a=ia(e,t);const i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){const t=aa(e,n);t.length&&(i.stacktrace={frames:t},Ft(a,{synthetic:!0}))}}else{const t=i.name||(Je(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;a=ha(e,s,n,r),Rt(a,s)}return"code"in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}if(Ze(t))return ia(e,t);if(nt(t)||it(t)){return a=ra(e,t,n,i),Ft(a,{synthetic:!0}),a}return a=ha(e,t,n,r),Rt(a,`${t}`),Ft(a,{synthetic:!0}),a}function ha(e,t,n,r){const i={};if(r&&n){const r=aa(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ft(i,{synthetic:!0})}if(et(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function da(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(dt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";if(Xe(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(it(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}let pa=class extends si{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Xi.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:be})),i.version=be)}(t,"browser",["browser"],Xi.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:i}=this._options;Xi.document&&Xi.document.addEventListener("visibilitychange",()=>{"hidden"===Xi.document.visibilityState&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",gi)}eventFromException(e,t){return function(e,t,n,r){const i=ca(e,t,n?.syntheticException||void 0,r);return Ft(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),lr(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const a=ha(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),lr(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};const fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ma=ve;function ga(e,t,n){ma.document&&ma.addEventListener(e,t,n)}function Aa(e,t,n){ma.document&&ma.removeEventListener(e,t,n)}const ya={};try{"undefined"!=typeof Node&&(ya.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(ya.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,ya.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,ya.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,ya.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(ya.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function va(e,t,n){const r=ya[t];if(r)try{return r.call(e,n)}catch{}const i=e[t];return"function"==typeof i?i.call(e,n):i}function ba(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let a=0,s=0;const o=" > ",l=o.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(u=xa(n,c),!("html"===u||a>1&&s+i.length*l+u.length>=h));)i.push(u),s+=u.length,n=va(n,"parentNode");return i.reverse().join(o)}catch{return"<unknown>"}}function xa(e,t){const n=[],r=va(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=va(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const i=t?.length?t.filter(t=>va(e,"getAttribute",t)).map(t=>[t,va(e,"getAttribute",t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=va(e,"id");t&&n.push(`#${t}`);const r=va(e,"className");if(r&&$e(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const a of["aria-label","type","name","title","alt"]){const t=va(e,"getAttribute",a);t&&n.push(`[${a}="${t}"]`)}return n.join("")}let _a,wa,Ea,Ca;function Sa(){if(!ma.document)return;const e=je.bind(null,"dom"),t=Ia(e,!0);ma.document.addEventListener("click",t,!1),ma.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=ma,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(lt(r,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){const r=Ia(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),lt(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ia(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ut(n,"_sentryCaptured",!0),r&&!r._sentryId&&ut(r,"_sentryId",Dt());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==wa)return!1;try{if(!e.target||e.target._sentryId!==Ea)return!1}catch{}return!0}(n)){e({event:n,name:i,global:t}),wa=n.type,Ea=r?r._sentryId:void 0}clearTimeout(_a),_a=ma.setTimeout(()=>{Ea=void 0,wa=void 0},1e3)}}function Ma(e){const t="history";Ve(t,e),Ge(t,Ta)}function Ta(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Ca,i=function(e){try{return new URL(e,ma.location.origin).toString()}catch{return e}}(String(n));if(Ca=i,r===i)return e.apply(this,t);je("history",{from:r,to:i})}return e.apply(this,t)}}ma.addEventListener("popstate",()=>{const e=ma.location.href,t=Ca;if(Ca=e,t===e)return;je("history",{from:t,to:e})}),"history"in Gi&&Gi.history&&(lt(ma.history,"pushState",e),lt(ma.history,"replaceState",e))}const Da={};const Pa="__sentry_xhr_v3__";function Ba(){if(!ma.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*zt(),a=$e(n[0])?n[0].toUpperCase():void 0,s=function(e){if($e(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!a||!s)return e.apply(t,n);t[Pa]={method:a,url:s,request_headers:{}},"POST"===a&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const o=()=>{const e=t[Pa];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}je("xhr",{endTimestamp:1e3*zt(),startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",o)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(o(),e.apply(t,n))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,a=t[Pa];return a&&$e(r)&&$e(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Pa];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return je("xhr",{startTimestamp:1e3*zt(),xhr:t}),e.apply(t,n)}})}function Ra(e,t=function(e){const t=Da[e];if(t)return t;let n=ma[e];if(ji(n))return Da[e]=n.bind(ma);const r=ma.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(qke){fa&&De.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,qke)}return n?Da[e]=n.bind(ma):n}("fetch")){let n=0,r=0;return Qr(e,async function(i){const a=i.body.length;n+=a,r++;const s={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(qke){throw function(e){Da[e]=void 0}("fetch"),qke}finally{n-=a,r--}},qr(e.bufferSize||40))}const Fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function La(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?Pe:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ka=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Oa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,za=/\((\S*)(?::(\d+))(?::(\d+))\)/,Na=/at (.+?) ?\(data:(.+?),/,Ua=[30,e=>{const t=e.match(Na);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ka.exec(e);if(n){const[,e,t,r]=n;return La(e,Pe,+t,+r)}const r=Oa.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=za.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Ha(r[1]||Pe,r[2]);return La(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Va=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ga=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ja=[50,e=>{const t=Va.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ga.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Pe;return[n,e]=Ha(n,e),La(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],qa=Fe(...[Ua,ja]),Ha=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Pe,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Qa=1024,Wa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=Ve(t,e);Ge(t,Fi)}(function(e){return function(t){if(un()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Li(t.level),message:It(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${It(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}yi(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(un()!==e)return;let r,i,a="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>Qa&&(Fa&&De.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=Qa),"string"==typeof a&&(a=[a]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ba(t,{keyAttrs:a,maxStringLength:s}),i=function(e,t=5){if(!Zi.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const o={category:`ui.${n.name}`,message:r};i&&(o.data={"ui.component_name":i}),yi(o,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Ve("dom",n),Ge("dom",Sa)),t.xhr&&function(e){Ve("xhr",e),Ge("xhr",Ba)}(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Pa];if(!n||!r||!i)return;const{method:a,url:s,status_code:o,body:l}=i,u={method:a,url:s,status_code:o},c={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},h={category:"xhr",data:u,type:"http",level:Vi(o)};e.emit("beforeOutgoingRequestBreadcrumb",h,c),yi(h,c)}}(e)),t.fetch&&Hi(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),yi(a,i)}else{const i=t.response,a={...t.fetchData,status_code:i?.status},s={input:t.args,response:i,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:a,type:"http",level:Vi(a.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",o,s),yi(o,s)}}}(e)),t.history&&Ma(function(e){return function(t){if(un()!==e)return;let n=t.from,r=t.to;const i=mi(Xi.location.href);let a=n?mi(n):void 0;const s=mi(r);a?.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),yi({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){un()===e&&yi({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Bt(t)},{event:t})}}(e))}}};const Ka="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Za=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&lt(Xi,"setTimeout",Ya),t.setInterval&&lt(Xi,"setInterval",Ya),t.requestAnimationFrame&&lt(Xi,"requestAnimationFrame",Xa),t.XMLHttpRequest&&"XMLHttpRequest"in Xi&&lt(XMLHttpRequest.prototype,"send",Ja);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Ka).forEach(e=>function(e,t){const n=Xi,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;lt(r,"addEventListener",function(n){return function(r,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=ea(i.handleEvent,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,i),n.apply(this,[r,ea(i,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),lt(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Ya(e){return function(...t){const n=t[0];return t[0]=ea(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Oe(e)}`}}),e.apply(this,t)}}function Xa(e){return function(t){return e.apply(this,[ea(t,{mechanism:{data:{handler:Oe(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ja(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&lt(n,e,function(t){const n={mechanism:{data:{handler:Oe(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=ht(t);return r&&(n.mechanism.data.handler=Oe(r)),ea(t,n)})}),e.apply(this,t)}}const $a=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===Xi.document)return void(Fa&&De.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Er({ignoreDuration:!0});let e=!1;(e=>{const t=ma.requestIdleCallback||ma.setTimeout;"hidden"===ma.document?.visibilityState?e():(ga("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),ga("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Aa("visibilitychange",e,{capture:!0}),Aa("pagehide",e,{capture:!0})}))})(()=>{e||(Ir(),e=!0)});const n=ln();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Ir())}),"route"===t&&Ma(({from:t,to:n})=>{t!==n&&(Er({ignoreDuration:!0}),Ir(),e=!0)})}}},es=()=>({name:"CultureContext",preprocessEvent(e){const t=ts();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=ts();t&&or(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function ts(){try{const e=Xi.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ns=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";Ve(t,e),Ge(t,He)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const{msg:i,url:a,line:s,column:o,error:l}=t,u=function(e,t,n,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[];0===l.length&&l.push({colno:r,lineno:n,filename:as(t)??Yi(),function:Pe,in_app:!0});return e}(ca(n,l||i,void 0,r,!1),a,s,o);u.level="error",_r(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),rs("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Ve(t,e),Ge(t,We)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const i=function(e){if(tt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),a=tt(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ca(n,i,void 0,r,!0);a.level="error",_r(a,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),rs("onunhandledrejection"))}}};function rs(e){Fa&&De.log(`Global Handler attached: ${e}`)}function is(){const e=un();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function as(e){if($e(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),a=e.indexOf(",");let s="";if(t&&-1!==a){const t=e.slice(a+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}const ss=()=>({name:"HttpContext",preprocessEvent(e){if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const t=ta(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[hn];if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const n=ta();or(e,{[ar]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),os=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){Si(na,i.getOptions().stackParser,n,t,e,r)}}},ls=/^HTML(\w*)Element$/;function us(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(ls.test(t))return`[HTMLElement: ${ba(e)}]`}}function cs(){return!!function(){if(void 0===Xi.window)return!1;const e=Xi;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=Yi();return!(Xi===Xi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(Fa&&Se(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function hs(e={}){const t=!e.skipBrowserExtensionCheck&&cs();let n=null==e.defaultIntegrations?[wi(),bi(),Ui(),Za(),Wa(),ns(),os(),ki(),ss(),es(),$a()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(i=e.stackParser||qa,Array.isArray(i)?Fe(...i):i),integrations:Pr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ra};var i;return bt=us,fi(pa,r)}class ds{constructor(){this.initialized=!1}static initialize(e){const t=ds.getInstance();if(t.initialized)return void wr("component",e);hs({dsn:"https://98a864152051bb3d42f8e955f2ab3078@sentry.mapvx.app/6",environment:"production",release:"0.9.0-dev.4"}),wr("component",e),t.initialized=!0}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}error(e,t){br(e,t?{extra:t}:void 0)}info(e,t){xr(e,{level:"info",extra:t})}warning(e,t){xr(e,{level:"warning",extra:t})}critical(e,t){xr(e,{level:"fatal",extra:t})}}
45
+ */const me=e=>e??W;class ge{constructor(){this.MEASUREMENT_ID="G-6XL8YD35QR",this.isInitialized=!1,this.sessionId=""}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}generateSessionId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}initialize(e){if(this.isInitialized)return;ge.component=e,this.sessionId=this.generateSessionId();const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${this.MEASUREMENT_ID}`,document.head.appendChild(t),window.dataLayer=window.dataLayer||[];window.gtag=window.gtag||((...e)=>{window.dataLayer.push(e)}),window.gtag("js",new Date),window.gtag("config",this.MEASUREMENT_ID,{send_page_view:!0,groups:"mapvx"}),this.isInitialized=!0}resetSessionId(){this.sessionId=this.generateSessionId()}trackPageView(e){this.isInitialized&&window.gtag("event","page_view",{page_title:e,page_location:window.location.href,page_path:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackEvent(e,t){this.isInitialized&&window.gtag("event",e,{...t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackUserTiming(e,t,n){this.isInitialized&&window.gtag("event","timing_complete",{name:t,value:n,event_category:e,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}trackException(e,t=!1){this.isInitialized&&window.gtag("event","exception",{description:e,fatal:t,component:ge.component,session_id:this.sessionId,send_to:"mapvx"})}}const Ae="https://tiles.mapvx.com/tiles";const ye="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ve=globalThis,be="10.68.0";function xe(){return _e(ve),ve}function _e(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||be,t[be]=t[be]||{}}function we(e,t,n=ve){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[be]=r[be]||{};return i[e]||(i[e]=t())}const Ee=["debug","info","warn","error","log","assert","trace"],Ce={};function Se(e){if(!("console"in ve))return e();const t=ve.console,n={},r=Object.keys(Ce);r.forEach(e=>{const r=Ce[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Ie(){return Te().enabled}function Me(e,...t){ye&&Ie()&&Se(()=>{ve.console[e](`Sentry Logger [${e}]:`,...t)})}function Te(){return ye?we("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const De={enable:function(){Te().enabled=!0},disable:function(){Te().enabled=!1},isEnabled:Ie,log:function(...e){Me("log",...e)},warn:function(...e){Me("warn",...e)},error:function(...e){Me("error",...e)}},Pe="?",Be=/\(error: (.*)\)/,Re=/captureMessage|captureException/;function Fe(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const i=[],a=e.split("\n");for(let s=n;s<a.length;s++){let e=a[s];e.length>1024&&(e=e.slice(0,1024));const n=Be.test(e)?e.replace(Be,"$1"):e;if(!n.includes("Error: ")){for(const e of t){const t=e(n);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(Le(t).function||"")&&t.pop();t.reverse(),Re.test(Le(t).function||"")&&(t.pop(),Re.test(Le(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||Le(t).filename,function:e.function||Pe}))}(i.slice(r))}}function Le(e){return e[e.length-1]||{}}const ke="<anonymous>";function Oe(e){try{return e&&"function"==typeof e&&e.name||ke}catch{return ke}}function ze(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}const Ne={},Ue={};function Ve(e,t){return Ne[e]=Ne[e]||[],Ne[e].push(t),()=>{const n=Ne[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ge(e,t){if(!Ue[e]){Ue[e]=!0;try{t()}catch(qke){ye&&De.error(`Error while instrumenting ${e}`,qke)}}}function je(e,t){const n=e&&Ne[e];if(n)for(const r of n)try{r(t)}catch(qke){ye&&De.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Oe(r)}\nError:`,qke)}}let qe=null;function He(){qe=ve.onerror,ve.onerror=function(e,t,n,r,i){return je("error",{column:r,error:i,line:n,msg:e,url:t}),!!qe&&qe.apply(this,arguments)},ve.onerror.__SENTRY_INSTRUMENTED__=!0}let Qe=null;function We(){Qe=ve.onunhandledrejection,ve.onunhandledrejection=function(e){return je("unhandledrejection",e),!Qe||Qe.apply(this,arguments)},ve.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ke=Object.prototype.toString;function Ze(e){switch(Ke.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return st(e,Error)}}function Ye(e,t){return Ke.call(e)===`[object ${t}]`}function Xe(e){return Ye(e,"ErrorEvent")}function Je(e){return Ye(e,"DOMError")}function $e(e){return Ye(e,"String")}function et(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function tt(e){return null===e||et(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return Ye(e,"Object")}function rt(e){return"object"==typeof e&&null!==e}function it(e){return"undefined"!=typeof Event&&st(e,Event)}function at(e){return Boolean(e?.then&&"function"==typeof e.then)}function st(e,t){try{return e instanceof t}catch{return!1}}function ot(e){return"undefined"!=typeof Request&&st(e,Request)}function lt(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const i=n(r);"function"==typeof i&&ct(i,r);try{e[t]=i}catch{ye&&De.log(`Failed to replace method "${t}" in object`,e)}}function ut(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ye&&De.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ct(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ut(e,"__sentry_original__",t)}catch{}}function ht(e){return e.__sentry_original__}function dt(e){if(Ze(e))return{message:e.message,name:e.name,stack:e.stack,...pt(e)};if(it(e)){const{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...pt(e)}}return e}function pt(e){return rt(e)?Object.fromEntries(Object.entries(e)):{}}let ft;function mt(e){if(void 0!==ft)return ft?ft(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=ve;return t in n&&"function"==typeof n[t]?(ft=n[t],ft(e)):(ft=null,e())}function gt(){return mt(()=>Math.random())}function At(){return mt(()=>Date.now())}const yt=Symbol.for("sentry.skipNormalization"),vt=Symbol.for("sentry.overrideNormalizationDepth");let bt,xt;function _t(e,t=100,n=1/0){try{return Et("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function wt(e,t=3,n=102400){const r=_t(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?wt(e,t-1,n):r;var i}function Et(e,t,n=1/0,r=1/0,i=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[a,s]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const o=Ct(e,t);if(!o.startsWith("[object "))return o;if(function(e){return Boolean(e[yt])}(t))return t;const l=function(e){const t=e[vt];return"number"==typeof t?t:void 0}(t),u=void 0!==l?l:n;if(0===u)return o.replace("object ","");if(a(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return Et("",c.toJSON(),u-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const p=dt(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=r){h[f]="[MaxProperties ~]";break}const e=p[f];h[f]=Et(f,e,u-1,r,i),d++}return s(t),h}function Ct(e,t){try{if(bt){const e=bt(t);if(e)return e}if("undefined"!=typeof global&&t===global)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Oe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(n){return`**non-serializable** (${n})`}}function St(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function It(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];tt(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(Ct(0,t))}return n.join(t)}function Mt(e,t,n=!1){return!!$e(e)&&(Ye(t,"RegExp")?t.test(e):$e(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function Tt(e,t=[],n=!1){for(const r of t)if(Mt(e,r,n))return!0;return!1}function Dt(e=function(){const e=ve;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return mt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return xt||(xt="10000000100040008000100000000000"),xt.replace(/[018]/g,e=>(e^(16*gt()&15)>>e/4).toString(16))}function Pt(e){return e.exception?.values?.[0]}function Bt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Pt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Rt(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Ft(e,t){const n=Pt(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function Lt(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{ut(e,"__sentry_captured__",!0)}catch{}return!1}function kt(){return At()/1e3}let Ot;function zt(){return(Ot??(Ot=function(){const{performance:e}=ve;if(!e?.now||!e.timeOrigin)return kt;const t=e.timeOrigin;return()=>(t+mt(()=>e.now()))/1e3}()))()}function Nt(e){const t=zt(),n={sid:Dt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&Ut(n,e),n}function Ut(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||zt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Dt()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Vt(r[i],t[i],n-1));return r}function Gt(){return Dt()}function jt(){return Dt().substring(16)}function qt(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const Ht="_sentrySpan";function Qt(e,t){t?ut(e,Ht,function(e){try{const t=ve.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[Ht]}function Wt(e){return qt(e[Ht])}let Kt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gt(),sampleRand:gt()}}clone(){const t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Qt(t,Wt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ut(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,r=n instanceof e?n.getScopeData():nt(n)?t:void 0,{tags:i,attributes:a,extra:s,user:o,contexts:l,level:u,fingerprint:c=[],propagationContext:h,conversationId:d}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...a},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},o&&Object.keys(o).length&&(this._user=o),u&&(this._level=u),c.length&&(this._fingerprint=c),h&&(this._propagationContext=h),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Qt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gt(),sampleRand:gt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:kt(),...e,message:e.message?St(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Wt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Vt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||Dt();if(!this._client)return ye&&De.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||Dt();if(!this._client)return ye&&De.warn("No client configured on scope - will not capture message!"),r;const i=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||Dt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ye&&De.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};const Zt=e=>e instanceof Promise&&!e[Yt],Yt=Symbol("chained PromiseLike"),Xt=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];"function"==typeof i?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Yt]:!0}),t};let Jt=class{constructor(e,t){let n,r;n=e||new Kt,r=t||new Kt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(qke){throw this._popScope(),qke}return at(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Zt(r)&&Zt(e)?r:Xt(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function $t(){const e=_e(xe());return e.stack=e.stack||new Jt(we("defaultCurrentScope",()=>new Kt),we("defaultIsolationScope",()=>new Kt))}function en(e){return $t().withScope(e)}function tn(e,t){const n=$t();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function nn(e){return $t().withScope(()=>e($t().getIsolationScope()))}function rn(e){const t=_e(e);return t.acs?t.acs:{withIsolationScope:nn,withScope:en,withSetScope:tn,withSetIsolationScope:(e,t)=>nn(t),getCurrentScope:()=>$t().getScope(),getIsolationScope:()=>$t().getIsolationScope()}}function an(e,t){const{value:n,unit:r}="object"==typeof(i=e)&&null!=i&&!Array.isArray(i)&&Object.keys(i).includes("value")?e:{value:e,unit:void 0};var i;const a=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),s=r&&"string"==typeof r?{unit:r}:{};if(a)return{...a,...s};if(!t||"skip-undefined"===t&&void 0===n)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...s}}function sn(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const e=an(i,t);e&&(n[r]=e)}return n}function on(){return rn(xe()).getCurrentScope()}function ln(){return rn(xe()).getIsolationScope()}function un(){return on().getClient()}function cn(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,a={trace_id:n,span_id:i||jt()};return r&&(a.parent_span_id=r),a}const hn="sentry.op",dn="sentry.profile_id",pn="sentry.exclusive_time";function fn(e){const t=e;return{scope:t._sentryScope,isolationScope:qt(t._sentryIsolationScope)}}const mn="sentry-";function gn(e){const t=function(e){if(!e||!$e(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=An(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return An(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(mn)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function An(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const yn=/^o(\d+)\./,vn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function bn(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r?`${r}/`:r}${s}`}function xn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function _n(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(yn);return t?.[1]}(n)),r}function wn(e){const t="string"==typeof e?function(e){const t=vn.exec(e);if(!t)return void Se(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",a="",s="",o=""]=t.slice(1);let l="",u=o;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return xn({host:a,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}(e):xn(e);if(t&&function(e){if(!ye)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(De.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(De.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(De.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(De.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}let En=!1;function Cn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Tn(e).parent_span_id,a=fn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||jt():t,trace_id:n}}function Sn(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:1===n,attributes:i,...r})):void 0}function In(e){return"number"==typeof e?Mn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Mn(e.getTime()):zt()}function Mn(e){return e>9999999999?e/1e3:e}function Tn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:a,endTime:s,status:o,links:l}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Dn(e),start_timestamp:In(i),timestamp:In(s)||void 0,status:Pn(o),op:r[hn],origin:r["sentry.origin"],links:Sn(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dn(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Pn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const Bn=function(e){return e._sentryRootSpan||e};function Rn(){En||(Se(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),En=!0)}function Fn(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||un()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function Ln(e){De.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function kn(e,t){if(!t?.length)return!1;for(const n of t){if(Nn(n)){if(e.description&&Mt(e.description,n))return ye&&Ln(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const r=!n.name||e.description&&Mt(e.description,n.name),i=!n.op||e.op&&Mt(e.op,n.op),a=!n.attributes||Object.entries(n.attributes).every(([t,n])=>On(e.attributes?.[t],n));if(r&&i&&a)return ye&&Ln(e),!0}return!1}function On(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?Mt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function zn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function Nn(e){return"string"==typeof e||e instanceof RegExp}const Un=Symbol.for("sentry.nonRecordingSpan");const Vn="production";function Gn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Vn,release:n.release,public_key:r,trace_id:e,org_id:_n(t)};return t.emit("createDsc",i),i}function jn(e,t){const n=t.getPropagationContext();return n.dsc||Gn(n.traceId,e)}function qn(e){const t=un();if(!t)return{};const n=Bn(e),r=Tn(n),i=r.data,a=n.spanContext().traceState,s=a?.get("sentry.sample_rate")??i["sentry.sample_rate"]??i["sentry.previous_trace_sample_rate"];function o(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const l=n._frozenDsc;if(l)return o(l);const u=function(e){return!!e&&!0===e[Un]}(n),c=u&&"ignored"===n.dropReason;if(u&&(!Fn(t.getOptions())||c)){const e=fn(n).scope;if(e){const n={...jn(t,e)};return c&&(n.sampled="false"),o(n)}}const h=a?.get("sentry.dsc"),d=h&&gn(h);if(d)return o(d);const p=Gn(e.spanContext().traceId,t),f=i["sentry.source"]??i["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),Fn()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=a?.get("sentry.sample_rand")??fn(n).scope?.getPropagationContext().sampleRand.toString()),o(p),t.emit("createDsc",p,n),p}function Hn(e,t=[]){return[e,t]}function Qn(e,t){const[n,r]=e;return[n,[...r,t]]}function Wn(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Kn(e){const t=_e(ve);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Zn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[Kn(r),e]:r.push("string"==typeof e?Kn(e):e)}for(const a of n){const[e,t]=a;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(_t(t))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(r)}function Yn(e){const t="string"==typeof e.data?Kn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Xn={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Jn(e){return function(e){return e in Xn}(e)?Xn[e]:e}function $n(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function er(e,t,n,r){const i=$n(n),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(At()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bn(r)},...i&&{trace:i}}}(e,i,r,t);delete e.sdkProcessingMetadata;return Hn(s,[[{type:a},e]])}function tr(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(i).length&&(e.user={...i,...e.user});Object.keys(a).length&&(e.contexts={...a,...e.contexts});s&&(e.level=s);o&&"transaction"!==e.type&&(e.transaction=o)}(e,t),r&&function(e,t){e.contexts={trace:Cn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:qn(t),...e.sdkProcessingMetadata};const n=Bn(t),r=Tn(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function nr(e,t){const{extra:n,tags:r,attributes:i,user:a,contexts:s,level:o,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:p,transactionName:f,span:m}=t;rr(e,"extra",n),rr(e,"tags",r),rr(e,"attributes",i),rr(e,"user",a),rr(e,"contexts",s),e.sdkProcessingMetadata=Vt(e.sdkProcessingMetadata,l,2),o&&(e.level=o),f&&(e.transactionName=f),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function rr(e,t,n){e[t]=Vt(e[t],n,1)}function ir(e,t){const n=we("globalScope",()=>new Kt).getScopeData();return e&&nr(n,e.getScopeData()),t&&nr(n,t.getScopeData()),n}const ar="url.full",sr="user_agent.original";function or(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function lr(e){return new fr(t=>{t(e)})}function ur(e){return new fr((t,n)=>{n(e)})}let cr,hr,dr,pr,fr=class e{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(qke){r(qke)}else e(n)},t=>{if(n)try{e(n(t))}catch(qke){r(qke)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(at(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(qke){r(qke)}}};function mr(e,t,n,r=0){try{const i=gr(t,n,e,r);return at(i)?i:lr(i)}catch(T5){return ur(T5)}}function gr(e,t,n,r){const i=n[r];if(!e||!i)return e;const a=i({...e},t);return ye&&null===a&&De.log(`Event processor "${i.id||"?"}" dropped event`),at(a)?a.then(e=>gr(e,t,n,r+1)):gr(a,t,n,r+1)}function Ar(e,t,n,r,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Dt(),timestamp:t.timestamp||kt()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||Vn,!e.release&&r&&(e.release=r);!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&a&&(s.url=St(s.url,a));a&&e.exception?.values?.forEach(e=>{e.value&&(e.value=St(e.value,a))})}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,u),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ve._sentryDebugIds,n=ve._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(pr&&r.length===hr&&i.length===dr)return pr;hr=r.length,dr=i.length,pr={},cr||(cr={});const a=(t,n)=>{for(const r of t){const t=n[r],i=cr?.[r];if(i&&pr&&t)pr[i[0]]=t,cr&&(cr[r]=[i[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const i=n[e],a=i?.filename;if(a&&pr&&cr){pr[a]=t,cr[r]=[a,t];break}}}}};return t&&a(r,t),n&&a(i,n),pr}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(l,e.stackParser);const c=function(e,t){if(!t)return e;const n=e?e.clone():new Kt;return n.update(t),n}(r,n.captureContext);n.mechanism&&Ft(l,n.mechanism);const h=i?i.getEventProcessors():[],d=ir(a,c),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),tr(l,d);const f=[...h,...d.eventProcessors];return(n.data&&!0===n.data.__sentry__?lr(l):mr(f,l,n)).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}}))},...e.user&&{user:_t(e.user,t,n)},...e.contexts&&{contexts:_t(e.contexts,t,n)},...e.extra&&{extra:_t(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_t(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:_t(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=_t(e.contexts.flags,3,n));return r}(e,s,o):e))}function yr(e){if(e)return function(e){return e instanceof Kt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>vr.includes(e))}(e)?{captureContext:e}:e}const vr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function br(e,t){return on().captureException(e,yr(t))}function xr(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return on().captureMessage(e,n,r)}function _r(e,t){return on().captureEvent(e,t)}function wr(e,t){ln().setTag(e,t)}function Er(e){const t=ln(),{user:n}=ir(t,on()),{userAgent:r}=ve.navigator||{},i=Nt({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return"ok"===a?.status&&Ut(a,{status:"exited"}),Cr(),t.setSession(i),i}function Cr(){const e=ln(),t=on().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Ut(e,t)}(t),Sr(),e.setSession()}function Sr(){const e=ln(),t=un(),n=e.getSession();n&&t&&t.captureSession(n)}function Ir(e=!1){e?Cr():Sr()}function Mr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Tr(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Dr=[];function Pr(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Br(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Rr(e,t,n){if(n[t.name])ye&&De.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Dr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Dr.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),ye&&De.log(`Integration installed: ${t.name}`)}}function Fr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Lr(){return"undefined"!=typeof window&&(!Fr()||function(){const e=ve.process;return"renderer"===e?.type}())}function kr(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Or(e,t){const n=t??function(e){return zr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[kr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);zr().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function zr(){return we("clientToLogBufferMap",()=>new WeakMap)}function Nr(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ur(e,t){const n=t??function(e){return Vr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),i=function(e,t,n,r,i){const a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),Hn(a,[Nr(e,i)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Vr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function Vr(){return we("clientToMetricBufferMap",()=>new WeakMap)}function Gr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:sn(n.attributes),links:n.links?.map(e=>({...e,attributes:sn(e.attributes)}))};var n}const jr=Symbol.for("SentryBufferFullError");function qr(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return ur(jr);const i=r();return t.add(i),i.then(()=>n(i),()=>n(i)),i},drain:function(e){if(!t.size)return lr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Mr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Hr(e,{statusCode:t,headers:n},r=At()){const i={...e},a=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(a)for(const o of a.trim().split(",")){const[e,t,,,n]=o.split(":",5),a=parseInt(e,10),s=1e3*(isNaN(a)?60:a);if(t)for(const o of t.split(";"))"metric_bucket"===o&&n&&!n.split(";").includes("custom")||(i[o]=r+s);else i.all=r+s}else s?i.all=r+function(e,t=At()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Qr(e,t,n=qr(e.bufferSize||64)){let r={};return{send:function(i){const a=[];if(Wn(i,(t,n)=>{const i=Jn(n);!function(e,t,n=At()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?a.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===a.length)return Promise.resolve({});const s=Hn(i[0],a),o=t=>{!function(e,t){return Wn(e,(e,n)=>t.includes(n))}(s,["client_report"])?Wn(s,(n,r)=>{e.recordDroppedEvent(t,Jn(r))}):ye&&De.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Zn(s)}).then(e=>413===e.statusCode?(ye&&De.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),o("send_error"),e):(ye&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&De.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Hr(r,e),e),e=>{throw o("network_error"),ye&&De.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===jr)return ye&&De.error("Skipped sending event because buffer is full."),o("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function Wr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const Kr=["forwarded","-ip","remote-","via","-user"];const Zr={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Yr(e){const t=null!=e.dataCollection?Zr:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Kr},httpHeaders:{request:{deny:Kr},response:{deny:Kr}},httpBodies:[],urlQueryParams:{deny:Kr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const Xr="Not capturing exception because it's already been captured.",Jr="Discarded session because of missing or non-string release",$r=Symbol.for("SentryInternalError"),ei=Symbol.for("SentryDoNotSendEventError");function ti(e){return{message:e,[$r]:!0}}function ni(e){return{message:e,[ei]:!0}}function ri(e){return rt(e)&&$r in e}function ii(e){return rt(e)&&ei in e}function ai(e,t,n,r,i){let a,s=0,o=!1;e.on(n,()=>{s=0,clearTimeout(a),o=!1}),e.on(t,t=>{if(s+=r(t),s>=8e5)i(e);else if(!o){const t=e.getOptions()._flushInterval??5e3;t>0&&(o=!0,a=Mr(setTimeout(()=>{i(e)},t)))}}),e.on("flush",()=>{i(e)})}let si=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=qr(e.transportOptions?.bufferSize??64),this._dataCollection=Yr(e),e.dsn?this._dsn=wn(e.dsn):ye&&De.warn("No DSN provided, client will not send events."),this._dsn){const t=Tr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&ai(this,"afterCaptureLog","flushLogs",hi,Or);(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ai(this,"afterCaptureMetric","flushMetrics",ci,Ur)}captureException(e,t,n){const r=Dt();if(Lt(e))return ye&&De.log(Xr),r;const i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),"error"),i.event_id}captureMessage(e,t,n,r){const i={event_id:Dt(),...n},a=et(e)?e:String(e),s=tt(e),o=s?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>o.then(e=>this._captureEvent(e,i,r)),s?"unknown":"error"),i.event_id}captureEvent(e,t,n){const r=Dt();if(t?.originalException&&Lt(t.originalException))return ye&&De.log(Xr),r;const i={event_id:r,...t},a=e.sdkProcessingMetadata||{},s=a.capturedSpanScope,o=a.capturedSpanIsolationScope,l=oi(e.type);return this._process(()=>this._captureEvent(e,i,s||n,o),l),i.event_id}captureSession(e){this.sendSession(e),Ut(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Rr(this,e,this._integrations),t||Br(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const a of e.spans)a.op?.startsWith("gen_ai.")?n.push(Gr(a)):r.push(a);if(0===n.length)return;e.spans=r;const i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Lr()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}(e,this);let r=er(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])r=Qn(r,Yn(i));n&&(r=Qn(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=Vn}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(ye&&De.warn(Jr));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(ye&&De.warn(Jr));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const i=$n(n);return Hn({sent_at:new Date(At()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;ye&&De.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return ye&&De.error("Error while sending envelope:",t),{}}return ye&&De.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Rr(e,t,n)}),n}(this,e),Br(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception?.values;if(i){r=!0,n=!1;for(const e of i)if(!1===e.mechanism?.handled){n=!0;break}}const a="ok"===e.status;(a&&0===e.errors||a&&n)&&(Ut(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ar(i,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...cn(n)},...e.contexts};const r=jn(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=on(),r=ln()){return ye&&li(e)&&De.log(`Captured error event \`${Wr(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{ye&&(ii(e)?De.log(e.message):ri(e)?De.warn(e.message):De.warn(e))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:a}=i,s=ui(e),o=li(e),l=`before send for type \`${e.type||"error"}\``,u=void 0===a?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(a);if(o&&"number"==typeof u&&gt()>u)return this.recordDroppedEvent("sample_rate","error"),ur(ni(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));const c=oi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",c),ni("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:a,ignoreSpans:s}=t,o=(l=t.beforeSendSpan,!(l&&"function"==typeof l&&"_streamed"in l&&l._streamed)&&t.beforeSendSpan);var l;let u=n;if(li(u)&&i)return i(u,r);if(ui(u)){if(o||s){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:s,op:o}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:a,profile_id:s?.[dn],exclusive_time:s?.[pn],measurements:e.measurements,is_segment:!0}}(u);if(s?.length&&kn({description:t.description,op:t.op,attributes:t.data},s))return null;if(o){const e=o(t);e?u=Vt(n,{type:"transaction",timestamp:(c=e).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[dn]:c.profile_id},...c.exclusive_time&&{[pn]:c.exclusive_time}}}},measurements:c.measurements}):Rn()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(s?.length&&kn({description:e.description,op:e.op,attributes:e.data},s))zn(n,e);else if(o){const n=o(e);n?t.push(n):(Rn(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(a){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(u,r)}}var c;return u}(this,i,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(at(e))return e.then(e=>{if(!nt(e)&&null!==e)throw ti(n);return e},e=>{throw ti(`${t} rejected with ${e}`)});if(!nt(e)&&null!==e)throw ti(n);return e}(n,l)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",c),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw ni(`${l} returned \`null\`, will not send event.`)}const a=n.getSession()||r.getSession();if(o&&a&&this._updateSessionFromEvent(a,i),s){const e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const u=i.transaction_info;if(s&&u&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...u,source:e}}return this.sendEvent(i,t),i}).then(null,e=>{if(ii(e)||ri(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),ti(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===jr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){ye&&De.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ye&&De.log("No outcomes to send"));if(!this._dsn)return void(ye&&De.log("No dsn provided, will not send outcomes"));ye&&De.log("Sending outcomes:",e);const t=(n=e,Hn((r=this._options.tunnel&&bn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:kt(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}};function oi(e){return"replay_event"===e?"replay":e||"error"}function li(e){return void 0===e.type}function ui(e){return"transaction"===e.type}function ci(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+di(e.attributes)}function hi(e){let t=0;return e.message&&(t+=2*e.message.length),t+di(e.attributes)}function di(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*pi(e[0]):tt(e)?t+=pi(e):t+=100}),t}function pi(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function fi(e,t){!0===t.debug&&(ye?De.enable():Se(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));on().update(t.initialScope);const n=new e(t);return function(e){on().setClient(e)}(n),n.init(),n}function mi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function gi(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const Ai=100;function yi(e,t){const n=un(),r=ln();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ai}=n.getOptions();if(a<=0)return;const s={timestamp:kt(),...e},o=i?Se(()=>i(s,t)):s;null!==o&&(n.emit&&n.emit("beforeAddBreadcrumb",o,t),r.addBreadcrumb(o,a))}const vi=new WeakMap,bi=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=ht(this);let r;try{vi.has(un())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){vi.set(e,!0)}}),xi=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],_i=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=Ei(e,r)},processEvent(n,r,i){if(!t){const n=i.getOptions();t=Ei(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Tt(n,t)}(e,t.ignoreTransactions))return ye&&De.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Bt(e)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return Wr(e).some(e=>Tt(e,t))}(e,t.ignoreErrors))return ye&&De.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Bt(e)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return ye&&De.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Bt(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ci(e);return!!n&&Tt(n,t)}(e,t.denyUrls))return ye&&De.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ci(e);return!n||Tt(n,t)}(e,t.allowUrls))return ye&&De.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Bt(e)}.\nUrl: ${Ci(e)}`),!0}return!1}(n,t)?null:n}}},wi=(e={})=>({..._i(e),name:"InboundFilters"});function Ei(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xi],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ci(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return ye&&De.error(`Cannot extract url for event ${Bt(e)}`),null}}function Si(e,t,n,r,i,a){if(!i.exception?.values||!a||!st(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ii(e,t,r,a.originalException,n,i.exception.values,s,0))}function Ii(e,t,n,r,i,a,s,o){if(a.length>=n+1)return a;let l=[...a];if(st(r[i],Error)){Ti(s,o,r);const a=e(t,r[i]),u=l.length;Di(a,i,u,o),l=Ii(e,t,n,r[i],i,[a,...l],a,u)}return Mi(r)&&r.errors.forEach((a,u)=>{if(st(a,Error)){Ti(s,o,r);const c=e(t,a),h=l.length;Di(c,`errors[${u}]`,h,o),l=Ii(e,t,n,a,i,[c,...l],c,h)}}),l}function Mi(e){return Array.isArray(e.errors)}function Ti(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Mi(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Di(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Pi(e){return function(e){return Ze(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Bi=new Set([]);const Ri=new Set;function Fi(){"console"in ve&&Ee.forEach(function(e){!Ri.has(e)&&e in ve.console&&(Ri.add(e),lt(ve.console,e,function(t){return Ce[e]=t,function(...t){const n=t[0],r=Ce[e],i=Bi.size&&"string"==typeof n&&Tt(n,Bi);i||je("console",{args:t,level:e}),(!i||ye&&De.isEnabled())&&r?.apply(ve.console,t)}}))})}function Li(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ki=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Ni(t),r=Ni(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!zi(e,t))return!1;if(!Oi(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return ye&&De.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Oi(e,t){let n=ze(e),r=ze(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function zi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function Ni(e){return e.exception?.values?.[0]}const Ui=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=on().getScopeData(),n=ln().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:i}=Tn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!i?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function Vi(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Gi=ve;function ji(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Gi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(ji(Gi.fetch))return!0;let e=!1;const t=Gi.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ji(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ye&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Hi(e,t){const n="fetch",r=Ve(n,e);return Ge(n,()=>function(e,t=!1){if(t&&!qi())return;lt(ve,"fetch",function(e){return function(...t){const n=new Error,{method:r,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Wi(t),method:Qi(n,"method")?String(n.method).toUpperCase():ot(t)&&Qi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Wi(t),method:Qi(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:r,url:i},startTimestamp:1e3*zt(),virtualError:n,headers:Ki(t)};return je("fetch",{...a}),e.apply(ve,t).then(async e=>(je("fetch",{...a,endTimestamp:1e3*zt(),response:e}),e),e=>{je("fetch",{...a,endTimestamp:1e3*zt(),error:e}),Ze(e)&&void 0===e.stack&&(e.stack=n.stack,ut(e,"framesToPop",1));const t=un(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:ut(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}(0,t)),r}function Qi(e,t){return rt(e)&&!!e[t]}function Wi(e){return"string"==typeof e?e:e?Qi(e,"url")?e.url:e.toString?e.toString():"":""}function Ki(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(ot(t))return new Headers(t.headers)}catch{}}const Zi=ve;function Yi(){try{return Zi.document.location.href}catch{return""}}const Xi=ve;let Ji=0;function $i(){return Ji>0}function ea(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(ht(e))return e}catch{return e}const n=function(...n){ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)+1;try{const r=n.map(e=>ea(e,t));return e.apply(this,r)}catch(r){throw Ji++,setTimeout(()=>{Ji--}),function(...e){const t=rn(xe());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(e=>{e.addEventProcessor(e=>(t.mechanism&&(Rt(e,void 0),Ft(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),br(r)}),r}finally{ve._sentryWrappedDepth=(ve._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ct(n,e),ut(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function ta(){const e=Yi(),{referrer:t}=Xi.document||{},{userAgent:n}=Xi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function na(e,t){const n=aa(e,t),r={type:la(t),value:ua(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ra(e,t,n,r){const i=un(),a=i?.getOptions().normalizeDepth,s=(o=t,Object.values(o).find(e=>e instanceof Error));var o;const l={__serialized__:wt(t,a)};if(s)return{exception:{values:[na(e,s)]},extra:l};const u={exception:{values:[{type:it(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:da(t,{isUnhandledRejection:r})}]},extra:l};if(n){const t=aa(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function ia(e,t){return{exception:{values:[na(e,t)]}}}function aa(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&sa.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch{}return[]}const sa=/Minified React error #\d+;/i;function oa(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function la(e){const t=e?.name;if(!t&&oa(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function ua(e){const t=e?.message;return oa(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Pi(t.error):Pi(e):"No error message"}function ca(e,t,n,r,i){let a;if(Xe(t)&&t.error){return ia(e,t.error)}if(Je(t)||Ye(t,"DOMException")){const i=t;if("stack"in t){a=ia(e,t);const i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){const t=aa(e,n);t.length&&(i.stacktrace={frames:t},Ft(a,{synthetic:!0}))}}else{const t=i.name||(Je(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;a=ha(e,s,n,r),Rt(a,s)}return"code"in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}if(Ze(t))return ia(e,t);if(nt(t)||it(t)){return a=ra(e,t,n,i),Ft(a,{synthetic:!0}),a}return a=ha(e,t,n,r),Rt(a,`${t}`),Ft(a,{synthetic:!0}),a}function ha(e,t,n,r){const i={};if(r&&n){const r=aa(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ft(i,{synthetic:!0})}if(et(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function da(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(dt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";if(Xe(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(it(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}let pa=class extends si{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Xi.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:be})),i.version=be)}(t,"browser",["browser"],Xi.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:i}=this._options;Xi.document&&Xi.document.addEventListener("visibilitychange",()=>{"hidden"===Xi.document.visibilityState&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",gi)}eventFromException(e,t){return function(e,t,n,r){const i=ca(e,t,n?.syntheticException||void 0,r);return Ft(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),lr(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const a=ha(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),lr(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};const fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ma=ve;function ga(e,t,n){ma.document&&ma.addEventListener(e,t,n)}function Aa(e,t,n){ma.document&&ma.removeEventListener(e,t,n)}const ya={};try{"undefined"!=typeof Node&&(ya.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(ya.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,ya.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,ya.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,ya.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(ya.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function va(e,t,n){const r=ya[t];if(r)try{return r.call(e,n)}catch{}const i=e[t];return"function"==typeof i?i.call(e,n):i}function ba(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let a=0,s=0;const o=" > ",l=o.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(u=xa(n,c),!("html"===u||a>1&&s+i.length*l+u.length>=h));)i.push(u),s+=u.length,n=va(n,"parentNode");return i.reverse().join(o)}catch{return"<unknown>"}}function xa(e,t){const n=[],r=va(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=va(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const i=t?.length?t.filter(t=>va(e,"getAttribute",t)).map(t=>[t,va(e,"getAttribute",t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=va(e,"id");t&&n.push(`#${t}`);const r=va(e,"className");if(r&&$e(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const a of["aria-label","type","name","title","alt"]){const t=va(e,"getAttribute",a);t&&n.push(`[${a}="${t}"]`)}return n.join("")}let _a,wa,Ea,Ca;function Sa(){if(!ma.document)return;const e=je.bind(null,"dom"),t=Ia(e,!0);ma.document.addEventListener("click",t,!1),ma.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=ma,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(lt(r,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){const r=Ia(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),lt(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ia(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ut(n,"_sentryCaptured",!0),r&&!r._sentryId&&ut(r,"_sentryId",Dt());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==wa)return!1;try{if(!e.target||e.target._sentryId!==Ea)return!1}catch{}return!0}(n)){e({event:n,name:i,global:t}),wa=n.type,Ea=r?r._sentryId:void 0}clearTimeout(_a),_a=ma.setTimeout(()=>{Ea=void 0,wa=void 0},1e3)}}function Ma(e){const t="history";Ve(t,e),Ge(t,Ta)}function Ta(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Ca,i=function(e){try{return new URL(e,ma.location.origin).toString()}catch{return e}}(String(n));if(Ca=i,r===i)return e.apply(this,t);je("history",{from:r,to:i})}return e.apply(this,t)}}ma.addEventListener("popstate",()=>{const e=ma.location.href,t=Ca;if(Ca=e,t===e)return;je("history",{from:t,to:e})}),"history"in Gi&&Gi.history&&(lt(ma.history,"pushState",e),lt(ma.history,"replaceState",e))}const Da={};const Pa="__sentry_xhr_v3__";function Ba(){if(!ma.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*zt(),a=$e(n[0])?n[0].toUpperCase():void 0,s=function(e){if($e(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!a||!s)return e.apply(t,n);t[Pa]={method:a,url:s,request_headers:{}},"POST"===a&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const o=()=>{const e=t[Pa];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}je("xhr",{endTimestamp:1e3*zt(),startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",o)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(o(),e.apply(t,n))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,a=t[Pa];return a&&$e(r)&&$e(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Pa];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return je("xhr",{startTimestamp:1e3*zt(),xhr:t}),e.apply(t,n)}})}function Ra(e,t=function(e){const t=Da[e];if(t)return t;let n=ma[e];if(ji(n))return Da[e]=n.bind(ma);const r=ma.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(qke){fa&&De.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,qke)}return n?Da[e]=n.bind(ma):n}("fetch")){let n=0,r=0;return Qr(e,async function(i){const a=i.body.length;n+=a,r++;const s={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(qke){throw function(e){Da[e]=void 0}("fetch"),qke}finally{n-=a,r--}},qr(e.bufferSize||40))}const Fa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function La(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?Pe:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ka=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Oa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,za=/\((\S*)(?::(\d+))(?::(\d+))\)/,Na=/at (.+?) ?\(data:(.+?),/,Ua=[30,e=>{const t=e.match(Na);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ka.exec(e);if(n){const[,e,t,r]=n;return La(e,Pe,+t,+r)}const r=Oa.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=za.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Ha(r[1]||Pe,r[2]);return La(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Va=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ga=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ja=[50,e=>{const t=Va.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ga.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Pe;return[n,e]=Ha(n,e),La(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],qa=Fe(...[Ua,ja]),Ha=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Pe,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Qa=1024,Wa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=Ve(t,e);Ge(t,Fi)}(function(e){return function(t){if(un()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Li(t.level),message:It(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${It(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}yi(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(un()!==e)return;let r,i,a="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>Qa&&(Fa&&De.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=Qa),"string"==typeof a&&(a=[a]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ba(t,{keyAttrs:a,maxStringLength:s}),i=function(e,t=5){if(!Zi.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const o={category:`ui.${n.name}`,message:r};i&&(o.data={"ui.component_name":i}),yi(o,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Ve("dom",n),Ge("dom",Sa)),t.xhr&&function(e){Ve("xhr",e),Ge("xhr",Ba)}(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Pa];if(!n||!r||!i)return;const{method:a,url:s,status_code:o,body:l}=i,u={method:a,url:s,status_code:o},c={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},h={category:"xhr",data:u,type:"http",level:Vi(o)};e.emit("beforeOutgoingRequestBreadcrumb",h,c),yi(h,c)}}(e)),t.fetch&&Hi(function(e){return function(t){if(un()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),yi(a,i)}else{const i=t.response,a={...t.fetchData,status_code:i?.status},s={input:t.args,response:i,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:a,type:"http",level:Vi(a.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",o,s),yi(o,s)}}}(e)),t.history&&Ma(function(e){return function(t){if(un()!==e)return;let n=t.from,r=t.to;const i=mi(Xi.location.href);let a=n?mi(n):void 0;const s=mi(r);a?.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),yi({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){un()===e&&yi({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Bt(t)},{event:t})}}(e))}}};const Ka="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Za=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&lt(Xi,"setTimeout",Ya),t.setInterval&&lt(Xi,"setInterval",Ya),t.requestAnimationFrame&&lt(Xi,"requestAnimationFrame",Xa),t.XMLHttpRequest&&"XMLHttpRequest"in Xi&&lt(XMLHttpRequest.prototype,"send",Ja);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Ka).forEach(e=>function(e,t){const n=Xi,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;lt(r,"addEventListener",function(n){return function(r,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=ea(i.handleEvent,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,i),n.apply(this,[r,ea(i,{mechanism:{data:{handler:Oe(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),lt(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Ya(e){return function(...t){const n=t[0];return t[0]=ea(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Oe(e)}`}}),e.apply(this,t)}}function Xa(e){return function(t){return e.apply(this,[ea(t,{mechanism:{data:{handler:Oe(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ja(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&lt(n,e,function(t){const n={mechanism:{data:{handler:Oe(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=ht(t);return r&&(n.mechanism.data.handler=Oe(r)),ea(t,n)})}),e.apply(this,t)}}const $a=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===Xi.document)return void(Fa&&De.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Er({ignoreDuration:!0});let e=!1;(e=>{const t=ma.requestIdleCallback||ma.setTimeout;"hidden"===ma.document?.visibilityState?e():(ga("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),ga("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Aa("visibilitychange",e,{capture:!0}),Aa("pagehide",e,{capture:!0})}))})(()=>{e||(Ir(),e=!0)});const n=ln();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Ir())}),"route"===t&&Ma(({from:t,to:n})=>{t!==n&&(Er({ignoreDuration:!0}),Ir(),e=!0)})}}},es=()=>({name:"CultureContext",preprocessEvent(e){const t=ts();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=ts();t&&or(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function ts(){try{const e=Xi.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ns=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";Ve(t,e),Ge(t,He)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const{msg:i,url:a,line:s,column:o,error:l}=t,u=function(e,t,n,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[];0===l.length&&l.push({colno:r,lineno:n,filename:as(t)??Yi(),function:Pe,in_app:!0});return e}(ca(n,l||i,void 0,r,!1),a,s,o);u.level="error",_r(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),rs("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Ve(t,e),Ge(t,We)}(t=>{const{stackParser:n,attachStacktrace:r}=is();if(un()!==e||$i())return;const i=function(e){if(tt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),a=tt(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ca(n,i,void 0,r,!0);a.level="error",_r(a,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),rs("onunhandledrejection"))}}};function rs(e){Fa&&De.log(`Global Handler attached: ${e}`)}function is(){const e=un();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function as(e){if($e(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),a=e.indexOf(",");let s="";if(t&&-1!==a){const t=e.slice(a+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}const ss=()=>({name:"HttpContext",preprocessEvent(e){if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const t=ta(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[hn];if(!Xi.navigator&&!Xi.location&&!Xi.document)return;const n=ta();or(e,{[ar]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),os=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){Si(na,i.getOptions().stackParser,n,t,e,r)}}},ls=/^HTML(\w*)Element$/;function us(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(ls.test(t))return`[HTMLElement: ${ba(e)}]`}}function cs(){return!!function(){if(void 0===Xi.window)return!1;const e=Xi;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=Yi();return!(Xi===Xi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(Fa&&Se(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function hs(e={}){const t=!e.skipBrowserExtensionCheck&&cs();let n=null==e.defaultIntegrations?[wi(),bi(),Ui(),Za(),Wa(),ns(),os(),ki(),ss(),es(),$a()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(i=e.stackParser||qa,Array.isArray(i)?Fe(...i):i),integrations:Pr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ra};var i;return bt=us,fi(pa,r)}class ds{constructor(){this.initialized=!1}static initialize(e){const t=ds.getInstance();if(t.initialized)return void wr("component",e);hs({dsn:"https://98a864152051bb3d42f8e955f2ab3078@sentry.mapvx.app/6",environment:"production",release:"0.9.0-dev.5"}),wr("component",e),t.initialized=!0}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}error(e,t){br(e,t?{extra:t}:void 0)}info(e,t){xr(e,{level:"info",extra:t})}warning(e,t){xr(e,{level:"warning",extra:t})}critical(e,t){xr(e,{level:"fatal",extra:t})}}
46
46
  /**
47
47
  * @license
48
48
  * Copyright 2021 Google LLC
@@ -316,7 +316,7 @@ var uG=Object.create,cG=Object.defineProperty,hG=Object.getOwnPropertyDescriptor
316
316
  </div>
317
317
  `})}
318
318
  </div>
319
- `}};Q1.styles=[o(':host{--floor-selector-clip-margin: 15px;position:absolute;top:0;right:calc(10px - var(--floor-selector-clip-margin));z-index:10;box-sizing:border-box;max-width:calc(100cqw - 20px + 2 * var(--floor-selector-clip-margin));padding:0 var(--floor-selector-clip-margin) var(--floor-selector-clip-margin);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;pointer-events:none}:host::-webkit-scrollbar{display:none}.floor-selector-container{display:flex;flex-direction:row;width:max-content;background:#fff;border-radius:0 0 30px 30px;box-shadow:0 0 15px #00000026;padding:0 6px;gap:8px;height:65px;z-index:9999;pointer-events:auto}.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:0 0 999px 999px;background:#000;color:#fff}.floor-btn{transition:background .2s ease,color .2s ease,transform .2s ease,opacity .2s ease;position:relative;background:transparent;border:none;outline:none;font-family:Poppins,sans-serif;font-weight:600;font-size:13px;border-radius:0 0 30px 30px;cursor:pointer;transition:all .2s ease;height:100%;min-width:65px;display:flex;align-items:center;justify-content:center;color:#000;z-index:1;span{min-width:50px}}.floor-btn.disabled{color:#c5c3c3;background:transparent;pointer-events:none;-webkit-tap-highlight-color:transparent;user-select:none}.floor-btn.active{color:#fff;background:transparent;z-index:2}.floor-btn.active:after{content:"";position:absolute;inset:0 2px;border-radius:0 0 999px 999px;background:#000;color:#fff;z-index:1}.floor-btn.active:before{content:"";position:absolute;inset:0 -3px -3px;border-radius:0 0 999px 999px;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0}.floor-btn.active span{z-index:10}@container (max-width: 1100px){:host{inset:0 0 0 auto;display:flex;flex-direction:column;max-width:none;padding:var(--floor-selector-clip-margin) 0 var(--floor-selector-clip-margin) var(--floor-selector-clip-margin);overflow-x:hidden;overflow-y:auto;pointer-events:none}.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:999px 0 0 999px;background:#000;color:#fff}.floor-selector-container{margin:auto 0;flex-shrink:0;pointer-events:auto;flex-direction:column-reverse;border-radius:30px 0 0 30px;width:auto;min-width:87px;height:auto;padding:0;gap:0}.floor-btn-container{padding:0;width:100%}.floor-btn{width:100%;padding:20px;border-radius:999px 0 0 999px}.floor-btn.active:after{position:absolute;inset:2px 0 2px 2px;border-radius:999px 0 0 999px}.floor-btn.active:before{inset:-3px 0 -3px -3px;border-radius:999px 0 0 999px}}')],Q1=((e,t,n,r)=>{for(var i,a=r>1?void 0:r?H1(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(a=i(a)||a);return a})([ce("floor-selector")],Q1);const W1=Object.freeze(Object.defineProperty({__proto__:null,get FloorSelector(){return Q1}},Symbol.toStringTag,{value:"Module"}));function K1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z1,Y1,X1={};function J1(){return Y1?Z1:(Y1=1,Z1=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var $1,e2={},t2={};function n2(){if($1)return t2;let e;$1=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return t2.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t2.getSymbolTotalCodewords=function(e){return t[e]},t2.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t2.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},t2.isKanjiModeEnabled=function(){return void 0!==e},t2.toSJIS=function(t){return e(t)},t2}var r2,i2,a2,s2,o2,l2={};function u2(){return r2||(r2=1,(e=l2).L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(qke){return n}}),l2;var e}var c2,h2={};var d2,p2={};var f2,m2={};var g2,A2={};function y2(){if(g2)return A2;g2=1;const e=u2(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return A2.getBlocksCount=function(n,r){switch(r){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},A2.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},A2}var v2,b2,x2,_2,w2={},E2={};function C2(){return b2||(b2=1,function(e){const t=function(){if(v2)return E2;v2=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)e[r]=n,t[n]=r,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),E2.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},E2.exp=function(t){return e[t]},E2.mul=function(n,r){return 0===n||0===r?0:e[t[n]+t[r]]},E2}();e.mul=function(e,n){const r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){const e=r[0];for(let a=0;a<n.length;a++)r[a]^=t.mul(n[a],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}}(w2)),w2}var S2,I2={},M2={},T2={};function D2(){return S2||(S2=1,T2.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),T2}var P2,B2,R2,F2={};function L2(){if(P2)return F2;P2=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";F2.KANJI=new RegExp(t,"g"),F2.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),F2.BYTE=new RegExp(n,"g"),F2.NUMERIC=new RegExp(e,"g"),F2.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+t+"$"),i=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return F2.testKanji=function(e){return r.test(e)},F2.testNumeric=function(e){return i.test(e)},F2.testAlphanumeric=function(e){return a.test(e)},F2}function k2(){return B2||(B2=1,function(e){const t=D2(),n=L2();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(qke){return n}}}(M2)),M2}function O2(){return R2||(R2=1,function(e){const t=n2(),n=y2(),r=u2(),i=k2(),a=D2(),s=t.getBCHDigit(7973);function o(e,t){return i.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach(function(e){const r=o(e.mode,t);n+=r+e.getBitsLength()}),n}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,s){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===s&&(s=i.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r));if(s===i.MIXED)return l;const u=l-o(s,e);switch(s){case i.NUMERIC:return Math.floor(u/10*3);case i.ALPHANUMERIC:return Math.floor(u/11*2);case i.KANJI:return Math.floor(u/13);case i.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){let a;const s=r.from(n,r.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,i.MIXED))return r}(t,s);if(0===t.length)return 1;a=t[0]}else a=t;return function(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}(a.mode,a.getLength(),s)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=7973<<t.getBCHDigit(n)-s;return e<<12|n}}(I2)),I2}var z2,N2={};var U2,V2,G2,j2,q2,H2,Q2,W2,K2={};var Z2,Y2,X2,J2={exports:{}};function $2(){return Z2||(Z2=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var i={},a={};a[n]=0;var s,o,l,u,c,h,d,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(l in o=(s=p.pop()).value,u=s.cost,c=e[o]||{})c.hasOwnProperty(l)&&(h=u+c[l],d=a[l],(void 0===a[l]||d>h)&&(a[l]=h,p.push(l,h),i[l]=o));if(void 0!==r&&void 0===a[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(J2)),J2.exports}function e3(){return Y2||(Y2=1,function(e){const t=k2(),n=function(){if(V2)return U2;V2=1;const e=k2();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},U2=t}(),r=function(){if(j2)return G2;j2=1;const e=k2(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*t.indexOf(this.data[n]);r+=t.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},G2=n}(),i=function(){if(H2)return q2;H2=1;const e=k2();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},q2=t}(),a=function(){if(W2)return Q2;W2=1;const e=k2(),t=n2();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let r=t.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},Q2=n}(),s=L2(),o=n2(),l=$2();function u(e){return unescape(encodeURIComponent(e)).length}function c(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function h(e){const n=c(s.NUMERIC,t.NUMERIC,e),r=c(s.ALPHANUMERIC,t.ALPHANUMERIC,e);let i,a;o.isKanjiModeEnabled()?(i=c(s.BYTE,t.BYTE,e),a=c(s.KANJI,t.KANJI,e)):(i=c(s.BYTE_KANJI,t.BYTE,e),a=[]);return n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function d(e,s){switch(s){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e,s){let l;const u=t.getBestModeForData(e);if(l=t.from(s,u),l!==t.BYTE&&l.bit<u.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(u));switch(l!==t.KANJI||o.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},e.fromString=function(n,r){const i=function(e){const n=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:u(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:u(i.data)}])}}return n}(h(n,o.isKanjiModeEnabled())),a=function(e,n){const r={},i={start:{}};let a=["start"];for(let s=0;s<e.length;s++){const o=e[s],l=[];for(let e=0;e<o.length;e++){const u=o[e],c=""+s+e;l.push(c),r[c]={node:u,lastCount:0},i[c]={};for(let e=0;e<a.length;e++){const s=a[e];r[s]&&r[s].node.mode===u.mode?(i[s][c]=d(r[s].lastCount+u.length,u.mode)-d(r[s].lastCount,u.mode),r[s].lastCount+=u.length):(r[s]&&(r[s].lastCount=u.length),i[s][c]=d(u.length,u.mode)+4+t.getCharCountIndicator(u.mode,n))}}a=l}for(let t=0;t<a.length;t++)i[a[t]].end=0;return{map:i,table:r}}(i,r),s=l.find_path(a.map,"start","end"),c=[];for(let e=1;e<s.length-1;e++)c.push(a.table[s[e]].node);return e.fromArray(function(e){return e.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(c))},e.rawSplit=function(t){return e.fromArray(h(t,o.isKanjiModeEnabled()))}}(K2)),K2}function t3(){if(X2)return e2;X2=1;const e=n2(),t=u2(),n=function(){if(a2)return i2;function e(){this.buffer=[],this.length=0}return a2=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},i2=e}(),r=function(){if(o2)return s2;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return o2=1,e.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},s2=e}(),i=(c2||(c2=1,function(e){const t=n2().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,r=t(e),i=145===r?26:2*Math.ceil((r-13)/(2*n-2)),a=[r-7];for(let t=1;t<n-1;t++)a[t]=a[t-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}}(h2)),h2),a=function(){if(d2)return p2;d2=1;const e=n2().getSymbolSize;return p2.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},p2}(),s=(f2||(f2=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,r=40,i=10;function a(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let r=0,i=0,a=0,s=null,o=null;for(let l=0;l<n;l++){i=a=0,s=o=null;for(let u=0;u<n;u++){let n=e.get(l,u);n===s?i++:(i>=5&&(r+=t+(i-5)),s=n,i=1),n=e.get(u,l),n===o?a++:(a>=5&&(r+=t+(a-5)),o=n,a=1)}i>=5&&(r+=t+(i-5)),a>=5&&(r+=t+(a-5))}return r},e.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let i=0;i<t-1;i++){const t=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);4!==t&&0!==t||r++}return r*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,i=0,a=0;for(let r=0;r<t;r++){i=a=0;for(let s=0;s<t;s++)i=i<<1&2047|e.get(r,s),s>=10&&(1488===i||93===i)&&n++,a=a<<1&2047|e.get(s,r),s>=10&&(1488===a||93===a)&&n++}return n*r},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*i},e.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,a(e,i,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let i=0,a=1/0;for(let s=0;s<r;s++){n(s),e.applyMask(s,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),r<a&&(a=r,i=s)}return i}}(m2)),m2),o=y2(),l=function(){if(_2)return x2;_2=1;const e=C2();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const r=e.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},x2=t}(),u=O2(),c=function(){if(z2)return N2;z2=1;const e=n2(),t=e.getBCHDigit(1335);return N2.getEncodedBits=function(n,r){const i=n.bit<<3|r;let a=i<<10;for(;e.getBCHDigit(a)-t>=0;)a^=1335<<e.getBCHDigit(a)-t;return 21522^(i<<10|a)},N2}(),h=k2(),d=e3();function p(e,t,n){const r=e.size,i=c.getEncodedBits(t,n);let a,s;for(a=0;a<15;a++)s=1==(i>>a&1),a<6?e.set(a,8,s,!0):a<8?e.set(a+1,8,s,!0):e.set(r-15+a,8,s,!0),a<8?e.set(8,r-a-1,s,!0):a<9?e.set(8,15-a-1+1,s,!0):e.set(8,15-a-1,s,!0);e.set(r-8,8,1,!0)}function f(t,r,i){const a=new n;i.forEach(function(e){a.put(e.mode.bit,4),a.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(a)});const s=8*(e.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,r));for(a.getLengthInBits()+4<=s&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);const u=(s-a.getLengthInBits())/8;for(let e=0;e<u;e++)a.put(e%2?17:236,8);return function(t,n,r){const i=e.getSymbolTotalCodewords(n),a=o.getTotalCodewordsCount(n,r),s=i-a,u=o.getBlocksCount(n,r),c=i%u,h=u-c,d=Math.floor(i/u),p=Math.floor(s/u),f=p+1,m=d-p,g=new l(m);let A=0;const y=new Array(u),v=new Array(u);let b=0;const x=new Uint8Array(t.buffer);for(let e=0;e<u;e++){const t=e<h?p:f;y[e]=x.slice(A,A+t),v[e]=g.encode(y[e]),A+=t,b=Math.max(b,t)}const _=new Uint8Array(i);let w,E,C=0;for(w=0;w<b;w++)for(E=0;E<u;E++)w<y[E].length&&(_[C++]=y[E][w]);for(w=0;w<m;w++)for(E=0;E<u;E++)_[C++]=v[E][w];return _}(a,t,r)}function m(t,n,o,l){let c;if(Array.isArray(t))c=d.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=d.rawSplit(t);e=u.getBestVersionForData(n,o)}c=d.fromString(t,e||40)}}const h=u.getBestVersionForData(c,o);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else n=h;const m=f(n,o,c),g=e.getSymbolSize(n),A=new r(g);return function(e,t){const n=e.size,r=a.getPositions(t);for(let i=0;i<r.length;i++){const t=r[i][0],a=r[i][1];for(let r=-1;r<=7;r++)if(!(t+r<=-1||n<=t+r))for(let i=-1;i<=7;i++)a+i<=-1||n<=a+i||(r>=0&&r<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===r||6===r)||r>=2&&r<=4&&i>=2&&i<=4?e.set(t+r,a+i,!0,!0):e.set(t+r,a+i,!1,!0))}}(A,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(A),function(e,t){const n=i.getPositions(t);for(let r=0;r<n.length;r++){const t=n[r][0],i=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?e.set(t+n,i+r,!0,!0):e.set(t+n,i+r,!1,!0)}}(A,n),p(A,o,0),n>=7&&function(e,t){const n=e.size,r=u.getEncodedBits(t);let i,a,s;for(let o=0;o<18;o++)i=Math.floor(o/3),a=o%3+n-8-3,s=1==(r>>o&1),e.set(i,a,s,!0),e.set(a,i,s,!0)}(A,n),function(e,t){const n=e.size;let r=-1,i=n-1,a=7,s=0;for(let o=n-1;o>0;o-=2)for(6===o&&o--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,o-n)){let r=!1;s<t.length&&(r=1==(t[s]>>>a&1)),e.set(i,o-n,r),a--,-1===a&&(s++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(A,m),isNaN(l)&&(l=s.getBestMask(A,p.bind(null,A,o))),s.applyMask(l,A),p(A,o,l),{modules:A,version:n,errorCorrectionLevel:o,maskPattern:l,segments:c}}return e2.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let i,a,o=t.M;return void 0!==r&&(o=t.from(r.errorCorrectionLevel,t.M),i=u.from(r.version),a=s.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),m(n,i,o,a)},e2}var n3,r3,i3={},a3={};function s3(){return n3||(n3=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const i=n.modules.size,a=n.modules.data,s=e.getScale(i,r),o=Math.floor((i+2*r.margin)*s),l=r.margin*s,u=[r.color.light,r.color.dark];for(let e=0;e<o;e++)for(let n=0;n<o;n++){let c=4*(e*o+n),h=r.color.light;if(e>=l&&n>=l&&e<o-l&&n<o-l){h=u[a[Math.floor((e-l)/s)*i+Math.floor((n-l)/s)]?1:0]}t[c++]=h.r,t[c++]=h.g,t[c++]=h.b,t[c]=h.a}}}(a3)),a3}function o3(){return r3||(r3=1,function(e){const t=s3();e.render=function(e,n,r){let i=r,a=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(a=function(){try{return document.createElement("canvas")}catch(qke){throw new Error("You need to specify a canvas element")}}()),i=t.getOptions(i);const s=t.getImageWidth(e.modules.size,i),o=a.getContext("2d"),l=o.createImageData(s,s);return t.qrToImageData(l.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(o,a,s),o.putImageData(l,0,0),a},e.renderToDataURL=function(t,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const a=e.render(t,n,i),s=i.type||"image/png",o=i.rendererOpts||{};return a.toDataURL(s,o.quality)}}(i3)),i3}var l3,u3,c3={};function h3(){if(l3)return c3;l3=1;const e=s3();function t(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}return c3.render=function(r,i,a){const s=e.getOptions(i),o=r.modules.size,l=r.modules.data,u=o+2*s.margin,c=s.color.light.a?"<path "+t(s.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",h="<path "+t(s.color.dark,"stroke")+' d="'+function(e,t,r){let i="",a=0,s=!1,o=0;for(let l=0;l<e.length;l++){const u=Math.floor(l%t),c=Math.floor(l/t);u||s||(s=!0),e[l]?(o++,l>0&&u>0&&e[l-1]||(i+=s?n("M",u+r,.5+c+r):n("m",a,0),a=0,s=!1),u+1<t&&e[l+1]||(i+=n("h",o),o=0)):a++}return i}(l,o,s.margin)+'"/>',d='viewBox="0 0 '+u+" "+u+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+h+"</svg>\n";return"function"==typeof a&&a(null,p),p},c3}var d3=function(){if(u3)return X1;u3=1;const e=J1(),t=t3(),n=o3(),r=h3();function i(n,r,i,a,s){const o=[].slice.call(arguments,1),l=o.length,u="function"==typeof o[l-1];if(!u&&!e())throw new Error("Callback required as last argument");if(!u){if(l<1)throw new Error("Too few arguments provided");return 1===l?(i=r,r=a=void 0):2!==l||r.getContext||(a=i,i=r,r=void 0),new Promise(function(e,s){try{const s=t.create(i,a);e(n(s,r,a))}catch(qke){s(qke)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(s=i,i=r,r=a=void 0):3===l&&(r.getContext&&void 0===s?(s=a,a=void 0):(s=a,a=i,i=r,r=void 0));try{const e=t.create(i,a);s(null,n(e,r,a))}catch(qke){s(qke)}}return X1.create=t.create,X1.toCanvas=i.bind(null,n.render),X1.toDataURL=i.bind(null,n.renderToDataURL),X1.toString=i.bind(null,function(e,t,n){return r.render(e,n)}),X1}();var p3=Object.defineProperty,f3=Object.getOwnPropertyDescriptor,m3=(e,t,n,r)=>{for(var i,a=r>1?void 0:r?f3(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r?i(t,n,a):i(a))||a);return r&&a&&p3(t,n,a),a};let g3=class extends le{updated(){const{originId:e,destinationId:t,generalConfig:n}=this.sdkData??{};if((e!==this.lastOriginId||t!==this.lastDestinationId)&&e&&t&&n){this.lastOriginId=e,this.lastDestinationId=t;const{baseUrl:r}=n,i=`${r}/?origin=${e}&destination=${t}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,a={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};d3.toDataURL(i,a).then(n=>{const r=this.shadowRoot?.getElementById("qr");r&&r instanceof HTMLImageElement&&(r.src=n,ge.getInstance().trackEvent("qr_modal_displayed",{origin_id:e,destination_id:t,qr_url:i}))})}}render(){const{cameraInitialized:e}=this.sdkData??{};return H`
319
+ `}};Q1.styles=[o(':host{--floor-selector-clip-margin: 15px;position:absolute;top:0;right:calc(10px - var(--floor-selector-clip-margin));z-index:10;box-sizing:border-box;max-width:calc(100cqw - 20px + 2 * var(--floor-selector-clip-margin));padding:0 var(--floor-selector-clip-margin) var(--floor-selector-clip-margin);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;pointer-events:none}:host::-webkit-scrollbar{display:none}.floor-selector-container{display:flex;flex-direction:row;width:max-content;background:#fff;border-radius:0 0 30px 30px;box-shadow:0 0 15px #00000026;padding:0 6px;gap:8px;height:65px;z-index:9999;pointer-events:auto}.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:0 0 999px 999px;background:#000;color:#fff}.floor-btn{transition:background .2s ease,color .2s ease,transform .2s ease,opacity .2s ease;position:relative;background:transparent;border:none;outline:none;font-family:Poppins,sans-serif;font-weight:600;font-size:13px;border-radius:0 0 30px 30px;cursor:pointer;transition:all .2s ease;height:100%;min-width:65px;display:flex;align-items:center;justify-content:center;color:#000;z-index:1;span{min-width:50px}}.floor-btn.disabled{color:#c5c3c3;background:transparent;pointer-events:none;-webkit-tap-highlight-color:transparent;user-select:none}.floor-btn.active{color:#fff;background:transparent;z-index:2}.floor-btn.active:after{content:"";position:absolute;inset:0 2px;border-radius:0 0 999px 999px;background:#000;color:#fff;z-index:1}.floor-btn.active:before{content:"";position:absolute;inset:0 -3px -3px;border-radius:0 0 999px 999px;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0}.floor-btn.active span{z-index:10}@container (max-width: 1100px){:host{inset:0 0 0 auto;display:flex;flex-direction:column;max-width:none;padding:var(--floor-selector-clip-margin) 0 var(--floor-selector-clip-margin) var(--floor-selector-clip-margin);overflow-x:hidden;overflow-y:auto;pointer-events:none}.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:999px 0 0 999px;background:#000;color:#fff}.floor-selector-container{margin:auto 0;flex-shrink:0;pointer-events:auto;flex-direction:column-reverse;border-radius:30px 0 0 30px;width:auto;min-width:87px;height:auto;padding:0;gap:0}.floor-btn-container{padding:0;width:100%}.floor-btn{width:100%;padding:20px;border-radius:999px 0 0 999px}.floor-btn.active:after{position:absolute;inset:2px 0 2px 2px;border-radius:999px 0 0 999px}.floor-btn.active:before{inset:-3px 0 -3px -3px;border-radius:999px 0 0 999px}}')],Q1=((e,t,n,r)=>{for(var i,a=r>1?void 0:r?H1(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(a=i(a)||a);return a})([ce("floor-selector")],Q1);const W1=Object.freeze(Object.defineProperty({__proto__:null,get FloorSelector(){return Q1}},Symbol.toStringTag,{value:"Module"}));function K1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z1,Y1,X1={};function J1(){return Y1?Z1:(Y1=1,Z1=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var $1,e2={},t2={};function n2(){if($1)return t2;let e;$1=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return t2.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t2.getSymbolTotalCodewords=function(e){return t[e]},t2.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t2.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},t2.isKanjiModeEnabled=function(){return void 0!==e},t2.toSJIS=function(t){return e(t)},t2}var r2,i2,a2,s2,o2,l2={};function u2(){return r2||(r2=1,(e=l2).L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(qke){return n}}),l2;var e}var c2,h2={};var d2,p2={};var f2,m2={};var g2,A2={};function y2(){if(g2)return A2;g2=1;const e=u2(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return A2.getBlocksCount=function(n,r){switch(r){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},A2.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},A2}var v2,b2,x2,_2,w2={},E2={};function C2(){return b2||(b2=1,function(e){const t=function(){if(v2)return E2;v2=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)e[r]=n,t[n]=r,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),E2.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},E2.exp=function(t){return e[t]},E2.mul=function(n,r){return 0===n||0===r?0:e[t[n]+t[r]]},E2}();e.mul=function(e,n){const r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){const e=r[0];for(let a=0;a<n.length;a++)r[a]^=t.mul(n[a],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}}(w2)),w2}var S2,I2={},M2={},T2={};function D2(){return S2||(S2=1,T2.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),T2}var P2,B2,R2,F2={};function L2(){if(P2)return F2;P2=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";F2.KANJI=new RegExp(t,"g"),F2.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),F2.BYTE=new RegExp(n,"g"),F2.NUMERIC=new RegExp(e,"g"),F2.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+t+"$"),i=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return F2.testKanji=function(e){return r.test(e)},F2.testNumeric=function(e){return i.test(e)},F2.testAlphanumeric=function(e){return a.test(e)},F2}function k2(){return B2||(B2=1,function(e){const t=D2(),n=L2();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(qke){return n}}}(M2)),M2}function O2(){return R2||(R2=1,function(e){const t=n2(),n=y2(),r=u2(),i=k2(),a=D2(),s=t.getBCHDigit(7973);function o(e,t){return i.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach(function(e){const r=o(e.mode,t);n+=r+e.getBitsLength()}),n}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,s){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===s&&(s=i.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r));if(s===i.MIXED)return l;const u=l-o(s,e);switch(s){case i.NUMERIC:return Math.floor(u/10*3);case i.ALPHANUMERIC:return Math.floor(u/11*2);case i.KANJI:return Math.floor(u/13);case i.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){let a;const s=r.from(n,r.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,i.MIXED))return r}(t,s);if(0===t.length)return 1;a=t[0]}else a=t;return function(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}(a.mode,a.getLength(),s)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=7973<<t.getBCHDigit(n)-s;return e<<12|n}}(I2)),I2}var z2,N2={};var U2,V2,G2,j2,q2,H2,Q2,W2,K2={};var Z2,Y2,X2,J2={exports:{}};function $2(){return Z2||(Z2=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var i={},a={};a[n]=0;var s,o,l,u,c,h,d,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(l in o=(s=p.pop()).value,u=s.cost,c=e[o]||{})c.hasOwnProperty(l)&&(h=u+c[l],d=a[l],(void 0===a[l]||d>h)&&(a[l]=h,p.push(l,h),i[l]=o));if(void 0!==r&&void 0===a[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(J2)),J2.exports}function e3(){return Y2||(Y2=1,function(e){const t=k2(),n=function(){if(V2)return U2;V2=1;const e=k2();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},U2=t}(),r=function(){if(j2)return G2;j2=1;const e=k2(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*t.indexOf(this.data[n]);r+=t.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},G2=n}(),i=function(){if(H2)return q2;H2=1;const e=k2();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},q2=t}(),a=function(){if(W2)return Q2;W2=1;const e=k2(),t=n2();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let r=t.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},Q2=n}(),s=L2(),o=n2(),l=$2();function u(e){return unescape(encodeURIComponent(e)).length}function c(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function h(e){const n=c(s.NUMERIC,t.NUMERIC,e),r=c(s.ALPHANUMERIC,t.ALPHANUMERIC,e);let i,a;o.isKanjiModeEnabled()?(i=c(s.BYTE,t.BYTE,e),a=c(s.KANJI,t.KANJI,e)):(i=c(s.BYTE_KANJI,t.BYTE,e),a=[]);return n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function d(e,s){switch(s){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e,s){let l;const u=t.getBestModeForData(e);if(l=t.from(s,u),l!==t.BYTE&&l.bit<u.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(u));switch(l!==t.KANJI||o.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},e.fromString=function(n,r){const i=function(e){const n=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:u(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:u(i.data)}])}}return n}(h(n,o.isKanjiModeEnabled())),a=function(e,n){const r={},i={start:{}};let a=["start"];for(let s=0;s<e.length;s++){const o=e[s],l=[];for(let e=0;e<o.length;e++){const u=o[e],c=""+s+e;l.push(c),r[c]={node:u,lastCount:0},i[c]={};for(let e=0;e<a.length;e++){const s=a[e];r[s]&&r[s].node.mode===u.mode?(i[s][c]=d(r[s].lastCount+u.length,u.mode)-d(r[s].lastCount,u.mode),r[s].lastCount+=u.length):(r[s]&&(r[s].lastCount=u.length),i[s][c]=d(u.length,u.mode)+4+t.getCharCountIndicator(u.mode,n))}}a=l}for(let t=0;t<a.length;t++)i[a[t]].end=0;return{map:i,table:r}}(i,r),s=l.find_path(a.map,"start","end"),c=[];for(let e=1;e<s.length-1;e++)c.push(a.table[s[e]].node);return e.fromArray(function(e){return e.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(c))},e.rawSplit=function(t){return e.fromArray(h(t,o.isKanjiModeEnabled()))}}(K2)),K2}function t3(){if(X2)return e2;X2=1;const e=n2(),t=u2(),n=function(){if(a2)return i2;function e(){this.buffer=[],this.length=0}return a2=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},i2=e}(),r=function(){if(o2)return s2;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return o2=1,e.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},s2=e}(),i=(c2||(c2=1,function(e){const t=n2().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,r=t(e),i=145===r?26:2*Math.ceil((r-13)/(2*n-2)),a=[r-7];for(let t=1;t<n-1;t++)a[t]=a[t-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}}(h2)),h2),a=function(){if(d2)return p2;d2=1;const e=n2().getSymbolSize;return p2.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},p2}(),s=(f2||(f2=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,r=40,i=10;function a(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let r=0,i=0,a=0,s=null,o=null;for(let l=0;l<n;l++){i=a=0,s=o=null;for(let u=0;u<n;u++){let n=e.get(l,u);n===s?i++:(i>=5&&(r+=t+(i-5)),s=n,i=1),n=e.get(u,l),n===o?a++:(a>=5&&(r+=t+(a-5)),o=n,a=1)}i>=5&&(r+=t+(i-5)),a>=5&&(r+=t+(a-5))}return r},e.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let i=0;i<t-1;i++){const t=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);4!==t&&0!==t||r++}return r*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,i=0,a=0;for(let r=0;r<t;r++){i=a=0;for(let s=0;s<t;s++)i=i<<1&2047|e.get(r,s),s>=10&&(1488===i||93===i)&&n++,a=a<<1&2047|e.get(s,r),s>=10&&(1488===a||93===a)&&n++}return n*r},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*i},e.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,a(e,i,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let i=0,a=1/0;for(let s=0;s<r;s++){n(s),e.applyMask(s,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),r<a&&(a=r,i=s)}return i}}(m2)),m2),o=y2(),l=function(){if(_2)return x2;_2=1;const e=C2();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const r=e.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},x2=t}(),u=O2(),c=function(){if(z2)return N2;z2=1;const e=n2(),t=e.getBCHDigit(1335);return N2.getEncodedBits=function(n,r){const i=n.bit<<3|r;let a=i<<10;for(;e.getBCHDigit(a)-t>=0;)a^=1335<<e.getBCHDigit(a)-t;return 21522^(i<<10|a)},N2}(),h=k2(),d=e3();function p(e,t,n){const r=e.size,i=c.getEncodedBits(t,n);let a,s;for(a=0;a<15;a++)s=1==(i>>a&1),a<6?e.set(a,8,s,!0):a<8?e.set(a+1,8,s,!0):e.set(r-15+a,8,s,!0),a<8?e.set(8,r-a-1,s,!0):a<9?e.set(8,15-a-1+1,s,!0):e.set(8,15-a-1,s,!0);e.set(r-8,8,1,!0)}function f(t,r,i){const a=new n;i.forEach(function(e){a.put(e.mode.bit,4),a.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(a)});const s=8*(e.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,r));for(a.getLengthInBits()+4<=s&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);const u=(s-a.getLengthInBits())/8;for(let e=0;e<u;e++)a.put(e%2?17:236,8);return function(t,n,r){const i=e.getSymbolTotalCodewords(n),a=o.getTotalCodewordsCount(n,r),s=i-a,u=o.getBlocksCount(n,r),c=i%u,h=u-c,d=Math.floor(i/u),p=Math.floor(s/u),f=p+1,m=d-p,g=new l(m);let A=0;const y=new Array(u),v=new Array(u);let b=0;const x=new Uint8Array(t.buffer);for(let e=0;e<u;e++){const t=e<h?p:f;y[e]=x.slice(A,A+t),v[e]=g.encode(y[e]),A+=t,b=Math.max(b,t)}const _=new Uint8Array(i);let w,E,C=0;for(w=0;w<b;w++)for(E=0;E<u;E++)w<y[E].length&&(_[C++]=y[E][w]);for(w=0;w<m;w++)for(E=0;E<u;E++)_[C++]=v[E][w];return _}(a,t,r)}function m(t,n,o,l){let c;if(Array.isArray(t))c=d.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=d.rawSplit(t);e=u.getBestVersionForData(n,o)}c=d.fromString(t,e||40)}}const h=u.getBestVersionForData(c,o);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else n=h;const m=f(n,o,c),g=e.getSymbolSize(n),A=new r(g);return function(e,t){const n=e.size,r=a.getPositions(t);for(let i=0;i<r.length;i++){const t=r[i][0],a=r[i][1];for(let r=-1;r<=7;r++)if(!(t+r<=-1||n<=t+r))for(let i=-1;i<=7;i++)a+i<=-1||n<=a+i||(r>=0&&r<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===r||6===r)||r>=2&&r<=4&&i>=2&&i<=4?e.set(t+r,a+i,!0,!0):e.set(t+r,a+i,!1,!0))}}(A,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(A),function(e,t){const n=i.getPositions(t);for(let r=0;r<n.length;r++){const t=n[r][0],i=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?e.set(t+n,i+r,!0,!0):e.set(t+n,i+r,!1,!0)}}(A,n),p(A,o,0),n>=7&&function(e,t){const n=e.size,r=u.getEncodedBits(t);let i,a,s;for(let o=0;o<18;o++)i=Math.floor(o/3),a=o%3+n-8-3,s=1==(r>>o&1),e.set(i,a,s,!0),e.set(a,i,s,!0)}(A,n),function(e,t){const n=e.size;let r=-1,i=n-1,a=7,s=0;for(let o=n-1;o>0;o-=2)for(6===o&&o--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,o-n)){let r=!1;s<t.length&&(r=1==(t[s]>>>a&1)),e.set(i,o-n,r),a--,-1===a&&(s++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(A,m),isNaN(l)&&(l=s.getBestMask(A,p.bind(null,A,o))),s.applyMask(l,A),p(A,o,l),{modules:A,version:n,errorCorrectionLevel:o,maskPattern:l,segments:c}}return e2.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let i,a,o=t.M;return void 0!==r&&(o=t.from(r.errorCorrectionLevel,t.M),i=u.from(r.version),a=s.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),m(n,i,o,a)},e2}var n3,r3,i3={},a3={};function s3(){return n3||(n3=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const i=n.modules.size,a=n.modules.data,s=e.getScale(i,r),o=Math.floor((i+2*r.margin)*s),l=r.margin*s,u=[r.color.light,r.color.dark];for(let e=0;e<o;e++)for(let n=0;n<o;n++){let c=4*(e*o+n),h=r.color.light;if(e>=l&&n>=l&&e<o-l&&n<o-l){h=u[a[Math.floor((e-l)/s)*i+Math.floor((n-l)/s)]?1:0]}t[c++]=h.r,t[c++]=h.g,t[c++]=h.b,t[c]=h.a}}}(a3)),a3}function o3(){return r3||(r3=1,function(e){const t=s3();e.render=function(e,n,r){let i=r,a=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(a=function(){try{return document.createElement("canvas")}catch(qke){throw new Error("You need to specify a canvas element")}}()),i=t.getOptions(i);const s=t.getImageWidth(e.modules.size,i),o=a.getContext("2d"),l=o.createImageData(s,s);return t.qrToImageData(l.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(o,a,s),o.putImageData(l,0,0),a},e.renderToDataURL=function(t,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const a=e.render(t,n,i),s=i.type||"image/png",o=i.rendererOpts||{};return a.toDataURL(s,o.quality)}}(i3)),i3}var l3,u3,c3={};function h3(){if(l3)return c3;l3=1;const e=s3();function t(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}return c3.render=function(r,i,a){const s=e.getOptions(i),o=r.modules.size,l=r.modules.data,u=o+2*s.margin,c=s.color.light.a?"<path "+t(s.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",h="<path "+t(s.color.dark,"stroke")+' d="'+function(e,t,r){let i="",a=0,s=!1,o=0;for(let l=0;l<e.length;l++){const u=Math.floor(l%t),c=Math.floor(l/t);u||s||(s=!0),e[l]?(o++,l>0&&u>0&&e[l-1]||(i+=s?n("M",u+r,.5+c+r):n("m",a,0),a=0,s=!1),u+1<t&&e[l+1]||(i+=n("h",o),o=0)):a++}return i}(l,o,s.margin)+'"/>',d='viewBox="0 0 '+u+" "+u+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+h+"</svg>\n";return"function"==typeof a&&a(null,p),p},c3}var d3=function(){if(u3)return X1;u3=1;const e=J1(),t=t3(),n=o3(),r=h3();function i(n,r,i,a,s){const o=[].slice.call(arguments,1),l=o.length,u="function"==typeof o[l-1];if(!u&&!e())throw new Error("Callback required as last argument");if(!u){if(l<1)throw new Error("Too few arguments provided");return 1===l?(i=r,r=a=void 0):2!==l||r.getContext||(a=i,i=r,r=void 0),new Promise(function(e,s){try{const s=t.create(i,a);e(n(s,r,a))}catch(qke){s(qke)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(s=i,i=r,r=a=void 0):3===l&&(r.getContext&&void 0===s?(s=a,a=void 0):(s=a,a=i,i=r,r=void 0));try{const e=t.create(i,a);s(null,n(e,r,a))}catch(qke){s(qke)}}return X1.create=t.create,X1.toCanvas=i.bind(null,n.render),X1.toDataURL=i.bind(null,n.renderToDataURL),X1.toString=i.bind(null,function(e,t,n){return r.render(e,n)}),X1}();var p3=Object.defineProperty,f3=Object.getOwnPropertyDescriptor,m3=(e,t,n,r)=>{for(var i,a=r>1?void 0:r?f3(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r?i(t,n,a):i(a))||a);return r&&a&&p3(t,n,a),a};let g3=class extends le{updated(){const{originId:e,destinationId:t,generalConfig:n}=this.sdkData??{};if((e!==this.lastOriginId||t!==this.lastDestinationId)&&e&&t&&n){this.lastOriginId=e,this.lastDestinationId=t;const{baseUrl:r}=n,i=`${r}/?origin=${e}&destination=${t}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,a={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:300};d3.toDataURL(i,a).then(n=>{const r=this.shadowRoot?.getElementById("qr");r&&r instanceof HTMLImageElement&&(r.src=n,ge.getInstance().trackEvent("qr_modal_displayed",{origin_id:e,destination_id:t,qr_url:i}))})}}render(){const{cameraInitialized:e}=this.sdkData??{};return H`
320
320
  <div class=${G1({card:!0,hidden:!e})}>
321
321
  <div class="modal-content">
322
322
  <div class="pin-container">
@@ -326,13 +326,13 @@ var uG=Object.create,cG=Object.defineProperty,hG=Object.getOwnPropertyDescriptor
326
326
  <span>Continúa la ruta en tu celular, escaneando el código QR</span>
327
327
  </div>
328
328
  <div class="qr-code qr-container">
329
- <img id="qr" src="" alt="QR Code" />
329
+ <img id="qr" src=${"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"} alt="QR Code" />
330
330
  </div>
331
331
  </div>
332
332
  </div>
333
- `}};g3.styles=[o(":host{display:block;height:100%;width:100%;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.card{margin-top:15px;background:#11032b;color:#fff;border-radius:24px;z-index:10;width:29.79vw;min-width:415px}.card.hidden{display:none}.modal-content{display:flex;flex-direction:row;align-items:center;gap:16px;padding:16px}.pin-container{display:flex;align-items:center;gap:8px}.qr-text{margin:0;font-size:1rem;font-weight:600;font-family:Poppins}.qr-code{display:flex;justify-content:center;align-items:center}.qr-code img{height:auto}.qr-container{background:#fff;padding:4px}")],m3([ys({context:pV,subscribe:!0})],g3.prototype,"sdkData",2),g3=m3([ce("qr-modal")],g3);const A3=Object.freeze(Object.defineProperty({__proto__:null,get QRModal(){return g3}},Symbol.toStringTag,{value:"Module"}));var y3,v3,b3,x3,_3,w3,E3,C3=Object.defineProperty,S3=Object.getOwnPropertyDescriptor,I3=e=>{throw TypeError(e)},M3=(e,t,n,r)=>{for(var i,a=r>1?void 0:r?S3(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r?i(t,n,a):i(a))||a);return r&&a&&C3(t,n,a),a},T3=(e,t,n)=>t.has(e)||I3("Cannot "+n),D3=(e,t,n)=>(T3(e,t,"read from private field"),n?n.call(e):t.get(e)),P3=(e,t,n)=>t.has(e)?I3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),B3=(e,t,n,r)=>(T3(e,t,"write to private field"),t.set(e,n),n);let R3=class extends le{constructor(){super(),P3(this,y3,!1),P3(this,v3,!1),P3(this,b3,!1),P3(this,x3,!1),P3(this,_3,!1),P3(this,w3,!1),P3(this,E3,CV),this.assets=null,this._loadAssets()}get hideBack(){return D3(this,y3)}set hideBack(e){B3(this,y3,e)}get hideRepeatRoute(){return D3(this,v3)}set hideRepeatRoute(e){B3(this,v3,e)}get hideRouteInputs(){return D3(this,b3)}set hideRouteInputs(e){B3(this,b3,e)}get hideAccessibilitySwitch(){return D3(this,x3)}set hideAccessibilitySwitch(e){B3(this,x3,e)}get hideGenerateRoute(){return D3(this,_3)}set hideGenerateRoute(e){B3(this,_3,e)}get autoGenerateRoute(){return D3(this,w3)}set autoGenerateRoute(e){B3(this,w3,e)}get panelVariant(){return D3(this,E3)}set panelVariant(e){B3(this,E3,e)}async _loadAssets(){this.assets=await(async()=>{const[e,t,n,r,i,a]=await Promise.all([Promise.resolve().then(()=>r3e),Promise.resolve().then(()=>i3e),Promise.resolve().then(()=>h1),Promise.resolve().then(()=>a3e),Promise.resolve().then(()=>s3e),Promise.resolve().then(()=>o3e)]);return{accessibilityIcon:e.default,backIcon:t.default,destinationPoint:n.default,originPoint:r.default,repeatIcon:i.default,walkingIcon:a.default}})(),this.requestUpdate()}handleBack(){this.dispatchEvent(new CustomEvent("back",{detail:{},bubbles:!0,composed:!0}))}handleAccessibility(){this.dispatchEvent(new CustomEvent("accessibilityChange",{detail:!this.sdkData?.accessibleRoute,bubbles:!0,composed:!0}))}handleRepeatRoute(){this.dispatchEvent(new CustomEvent("repeatRoute",{detail:!0,bubbles:!0,composed:!0}))}handleGenerateRoute(){this.dispatchEvent(new CustomEvent("generateRoute",{detail:{accessible:!!this.sdkData?.accessibleRoute},bubbles:!0,composed:!0}))}_dismissError(){ge.getInstance().trackEvent("error_modal_dismissed",{error_message:this.sdkData?.routeError,origin_id:this.sdkData?.originId,destination_id:this.sdkData?.destinationId}),this.dispatchEvent(new CustomEvent("dismissRouteError",{bubbles:!0,composed:!0}))}render(){if(!this.sdkData)return H``;const{destination:e,accessibleRoute:t,parentPlace:n,origin:r,route:i,isRouteAnimating:a,isLoading:s,loadingRoute:o,isNetworkError:l}=this.sdkData,u=(t?this.assets?.accessibilityIcon:this.assets?.walkingIcon)??"",c=e?.title??"",h=n?.innerFloors??[],d=(r&&"function"==typeof r.inFloor?r.inFloor(h):void 0)?.name??"",p=(e&&"function"==typeof e.inFloor?e.inFloor(h):void 0)?.name??"",f=a??!1;let m="";i&&i.legs&&i.legs.length>0&&i.legs[0].distance&&(m=`• ${i.legs[0].distance.toFixed(0)} mts`);const g="compact"===function(e){const t=e?.trim().toLowerCase();return"compact"===t||"full"===t?t:CV}(this.panelVariant)?this._renderCompactPanel(c,p,m,u):this._renderFullPanel({destinationName:c,destinationFloor:p,originFloor:d,distance:m,defaultIcon:u,hasRoute:!!i,isAnimating:f});return H`
334
- ${g}
335
- <qr-modal></qr-modal>
333
+ `}};g3.styles=[o(":host{display:block;height:100%;width:100%;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.card{margin-top:15px;background:#11032b;color:#fff;border-radius:24px;max-width:var(--mvx-qr-card-max-width, none)}:host(.compact) .card{max-width:var(--mvx-qr-card-max-width, 360px)}.card.hidden{display:none}.modal-content{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px;padding:16px}.pin-container{flex:0 0 auto;display:flex;align-items:center}.pin-container svg{display:block;width:63px;height:63px}:host(.compact) .pin-container svg{width:40px;height:40px}.qr-text{flex:1 1 80px;min-width:0;margin:0;font-family:Poppins;font-size:16px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}:host(.compact) .qr-text{font-size:14px}.qr-code{flex:0 1 auto;min-width:0;display:flex;justify-content:center;align-items:center}.qr-code img{display:block;width:var(--mvx-qr-code-size, 150px);max-width:100%;height:auto;aspect-ratio:1 / 1}.qr-container{background:#fff;padding:4px}")],m3([ys({context:pV,subscribe:!0})],g3.prototype,"sdkData",2),g3=m3([ce("qr-modal")],g3);const A3=Object.freeze(Object.defineProperty({__proto__:null,get QRModal(){return g3}},Symbol.toStringTag,{value:"Module"}));var y3,v3,b3,x3,_3,w3,E3,C3=Object.defineProperty,S3=Object.getOwnPropertyDescriptor,I3=e=>{throw TypeError(e)},M3=(e,t,n,r)=>{for(var i,a=r>1?void 0:r?S3(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r?i(t,n,a):i(a))||a);return r&&a&&C3(t,n,a),a},T3=(e,t,n)=>t.has(e)||I3("Cannot "+n),D3=(e,t,n)=>(T3(e,t,"read from private field"),n?n.call(e):t.get(e)),P3=(e,t,n)=>t.has(e)?I3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),B3=(e,t,n,r)=>(T3(e,t,"write to private field"),t.set(e,n),n);let R3=class extends le{constructor(){super(),P3(this,y3,!1),P3(this,v3,!1),P3(this,b3,!1),P3(this,x3,!1),P3(this,_3,!1),P3(this,w3,!1),P3(this,E3,CV),this.assets=null,this._loadAssets()}get hideBack(){return D3(this,y3)}set hideBack(e){B3(this,y3,e)}get hideRepeatRoute(){return D3(this,v3)}set hideRepeatRoute(e){B3(this,v3,e)}get hideRouteInputs(){return D3(this,b3)}set hideRouteInputs(e){B3(this,b3,e)}get hideAccessibilitySwitch(){return D3(this,x3)}set hideAccessibilitySwitch(e){B3(this,x3,e)}get hideGenerateRoute(){return D3(this,_3)}set hideGenerateRoute(e){B3(this,_3,e)}get autoGenerateRoute(){return D3(this,w3)}set autoGenerateRoute(e){B3(this,w3,e)}get panelVariant(){return D3(this,E3)}set panelVariant(e){B3(this,E3,e)}async _loadAssets(){this.assets=await(async()=>{const[e,t,n,r,i,a]=await Promise.all([Promise.resolve().then(()=>r3e),Promise.resolve().then(()=>i3e),Promise.resolve().then(()=>h1),Promise.resolve().then(()=>a3e),Promise.resolve().then(()=>s3e),Promise.resolve().then(()=>o3e)]);return{accessibilityIcon:e.default,backIcon:t.default,destinationPoint:n.default,originPoint:r.default,repeatIcon:i.default,walkingIcon:a.default}})(),this.requestUpdate()}handleBack(){this.dispatchEvent(new CustomEvent("back",{detail:{},bubbles:!0,composed:!0}))}handleAccessibility(){this.dispatchEvent(new CustomEvent("accessibilityChange",{detail:!this.sdkData?.accessibleRoute,bubbles:!0,composed:!0}))}handleRepeatRoute(){this.dispatchEvent(new CustomEvent("repeatRoute",{detail:!0,bubbles:!0,composed:!0}))}handleGenerateRoute(){this.dispatchEvent(new CustomEvent("generateRoute",{detail:{accessible:!!this.sdkData?.accessibleRoute},bubbles:!0,composed:!0}))}_dismissError(){ge.getInstance().trackEvent("error_modal_dismissed",{error_message:this.sdkData?.routeError,origin_id:this.sdkData?.originId,destination_id:this.sdkData?.destinationId}),this.dispatchEvent(new CustomEvent("dismissRouteError",{bubbles:!0,composed:!0}))}render(){if(!this.sdkData)return H``;const{destination:e,accessibleRoute:t,parentPlace:n,origin:r,route:i,isRouteAnimating:a,isLoading:s,loadingRoute:o,isNetworkError:l}=this.sdkData,u=(t?this.assets?.accessibilityIcon:this.assets?.walkingIcon)??"",c=e?.title??"",h=n?.innerFloors??[],d=(r&&"function"==typeof r.inFloor?r.inFloor(h):void 0)?.name??"",p=(e&&"function"==typeof e.inFloor?e.inFloor(h):void 0)?.name??"",f=a??!1;let m="";i&&i.legs&&i.legs.length>0&&i.legs[0].distance&&(m=`• ${i.legs[0].distance.toFixed(0)} mts`);const g=function(e){const t=e?.trim().toLowerCase();return"compact"===t||"full"===t?t:CV}(this.panelVariant),A="compact"===g?this._renderCompactPanel(c,p,m,u):this._renderFullPanel({destinationName:c,destinationFloor:p,originFloor:d,distance:m,defaultIcon:u,hasRoute:!!i,isAnimating:f});return H`
334
+ ${A}
335
+ <qr-modal class=${g}></qr-modal>
336
336
  ${s||o?H`
337
337
  <div class="loading-overlay">
338
338
  <div class="loading-spinner"></div>
@@ -463,7 +463,7 @@ var uG=Object.create,cG=Object.defineProperty,hG=Object.getOwnPropertyDescriptor
463
463
  <button class="error-btn" @click=${this._dismissError}>Aceptar</button>
464
464
  </div>
465
465
  </div>
466
- `}};y3=new WeakMap,v3=new WeakMap,b3=new WeakMap,x3=new WeakMap,_3=new WeakMap,w3=new WeakMap,E3=new WeakMap,R3.styles=[o(":host{position:absolute;top:0;left:0;padding:1rem;z-index:10;font-family:Poppins!important;user-select:none}svg{vertical-align:middle}.back-panel{background-color:#11032b;color:#fff;margin-bottom:5px;padding-left:1.2rem;align-items:center;height:55px;position:relative}.back-content{margin:0;position:relative;top:50%;transform:translateY(-50%);font-size:22px;color:#fff;display:flex;align-items:center;gap:8px;cursor:pointer}.route-panel{width:29.79vw;min-width:415px;max-height:75vh;overflow-y:auto;overflow-x:hidden;border-radius:24px;background:#fff;box-shadow:0 0 24px #00000026}.back-text{font-size:24px;font-weight:600}.back-content img{vertical-align:middle}.route-modal{padding:19px 13px 22px 32px}.icon_switcher_user_type{position:relative;color:#000}.d-flex{display:flex!important}.flex-fill{flex:1 1 auto!important}.place-name{font-weight:700;font-size:32px;line-height:1;letter-spacing:-1.6px;color:#333;margin-left:2px}.repeat-route-btn{display:flex;gap:10px;justify-content:center;align-items:center;text-align:center;background-color:#fff;border:2px solid #000000;border-radius:999px;margin-left:auto;margin-right:0;padding:12px 20px;font-size:20px;font-weight:700;line-height:20px;letter-spacing:-1px;color:#000;transition:background-color .3s ease,color .3s ease;cursor:pointer}.repeat-route-btn[disabled]{color:gray;border-color:gray;cursor:not-allowed;pointer-events:none}.floor-name{font-size:1rem;color:#427553}.floor-specs{font-family:Poppins;font-weight:600;line-height:14px;size:18px}.route-distance{color:#666}.container-controls{margin-top:16px;align-items:end;gap:11px}.c-route-input{color:#000;display:flex;padding:15px;font-size:16px;font-style:normal;font-weight:600;line-height:16px;letter-spacing:-.8px;align-items:center;gap:9px;border-radius:30px;background:#fff;box-shadow:0 0 10px #0000001a;position:relative;margin-top:12px}.c-route-input .c-route-input-icon svg{width:22px;height:22px}.c-route-input-from{margin-top:0}.c-route-input-from:after{content:\"\";position:absolute;bottom:-50%;left:24px;width:3.998px;height:34.5px;z-index:1;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='38' viewBox='0 0 4 38' fill='none'%3E%3Cpath d='M-0.00028944 18.9386C-0.00028944 17.8347 0.894666 16.9397 1.99864 16.9397C3.10259 16.9397 3.99756 17.8347 3.99756 18.9386C3.99756 20.0426 3.10259 20.9375 1.99864 20.9375C0.894666 20.9375 -0.00028944 20.0426 -0.00028944 18.9386ZM-0.00028944 27.2198C-0.00028944 26.1159 0.894666 25.2209 1.99864 25.2209C3.10259 25.2209 3.99756 26.1159 3.99756 27.2198C3.99756 28.3238 3.10259 29.2188 1.99864 29.2188C0.894666 29.2188 -0.00028944 28.3238 -0.00028944 27.2198ZM-0.00028944 35.5011C-0.00028944 34.3971 0.894666 33.5021 1.99864 33.5021C3.10259 33.5021 3.99756 34.3971 3.99756 35.5011C3.99756 36.605 3.10259 37.5 1.99864 37.5C0.894666 37.5 -0.00028944 36.605 -0.00028944 35.5011Z' fill='%23D0D0D0'/%3E%3Cpath d='M1.99864 8.49999C0.894666 8.49999 -0.00028944 9.39496 -0.00028944 10.4989C-0.00028944 11.6029 0.894666 12.4978 1.99864 12.4978C3.10259 12.4978 3.99756 11.6029 3.99756 10.4989C3.99756 9.39496 3.10259 8.49999 1.99864 8.49999Z' fill='%23D0D0D0'/%3E%3Cpath d='M1.99864 0C0.894666 0 -0.00028944 0.894973 -0.00028944 1.99892C-0.00028944 3.10289 0.894666 3.99784 1.99864 3.99784C3.10259 3.99784 3.99756 3.10289 3.99756 1.99892C3.99756 0.894973 3.10259 0 1.99864 0Z' fill='%23D0D0D0'/%3E%3C/svg%3E\")}.c-route-input span{padding:0 6px;border-radius:15px;color:#454545;background:#f2f2f2;font-size:10px;font-style:normal;font-weight:600;line-height:14px;letter-spacing:-.5px}.accessibility-switch{display:flex;align-items:center;justify-content:center;min-width:100px;height:50px;border-radius:48px;background-color:#fff;box-shadow:0 0 15px #0003;position:relative}.accessibility-switch:before,.accessibility-switch:after{content:\"\";border-radius:50%;width:50%;height:100%;background:#000;position:absolute;bottom:0;left:0;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0;transition:transform .5s ease}.accessibility-switch:after{background:var(--mvx-accessibility-switch-active-color, #000);clip-path:circle(22px);z-index:1}.accessibility-switch.accessible:before,.accessibility-switch.accessible:after{transform:translate(100%)}.accessibility-switch-icon{width:50px;height:100%;display:grid;place-items:center;cursor:pointer;z-index:2;transition:color .5s ease;color:#000}.accessibility-switch-icon.active{color:#fff}.generate-route-btn{border-style:solid;width:100%;border-radius:30px;height:58px;background-color:#11032b;cursor:pointer}.generate-route-btn span{font-family:Poppins;font-size:1rem;line-height:16px;font-weight:600;text-align:center;color:#fff}.generate-route-container{width:100%}.route-panel.compact{width:auto;min-width:0;max-width:480px}@container (max-width: 1100px){.route-panel.compact{max-width:min(calc(100cqw - var(--floor-selector-inline-size, 102px) - 1rem),480px)}}.compact-modal{display:flex;align-items:center;gap:16px;padding:16px 16px 16px 24px}.compact-info{flex:1 1 auto;min-width:0}.compact .place-name{font-size:26px;letter-spacing:-1.2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact .floor-specs{margin-top:6px;font-size:14px}.compact .accessibility-switch{flex:0 0 auto;min-width:88px;height:44px}.compact .accessibility-switch:after{clip-path:circle(19px)}.compact .accessibility-switch-icon{width:44px}.compact-generate-route{padding:0 16px 16px}.compact-generate-route .generate-route-container{margin-top:0!important}.compact-generate-route .generate-route-btn{height:48px}.mt-3{margin-top:1rem!important}.align-items-center{align-items:center!important}.justify-content-center{justify-content:center!important}.error-modal-overlay{position:fixed;inset:0;background:#00000080;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000}.error-modal{background:#fff;color:#11032b;border-radius:24px;padding:32px;text-align:center;max-width:350px;box-shadow:0 0 24px #0000004d;animation:fadeInScale .2s ease-out}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.error-icon{margin-bottom:16px;color:#11032b}.error-message{font-size:18px;margin:0 0 24px;line-height:1.4;font-weight:500}.error-btn{background:#11032b;color:#fff;border:none;border-radius:30px;padding:12px 40px;font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s ease}.error-btn:hover{background:#1a0540}.loading-overlay{position:fixed;inset:0;background:#ffffffd9;backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999}.loading-spinner{width:60px;height:60px;border:4px solid #f3f3f3;border-top:4px solid #11032b;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loading-text{margin-top:16px;font-size:18px;font-weight:600;color:#11032b}.error-icon.network-error{color:#e74c3c}")],M3([ys({context:pV,subscribe:!0})],R3.prototype,"sdkData",2),M3([pe({type:Boolean,attribute:"hide-back"})],R3.prototype,"hideBack",1),M3([pe({type:Boolean,attribute:"hide-repeat-route"})],R3.prototype,"hideRepeatRoute",1),M3([pe({type:Boolean,attribute:"hide-route-inputs"})],R3.prototype,"hideRouteInputs",1),M3([pe({type:Boolean,attribute:"hide-accessibility-switch"})],R3.prototype,"hideAccessibilitySwitch",1),M3([pe({type:Boolean,attribute:"hide-generate-route"})],R3.prototype,"hideGenerateRoute",1),M3([pe({type:Boolean,attribute:"auto-generate-route"})],R3.prototype,"autoGenerateRoute",1),M3([pe({type:String,attribute:"panel-variant"})],R3.prototype,"panelVariant",1),R3=M3([ce("route-options")],R3);const F3=Object.freeze(Object.defineProperty({__proto__:null,get RouteOptions(){return R3}},Symbol.toStringTag,{value:"Module"})),L3=Object.freeze(Object.defineProperty({__proto__:null,default:'.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media(forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media(forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media(hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}}.maplibregl-ctrl button:not(:disabled):active{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E)}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E)}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E)}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E)}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media(forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:#ffffff80;margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E);background-color:#ffffff80;width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E)}}@media screen and (forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px #00000059}@media(prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:#0006;position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media(hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}.mapvx-marker{display:flex;border:none;cursor:pointer;padding:0;align-items:center;justify-content:center;box-sizing:border-box}.mapvx-marker .text-container{position:absolute;display:block;width:max-content;max-width:var(--mapvx-label-max-width, 200px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;pointer-events:none;box-sizing:border-box}.mapvx-marker .text-container.top{bottom:100%;left:50%;transform:translate(-50%);margin-bottom:var(--mapvx-label-vertical-gap, 4px)}.mapvx-marker .text-container.bottom{top:100%;left:50%;transform:translate(-50%);margin-top:var(--mapvx-label-vertical-gap, 4px)}.mapvx-marker .text-container.left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--mapvx-label-gap, 8px)}.mapvx-marker .text-container.right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--mapvx-label-gap, 8px)}.icon-default{background-color:#007cbf;border-radius:50%;display:block}.mapvx-map-container{width:100%;height:100%;position:relative}.mapvx-popup{max-width:300px}.mapvx-popup .maplibregl-popup-content{padding:12px;border-radius:8px;box-shadow:0 4px 6px #0000001a}.mapvx-controls{position:absolute;top:10px;right:10px;z-index:1000}'},Symbol.toStringTag,{value:"Module"})),k3="184",O3=1,z3=3,N3=0,U3=1,V3=2,G3=100,j3=101,q3=102,H3=200,Q3=201,W3=202,K3=203,Z3=204,Y3=205,X3=206,J3=207,$3=208,e4=209,t4=210,n4=211,r4=212,i4=213,a4=214,s4=0,o4=1,l4=2,u4=3,c4=4,h4=5,d4=6,p4=7,f4=0,m4=1,g4=2,A4=1,y4=2,v4=3,b4=4,x4=5,_4=6,w4=7,E4="attached",C4="detached",S4=300,I4=301,M4=302,T4=303,D4=304,P4=306,B4=1e3,R4=1001,F4=1002,L4=1003,k4=1004,O4=1005,z4=1006,N4=1007,U4=1008,V4=1009,G4=1010,j4=1011,q4=1012,H4=1013,Q4=1014,W4=1015,K4=1016,Z4=1017,Y4=1018,X4=1020,J4=35902,$4=35899,e6=1021,t6=1022,n6=1023,r6=1026,i6=1027,a6=1028,s6=1029,o6=1030,l6=1031,u6=1033,c6=33776,h6=33777,d6=33778,p6=33779,f6=35840,m6=35841,g6=35842,A6=35843,y6=36196,v6=37492,b6=37496,x6=37488,_6=37489,w6=37490,E6=37491,C6=37808,S6=37809,I6=37810,M6=37811,T6=37812,D6=37813,P6=37814,B6=37815,R6=37816,F6=37817,L6=37818,k6=37819,O6=37820,z6=37821,N6=36492,U6=36494,V6=36495,G6=36283,j6=36284,q6=36285,H6=36286,Q6=2300,W6=2301,K6=2302,Z6=2303,Y6=2400,X6=2401,J6=2402,$6=2500,e5=2501,t5="",n5="srgb",r5="srgb-linear",i5="linear",a5="srgb",s5=7680,o5=512,l5=513,u5=514,c5=515,h5=516,d5=517,p5=518,f5=519,m5=35044,g5="300 es",A5=2e3,y5=2001;const v5={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function b5(e,t){return new v5[e](t)}function x5(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _5(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function w5(){const e=_5("canvas");return e.style.display="block",e}const E5={};let C5=null;function S5(...e){const t="THREE."+e.shift();C5?C5("log",t,...e):console.log(t,...e)}function I5(e){const t=e[0];if("string"==typeof t&&t.startsWith("TSL:")){const t=e[1];t&&t.isStackTrace?e[0]+=" "+t.getLocation():e[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return e}function M5(...e){const t="THREE."+(e=I5(e)).shift();if(C5)C5("warn",t,...e);else{const n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function T5(...e){const t="THREE."+(e=I5(e)).shift();if(C5)C5("error",t,...e);else{const n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function D5(...e){const t=e.join(" ");t in E5||(E5[t]=!0,M5(...e))}const P5={[s4]:1,[l4]:6,[c4]:7,[u4]:5,[o4]:0,[d4]:2,[p4]:4,[h4]:3};class B5{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return void 0!==n&&(void 0!==n[e]&&-1!==n[e].indexOf(t))}removeEventListener(e,t){const n=this._listeners;if(void 0===n)return;const r=n[e];if(void 0!==r){const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){const t=this._listeners;if(void 0===t)return;const n=t[e.type];if(void 0!==n){e.target=this;const t=n.slice(0);for(let n=0,r=t.length;n<r;n++)t[n].call(this,e);e.target=null}}}const R5=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let F5=1234567;const L5=Math.PI/180,k5=180/Math.PI;function O5(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(R5[255&e]+R5[e>>8&255]+R5[e>>16&255]+R5[e>>24&255]+"-"+R5[255&t]+R5[t>>8&255]+"-"+R5[t>>16&15|64]+R5[t>>24&255]+"-"+R5[63&n|128]+R5[n>>8&255]+"-"+R5[n>>16&255]+R5[n>>24&255]+R5[255&r]+R5[r>>8&255]+R5[r>>16&255]+R5[r>>24&255]).toLowerCase()}function z5(e,t,n){return Math.max(t,Math.min(n,e))}function N5(e,t){return(e%t+t)%t}function U5(e,t,n){return(1-n)*e+n*t}function V5(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function G5(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const j5={DEG2RAD:L5,RAD2DEG:k5,generateUUID:O5,clamp:z5,euclideanModulo:N5,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:U5,damp:function(e,t,n,r){return U5(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(N5(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(F5=e);let t=F5+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*L5},radToDeg:function(e){return e*k5},isPowerOfTwo:function(e){return!(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),u=a((t+r)/2),c=s((t+r)/2),h=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(o*c,l*h,l*d,o*u);break;case"YZY":e.set(l*d,o*c,l*h,o*u);break;case"ZXZ":e.set(l*h,l*d,o*c,o*u);break;case"XZX":e.set(o*c,l*f,l*p,o*u);break;case"YXY":e.set(l*p,o*c,l*f,o*u);break;case"ZYZ":e.set(l*f,l*p,o*c,o*u);break;default:M5("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:G5,denormalize:V5};let q5=class e{static{e.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=z5(this.x,e.x,t.x),this.y=z5(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=z5(this.x,e,t),this.y=z5(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(z5(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(z5(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},H5=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3],h=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(c!==f||o!==h||l!==d||u!==p){let e=o*h+l*d+u*p+c*f;e<0&&(h=-h,d=-d,p=-p,f=-f,e=-e);let t=1-s;if(e<.9995){const n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=o*t+h*(s=Math.sin(s*n)/r),l=l*t+d*s,u=u*t+p*s,c=c*t+f*s}else{o=o*t+h*s,l=l*t+d*s,u=u*t+p*s,c=c*t+f*s;const e=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){const s=n[r],o=n[r+1],l=n[r+2],u=n[r+3],c=i[a],h=i[a+1],d=i[a+2],p=i[a+3];return e[t]=s*p+u*c+o*d-l*h,e[t+1]=o*p+u*h+l*c-s*d,e[t+2]=l*p+u*d+s*h-o*c,e[t+3]=u*p-s*c-o*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),u=s(r/2),c=s(i/2),h=o(n/2),d=o(r/2),p=o(i/2);switch(a){case"XYZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"YXZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"ZXY":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"ZYX":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"YZX":this._x=h*u*c+l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c-h*d*p;break;case"XZY":this._x=h*u*c-l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c+h*d*p;break;default:M5("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],h=n+s+c;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>c){const e=2*Math.sqrt(1+n-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>c){const e=2*Math.sqrt(1+s-n-c);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+u)/e}else{const e=2*Math.sqrt(1+c-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(z5(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=n*u+a*s+r*l-i*o,this._y=r*u+a*o+i*s-n*l,this._z=i*u+a*l+n*o-r*s,this._w=a*u-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,s=this.dot(e);s<0&&(n=-n,r=-r,i=-i,a=-a,s=-s);let o=1-t;if(s<.9995){const e=Math.acos(s),l=Math.sin(e);o=Math.sin(o*e)/l,t=Math.sin(t*e)/l,this._x=this._x*o+n*t,this._y=this._y*o+r*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this._onChangeCallback()}else this._x=this._x*o+n*t,this._y=this._y*o+r*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Q5=class e{static{e.prototype.isVector3=!0}constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(K5.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(K5.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*r-s*n),u=2*(s*t-i*r),c=2*(i*n-a*t);return this.x=t+o*l+a*c-s*u,this.y=n+o*u+s*l-i*c,this.z=r+o*c+i*u-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=z5(this.x,e.x,t.x),this.y=z5(this.y,e.y,t.y),this.z=z5(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=z5(this.x,e,t),this.y=z5(this.y,e,t),this.z=z5(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(z5(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return W5.copy(this).projectOnVector(e),this.sub(W5)}reflect(e){return this.sub(W5.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(z5(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=2*Math.random()-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const W5=new Q5,K5=new H5;let Z5=class e{static{e.prototype.isMatrix3=!0}constructor(e,t,n,r,i,a,s,o,l){this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}set(e,t,n,r,i,a,s,o,l){const u=this.elements;return u[0]=e,u[1]=r,u[2]=s,u[3]=t,u[4]=i,u[5]=o,u[6]=n,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],A=r[1],y=r[4],v=r[7],b=r[2],x=r[5],_=r[8];return i[0]=a*f+s*A+o*b,i[3]=a*m+s*y+o*x,i[6]=a*g+s*v+o*_,i[1]=l*f+u*A+c*b,i[4]=l*m+u*y+c*x,i[7]=l*g+u*v+c*_,i[2]=h*f+d*A+p*b,i[5]=h*m+d*y+p*x,i[8]=h*g+d*v+p*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-n*i*u+n*s*o+r*i*l-r*a*o}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,h=s*o-u*i,d=l*i-a*o,p=t*c+n*h+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=c*f,e[1]=(r*l-u*n)*f,e[2]=(s*n-r*a)*f,e[3]=h*f,e[4]=(u*t-r*o)*f,e[5]=(r*i-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,s){const o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Y5.makeScale(e,t)),this}rotate(e){return this.premultiply(Y5.makeRotation(-e)),this}translate(e,t){return this.premultiply(Y5.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}};const Y5=new Z5,X5=(new Z5).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),J5=(new Z5).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function $5(){const e={enabled:!0,workingColorSpace:r5,spaces:{},convert:function(e,t,n){return!1!==this.enabled&&t!==n&&t&&n?(this.spaces[t].transfer===a5&&(e.r=t8(e.r),e.g=t8(e.g),e.b=t8(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===a5&&(e.r=n8(e.r),e.g=n8(e.g),e.b=n8(e.b)),e):e},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===t5?i5:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return D5("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return D5("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[r5]:{primaries:t,whitePoint:r,transfer:i5,toXYZ:X5,fromXYZ:J5,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:n5},outputColorSpaceConfig:{drawingBufferColorSpace:n5}},[n5]:{primaries:t,whitePoint:r,transfer:a5,toXYZ:X5,fromXYZ:J5,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:n5}}}),e}const e8=$5();function t8(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function n8(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let r8;class i8{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{void 0===r8&&(r8=_5("canvas")),r8.width=e.width,r8.height=e.height;const t=r8.getContext("2d");e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=r8}return n.toDataURL(t)}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=_5("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*t8(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*t8(t[e]/255)):t[e]=t8(t[e]);return{data:t,width:e.width,height:e.height}}return M5("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let a8=0;class s8{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:a8++}),this.uuid=O5(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):null!==t?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(o8(r[t].image)):e.push(o8(r[t]))}else e=o8(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function o8(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?i8.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(M5("Texture: Unable to serialize Texture."),{})}let l8=0;const u8=new Q5;let c8=class e extends B5{constructor(t=e.DEFAULT_IMAGE,n=e.DEFAULT_MAPPING,r=1001,i=1001,a=1006,s=1008,o=1023,l=V4,u=e.DEFAULT_ANISOTROPY,c=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:l8++}),this.uuid=O5(),this.name="",this.source=new s8(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=a,this.minFilter=s,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new q5(0,0),this.repeat=new q5(1,1),this.center=new q5(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Z5,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(u8).x}get height(){return this.source.getSize(u8).y}get depth(){return this.source.getSize(u8).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(void 0===n){M5(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n:M5(`Texture.setValues(): property '${t}' does not exist.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==S4)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case B4:e.x=e.x-Math.floor(e.x);break;case R4:e.x=e.x<0?0:1;break;case F4:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case B4:e.y=e.y-Math.floor(e.y);break;case R4:e.y=e.y<0?0:1;break;case F4:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}};c8.DEFAULT_IMAGE=null,c8.DEFAULT_MAPPING=S4,c8.DEFAULT_ANISOTROPY=1;let h8=class e{static{e.prototype.isVector4=!0}constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,s=.1,o=e.elements,l=o[0],u=o[4],c=o[8],h=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(u-h)<a&&Math.abs(c-f)<a&&Math.abs(p-m)<a){if(Math.abs(u+h)<s&&Math.abs(c+f)<s&&Math.abs(p+m)<s&&Math.abs(l+d+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,o=(d+1)/2,A=(g+1)/2,y=(u+h)/4,v=(c+f)/4,b=(p+m)/4;return e>o&&e>A?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=v/n):o>A?o<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=y/r,i=b/r):A<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(A),n=v/i,r=b/i),this.set(n,r,i,t),this}let A=Math.sqrt((m-p)*(m-p)+(c-f)*(c-f)+(h-u)*(h-u));return Math.abs(A)<.001&&(A=1),this.x=(m-p)/A,this.y=(c-f)/A,this.z=(h-u)/A,this.w=Math.acos((l+d+g-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=z5(this.x,e.x,t.x),this.y=z5(this.y,e.y,t.y),this.z=z5(this.z,e.z,t.z),this.w=z5(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=z5(this.x,e,t),this.y=z5(this.y,e,t),this.z=z5(this.z,e,t),this.w=z5(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(z5(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};class d8 extends B5{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:z4,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new h8(0,0,e,t),this.scissorTest=!1,this.viewport=new h8(0,0,e,t),this.textures=[];const r={width:e,height:t,depth:n.depth},i=new c8(r),a=n.count;for(let s=0;s<a;s++)this.textures[s]=i.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:z4,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++){this.textures[n].setValues(t)}}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==e&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.textures.length;r<i;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,!0!==this.textures[r].isData3DTexture&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const n=Object.assign({},e.textures[t].image);this.textures[t].source=new s8(n)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this}dispose(){this.dispatchEvent({type:"dispose"})}}class p8 extends d8{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class f8 extends c8{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=L4,this.minFilter=L4,this.wrapR=R4,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class m8 extends c8{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=L4,this.minFilter=L4,this.wrapR=R4,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}let g8=class e{static{e.prototype.isMatrix4=!0}constructor(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m)}set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new e).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return 0===this.determinant()?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(0===e.determinant())return this.identity();const t=this.elements,n=e.elements,r=1/A8.setFromMatrixColumn(e,0).length(),i=1/A8.setFromMatrixColumn(e,1).length(),a=1/A8.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){const e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){const e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){const e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e-i*s,t[4]=-a*c,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*u,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){const e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*c,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=n*c-r,t[2]=r*c-n,t[6]=s*u,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(v8,e,b8)}lookAt(e,t,n){const r=this.elements;return w8.subVectors(e,t),0===w8.lengthSq()&&(w8.z=1),w8.normalize(),x8.crossVectors(n,w8),0===x8.lengthSq()&&(1===Math.abs(n.z)?w8.x+=1e-4:w8.z+=1e-4,w8.normalize(),x8.crossVectors(n,w8)),x8.normalize(),_8.crossVectors(w8,x8),r[0]=x8.x,r[4]=_8.x,r[8]=w8.x,r[1]=x8.y,r[5]=_8.y,r[9]=w8.y,r[2]=x8.z,r[6]=_8.z,r[10]=w8.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],A=n[3],y=n[7],v=n[11],b=n[15],x=r[0],_=r[4],w=r[8],E=r[12],C=r[1],S=r[5],I=r[9],M=r[13],T=r[2],D=r[6],P=r[10],B=r[14],R=r[3],F=r[7],L=r[11],k=r[15];return i[0]=a*x+s*C+o*T+l*R,i[4]=a*_+s*S+o*D+l*F,i[8]=a*w+s*I+o*P+l*L,i[12]=a*E+s*M+o*B+l*k,i[1]=u*x+c*C+h*T+d*R,i[5]=u*_+c*S+h*D+d*F,i[9]=u*w+c*I+h*P+d*L,i[13]=u*E+c*M+h*B+d*k,i[2]=p*x+f*C+m*T+g*R,i[6]=p*_+f*S+m*D+g*F,i[10]=p*w+f*I+m*P+g*L,i[14]=p*E+f*M+m*B+g*k,i[3]=A*x+y*C+v*T+b*R,i[7]=A*_+y*S+v*D+b*F,i[11]=A*w+y*I+v*P+b*L,i[15]=A*E+y*M+v*B+b*k,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14],p=e[3],f=e[7],m=e[11],g=e[15],A=o*d-l*h,y=s*d-l*c,v=s*h-o*c,b=a*d-l*u,x=a*h-o*u,_=a*c-s*u;return t*(f*A-m*y+g*v)-n*(p*A-m*b+g*x)+r*(p*y-f*b+g*_)-i*(p*v-f*x+m*_)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],A=t*s-n*a,y=t*o-r*a,v=t*l-i*a,b=n*o-r*s,x=n*l-i*s,_=r*l-i*o,w=u*f-c*p,E=u*m-h*p,C=u*g-d*p,S=c*m-h*f,I=c*g-d*f,M=h*g-d*m,T=A*M-y*I+v*S+b*C-x*E+_*w;if(0===T)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/T;return e[0]=(s*M-o*I+l*S)*D,e[1]=(r*I-n*M-i*S)*D,e[2]=(f*_-m*x+g*b)*D,e[3]=(h*x-c*_-d*b)*D,e[4]=(o*C-a*M-l*E)*D,e[5]=(t*M-r*C+i*E)*D,e[6]=(m*v-p*_-g*y)*D,e[7]=(u*_-h*v+d*y)*D,e[8]=(a*I-s*C+l*w)*D,e[9]=(n*C-t*I-i*w)*D,e[10]=(p*x-f*v+g*A)*D,e[11]=(c*v-u*x-d*A)*D,e[12]=(s*E-a*S-o*w)*D,e[13]=(t*S-n*E+r*w)*D,e[14]=(f*y-p*b-m*A)*D,e[15]=(u*b-c*y+h*A)*D,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,u=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,u*s+n,u*o-r*a,0,l*o-r*s,u*o+r*a,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,u=a+a,c=s+s,h=i*l,d=i*u,p=i*c,f=a*u,m=a*c,g=s*c,A=o*l,y=o*u,v=o*c,b=n.x,x=n.y,_=n.z;return r[0]=(1-(f+g))*b,r[1]=(d+v)*b,r[2]=(p-y)*b,r[3]=0,r[4]=(d-v)*x,r[5]=(1-(h+g))*x,r[6]=(m+A)*x,r[7]=0,r[8]=(p+y)*_,r[9]=(m-A)*_,r[10]=(1-(h+f))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;e.x=r[12],e.y=r[13],e.z=r[14];const i=this.determinant();if(0===i)return n.set(1,1,1),t.identity(),this;let a=A8.set(r[0],r[1],r[2]).length();const s=A8.set(r[4],r[5],r[6]).length(),o=A8.set(r[8],r[9],r[10]).length();i<0&&(a=-a),y8.copy(this);const l=1/a,u=1/s,c=1/o;return y8.elements[0]*=l,y8.elements[1]*=l,y8.elements[2]*=l,y8.elements[4]*=u,y8.elements[5]*=u,y8.elements[6]*=u,y8.elements[8]*=c,y8.elements[9]*=c,y8.elements[10]*=c,t.setFromRotationMatrix(y8),n.x=a,n.y=s,n.z=o,this}makePerspective(e,t,n,r,i,a,s=2e3,o=!1){const l=this.elements,u=2*i/(t-e),c=2*i/(n-r),h=(t+e)/(t-e),d=(n+r)/(n-r);let p,f;if(o)p=i/(a-i),f=a*i/(a-i);else if(s===A5)p=-(a+i)/(a-i),f=-2*a*i/(a-i);else{if(s!==y5)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);p=-a/(a-i),f=-a*i/(a-i)}return l[0]=u,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=c,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,r,i,a,s=2e3,o=!1){const l=this.elements,u=2/(t-e),c=2/(n-r),h=-(t+e)/(t-e),d=-(n+r)/(n-r);let p,f;if(o)p=1/(a-i),f=a/(a-i);else if(s===A5)p=-2/(a-i),f=-(a+i)/(a-i);else{if(s!==y5)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);p=-1/(a-i),f=-i/(a-i)}return l[0]=u,l[4]=0,l[8]=0,l[12]=h,l[1]=0,l[5]=c,l[9]=0,l[13]=d,l[2]=0,l[6]=0,l[10]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};const A8=new Q5,y8=new g8,v8=new Q5(0,0,0),b8=new Q5(1,1,1),x8=new Q5,_8=new Q5,w8=new Q5,E8=new g8,C8=new H5;class S8{constructor(e=0,t=0,n=0,r=S8.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(z5(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-z5(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(z5(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-z5(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(z5(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-z5(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:M5("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return E8.makeRotationFromQuaternion(e),this.setFromRotationMatrix(E8,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return C8.setFromEuler(this),this.setFromQuaternion(C8,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}S8.DEFAULT_ORDER="XYZ";class I8{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}isEnabled(e){return!!(this.mask&1<<e)}}let M8=0;const T8=new Q5,D8=new H5,P8=new g8,B8=new Q5,R8=new Q5,F8=new Q5,L8=new H5,k8=new Q5(1,0,0),O8=new Q5(0,1,0),z8=new Q5(0,0,1),N8={type:"added"},U8={type:"removed"},V8={type:"childadded",child:null},G8={type:"childremoved",child:null};class j8 extends B5{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:M8++}),this.uuid=O5(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=j8.DEFAULT_UP.clone();const e=new Q5,t=new S8,n=new H5,r=new Q5(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new g8},normalMatrix:{value:new Z5}}),this.matrix=new g8,this.matrixWorld=new g8,this.matrixAutoUpdate=j8.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=j8.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new I8,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return D8.setFromAxisAngle(e,t),this.quaternion.multiply(D8),this}rotateOnWorldAxis(e,t){return D8.setFromAxisAngle(e,t),this.quaternion.premultiply(D8),this}rotateX(e){return this.rotateOnAxis(k8,e)}rotateY(e){return this.rotateOnAxis(O8,e)}rotateZ(e){return this.rotateOnAxis(z8,e)}translateOnAxis(e,t){return T8.copy(e).applyQuaternion(this.quaternion),this.position.add(T8.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(k8,e)}translateY(e){return this.translateOnAxis(O8,e)}translateZ(e){return this.translateOnAxis(z8,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(P8.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?B8.copy(e):B8.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),R8.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?P8.lookAt(R8,B8,this.up):P8.lookAt(B8,R8,this.up),this.quaternion.setFromRotationMatrix(P8),r&&(P8.extractRotation(r.matrixWorld),D8.setFromRotationMatrix(P8),this.quaternion.premultiply(D8.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(T5("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(N8),V8.child=e,this.dispatchEvent(V8),V8.child=null):T5("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(U8),G8.child=e,this.dispatchEvent(G8),G8.child=null),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),P8.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),P8.multiply(e.parent.matrixWorld)),e.applyMatrix4(P8),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(N8),V8.child=e,this.dispatchEvent(V8),V8.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const r=this.children;for(let i=0,a=r.length;i<a;i++)r[i].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(R8,e,F8),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(R8,L8,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(null!==e){const t=e.x,n=e.y,r=e.z,i=this.matrix.elements;i[12]+=t-i[0]*t-i[4]*n-i[8]*r,i[13]+=n-i[1]*t-i[5]*n-i[9]*r,i[14]+=r-i[2]*t-i[6]*n-i[10]*r}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++){t[n].updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){e[t].updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),!1!==this.static&&(r.static=this.static),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),null!==this.pivot&&(r.pivot=this.pivot.toArray()),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.morphTargetDictionary&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),void 0!==this.morphTargetInfluences&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(r.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(r.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(r.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=a(e.geometries),r=a(e.materials),i=a(e.textures),s=a(e.images),o=a(e.shapes),l=a(e.skeletons),u=a(e.animations),c=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=null!==e.pivot?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}j8.DEFAULT_UP=new Q5(0,1,0),j8.DEFAULT_MATRIX_AUTO_UPDATE=!0,j8.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class q8 extends j8{constructor(){super(),this.isGroup=!0,this.type="Group"}}const H8={type:"move"};class Q8{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new q8,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new q8,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Q5,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Q5),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new q8,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Q5,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Q5,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null;const s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){a=!0;for(const a of e.hand.values()){const e=t.getJointPose(a,n),r=this._getHandJoint(l,a);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),o=.02,u=.005;l.inputState.pinching&&s>o+u?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=o-u&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,o.eventsEnabled&&o.dispatchEvent({type:"gripUpdated",data:e,target:this})));null!==s&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(H8)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new q8;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const W8={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},K8={h:0,s:0,l:0},Z8={h:0,s:0,l:0};function Y8(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class X8{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=n5){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,e8.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=e8.workingColorSpace){return this.r=e,this.g=t,this.b=n,e8.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=e8.workingColorSpace){if(e=N5(e,1),t=z5(t,0,1),n=z5(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Y8(i,r,e+1/3),this.g=Y8(i,r,e),this.b=Y8(i,r,e-1/3)}return e8.colorSpaceToWorking(this,r),this}setStyle(e,t=n5){function n(t){void 0!==t&&parseFloat(t)<1&&M5("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:M5("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);M5("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=n5){const n=W8[e.toLowerCase()];return void 0!==n?this.setHex(n,t):M5("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=t8(e.r),this.g=t8(e.g),this.b=t8(e.b),this}copyLinearToSRGB(e){return this.r=n8(e.r),this.g=n8(e.g),this.b=n8(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=n5){return e8.workingToColorSpace(J8.copy(this),e),65536*Math.round(z5(255*J8.r,0,255))+256*Math.round(z5(255*J8.g,0,255))+Math.round(z5(255*J8.b,0,255))}getHexString(e=n5){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=e8.workingColorSpace){e8.workingToColorSpace(J8.copy(this),t);const n=J8.r,r=J8.g,i=J8.b,a=Math.max(n,r,i),s=Math.min(n,r,i);let o,l;const u=(s+a)/2;if(s===a)o=0,l=0;else{const e=a-s;switch(l=u<=.5?e/(a+s):e/(2-a-s),a){case n:o=(r-i)/e+(r<i?6:0);break;case r:o=(i-n)/e+2;break;case i:o=(n-r)/e+4}o/=6}return e.h=o,e.s=l,e.l=u,e}getRGB(e,t=e8.workingColorSpace){return e8.workingToColorSpace(J8.copy(this),t),e.r=J8.r,e.g=J8.g,e.b=J8.b,e}getStyle(e=n5){e8.workingToColorSpace(J8.copy(this),e);const t=J8.r,n=J8.g,r=J8.b;return e!==n5?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(e,t,n){return this.getHSL(K8),this.setHSL(K8.h+e,K8.s+t,K8.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(K8),e.getHSL(Z8);const n=U5(K8.h,Z8.h,t),r=U5(K8.s,Z8.s,t),i=U5(K8.l,Z8.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const J8=new X8;X8.NAMES=W8;class $8{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new X8(e),this.density=t}clone(){return new $8(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class e7{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new X8(e),this.near=t,this.far=n}clone(){return new e7(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class t7 extends j8{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new S8,this.environmentIntensity=1,this.environmentRotation=new S8,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}const n7=new Q5,r7=new Q5,i7=new Q5,a7=new Q5,s7=new Q5,o7=new Q5,l7=new Q5,u7=new Q5,c7=new Q5,h7=new Q5,d7=new h8,p7=new h8,f7=new h8;class m7{constructor(e=new Q5,t=new Q5,n=new Q5){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),n7.subVectors(e,t),r.cross(n7);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){n7.subVectors(r,t),r7.subVectors(n,t),i7.subVectors(e,t);const a=n7.dot(n7),s=n7.dot(r7),o=n7.dot(i7),l=r7.dot(r7),u=r7.dot(i7),c=a*l-s*s;if(0===c)return i.set(0,0,0),null;const h=1/c,d=(l*o-s*u)*h,p=(a*u-s*o)*h;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return null!==this.getBarycoord(e,t,n,r,a7)&&(a7.x>=0&&a7.y>=0&&a7.x+a7.y<=1)}static getInterpolation(e,t,n,r,i,a,s,o){return null===this.getBarycoord(e,t,n,r,a7)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(i,a7.x),o.addScaledVector(a,a7.y),o.addScaledVector(s,a7.z),o)}static getInterpolatedAttribute(e,t,n,r,i,a){return d7.setScalar(0),p7.setScalar(0),f7.setScalar(0),d7.fromBufferAttribute(e,t),p7.fromBufferAttribute(e,n),f7.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(d7,i.x),a.addScaledVector(p7,i.y),a.addScaledVector(f7,i.z),a}static isFrontFacing(e,t,n,r){return n7.subVectors(n,t),r7.subVectors(e,t),n7.cross(r7).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return n7.subVectors(this.c,this.b),r7.subVectors(this.a,this.b),.5*n7.cross(r7).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return m7.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return m7.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,i){return m7.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return m7.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return m7.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,s;s7.subVectors(r,n),o7.subVectors(i,n),u7.subVectors(e,n);const o=s7.dot(u7),l=o7.dot(u7);if(o<=0&&l<=0)return t.copy(n);c7.subVectors(e,r);const u=s7.dot(c7),c=o7.dot(c7);if(u>=0&&c<=u)return t.copy(r);const h=o*c-u*l;if(h<=0&&o>=0&&u<=0)return a=o/(o-u),t.copy(n).addScaledVector(s7,a);h7.subVectors(e,i);const d=s7.dot(h7),p=o7.dot(h7);if(p>=0&&d<=p)return t.copy(i);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(o7,s);const m=u*p-d*c;if(m<=0&&c-u>=0&&d-p>=0)return l7.subVectors(i,r),s=(c-u)/(c-u+(d-p)),t.copy(r).addScaledVector(l7,s);const g=1/(m+f+h);return a=f*g,s=h*g,t.copy(n).addScaledVector(s7,a).addScaledVector(o7,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class g7{constructor(e=new Q5(1/0,1/0,1/0),t=new Q5(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(y7.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(y7.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=y7.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n){const r=n.getAttribute("position");if(!0===t&&void 0!==r&&!0!==e.isInstancedMesh)for(let t=0,n=r.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,y7):y7.fromBufferAttribute(r,t),y7.applyMatrix4(e.matrixWorld),this.expandByPoint(y7);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),v7.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),v7.copy(n.boundingBox)),v7.applyMatrix4(e.matrixWorld),this.union(v7)}const r=e.children;for(let i=0,a=r.length;i<a;i++)this.expandByObject(r[i],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,y7),y7.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(S7),I7.subVectors(this.max,S7),b7.subVectors(e.a,S7),x7.subVectors(e.b,S7),_7.subVectors(e.c,S7),w7.subVectors(x7,b7),E7.subVectors(_7,x7),C7.subVectors(b7,_7);let t=[0,-w7.z,w7.y,0,-E7.z,E7.y,0,-C7.z,C7.y,w7.z,0,-w7.x,E7.z,0,-E7.x,C7.z,0,-C7.x,-w7.y,w7.x,0,-E7.y,E7.x,0,-C7.y,C7.x,0];return!!D7(t,b7,x7,_7,I7)&&(t=[1,0,0,0,1,0,0,0,1],!!D7(t,b7,x7,_7,I7)&&(M7.crossVectors(w7,E7),t=[M7.x,M7.y,M7.z],D7(t,b7,x7,_7,I7)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,y7).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(y7).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(A7[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),A7[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),A7[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),A7[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),A7[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),A7[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),A7[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),A7[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(A7)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const A7=[new Q5,new Q5,new Q5,new Q5,new Q5,new Q5,new Q5,new Q5],y7=new Q5,v7=new g7,b7=new Q5,x7=new Q5,_7=new Q5,w7=new Q5,E7=new Q5,C7=new Q5,S7=new Q5,I7=new Q5,M7=new Q5,T7=new Q5;function D7(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){T7.fromArray(e,a);const s=i.x*Math.abs(T7.x)+i.y*Math.abs(T7.y)+i.z*Math.abs(T7.z),o=t.dot(T7),l=n.dot(T7),u=r.dot(T7);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}const P7=B7();function B7(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const e=l-127;e<-27?(r[l]=0,r[256|l]=32768,i[l]=24,i[256|l]=24):e<-14?(r[l]=1024>>-e-14,r[256|l]=1024>>-e-14|32768,i[l]=-e-1,i[256|l]=-e-1):e<=15?(r[l]=e+15<<10,r[256|l]=e+15<<10|32768,i[l]=13,i[256|l]=13):e<128?(r[l]=31744,r[256|l]=64512,i[l]=24,i[256|l]=24):(r[l]=31744,r[256|l]=64512,i[l]=13,i[256|l]=13)}const a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let e=l<<13,t=0;for(;!(8388608&e);)e<<=1,t-=8388608;e&=-8388609,t+=947912704,a[l]=e|t}for(let l=1024;l<2048;++l)a[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)32!==l&&(o[l]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}function R7(e){Math.abs(e)>65504&&M5("DataUtils.toHalfFloat(): Value out of range."),e=z5(e,-65504,65504),P7.floatView[0]=e;const t=P7.uint32View[0],n=t>>23&511;return P7.baseTable[n]+((8388607&t)>>P7.shiftTable[n])}function F7(e){const t=e>>10;return P7.uint32View[0]=P7.mantissaTable[P7.offsetTable[t]+(1023&e)]+P7.exponentTable[t],P7.floatView[0]}const L7=new Q5,k7=new q5;let O7=0;class z7 extends B5{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:O7++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=m5,this.updateRanges=[],this.gpuType=W4,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)k7.fromBufferAttribute(this,t),k7.applyMatrix3(e),this.setXY(t,k7.x,k7.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.applyMatrix3(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.applyMatrix4(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.applyNormalMatrix(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.transformDirection(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=V5(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=G5(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=V5(t,this.array)),t}setX(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=V5(t,this.array)),t}setY(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=V5(t,this.array)),t}setZ(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=V5(t,this.array)),t}setW(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array),i=G5(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==m5&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class N7 extends z7{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class U7 extends z7{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class V7 extends z7{constructor(e,t,n){super(new Float32Array(e),t,n)}}const G7=new g7,j7=new Q5,q7=new Q5;class H7{constructor(e=new Q5,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):G7.setFromPoints(e).getCenter(n);let r=0;for(let i=0,a=e.length;i<a;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;j7.subVectors(e,this.center);const t=j7.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(j7,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(q7.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(j7.copy(e.center).add(q7)),this.expandByPoint(j7.copy(e.center).sub(q7))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let Q7=0;const W7=new g8,K7=new j8,Z7=new Q5,Y7=new g7,X7=new g7,J7=new Q5;class $7 extends B5{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Q7++}),this.uuid=O5(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(function(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}(e)?U7:N7)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Z5).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return W7.makeRotationFromQuaternion(e),this.applyMatrix4(W7),this}rotateX(e){return W7.makeRotationX(e),this.applyMatrix4(W7),this}rotateY(e){return W7.makeRotationY(e),this.applyMatrix4(W7),this}rotateZ(e){return W7.makeRotationZ(e),this.applyMatrix4(W7),this}translate(e,t,n){return W7.makeTranslation(e,t,n),this.applyMatrix4(W7),this}scale(e,t,n){return W7.makeScale(e,t,n),this.applyMatrix4(W7),this}lookAt(e){return K7.lookAt(e),K7.updateMatrix(),this.applyMatrix4(K7.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Z7).negate(),this.translate(Z7.x,Z7.y,Z7.z),this}setFromPoints(e){const t=this.getAttribute("position");if(void 0===t){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}this.setAttribute("position",new V7(t,3))}else{const n=Math.min(e.length,t.count);for(let r=0;r<n;r++){const n=e[r];t.setXYZ(r,n.x,n.y,n.z||0)}e.length>t.count&&M5("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new g7);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return T5("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new Q5(-1/0,-1/0,-1/0),new Q5(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];Y7.setFromBufferAttribute(e),this.morphTargetsRelative?(J7.addVectors(this.boundingBox.min,Y7.min),this.boundingBox.expandByPoint(J7),J7.addVectors(this.boundingBox.max,Y7.max),this.boundingBox.expandByPoint(J7)):(this.boundingBox.expandByPoint(Y7.min),this.boundingBox.expandByPoint(Y7.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&T5('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new H7);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return T5("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new Q5,1/0);if(e){const n=this.boundingSphere.center;if(Y7.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];X7.setFromBufferAttribute(n),this.morphTargetsRelative?(J7.addVectors(Y7.min,X7.min),Y7.expandByPoint(J7),J7.addVectors(Y7.max,X7.max),Y7.expandByPoint(J7)):(Y7.expandByPoint(X7.min),Y7.expandByPoint(X7.max))}Y7.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)J7.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(J7));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],s=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)J7.fromBufferAttribute(a,t),s&&(Z7.fromBufferAttribute(e,t),J7.add(Z7)),r=Math.max(r,n.distanceToSquared(J7))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&T5('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void T5("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.position,r=t.normal,i=t.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new z7(new Float32Array(4*n.count),4));const a=this.getAttribute("tangent"),s=[],o=[];for(let w=0;w<n.count;w++)s[w]=new Q5,o[w]=new Q5;const l=new Q5,u=new Q5,c=new Q5,h=new q5,d=new q5,p=new q5,f=new Q5,m=new Q5;function g(e,t,r){l.fromBufferAttribute(n,e),u.fromBufferAttribute(n,t),c.fromBufferAttribute(n,r),h.fromBufferAttribute(i,e),d.fromBufferAttribute(i,t),p.fromBufferAttribute(i,r),u.sub(l),c.sub(l),d.sub(h),p.sub(h);const a=1/(d.x*p.y-p.x*d.y);isFinite(a)&&(f.copy(u).multiplyScalar(p.y).addScaledVector(c,-d.y).multiplyScalar(a),m.copy(c).multiplyScalar(d.x).addScaledVector(u,-p.x).multiplyScalar(a),s[e].add(f),s[t].add(f),s[r].add(f),o[e].add(m),o[t].add(m),o[r].add(m))}let A=this.groups;0===A.length&&(A=[{start:0,count:e.count}]);for(let w=0,E=A.length;w<E;++w){const t=A[w],n=t.start;for(let r=n,i=n+t.count;r<i;r+=3)g(e.getX(r+0),e.getX(r+1),e.getX(r+2))}const y=new Q5,v=new Q5,b=new Q5,x=new Q5;function _(e){b.fromBufferAttribute(r,e),x.copy(b);const t=s[e];y.copy(t),y.sub(b.multiplyScalar(b.dot(t))).normalize(),v.crossVectors(x,t);const n=v.dot(o[e])<0?-1:1;a.setXYZW(e,y.x,y.y,y.z,n)}for(let w=0,E=A.length;w<E;++w){const t=A[w],n=t.start;for(let r=n,i=n+t.count;r<i;r+=3)_(e.getX(r+0)),_(e.getX(r+1)),_(e.getX(r+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new z7(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new Q5,i=new Q5,a=new Q5,s=new Q5,o=new Q5,l=new Q5,u=new Q5,c=new Q5;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),p=e.getX(h+1),f=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,p),a.fromBufferAttribute(t,f),u.subVectors(a,i),c.subVectors(r,i),u.cross(c),s.fromBufferAttribute(n,d),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(u),o.add(u),l.add(u),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,h=t.count;e<h;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),u.subVectors(a,i),c.subVectors(r,i),u.cross(c),n.setXYZ(e+0,u.x,u.y,u.z),n.setXYZ(e+1,u.x,u.y,u.z),n.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)J7.fromBufferAttribute(e,t),J7.normalize(),e.setXYZ(t,J7.x,J7.y,J7.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r);let s=0,o=0;for(let l=0,u=t.length;l<u;l++){s=e.isInterleavedBufferAttribute?t[l]*e.data.stride+e.offset:t[l]*r;for(let e=0;e<r;e++)a[o++]=n[s++]}return new z7(a,r,i)}if(null===this.index)return M5("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new $7,n=this.index.array,r=this.attributes;for(const s in r){const i=e(r[s],n);t.setAttribute(s,i)}const i=this.morphAttributes;for(const s in i){const r=[],a=i[s];for(let t=0,i=a.length;t<i;t++){const i=e(a[t],n);r.push(i)}t.morphAttributes[s]=r}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let s=0,o=a.length;s<o;s++){const e=a[s];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const o in n){const t=n[o];e.data.attributes[o]=t.toJSON(e.data)}const r={};let i=!1;for(const o in this.morphAttributes){const t=this.morphAttributes[o],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[o]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere=s.toJSON()),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone());const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let l=0,u=a.length;l<u;l++){const e=a[l];this.addGroup(e.start,e.count,e.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}class e9{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=m5,this.updateRanges=[],this.version=0,this.uuid=O5()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=O5()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=O5()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const t9=new Q5;class n9{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)t9.fromBufferAttribute(this,t),t9.applyMatrix4(e),this.setXYZ(t,t9.x,t9.y,t9.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)t9.fromBufferAttribute(this,t),t9.applyNormalMatrix(e),this.setXYZ(t,t9.x,t9.y,t9.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)t9.fromBufferAttribute(this,t),t9.transformDirection(e),this.setXYZ(t,t9.x,t9.y,t9.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=V5(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=G5(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=V5(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=V5(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=V5(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=V5(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array),i=G5(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){S5("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new z7(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new n9(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){S5("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}let r9,i9=0,a9=class extends B5{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:i9++}),this.uuid=O5(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Z3,this.blendDst=Y3,this.blendEquation=G3,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new X8(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=s5,this.stencilZFail=s5,this.stencilZPass=s5,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){M5(`Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:M5(`Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==Z3&&(n.blendSrc=this.blendSrc),this.blendDst!==Y3&&(n.blendDst=this.blendDst),this.blendEquation!==G3&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==s5&&(n.stencilFail=this.stencilFail),this.stencilZFail!==s5&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==s5&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!1===this.allowOverride&&(n.allowOverride=!1),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}};class s9 extends a9{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new X8(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const o9=new Q5,l9=new Q5,u9=new Q5,c9=new q5,h9=new q5,d9=new g8,p9=new Q5,f9=new Q5,m9=new Q5,g9=new q5,A9=new q5,y9=new q5;class v9 extends j8{constructor(e=new s9){if(super(),this.isSprite=!0,this.type="Sprite",void 0===r9){r9=new $7;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new e9(e,5);r9.setIndex([0,1,2,0,2,3]),r9.setAttribute("position",new n9(t,3,0,!1)),r9.setAttribute("uv",new n9(t,2,3,!1))}this.geometry=r9,this.material=e,this.center=new q5(.5,.5),this.count=1}raycast(e,t){null===e.camera&&T5('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),l9.setFromMatrixScale(this.matrixWorld),d9.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),u9.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&l9.multiplyScalar(-u9.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;b9(p9.set(-.5,-.5,0),u9,a,l9,r,i),b9(f9.set(.5,-.5,0),u9,a,l9,r,i),b9(m9.set(.5,.5,0),u9,a,l9,r,i),g9.set(0,0),A9.set(1,0),y9.set(1,1);let s=e.ray.intersectTriangle(p9,f9,m9,!1,o9);if(null===s&&(b9(f9.set(-.5,.5,0),u9,a,l9,r,i),A9.set(0,1),s=e.ray.intersectTriangle(p9,m9,f9,!1,o9),null===s))return;const o=e.ray.origin.distanceTo(o9);o<e.near||o>e.far||t.push({distance:o,point:o9.clone(),uv:m7.getInterpolation(o9,p9,f9,m9,g9,A9,y9,new q5),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function b9(e,t,n,r,i,a){c9.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(h9.x=a*c9.x-i*c9.y,h9.y=i*c9.x+a*c9.y):h9.copy(c9),e.copy(t),e.x+=h9.x,e.y+=h9.y,e.applyMatrix4(d9)}const x9=new Q5,_9=new Q5;class w9 extends j8{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,r=t.length;n<r;n++){const e=t[n];this.addLevel(e.object.clone(),e.distance,e.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const r=this.levels;let i;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const e=t.splice(n,1);return this.remove(e[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){x9.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(x9);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){x9.setFromMatrixPosition(e.matrixWorld),_9.setFromMatrixPosition(this.matrixWorld);const n=x9.distanceTo(_9)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),!(n>=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let r=0,i=n.length;r<i;r++){const e=n[r];t.object.levels.push({object:e.object.uuid,distance:e.distance,hysteresis:e.hysteresis})}return t}}const E9=new Q5,C9=new Q5,S9=new Q5,I9=new Q5,M9=new Q5,T9=new Q5,D9=new Q5;class P9{constructor(e=new Q5,t=new Q5(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,E9)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=E9.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(E9.copy(this.origin).addScaledVector(this.direction,t),E9.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){C9.copy(e).add(t).multiplyScalar(.5),S9.copy(t).sub(e).normalize(),I9.copy(this.origin).sub(C9);const i=.5*e.distanceTo(t),a=-this.direction.dot(S9),s=I9.dot(this.direction),o=-I9.dot(S9),l=I9.lengthSq(),u=Math.abs(1-a*a);let c,h,d,p;if(u>0)if(c=a*o-s,h=a*s-o,p=i*u,c>=0)if(h>=-p)if(h<=p){const e=1/u;c*=e,h*=e,d=c*(c+a*h+2*s)+h*(a*c+h+2*o)+l}else h=i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;else h=-i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;else h<=-p?(c=Math.max(0,-(-a*i+s)),h=c>0?-i:Math.min(Math.max(-i,-o),i),d=-c*c+h*(h+2*o)+l):h<=p?(c=0,h=Math.min(Math.max(-i,-o),i),d=h*(h+2*o)+l):(c=Math.max(0,-(a*i+s)),h=c>0?i:Math.min(Math.max(-i,-o),i),d=-c*c+h*(h+2*o)+l);else h=a>0?-i:i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,c),r&&r.copy(C9).addScaledVector(S9,h),d}intersectSphere(e,t){E9.subVectors(e.center,this.origin);const n=E9.dot(this.direction),r=E9.dot(E9)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,s,o;const l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),u>=0?(i=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(i=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),c>=0?(s=(e.min.z-h.z)*c,o=(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,o=(e.min.z-h.z)*c),n>o||s>r?null:((s>n||n!=n)&&(n=s),(o<r||r!=r)&&(r=o),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,E9)}intersectTriangle(e,t,n,r,i){M9.subVectors(t,e),T9.subVectors(n,e),D9.crossVectors(M9,T9);let a,s=this.direction.dot(D9);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}I9.subVectors(this.origin,e);const o=a*this.direction.dot(T9.crossVectors(I9,T9));if(o<0)return null;const l=a*this.direction.dot(M9.cross(I9));if(l<0)return null;if(o+l>s)return null;const u=-a*I9.dot(D9);return u<0?null:this.at(u/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class B9 extends a9{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new X8(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const R9=new g8,F9=new P9,L9=new H7,k9=new Q5,O9=new Q5,z9=new Q5,N9=new Q5,U9=new Q5,V9=new Q5,G9=new Q5,j9=new Q5;class q9 extends j8{constructor(e=new $7,t=new B9){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const s=this.morphTargetInfluences;if(i&&s){V9.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],o=i[n];0!==r&&(U9.fromBufferAttribute(o,e),a?V9.addScaledVector(U9,r):V9.addScaledVector(U9.sub(t),r))}t.add(V9)}return t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r){if(null===n.boundingSphere&&n.computeBoundingSphere(),L9.copy(n.boundingSphere),L9.applyMatrix4(i),F9.copy(e.ray).recast(e.near),!1===L9.containsPoint(F9.origin)){if(null===F9.intersectSphere(L9,k9))return;if(F9.origin.distanceToSquared(k9)>(e.far-e.near)**2)return}R9.copy(i).invert(),F9.copy(e.ray).applyMatrix4(R9),null!==n.boundingBox&&!1===F9.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,F9)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==s)if(Array.isArray(a))for(let p=0,f=h.length;p<f;p++){const i=h[p],o=a[i.materialIndex];for(let a=Math.max(i.start,d.start),h=Math.min(s.count,Math.min(i.start+i.count,d.start+d.count));a<h;a+=3){r=H9(this,o,e,n,l,u,c,s.getX(a),s.getX(a+1),s.getX(a+2)),r&&(r.faceIndex=Math.floor(a/3),r.face.materialIndex=i.materialIndex,t.push(r))}}else{for(let i=Math.max(0,d.start),o=Math.min(s.count,d.start+d.count);i<o;i+=3){r=H9(this,a,e,n,l,u,c,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}else if(void 0!==o)if(Array.isArray(a))for(let p=0,f=h.length;p<f;p++){const i=h[p],s=a[i.materialIndex];for(let a=Math.max(i.start,d.start),h=Math.min(o.count,Math.min(i.start+i.count,d.start+d.count));a<h;a+=3){r=H9(this,s,e,n,l,u,c,a,a+1,a+2),r&&(r.faceIndex=Math.floor(a/3),r.face.materialIndex=i.materialIndex,t.push(r))}}else{for(let i=Math.max(0,d.start),s=Math.min(o.count,d.start+d.count);i<s;i+=3){r=H9(this,a,e,n,l,u,c,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}}}function H9(e,t,n,r,i,a,s,o,l,u){e.getVertexPosition(o,O9),e.getVertexPosition(l,z9),e.getVertexPosition(u,N9);const c=function(e,t,n,r,i,a,s,o){let l;if(l=1===t.side?r.intersectTriangle(s,a,i,!0,o):r.intersectTriangle(i,a,s,0===t.side,o),null===l)return null;j9.copy(o),j9.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(j9);return u<n.near||u>n.far?null:{distance:u,point:j9.clone(),object:e}}(e,t,n,r,O9,z9,N9,G9);if(c){const e=new Q5;m7.getBarycoord(G9,O9,z9,N9,e),i&&(c.uv=m7.getInterpolatedAttribute(i,o,l,u,e,new q5)),a&&(c.uv1=m7.getInterpolatedAttribute(a,o,l,u,e,new q5)),s&&(c.normal=m7.getInterpolatedAttribute(s,o,l,u,e,new Q5),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const t={a:o,b:l,c:u,normal:new Q5,materialIndex:0};m7.getNormal(O9,z9,N9,t.normal),c.face=t,c.barycoord=e}return c}const Q9=new h8,W9=new h8,K9=new h8,Z9=new h8,Y9=new g8,X9=new Q5,J9=new H7,$9=new g8,eee=new P9;class tee extends q9{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=E4,this.bindMatrix=new g8,this.bindMatrixInverse=new g8,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new g7),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,X9),this.boundingBox.expandByPoint(X9)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new H7),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,X9),this.boundingSphere.expandByPoint(X9)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),J9.copy(this.boundingSphere),J9.applyMatrix4(r),!1!==e.ray.intersectsSphere(J9)&&($9.copy(r).invert(),eee.copy(e.ray).applyMatrix4($9),null!==this.boundingBox&&!1===eee.intersectsBox(this.boundingBox)||this._computeIntersections(e,t,eee)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new h8,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===E4?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===C4?this.bindMatrixInverse.copy(this.bindMatrix).invert():M5("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;W9.fromBufferAttribute(r.attributes.skinIndex,e),K9.fromBufferAttribute(r.attributes.skinWeight,e),t.isVector4?(Q9.copy(t),t.set(0,0,0,0)):(Q9.set(...t,1),t.set(0,0,0)),Q9.applyMatrix4(this.bindMatrix);for(let i=0;i<4;i++){const e=K9.getComponent(i);if(0!==e){const r=W9.getComponent(i);Y9.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Z9.copy(Q9).applyMatrix4(Y9),e)}}return t.isVector4&&(t.w=Q9.w),t.applyMatrix4(this.bindMatrixInverse)}}class nee extends j8{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ree extends c8{constructor(e=null,t=1,n=1,r,i,a,s,o,l=1003,u=1003,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const iee=new g8,aee=new g8;class see{constructor(e=[],t=[]){this.uuid=O5(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){M5("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new g8)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new g8;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let i=0,a=e.length;i<a;i++){const r=e[i]?e[i].matrixWorld:aee;iee.multiplyMatrices(r,t[i]),iee.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)}clone(){return new see(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new ree(t,e,e,n6,W4);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(M5("Skeleton: No bone found with UUID:",r),i=new nee),this.bones.push(i),this.boneInverses.push((new g8).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class oee extends z7{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const lee=new g8,uee=new g8,cee=[],hee=new g7,dee=new g8,pee=new q9,fee=new H7;class mee extends q9{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new oee(new Float32Array(16*n),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,dee)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new g7),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,lee),hee.copy(e.boundingBox).applyMatrix4(lee),this.boundingBox.union(hee)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new H7),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,lee),fee.copy(e.boundingSphere).applyMatrix4(lee),this.boundingSphere.union(fee)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.previousInstanceMatrix&&(this.previousInstanceMatrix=e.previousInstanceMatrix.clone()),null!==e.morphTexture&&(this.morphTexture=e.morphTexture.clone()),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return null===this.instanceColor?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,16*e)}getMorphAt(e,t){const n=t.morphTargetInfluences,r=this.morphTexture.source.data.data,i=e*(n.length+1)+1;for(let a=0;a<n.length;a++)n[a]=r[i+a]}raycast(e,t){const n=this.matrixWorld,r=this.count;if(pee.geometry=this.geometry,pee.material=this.material,void 0!==pee.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),fee.copy(this.boundingSphere),fee.applyMatrix4(n),!1!==e.ray.intersectsSphere(fee)))for(let i=0;i<r;i++){this.getMatrixAt(i,lee),uee.multiplyMatrices(n,lee),pee.matrixWorld=uee,pee.raycast(e,cee);for(let e=0,n=cee.length;e<n;e++){const n=cee[e];n.instanceId=i,n.object=this,t.push(n)}cee.length=0}}setColorAt(e,t){return null===this.instanceColor&&(this.instanceColor=new oee(new Float32Array(3*this.instanceMatrix.count).fill(1),3)),t.toArray(this.instanceColor.array,3*e),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,16*e),this}setMorphAt(e,t){const n=t.morphTargetInfluences,r=n.length+1;null===this.morphTexture&&(this.morphTexture=new ree(new Float32Array(r*this.count),r,this.count,a6,W4));const i=this.morphTexture.source.data.data;let a=0;for(let l=0;l<n.length;l++)a+=n[l];const s=this.geometry.morphTargetsRelative?1:1-a,o=r*e;return i[o]=s,i.set(n,o+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null)}}const gee=new Q5,Aee=new Q5,yee=new Z5;let vee=class{constructor(e=new Q5(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=gee.subVectors(n,t).cross(Aee.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,n=!0){const r=e.delta(gee),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/i;return!0===n&&(a<0||a>1)?null:t.copy(e.start).addScaledVector(r,a)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||yee.getNormalMatrix(e),r=this.coplanarPoint(gee).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}};const bee=new H7,xee=new q5(.5,.5),_ee=new Q5;class wee{constructor(e=new vee,t=new vee,n=new vee,r=new vee,i=new vee,a=new vee){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3,n=!1){const r=this.planes,i=e.elements,a=i[0],s=i[1],o=i[2],l=i[3],u=i[4],c=i[5],h=i[6],d=i[7],p=i[8],f=i[9],m=i[10],g=i[11],A=i[12],y=i[13],v=i[14],b=i[15];if(r[0].setComponents(l-a,d-u,g-p,b-A).normalize(),r[1].setComponents(l+a,d+u,g+p,b+A).normalize(),r[2].setComponents(l+s,d+c,g+f,b+y).normalize(),r[3].setComponents(l-s,d-c,g-f,b-y).normalize(),n)r[4].setComponents(o,h,m,v).normalize(),r[5].setComponents(l-o,d-h,g-m,b-v).normalize();else if(r[4].setComponents(l-o,d-h,g-m,b-v).normalize(),t===A5)r[5].setComponents(l+o,d+h,g+m,b+v).normalize();else{if(t!==y5)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);r[5].setComponents(o,h,m,v).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),bee.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),bee.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(bee)}intersectsSprite(e){bee.center.set(0,0,0);const t=xee.distanceTo(e.center);return bee.radius=.7071067811865476+t,bee.applyMatrix4(e.matrixWorld),this.intersectsSphere(bee)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(_ee.x=r.normal.x>0?e.max.x:e.min.x,_ee.y=r.normal.y>0?e.max.y:e.min.y,_ee.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(_ee)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}const Eee=new g8,Cee=new wee;class See{constructor(){this.coordinateSystem=A5}intersectsObject(e,t){if(!t.isArrayCamera||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.containsPoint(e))return!0}return!1}clone(){return new See}}function Iee(e,t){return e-t}function Mee(e,t){return e.z-t.z}function Tee(e,t){return t.z-e.z}class Dee{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,r){const i=this.pool,a=this.list;this.index>=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});const s=i[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}}const Pee=new g8,Bee=new X8(1,1,1),Ree=new wee,Fee=new See,Lee=new g7,kee=new H7,Oee=new Q5,zee=new Q5,Nee=new Q5,Uee=new Dee,Vee=new q9,Gee=[];function jee(e,t,n=0){const r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const i=e.count;for(let a=0;a<i;a++)for(let i=0;i<r;i++)t.setComponent(a+n,i,e.getComponent(a,i))}else t.array.set(e.array,n*r);t.needsUpdate=!0}function qee(e,t){if(e.constructor!==t.constructor){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)t[r]=e[r]}else{const n=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,n))}}class Hee extends q9{constructor(e,t,n=2*t,r){super(new $7,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(4*this._maxInstanceCount);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new ree(t,e,e,n6,W4);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new ree(t,e,e,s6,Q4);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new ree(t,e,e,n6,W4);n.colorSpace=e8.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxIndexCount;if(!1===this._geometryInitialized){for(const r in e.attributes){const i=e.getAttribute(r),{array:a,itemSize:s,normalized:o}=i,l=new a.constructor(n*s),u=new z7(l,s,o);t.setAttribute(r,u)}if(null!==e.getIndex()){const e=n>65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new z7(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(t.getIndex()))throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||!1===t[e].active)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||!1===t[e].active)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new g7);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(!1===t[n].active)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,Pee),this.getBoundingBoxAt(r,Lee).applyMatrix4(Pee),e.union(Lee)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new H7);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(!1===t[n].active)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,Pee),this.getBoundingSphereAt(r,kee).applyMatrix4(Pee),e.union(kee)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const t={visible:!0,active:!0,geometryIndex:e};let n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Iee),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));const r=this._matricesTexture;Pee.identity().toArray(r.image.data,16*n),r.needsUpdate=!0;const i=this._colorsTexture;return i&&(Bee.toArray(i.image.data,4*n),i.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},i=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=-1===t?e.getAttribute("position").count:t;const a=e.getIndex();if(null!==a&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=-1===n?a.count:n),-1!==r.indexStart&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let s;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Iee),s=this._availableGeometryIds.shift(),i[s]=r):(s=this._geometryCount,this._geometryCount++,i.push(r)),this.setGeometryAt(s,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,s}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,r=null!==n.getIndex(),i=n.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(r&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const o=s.vertexStart,l=s.reservedVertexCount;s.vertexCount=t.getAttribute("position").count;for(const u in n.attributes){const e=t.getAttribute(u),r=n.getAttribute(u);jee(e,r,o);const i=e.itemSize;for(let t=e.count,n=l;t<n;t++){const e=o+t;for(let t=0;t<i;t++)r.setComponent(e,t,0)}r.needsUpdate=!0,r.addUpdateRange(o*i,l*i)}if(r){const e=s.indexStart,n=s.reservedIndexCount;s.indexCount=t.getIndex().count;for(let t=0;t<a.count;t++)i.setX(e+t,o+a.getX(t));for(let t=a.count,r=n;t<r;t++)i.setX(e+t,o);i.needsUpdate=!0,i.addUpdateRange(e,s.reservedIndexCount)}return s.start=r?s.indexStart:s.vertexStart,s.count=r?s.indexCount:s.vertexCount,s.boundingBox=null,null!==t.boundingBox&&(s.boundingBox=t.boundingBox.clone()),s.boundingSphere=null,null!==t.boundingSphere&&(s.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||!1===t[e].active)return this;const n=this._instanceInfo;for(let r=0,i=n.length;r<i;r++)n[r].active&&n[r].geometryIndex===e&&this.deleteInstance(r);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const n=this._geometryInfo,r=n.map((e,t)=>t).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,s=n.length;a<s;a++){const s=r[a],o=n[s];if(!1!==o.active){if(null!==i.index){if(o.indexStart!==t){const{indexStart:n,vertexStart:r,reservedIndexCount:a}=o,s=i.index,l=s.array,u=e-r;for(let e=n;e<n+a;e++)l[e]=l[e]+u;s.array.copyWithin(t,n,n+a),s.addUpdateRange(t,a),s.needsUpdate=!0,o.indexStart=t}t+=o.reservedIndexCount}if(o.vertexStart!==e){const{vertexStart:t,reservedVertexCount:n}=o,r=i.attributes;for(const i in r){const a=r[i],{array:s,itemSize:o}=a;s.copyWithin(e*o,t*o,(t+n)*o),a.addUpdateRange(e*o,n*o),a.needsUpdate=!0}o.vertexStart=e}e+=o.reservedVertexCount,o.start=i.index?o.indexStart:o.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingBox){const e=new g7,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n<a;n++){let r=n;t&&(r=t.getX(r)),e.expandByPoint(Oee.fromBufferAttribute(i,r))}r.boundingBox=e}return t.copy(r.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingSphere){const t=new H7;this.getBoundingBoxAt(e,Lee),Lee.getCenter(t.center);const i=n.index,a=n.attributes.position;let s=0;for(let e=r.start,n=r.start+r.count;e<n;e++){let n=e;i&&(n=i.getX(n)),Oee.fromBufferAttribute(a,n),s=Math.max(s,t.center.distanceToSquared(Oee))}t.radius=Math.sqrt(s),r.boundingSphere=t}return t.copy(r.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,r=this._matricesTexture.image.data;return t.toArray(r,16*e),n.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,16*e)}setColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,4*e),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture?t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1):t.fromArray(this._colorsTexture.image.data,4*e)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t||(this._instanceInfo[e].visible=t,this._visibilityChanged=!0),this}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){const t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(Iee);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const r=new Int32Array(e),i=new Int32Array(e);qee(this._multiDrawCounts,r),qee(this._multiDrawStarts,i),this._multiDrawCounts=r,this._multiDrawStarts=i,this._maxInstanceCount=e;const a=this._indirectTexture,s=this._matricesTexture,o=this._colorsTexture;a.dispose(),this._initIndirectTexture(),qee(a.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),qee(s.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),qee(o.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(e=>e.active);if(Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index){if(Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`)}const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new $7,this._initializeGeometry(r));const i=this.geometry;r.index&&qee(r.index.array,i.index.array);for(const a in r.attributes)qee(r.attributes[a].array,i.attributes[a].array)}raycast(e,t){const n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;Vee.material=this.material,Vee.geometry.index=a.index,Vee.geometry.attributes=a.attributes,null===Vee.geometry.boundingBox&&(Vee.geometry.boundingBox=new g7),null===Vee.geometry.boundingSphere&&(Vee.geometry.boundingSphere=new H7);for(let s=0,o=n.length;s<o;s++){if(!n[s].visible||!n[s].active)continue;const a=n[s].geometryIndex,o=r[a];Vee.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(s,Vee.matrixWorld).premultiply(i),this.getBoundingBoxAt(a,Vee.geometry.boundingBox),this.getBoundingSphereAt(a,Vee.geometry.boundingSphere),Vee.raycast(e,Gee);for(let e=0,n=Gee.length;e<n;e++){const n=Gee[e];n.object=this,n.batchId=s,t.push(n)}Gee.length=0}Vee.material=null,Vee.geometry.index=null,Vee.geometry.attributes={},Vee.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=null!==e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=null!==e.boundingSphere?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(e=>({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=r.getIndex();let s=null===a?1:a.array.BYTES_PER_ELEMENT,o=1;i.wireframe&&(o=2,s=r.attributes.position.count>65535?4:2);const l=this._instanceInfo,u=this._multiDrawStarts,c=this._multiDrawCounts,h=this._geometryInfo,d=this.perObjectFrustumCulled,p=this._indirectTexture,f=p.image.data,m=n.isArrayCamera?Fee:Ree;d&&!n.isArrayCamera&&(Pee.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),Ree.setFromProjectionMatrix(Pee,n.coordinateSystem,n.reversedDepth));let g=0;if(this.sortObjects){Pee.copy(this.matrixWorld).invert(),Oee.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Pee),zee.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Pee);for(let r=0,i=l.length;r<i;r++)if(l[r].visible&&l[r].active){const e=l[r].geometryIndex;this.getMatrixAt(r,Pee),this.getBoundingSphereAt(e,kee).applyMatrix4(Pee);let t=!1;if(d&&(t=!m.intersectsSphere(kee,n)),!t){const t=h[e],n=Nee.subVectors(kee.center,Oee).dot(zee);Uee.push(t.start,t.count,n,r)}}const e=Uee.list,t=this.customSort;null===t?e.sort(i.transparent?Tee:Mee):t.call(this,e,n);for(let n=0,r=e.length;n<r;n++){const t=e[n];u[g]=t.start*s*o,c[g]=t.count*o,f[g]=t.index,g++}Uee.reset()}else for(let A=0,y=l.length;A<y;A++)if(l[A].visible&&l[A].active){const e=l[A].geometryIndex;let t=!1;if(d&&(this.getMatrixAt(A,Pee),this.getBoundingSphereAt(e,kee).applyMatrix4(Pee),t=!m.intersectsSphere(kee,n)),!t){const t=h[e];u[g]=t.start*s*o,c[g]=t.count*o,f[g]=A,g++}}p.needsUpdate=!0,this._multiDrawCount=g,this._visibilityChanged=!1}onBeforeShadow(e,t,n,r,i,a){this.onBeforeRender(e,null,r,i,a)}}class Qee extends a9{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new X8(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Wee=new Q5,Kee=new Q5,Zee=new g8,Yee=new P9,Xee=new H7,Jee=new Q5,$ee=new Q5;class ete extends j8{constructor(e=new $7,t=new Qee){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Wee.fromBufferAttribute(t,e-1),Kee.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Wee.distanceTo(Kee);e.setAttribute("lineDistance",new V7(n,1))}else M5("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Xee.copy(n.boundingSphere),Xee.applyMatrix4(r),Xee.radius+=i,!1===e.ray.intersectsSphere(Xee))return;Zee.copy(r).invert(),Yee.copy(e.ray).applyMatrix4(Zee);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=this.isLineSegments?2:1,u=n.index,c=n.attributes.position;if(null!==u){const n=Math.max(0,a.start),r=Math.min(u.count,a.start+a.count);for(let i=n,a=r-1;i<a;i+=l){const n=u.getX(i),r=u.getX(i+1),a=tte(this,e,Yee,o,n,r,i);a&&t.push(a)}if(this.isLineLoop){const i=u.getX(r-1),a=u.getX(n),s=tte(this,e,Yee,o,i,a,r-1);s&&t.push(s)}}else{const n=Math.max(0,a.start),r=Math.min(c.count,a.start+a.count);for(let i=n,a=r-1;i<a;i+=l){const n=tte(this,e,Yee,o,i,i+1,i);n&&t.push(n)}if(this.isLineLoop){const i=tte(this,e,Yee,o,r-1,n,r-1);i&&t.push(i)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function tte(e,t,n,r,i,a,s){const o=e.geometry.attributes.position;Wee.fromBufferAttribute(o,i),Kee.fromBufferAttribute(o,a);if(n.distanceSqToSegment(Wee,Kee,Jee,$ee)>r)return;Jee.applyMatrix4(e.matrixWorld);const l=t.ray.origin.distanceTo(Jee);return l<t.near||l>t.far?void 0:{distance:l,point:$ee.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}const nte=new Q5,rte=new Q5;class ite extends ete{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)nte.fromBufferAttribute(t,e),rte.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+nte.distanceTo(rte);e.setAttribute("lineDistance",new V7(n,1))}else M5("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class ate extends ete{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class ste extends a9{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new X8(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const ote=new g8,lte=new P9,ute=new H7,cte=new Q5;class hte extends j8{constructor(e=new $7,t=new ste){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ute.copy(n.boundingSphere),ute.applyMatrix4(r),ute.radius+=i,!1===e.ray.intersectsSphere(ute))return;ote.copy(r).invert(),lte.copy(e.ray).applyMatrix4(ote);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=n.index,u=n.attributes.position;if(null!==l){for(let n=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);n<i;n++){const i=l.getX(n);cte.fromBufferAttribute(u,i),dte(cte,i,o,r,e,t,this)}}else{for(let n=Math.max(0,a.start),i=Math.min(u.count,a.start+a.count);n<i;n++)cte.fromBufferAttribute(u,n),dte(cte,n,o,r,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function dte(e,t,n,r,i,a,s){const o=lte.distanceSqToPoint(e);if(o<n){const n=new Q5;lte.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class pte extends c8{constructor(e,t,n,r,i=1006,a=1006,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const u=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){0!==this._requestVideoFrameCallbackId&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class fte extends c8{constructor(e,t,n,r,i,a,s,o,l,u,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class mte extends fte{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=R4,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class gte extends fte{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,I4),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class Ate extends c8{constructor(e=[],t=301,n,r,i,a,s,o,l,u){super(e,t,n,r,i,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class yte extends c8{constructor(e,t,n=1014,r,i,a,s=1003,o=1003,l,u=1026,c=1){if(u!==r6&&u!==i6)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:c},r,i,a,s,o,u,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new s8(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class vte extends yte{constructor(e,t=1014,n=301,r,i,a=1003,s=1003,o,l=1026){const u={width:e,height:e,depth:1},c=[u,u,u,u,u,u];super(e,e,t,n,r,i,a,s,o,l),this.image=c,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}let bte=class extends c8{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}};class xte extends $7{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const s=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const o=[],l=[],u=[],c=[];let h=0,d=0;function p(e,t,n,r,i,a,p,f,m,g,A){const y=a/m,v=p/g,b=a/2,x=p/2,_=f/2,w=m+1,E=g+1;let C=0,S=0;const I=new Q5;for(let s=0;s<E;s++){const a=s*v-x;for(let o=0;o<w;o++){const h=o*y-b;I[e]=h*r,I[t]=a*i,I[n]=_,l.push(I.x,I.y,I.z),I[e]=0,I[t]=0,I[n]=f>0?1:-1,u.push(I.x,I.y,I.z),c.push(o/m),c.push(1-s/g),C+=1}}for(let s=0;s<g;s++)for(let e=0;e<m;e++){const t=h+e+w*s,n=h+e+w*(s+1),r=h+(e+1)+w*(s+1),i=h+(e+1)+w*s;o.push(t,n,i),o.push(n,r,i),S+=6}s.addGroup(d,S,A),d+=S,h+=C}p("z","y","x",-1,-1,n,t,e,a,i,0),p("z","y","x",1,-1,n,t,-e,a,i,1),p("x","z","y",1,1,e,n,t,r,a,2),p("x","z","y",1,-1,e,n,-t,r,a,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(o),this.setAttribute("position",new V7(l,3)),this.setAttribute("normal",new V7(u,3)),this.setAttribute("uv",new V7(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new xte(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class _te extends $7{constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),i=Math.max(1,Math.floor(i));const a=[],s=[],o=[],l=[],u=t/2,c=Math.PI/2*e,h=t,d=2*c+h,p=2*n+i,f=r+1,m=new Q5,g=new Q5;for(let A=0;A<=p;A++){let y=0,v=0,b=0,x=0;if(A<=n){const t=A/n,r=t*Math.PI/2;v=-u-e*Math.cos(r),b=e*Math.sin(r),x=-e*Math.cos(r),y=t*c}else if(A<=n+i){const r=(A-n)/i;v=r*t-u,b=e,x=0,y=c+r*h}else{const t=(A-n-i)/n,r=t*Math.PI/2;v=u+e*Math.sin(r),b=e*Math.cos(r),x=e*Math.sin(r),y=c+h+t*c}const _=Math.max(0,Math.min(1,y/d));let w=0;0===A?w=.5/r:A===p&&(w=-.5/r);for(let e=0;e<=r;e++){const t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=v,g.z=b*i,s.push(g.x,g.y,g.z),m.set(-b*a,x,b*i),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+w,_)}if(A>0){const e=(A-1)*f;for(let t=0;t<r;t++){const n=e+t,r=e+t+1,i=A*f+t,s=A*f+t+1;a.push(n,r,i),a.push(r,s,i)}}}this.setIndex(a),this.setAttribute("position",new V7(s,3)),this.setAttribute("normal",new V7(o,3)),this.setAttribute("uv",new V7(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _te(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class wte extends $7{constructor(e=1,t=32,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],a=[],s=[],o=[],l=new Q5,u=new q5;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let c=0,h=3;c<=t;c++,h+=3){const i=n+c/t*r;l.x=e*Math.cos(i),l.y=e*Math.sin(i),a.push(l.x,l.y,l.z),s.push(0,0,1),u.x=(a[h]/e+1)/2,u.y=(a[h+1]/e+1)/2,o.push(u.x,u.y)}for(let c=1;c<=t;c++)i.push(c,c+1,0);this.setIndex(i),this.setAttribute("position",new V7(a,3)),this.setAttribute("normal",new V7(s,3)),this.setAttribute("uv",new V7(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new wte(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Ete extends $7{constructor(e=1,t=1,n=1,r=32,i=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:s,thetaLength:o};const l=this;r=Math.floor(r),i=Math.floor(i);const u=[],c=[],h=[],d=[];let p=0;const f=[],m=n/2;let g=0;function A(n){const i=p,a=new q5,f=new Q5;let A=0;const y=!0===n?e:t,v=!0===n?1:-1;for(let e=1;e<=r;e++)c.push(0,m*v,0),h.push(0,v,0),d.push(.5,.5),p++;const b=p;for(let e=0;e<=r;e++){const t=e/r*o+s,n=Math.cos(t),i=Math.sin(t);f.x=y*i,f.y=m*v,f.z=y*n,c.push(f.x,f.y,f.z),h.push(0,v,0),a.x=.5*n+.5,a.y=.5*i*v+.5,d.push(a.x,a.y),p++}for(let e=0;e<r;e++){const t=i+e,r=b+e;!0===n?u.push(r,r+1,t):u.push(r+1,r,t),A+=3}l.addGroup(g,A,!0===n?1:2),g+=A}!function(){const a=new Q5,A=new Q5;let y=0;const v=(t-e)/n;for(let l=0;l<=i;l++){const u=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*o+s,l=Math.sin(i),f=Math.cos(i);A.x=y*l,A.y=-g*n+m,A.z=y*f,c.push(A.x,A.y,A.z),a.set(l,v,f).normalize(),h.push(a.x,a.y,a.z),d.push(t,1-g),u.push(p++)}f.push(u)}for(let n=0;n<r;n++)for(let r=0;r<i;r++){const a=f[r][n],s=f[r+1][n],o=f[r+1][n+1],l=f[r][n+1];(e>0||0!==r)&&(u.push(a,s,l),y+=3),(t>0||r!==i-1)&&(u.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y}(),!1===a&&(e>0&&A(!0),t>0&&A(!1)),this.setIndex(u),this.setAttribute("position",new V7(c,3)),this.setAttribute("normal",new V7(h,3)),this.setAttribute("uv",new V7(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ete(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Cte extends Ete{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}static fromJSON(e){return new Cte(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ste extends $7{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],a=[];function s(e,t,n,r){const i=r+1,a=[];for(let s=0;s<=i;s++){a[s]=[];const r=e.clone().lerp(n,s/i),o=t.clone().lerp(n,s/i),l=i-s;for(let e=0;e<=l;e++)a[s][e]=0===e&&s===i?r:r.clone().lerp(o,e/l)}for(let s=0;s<i;s++)for(let e=0;e<2*(i-s)-1;e++){const t=Math.floor(e/2);e%2==0?(o(a[s][t+1]),o(a[s+1][t]),o(a[s][t])):(o(a[s][t+1]),o(a[s+1][t+1]),o(a[s+1][t]))}}function o(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function u(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function c(e){return Math.atan2(e.z,-e.x)}function h(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){const n=new Q5,r=new Q5,i=new Q5;for(let a=0;a<t.length;a+=3)l(t[a+0],n),l(t[a+1],r),l(t[a+2],i),s(n,r,i,e)}(r),function(e){const t=new Q5;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new Q5;for(let t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];const n=c(e)/2/Math.PI+.5,r=h(e)/Math.PI+.5;a.push(n,1-r)}(function(){const e=new Q5,t=new Q5,n=new Q5,r=new Q5,s=new q5,o=new q5,l=new q5;for(let h=0,d=0;h<i.length;h+=9,d+=6){e.set(i[h+0],i[h+1],i[h+2]),t.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),s.set(a[d+0],a[d+1]),o.set(a[d+2],a[d+3]),l.set(a[d+4],a[d+5]),r.copy(e).add(t).add(n).divideScalar(3);const p=c(r);u(s,d+0,e,p),u(o,d+2,t,p),u(l,d+4,n,p)}})(),function(){for(let e=0;e<a.length;e+=6){const t=a[e+0],n=a[e+2],r=a[e+4],i=Math.max(t,n,r),s=Math.min(t,n,r);i>.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new V7(i,3)),this.setAttribute("normal",new V7(i.slice(),3)),this.setAttribute("uv",new V7(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ste(e.vertices,e.indices,e.radius,e.detail)}}class Ite extends Ste{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Ite(e.radius,e.detail)}}const Mte=new Q5,Tte=new Q5,Dte=new Q5,Pte=new m7;class Bte extends $7{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(L5*t),a=e.getIndex(),s=e.getAttribute("position"),o=a?a.count:s.count,l=[0,0,0],u=["a","b","c"],c=new Array(3),h={},d=[];for(let e=0;e<o;e+=3){a?(l[0]=a.getX(e),l[1]=a.getX(e+1),l[2]=a.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:o}=Pte;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),o.fromBufferAttribute(s,l[2]),Pte.getNormal(Dte),c[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,c[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,c[2]=`${Math.round(o.x*r)},${Math.round(o.y*r)},${Math.round(o.z*r)}`,c[0]!==c[1]&&c[1]!==c[2]&&c[2]!==c[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=c[e],r=c[t],a=Pte[u[e]],s=Pte[u[t]],o=`${n}_${r}`,p=`${r}_${n}`;p in h&&h[p]?(Dte.dot(h[p].normal)<=i&&(d.push(a.x,a.y,a.z),d.push(s.x,s.y,s.z)),h[p]=null):o in h||(h[o]={index0:l[e],index1:l[t],normal:Dte.clone()})}}for(const e in h)if(h[e]){const{index0:t,index1:n}=h[e];Mte.fromBufferAttribute(s,t),Tte.fromBufferAttribute(s,n),d.push(Mte.x,Mte.y,Mte.z),d.push(Tte.x,Tte.y,Tte.z)}this.setAttribute("position",new V7(d,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Rte{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){M5("Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let s,o=0,l=i-1;for(;o<=l;)if(r=Math.floor(o+(l-o)/2),s=n[r]-a,s<0)o=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===a)return r/(i-1);const u=n[r];return(r+(a-u)/(n[r+1]-u))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),s=this.getPoint(i),o=t||(a.isVector2?new q5:new Q5);return o.copy(s).sub(a).normalize(),o}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new Q5,r=[],i=[],a=[],s=new Q5,o=new g8;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new Q5)}i[0]=new Q5,a[0]=new Q5;let l=Number.MAX_VALUE;const u=Math.abs(r[0].x),c=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=l&&(l=u,n.set(1,0,0)),c<=l&&(l=c,n.set(0,1,0)),h<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),a[d]=a[d-1].clone(),s.crossVectors(r[d-1],r[d]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(z5(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(o.makeRotationAxis(s,e))}a[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(z5(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Fte extends Rte{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t=new q5){const n=t,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);const s=this.aStartAngle+e*i;let o=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=o-this.aX,r=l-this.aY;o=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(o,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class Lte extends Fte{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function kte(){let e=0,t=0,n=0,r=0;function i(i,a,s,o){e=i,t=s,n=-3*i+3*a-2*s-o,r=2*i-2*a+s+o}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,s,o){let l=(t-e)/a-(n-e)/(a+s)+(n-t)/s,u=(n-t)/s-(r-t)/(s+o)+(r-n)/o;l*=s,u*=s,i(t,n,l,u)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}const Ote=new Q5,zte=new Q5,Nte=new kte,Ute=new kte,Vte=new kte;class Gte extends Rte{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new Q5){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let s,o,l=Math.floor(a),u=a-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===u&&l===i-1&&(l=i-2,u=1),this.closed||l>0?s=r[(l-1)%i]:(zte.subVectors(r[0],r[1]).add(r[0]),s=zte);const c=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?o=r[(l+2)%i]:(Ote.subVectors(r[i-1],r[i-2]).add(r[i-1]),o=Ote),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(c),e),n=Math.pow(c.distanceToSquared(h),e),r=Math.pow(h.distanceToSquared(o),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),Nte.initNonuniformCatmullRom(s.x,c.x,h.x,o.x,t,n,r),Ute.initNonuniformCatmullRom(s.y,c.y,h.y,o.y,t,n,r),Vte.initNonuniformCatmullRom(s.z,c.z,h.z,o.z,t,n,r)}else"catmullrom"===this.curveType&&(Nte.initCatmullRom(s.x,c.x,h.x,o.x,this.tension),Ute.initCatmullRom(s.y,c.y,h.y,o.y,this.tension),Vte.initCatmullRom(s.z,c.z,h.z,o.z,this.tension));return n.set(Nte.calc(u),Ute.calc(u),Vte.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Q5).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function jte(e,t,n,r,i){const a=.5*(r-t),s=.5*(i-n),o=e*e;return(2*n-2*r+a+s)*(e*o)+(-3*n+3*r-2*a-s)*o+a*e+n}function qte(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Hte(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}class Qte extends Rte{constructor(e=new q5,t=new q5,n=new q5,r=new q5){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new q5){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(Hte(e,r.x,i.x,a.x,s.x),Hte(e,r.y,i.y,a.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Wte extends Rte{constructor(e=new Q5,t=new Q5,n=new Q5,r=new Q5){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Q5){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(Hte(e,r.x,i.x,a.x,s.x),Hte(e,r.y,i.y,a.y,s.y),Hte(e,r.z,i.z,a.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Kte extends Rte{constructor(e=new q5,t=new q5){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new q5){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new q5){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Zte extends Rte{constructor(e=new Q5,t=new Q5){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new Q5){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Q5){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Yte extends Rte{constructor(e=new q5,t=new q5,n=new q5){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new q5){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(qte(e,r.x,i.x,a.x),qte(e,r.y,i.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Xte extends Rte{constructor(e=new Q5,t=new Q5,n=new Q5){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Q5){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(qte(e,r.x,i.x,a.x),qte(e,r.y,i.y,a.y),qte(e,r.z,i.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Jte extends Rte{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new q5){const n=t,r=this.points,i=(r.length-1)*e,a=Math.floor(i),s=i-a,o=r[0===a?a:a-1],l=r[a],u=r[a>r.length-2?r.length-1:a+1],c=r[a>r.length-3?r.length-1:a+2];return n.set(jte(s,o.x,l.x,u.x,c.x),jte(s,o.y,l.y,u.y,c.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new q5).fromArray(n))}return this}}var $te=Object.freeze({__proto__:null,ArcCurve:Lte,CatmullRomCurve3:Gte,CubicBezierCurve:Qte,CubicBezierCurve3:Wte,EllipseCurve:Fte,LineCurve:Kte,LineCurve3:Zte,QuadraticBezierCurve:Yte,QuadraticBezierCurve3:Xte,SplineCurve:Jte});class ene extends Rte{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new $te[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const a=i[r],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){const r=o[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new $te[n.type]).fromJSON(n))}return this}}class tne extends ene{constructor(e){super(),this.type="Path",this.currentPoint=new q5,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Kte(this.currentPoint.clone(),new q5(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new Yte(this.currentPoint.clone(),new q5(e,t),new q5(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const s=new Qte(this.currentPoint.clone(),new q5(e,t),new q5(n,r),new q5(i,a));return this.curves.push(s),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Jte(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,a){const s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,n,r,i,a),this}absarc(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this}ellipse(e,t,n,r,i,a,s,o){const l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,n,r,i,a,s,o),this}absellipse(e,t,n,r,i,a,s,o){const l=new Fte(e,t,n,r,i,a,s,o);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class nne extends tne{constructor(e){super(e),this.uuid=O5(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new tne).fromJSON(n))}return this}}function rne(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=ine(e,0,i,n,!0);const s=[];if(!a||a.next===a.prev)return s;let o,l,u;if(r&&(a=function(e,t,n,r){const i=[];for(let a=0,s=t.length;a<s;a++){const n=ine(e,t[a]*r,a<s-1?t[a+1]*r:e.length,r,!1);n===n.next&&(n.steiner=!0),i.push(mne(n))}i.sort(hne);for(let a=0;a<i.length;a++)n=dne(i[a],n);return n}(e,t,a,n)),e.length>80*n){o=e[0],l=e[1];let t=o,r=l;for(let a=n;a<i;a+=n){const n=e[a],i=e[a+1];n<o&&(o=n),i<l&&(l=i),n>t&&(t=n),i>r&&(r=i)}u=Math.max(t-o,r-l),u=0!==u?32767/u:0}return sne(a,s,n,o,l,u,0),s}function ine(e,t,n,r,i){let a;if(i===function(e,t,n,r){let i=0;for(let a=t,s=n-r;a<n;a+=r)i+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return i}(e,t,n,r)>0)for(let s=t;s<n;s+=r)a=Sne(s/r|0,e[s],e[s+1],a);else for(let s=n-r;s>=t;s-=r)a=Sne(s/r|0,e[s],e[s+1],a);return a&&bne(a,a.next)&&(Ine(a),a=a.next),a}function ane(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!bne(r,r.next)&&0!==vne(r.prev,r,r.next))r=r.next;else{if(Ine(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function sne(e,t,n,r,i,a,s){if(!e)return;!s&&a&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=fne(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n=1;do{let r,i=e;e=null;let a=null;for(t=0;i;){t++;let s=i,o=0;for(let e=0;e<n&&(o++,s=s.nextZ,s);e++);let l=n;for(;o>0||l>0&&s;)0!==o&&(0===l||!s||i.z<=s.z)?(r=i,i=i.nextZ,o--):(r=s,s=s.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=s}a.nextZ=null,n*=2}while(t>1)}(i)}(e,r,i,a);let o=e;for(;e.prev!==e.next;){const l=e.prev,u=e.next;if(a?lne(e,r,i,a):one(e))t.push(l.i,e.i,u.i),Ine(e),e=u.next,o=u.next;else if((e=u)===o){s?1===s?sne(e=une(ane(e),t),t,n,r,i,a,2):2===s&&cne(e,t,n,r,i,a):sne(ane(e),t,n,r,i,a,1);break}}}function one(e){const t=e.prev,n=e,r=e.next;if(vne(t,n,r)>=0)return!1;const i=t.x,a=n.x,s=r.x,o=t.y,l=n.y,u=r.y,c=Math.min(i,a,s),h=Math.min(o,l,u),d=Math.max(i,a,s),p=Math.max(o,l,u);let f=r.next;for(;f!==t;){if(f.x>=c&&f.x<=d&&f.y>=h&&f.y<=p&&Ane(i,o,a,l,s,u,f.x,f.y)&&vne(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function lne(e,t,n,r){const i=e.prev,a=e,s=e.next;if(vne(i,a,s)>=0)return!1;const o=i.x,l=a.x,u=s.x,c=i.y,h=a.y,d=s.y,p=Math.min(o,l,u),f=Math.min(c,h,d),m=Math.max(o,l,u),g=Math.max(c,h,d),A=fne(p,f,t,n,r),y=fne(m,g,t,n,r);let v=e.prevZ,b=e.nextZ;for(;v&&v.z>=A&&b&&b.z<=y;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==s&&Ane(o,c,l,h,u,d,v.x,v.y)&&vne(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==i&&b!==s&&Ane(o,c,l,h,u,d,b.x,b.y)&&vne(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=A;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==s&&Ane(o,c,l,h,u,d,v.x,v.y)&&vne(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=y;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==i&&b!==s&&Ane(o,c,l,h,u,d,b.x,b.y)&&vne(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function une(e,t){let n=e;do{const r=n.prev,i=n.next.next;!bne(r,i)&&xne(r,n,n.next,i)&&Ene(r,i)&&Ene(i,r)&&(t.push(r.i,n.i,i.i),Ine(n),Ine(n.next),n=e=i),n=n.next}while(n!==e);return ane(n)}function cne(e,t,n,r,i,a){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&yne(s,e)){let o=Cne(s,e);return s=ane(s,s.next),o=ane(o,o.next),sne(s,t,n,r,i,a,0),void sne(o,t,n,r,i,a,0)}e=e.next}s=s.next}while(s!==e)}function hne(e,t){let n=e.x-t.x;if(0===n&&(n=e.y-t.y,0===n)){n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}return n}function dne(e,t){const n=function(e,t){let n=t;const r=e.x,i=e.y;let a,s=-1/0;if(bne(e,n))return n;do{if(bne(e,n.next))return n.next;if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>s&&(s=e,a=n.x<n.next.x?n:n.next,e===r))return a}n=n.next}while(n!==t);if(!a)return null;const o=a,l=a.x,u=a.y;let c=1/0;n=a;do{if(r>=n.x&&n.x>=l&&r!==n.x&&gne(i<u?r:s,i,l,u,i<u?s:r,i,n.x,n.y)){const t=Math.abs(i-n.y)/(r-n.x);Ene(n,e)&&(t<c||t===c&&(n.x>a.x||n.x===a.x&&pne(a,n)))&&(a=n,c=t)}n=n.next}while(n!==o);return a}(e,t);if(!n)return t;const r=Cne(n,e);return ane(r,r.next),ane(n,n.next)}function pne(e,t){return vne(e.prev,e,t.prev)<0&&vne(t.next,e,e.next)<0}function fne(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function mne(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function gne(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function Ane(e,t,n,r,i,a,s,o){return!(e===s&&t===o)&&gne(e,t,n,r,i,a,s,o)}function yne(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&xne(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Ene(e,t)&&Ene(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(vne(e.prev,e,t.prev)||vne(e,t.prev,t))||bne(e,t)&&vne(e.prev,e,e.next)>0&&vne(t.prev,t,t.next)>0)}function vne(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function bne(e,t){return e.x===t.x&&e.y===t.y}function xne(e,t,n,r){const i=wne(vne(e,t,n)),a=wne(vne(e,t,r)),s=wne(vne(n,r,e)),o=wne(vne(n,r,t));return i!==a&&s!==o||(!(0!==i||!_ne(e,n,t))||(!(0!==a||!_ne(e,r,t))||(!(0!==s||!_ne(n,e,r))||!(0!==o||!_ne(n,t,r)))))}function _ne(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function wne(e){return e>0?1:e<0?-1:0}function Ene(e,t){return vne(e.prev,e,e.next)<0?vne(e,t,e.next)>=0&&vne(e,e.prev,t)>=0:vne(e,t,e.prev)<0||vne(e,e.next,t)<0}function Cne(e,t){const n=Mne(e.i,e.x,e.y),r=Mne(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function Sne(e,t,n,r){const i=Mne(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Ine(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Mne(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Tne{static triangulate(e,t,n=2){return rne(e,t,n)}}class Dne{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return Dne.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];Pne(e),Bne(n,e);let a=e.length;t.forEach(Pne);for(let o=0;o<t.length;o++)r.push(a),a+=t[o].length,Bne(n,t[o]);const s=Tne.triangulate(n,r);for(let o=0;o<s.length;o+=3)i.push(s.slice(o,o+3));return i}}function Pne(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Bne(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Rne extends $7{constructor(e=new nne([new q5(.5,.5),new q5(-.5,.5),new q5(-.5,-.5),new q5(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let s=0,o=e.length;s<o;s++){a(e[s])}function a(e){const a=[],s=void 0!==t.curveSegments?t.curveSegments:12,o=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let u=void 0===t.bevelEnabled||t.bevelEnabled,c=void 0!==t.bevelThickness?t.bevelThickness:.2,h=void 0!==t.bevelSize?t.bevelSize:c-.1,d=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Fne;let g,A,y,v,b,x=!1;if(f){g=f.getSpacedPoints(o),x=!0,u=!1;const e=!!f.isCatmullRomCurve3&&f.closed;A=f.computeFrenetFrames(o,e),y=new Q5,v=new Q5,b=new Q5}u||(p=0,c=0,h=0,d=0);const _=e.extractPoints(s);let w=_.shape;const E=_.holes;if(!Dne.isClockWise(w)){w=w.reverse();for(let e=0,t=E.length;e<t;e++){const t=E[e];Dne.isClockWise(t)&&(E[e]=t.reverse())}}function C(e){const t=1e-10*1e-10;let n=e[0];for(let r=1;r<=e.length;r++){const i=r%e.length,a=e[i],s=a.x-n.x,o=a.y-n.y,l=s*s+o*o,u=Math.max(Math.abs(a.x),Math.abs(a.y),Math.abs(n.x),Math.abs(n.y));l<=t*u*u?(e.splice(i,1),r--):n=a}}C(w),E.forEach(C);const S=E.length,I=w;for(let t=0;t<S;t++){const e=E[t];w=w.concat(e)}function M(e,t,n){return t||T5("ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,n)}const T=w.length;function D(e,t,n){let r,i,a;const s=e.x-t.x,o=e.y-t.y,l=n.x-e.x,u=n.y-e.y,c=s*s+o*o,h=s*u-o*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(c),d=Math.sqrt(l*l+u*u),p=t.x-o/h,f=t.y+s/h,m=((n.x-u/d-p)*u-(n.y+l/d-f)*l)/(s*u-o*l);r=p+s*m-e.x,i=f+o*m-e.y;const g=r*r+i*i;if(g<=2)return new q5(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(c)):(r=s,i=o,a=Math.sqrt(c/2))}return new q5(r/a,i/a)}const P=[];for(let t=0,n=I.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),P[t]=D(I[t],I[r],I[i]);const B=[];let R,F,L=P.concat();for(let t=0,n=S;t<n;t++){const e=E[t];R=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),R[t]=D(e[t],e[r],e[i]);B.push(R),L=L.concat(R)}if(0===p)F=Dne.triangulateShape(I,E);else{const e=[],t=[];for(let n=0;n<p;n++){const r=n/p,i=c*Math.cos(r*Math.PI/2),a=h*Math.sin(r*Math.PI/2)+d;for(let t=0,n=I.length;t<n;t++){const n=M(I[t],P[t],a);N(n.x,n.y,-i),0===r&&e.push(n)}for(let e=0,n=S;e<n;e++){const n=E[e];R=B[e];const s=[];for(let e=0,t=n.length;e<t;e++){const t=M(n[e],R[e],a);N(t.x,t.y,-i),0===r&&s.push(t)}0===r&&t.push(s)}}F=Dne.triangulateShape(e,t)}const k=F.length,O=h+d;for(let t=0;t<T;t++){const e=u?M(w[t],L[t],O):w[t];x?(v.copy(A.normals[0]).multiplyScalar(e.x),y.copy(A.binormals[0]).multiplyScalar(e.y),b.copy(g[0]).add(v).add(y),N(b.x,b.y,b.z)):N(e.x,e.y,0)}for(let t=1;t<=o;t++)for(let e=0;e<T;e++){const n=u?M(w[e],L[e],O):w[e];x?(v.copy(A.normals[t]).multiplyScalar(n.x),y.copy(A.binormals[t]).multiplyScalar(n.y),b.copy(g[t]).add(v).add(y),N(b.x,b.y,b.z)):N(n.x,n.y,l/o*t)}for(let t=p-1;t>=0;t--){const e=t/p,n=c*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=I.length;t<i;t++){const e=M(I[t],P[t],r);N(e.x,e.y,l+n)}for(let t=0,i=E.length;t<i;t++){const e=E[t];R=B[t];for(let t=0,i=e.length;t<i;t++){const i=M(e[t],R[t],r);x?N(i.x,i.y+g[o-1].y,g[o-1].x+n):N(i.x,i.y,l+n)}}}function z(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=o+2*p;e<n;e++){const n=T*e,a=T*(e+1);V(t+r+n,t+i+n,t+i+a,t+r+a)}}}function N(e,t,n){a.push(e),a.push(t),a.push(n)}function U(e,t,i){G(e),G(t),G(i);const a=r.length/3,s=m.generateTopUV(n,r,a-3,a-2,a-1);j(s[0]),j(s[1]),j(s[2])}function V(e,t,i,a){G(e),G(t),G(a),G(t),G(i),G(a);const s=r.length/3,o=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);j(o[0]),j(o[1]),j(o[3]),j(o[1]),j(o[2]),j(o[3])}function G(e){r.push(a[3*e+0]),r.push(a[3*e+1]),r.push(a[3*e+2])}function j(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(u){let e=0,t=T*e;for(let n=0;n<k;n++){const e=F[n];U(e[2]+t,e[1]+t,e[0]+t)}e=o+2*p,t=T*e;for(let n=0;n<k;n++){const e=F[n];U(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<k;e++){const t=F[e];U(t[2],t[1],t[0])}for(let e=0;e<k;e++){const t=F[e];U(t[0]+T*o,t[1]+T*o,t[2]+T*o)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;z(I,t),t+=I.length;for(let n=0,r=E.length;n<r;n++){const e=E[n];z(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new V7(r,3)),this.setAttribute("uv",new V7(i,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const r=t[e.shapes[i]];n.push(r)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new $te[r.type]).fromJSON(r)),new Rne(n,e.options)}}const Fne={generateTopUV:function(e,t,n,r,i){const a=t[3*n],s=t[3*n+1],o=t[3*r],l=t[3*r+1],u=t[3*i],c=t[3*i+1];return[new q5(a,s),new q5(o,l),new q5(u,c)]},generateSideWallUV:function(e,t,n,r,i,a){const s=t[3*n],o=t[3*n+1],l=t[3*n+2],u=t[3*r],c=t[3*r+1],h=t[3*r+2],d=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*a],g=t[3*a+1],A=t[3*a+2];return Math.abs(o-c)<Math.abs(s-u)?[new q5(s,1-l),new q5(u,1-h),new q5(d,1-f),new q5(m,1-A)]:[new q5(o,1-l),new q5(c,1-h),new q5(p,1-f),new q5(g,1-A)]}};class Lne extends Ste{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Lne(e.radius,e.detail)}}class kne extends $7{constructor(e=[new q5(0,-.5),new q5(.5,0),new q5(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=z5(r,0,2*Math.PI);const i=[],a=[],s=[],o=[],l=[],u=1/t,c=new Q5,h=new q5,d=new Q5,p=new Q5,f=new Q5;let m=0,g=0;for(let A=0;A<=e.length-1;A++)switch(A){case 0:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),o.push(d.x,d.y,d.z),f.copy(p)}for(let A=0;A<=t;A++){const i=n+A*u*r,d=Math.sin(i),p=Math.cos(i);for(let n=0;n<=e.length-1;n++){c.x=e[n].x*d,c.y=e[n].y,c.z=e[n].x*p,a.push(c.x,c.y,c.z),h.x=A/t,h.y=n/(e.length-1),s.push(h.x,h.y);const r=o[3*n+0]*d,i=o[3*n+1],u=o[3*n+0]*p;l.push(r,i,u)}}for(let A=0;A<t;A++)for(let t=0;t<e.length-1;t++){const n=t+A*e.length,r=n,a=n+e.length,s=n+e.length+1,o=n+1;i.push(r,a,o),i.push(s,o,a)}this.setIndex(i),this.setAttribute("position",new V7(a,3)),this.setAttribute("uv",new V7(s,2)),this.setAttribute("normal",new V7(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new kne(e.points,e.segments,e.phiStart,e.phiLength)}}class One extends Ste{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new One(e.radius,e.detail)}}class zne extends $7{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,a=t/2,s=Math.floor(n),o=Math.floor(r),l=s+1,u=o+1,c=e/s,h=t/o,d=[],p=[],f=[],m=[];for(let g=0;g<u;g++){const e=g*h-a;for(let t=0;t<l;t++){const n=t*c-i;p.push(n,-e,0),f.push(0,0,1),m.push(t/s),m.push(1-g/o)}}for(let g=0;g<o;g++)for(let e=0;e<s;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;d.push(t,n,i),d.push(n,r,i)}this.setIndex(d),this.setAttribute("position",new V7(p,3)),this.setAttribute("normal",new V7(f,3)),this.setAttribute("uv",new V7(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new zne(e.width,e.height,e.widthSegments,e.heightSegments)}}class Nne extends $7{constructor(e=.5,t=1,n=32,r=1,i=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},n=Math.max(3,n);const s=[],o=[],l=[],u=[];let c=e;const h=(t-e)/(r=Math.max(1,r)),d=new Q5,p=new q5;for(let f=0;f<=r;f++){for(let e=0;e<=n;e++){const r=i+e/n*a;d.x=c*Math.cos(r),d.y=c*Math.sin(r),o.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/t+1)/2,p.y=(d.y/t+1)/2,u.push(p.x,p.y)}c+=h}for(let f=0;f<r;f++){const e=f*(n+1);for(let t=0;t<n;t++){const r=t+e,i=r,a=r+n+1,o=r+n+2,l=r+1;s.push(i,a,l),s.push(a,o,l)}}this.setIndex(s),this.setAttribute("position",new V7(o,3)),this.setAttribute("normal",new V7(l,3)),this.setAttribute("uv",new V7(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Nne(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Une extends $7{constructor(e=new nne([new q5(0,.5),new q5(-.5,-.5),new q5(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],a=[];let s=0,o=0;if(!1===Array.isArray(e))l(e);else for(let u=0;u<e.length;u++)l(e[u]),this.addGroup(s,o,u),s+=o,o=0;function l(e){const s=r.length/3,l=e.extractPoints(t);let u=l.shape;const c=l.holes;!1===Dne.isClockWise(u)&&(u=u.reverse());for(let t=0,n=c.length;t<n;t++){const e=c[t];!0===Dne.isClockWise(e)&&(c[t]=e.reverse())}const h=Dne.triangulateShape(u,c);for(let t=0,n=c.length;t<n;t++){const e=c[t];u=u.concat(e)}for(let t=0,n=u.length;t<n;t++){const e=u[t];r.push(e.x,e.y,0),i.push(0,0,1),a.push(e.x,e.y)}for(let t=0,r=h.length;t<r;t++){const e=h[t],r=e[0]+s,i=e[1]+s,a=e[2]+s;n.push(r,i,a),o+=3}}this.setIndex(n),this.setAttribute("position",new V7(r,3)),this.setAttribute("normal",new V7(i,3)),this.setAttribute("uv",new V7(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new Une(n,e.curveSegments)}}class Vne extends $7{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const o=Math.min(a+s,Math.PI);let l=0;const u=[],c=new Q5,h=new Q5,d=[],p=[],f=[],m=[];for(let g=0;g<=n;g++){const d=[],A=g/n;let y=0;0===g&&0===a?y=.5/t:g===n&&o===Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const o=n/t;c.x=-e*Math.cos(r+o*i)*Math.sin(a+A*s),c.y=e*Math.cos(a+A*s),c.z=e*Math.sin(r+o*i)*Math.sin(a+A*s),p.push(c.x,c.y,c.z),h.copy(c).normalize(),f.push(h.x,h.y,h.z),m.push(o+y,1-A),d.push(l++)}u.push(d)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=u[g][e+1],r=u[g][e],i=u[g+1][e],s=u[g+1][e+1];(0!==g||a>0)&&d.push(t,r,s),(g!==n-1||o<Math.PI)&&d.push(r,i,s)}this.setIndex(d),this.setAttribute("position",new V7(p,3)),this.setAttribute("normal",new V7(f,3)),this.setAttribute("uv",new V7(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Vne(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Gne extends Ste{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Gne(e.radius,e.detail)}}class jne extends $7{constructor(e=1,t=.4,n=12,r=48,i=2*Math.PI,a=0,s=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i,thetaStart:a,thetaLength:s},n=Math.floor(n),r=Math.floor(r);const o=[],l=[],u=[],c=[],h=new Q5,d=new Q5,p=new Q5;for(let f=0;f<=n;f++){const o=a+f/n*s;for(let a=0;a<=r;a++){const s=a/r*i;d.x=(e+t*Math.cos(o))*Math.cos(s),d.y=(e+t*Math.cos(o))*Math.sin(s),d.z=t*Math.sin(o),l.push(d.x,d.y,d.z),h.x=e*Math.cos(s),h.y=e*Math.sin(s),p.subVectors(d,h).normalize(),u.push(p.x,p.y,p.z),c.push(a/r),c.push(f/n)}}for(let f=1;f<=n;f++)for(let e=1;e<=r;e++){const t=(r+1)*f+e-1,n=(r+1)*(f-1)+e-1,i=(r+1)*(f-1)+e,a=(r+1)*f+e;o.push(t,n,a),o.push(n,i,a)}this.setIndex(o),this.setAttribute("position",new V7(l,3)),this.setAttribute("normal",new V7(u,3)),this.setAttribute("uv",new V7(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new jne(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class qne extends $7{constructor(e=1,t=.4,n=64,r=8,i=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},n=Math.floor(n),r=Math.floor(r);const s=[],o=[],l=[],u=[],c=new Q5,h=new Q5,d=new Q5,p=new Q5,f=new Q5,m=new Q5,g=new Q5;for(let y=0;y<=n;++y){const s=y/n*i*Math.PI*2;A(s,i,a,e,d),A(s+.01,i,a,e,p),m.subVectors(p,d),g.addVectors(p,d),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,a=-t*Math.cos(i),s=t*Math.sin(i);c.x=d.x+(a*g.x+s*f.x),c.y=d.y+(a*g.y+s*f.y),c.z=d.z+(a*g.z+s*f.z),o.push(c.x,c.y,c.z),h.subVectors(c,d).normalize(),l.push(h.x,h.y,h.z),u.push(y/n),u.push(e/r)}}for(let y=1;y<=n;y++)for(let e=1;e<=r;e++){const t=(r+1)*(y-1)+(e-1),n=(r+1)*y+(e-1),i=(r+1)*y+e,a=(r+1)*(y-1)+e;s.push(t,n,a),s.push(n,i,a)}function A(e,t,n,r,i){const a=Math.cos(e),s=Math.sin(e),o=n/t*e,l=Math.cos(o);i.x=r*(2+l)*.5*a,i.y=r*(2+l)*s*.5,i.z=r*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new V7(o,3)),this.setAttribute("normal",new V7(l,3)),this.setAttribute("uv",new V7(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qne(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Hne extends $7{constructor(e=new Xte(new Q5(-1,-1,0),new Q5(-1,1,0),new Q5(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new Q5,o=new Q5,l=new q5;let u=new Q5;const c=[],h=[],d=[],p=[];function f(i){u=e.getPointAt(i/t,u);const l=a.normals[i],d=a.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+i*d.x,o.y=a*l.y+i*d.y,o.z=a*l.z+i*d.z,o.normalize(),h.push(o.x,o.y,o.z),s.x=u.x+n*o.x,s.y=u.y+n*o.y,s.z=u.z+n*o.z,c.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,s=(r+1)*(e-1)+t;p.push(n,i,s),p.push(i,a,s)}}()}(),this.setIndex(p),this.setAttribute("position",new V7(c,3)),this.setAttribute("normal",new V7(h,3)),this.setAttribute("uv",new V7(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Hne((new $te[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Qne extends $7{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new Q5,i=new Q5;if(null!==e.index){const a=e.attributes.position,s=e.index;let o=e.groups;0===o.length&&(o=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=o.length;e<l;++e){const l=o[e],u=l.start;for(let e=u,o=u+l.count;e<o;e+=3)for(let l=0;l<3;l++){const o=s.getX(e+l),u=s.getX(e+(l+1)%3);r.fromBufferAttribute(a,o),i.fromBufferAttribute(a,u),!0===Wne(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,s=a.count/3;e<s;e++)for(let o=0;o<3;o++){const s=3*e+o,l=3*e+(o+1)%3;r.fromBufferAttribute(a,s),i.fromBufferAttribute(a,l),!0===Wne(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new V7(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function Wne(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var Kne=Object.freeze({__proto__:null,BoxGeometry:xte,CapsuleGeometry:_te,CircleGeometry:wte,ConeGeometry:Cte,CylinderGeometry:Ete,DodecahedronGeometry:Ite,EdgesGeometry:Bte,ExtrudeGeometry:Rne,IcosahedronGeometry:Lne,LatheGeometry:kne,OctahedronGeometry:One,PlaneGeometry:zne,PolyhedronGeometry:Ste,RingGeometry:Nne,ShapeGeometry:Une,SphereGeometry:Vne,TetrahedronGeometry:Gne,TorusGeometry:jne,TorusKnotGeometry:qne,TubeGeometry:Hne,WireframeGeometry:Qne});class Zne extends a9{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new X8(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}function Yne(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];if(Jne(i))i.isRenderTargetTexture?(M5("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][r]=null):t[n][r]=i.clone();else if(Array.isArray(i))if(Jne(i[0])){const e=[];for(let t=0,n=i.length;t<n;t++)e[t]=i[t].clone();t[n][r]=e}else t[n][r]=i.slice();else t[n][r]=i}}return t}function Xne(e){const t={};for(let n=0;n<e.length;n++){const r=Yne(e[n]);for(const e in r)t[e]=r[e]}return t}function Jne(e){return e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture||e.isQuaternion)}function $ne(e){const t=e.getRenderTarget();return null===t?e.outputColorSpace:!0===t.isXRRenderTarget?t.texture.colorSpace:e8.workingColorSpace}const ere={clone:Yne,merge:Xne};class tre extends a9{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Yne(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class nre extends tre{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class rre extends a9{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new X8(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ire extends rre{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new q5(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return z5(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new X8(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new X8(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new X8(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class are extends a9{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new X8(16777215),this.specular=new X8(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class sre extends a9{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new X8(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class ore extends a9{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class lre extends a9{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new X8(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ure extends a9{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class cre extends a9{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class hre extends a9{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new X8(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class dre extends Qee{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function pre(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function fre(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(function(t,n){return e[t]-e[n]}),n}function mre(e,t,n){const r=e.length,i=new e.constructor(r);for(let a=0,s=0;s!==r;++a){const r=n[a]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function gre(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let s=a[r];if(void 0!==s)if(Array.isArray(s))do{s=a[r],void 0!==s&&(t.push(a.time),n.push(...s)),a=e[i++]}while(void 0!==a);else if(void 0!==s.toArray)do{s=a[r],void 0!==s&&(t.push(a.time),s.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{s=a[r],void 0!==s&&(t.push(a.time),n.push(s)),a=e[i++]}while(void 0!==a)}class Are{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let a;n:{r:if(!(e<r)){for(let a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}a=t.length;break n}if(!(e>=i)){const s=t[1];e<s&&(n=2,i=s);for(let a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}a=n,n=0;break n}break e}for(;n<a;){const r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let a=0;a!==r;++a)t[a]=n[i+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class yre extends Are{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Y6,endingEnd:Y6}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,a=e+1,s=r[i],o=r[a];if(void 0===s)switch(this.getSettings_().endingStart){case X6:i=e,s=2*t-n;break;case J6:i=r.length-2,s=t+r[i]-r[i+1];break;default:i=e,s=n}if(void 0===o)switch(this.getSettings_().endingEnd){case X6:a=e,o=2*n-t;break;case J6:a=1,o=n+r[1]-r[0];break;default:a=e-1,o=t}const l=.5*(n-t),u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=i*u,this._offsetNext=a*u}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(n-t)/(r-t),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,A=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,v=d*m-d*f;for(let b=0;b!==s;++b)i[b]=g*a[u+b]+A*a[l+b]+y*a[o+b]+v*a[c+b];return i}}class vre extends Are{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(n-t)/(r-t),c=1-u;for(let h=0;h!==s;++h)i[h]=a[l+h]*c+a[o+h]*u;return i}}class bre extends Are{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class xre extends Are{interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this.settings||this.DefaultSettings_,c=u.inTangents,h=u.outTangents;if(!c||!h){const e=(n-t)/(r-t),u=1-e;for(let t=0;t!==s;++t)i[t]=a[l+t]*u+a[o+t]*e;return i}const d=2*s,p=e-1;for(let f=0;f!==s;++f){const s=a[l+f],u=a[o+f],m=p*d+2*f,g=h[m],A=h[m+1],y=e*d+2*f,v=c[y],b=c[y+1];let x,_,w,E,C,S=(n-t)/(r-t);for(let e=0;e<8;e++){x=S*S,_=x*S,w=1-S,E=w*w,C=E*w;const e=C*t+3*E*S*g+3*w*x*v+_*r-n;if(Math.abs(e)<1e-10)break;const i=3*E*(g-t)+6*w*S*(v-g)+3*x*(r-v);if(Math.abs(i)<1e-10)break;S-=e/i,S=Math.max(0,Math.min(1,S))}i[f]=C*s+3*E*S*A+3*w*x*b+_*u}return i}}class _re{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=pre(t,this.TimeBufferType),this.values=pre(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:pre(e.times,Array),values:pre(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new bre(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new vre(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new yre(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){const t=new xre(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case Q6:t=this.InterpolantFactoryMethodDiscrete;break;case W6:t=this.InterpolantFactoryMethodLinear;break;case K6:t=this.InterpolantFactoryMethodSmooth;break;case Z6:t=this.InterpolantFactoryMethodBezier}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return M5("KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Q6;case this.InterpolantFactoryMethodLinear:return W6;case this.InterpolantFactoryMethodSmooth:return K6;case this.InterpolantFactoryMethodBezier:return Z6}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(T5("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(T5("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let s=0;s!==i;s++){const t=n[s];if("number"==typeof t&&isNaN(t)){T5("KeyframeTrack: Time is not a valid number.",this,s,t),e=!1;break}if(null!==a&&a>t){T5("KeyframeTrack: Out of order keys.",this,s,t,a),e=!1;break}a=t}if(void 0!==r&&x5(r))for(let s=0,o=r.length;s!==o;++s){const t=r[s];if(isNaN(t)){T5("KeyframeTrack: Value is not a valid number.",this,s,t),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===K6,i=e.length-1;let a=1;for(let s=1;s<i;++s){let i=!1;const o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(r)i=!0;else{const e=s*n,r=e-n,a=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[r+s]||n!==t[a+s]){i=!0;break}}}if(i){if(s!==a){e[a]=e[s];const r=s*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}_re.prototype.ValueTypeName="",_re.prototype.TimeBufferType=Float32Array,_re.prototype.ValueBufferType=Float32Array,_re.prototype.DefaultInterpolation=W6;class wre extends _re{constructor(e,t,n){super(e,t,n)}}wre.prototype.ValueTypeName="bool",wre.prototype.ValueBufferType=Array,wre.prototype.DefaultInterpolation=Q6,wre.prototype.InterpolantFactoryMethodLinear=void 0,wre.prototype.InterpolantFactoryMethodSmooth=void 0;class Ere extends _re{constructor(e,t,n,r){super(e,t,n,r)}}Ere.prototype.ValueTypeName="color";class Cre extends _re{constructor(e,t,n,r){super(e,t,n,r)}}Cre.prototype.ValueTypeName="number";class Sre extends Are{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t);let l=e*s;for(let u=l+s;l!==u;l+=4)H5.slerpFlat(i,0,a,l-s,a,l,o);return i}}class Ire extends _re{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new Sre(this.times,this.values,this.getValueSize(),e)}}Ire.prototype.ValueTypeName="quaternion",Ire.prototype.InterpolantFactoryMethodSmooth=void 0;class Mre extends _re{constructor(e,t,n){super(e,t,n)}}Mre.prototype.ValueTypeName="string",Mre.prototype.ValueBufferType=Array,Mre.prototype.DefaultInterpolation=Q6,Mre.prototype.InterpolantFactoryMethodLinear=void 0,Mre.prototype.InterpolantFactoryMethodSmooth=void 0;class Tre extends _re{constructor(e,t,n,r){super(e,t,n,r)}}Tre.prototype.ValueTypeName="vector";let Dre=class{constructor(e="",t=-1,n=[],r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=O5(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let a=0,s=n.length;a!==s;++a)t.push(Pre(n[a]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||"{}"),i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let i=0,a=n.length;i!==a;++i)t.push(_re.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,a=[];for(let s=0;s<i;s++){let e=[],o=[];e.push((s+i-1)%i,s,(s+1)%i),o.push(0,1,0);const l=fre(e);e=mre(e,1,l),o=mre(o,1,l),r||0!==e[0]||(e.push(i),o.push(o[0])),a.push(new Cre(".morphTargetInfluences["+t[s].name+"]",e,o).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let s=0,o=e.length;s<o;s++){const t=e[s],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const a=[];for(const s in r)a.push(this.CreateFromMorphTargetSequence(s,r[s],t,n));return a}static parseAnimation(e,t){if(M5("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return T5("AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const a=[],s=[];gre(n,a,s,r),0!==a.length&&i.push(new e(t,a,s))}},r=[],i=e.name||"default",a=e.fps||30,s=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let u=0;u<l.length;u++){const e=l[u].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],a=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),a.push(r.morphTarget===i?1:0)}r.push(new Cre(".morphTargetInfluence["+i+"]",t,a))}o=t.length*a}else{const i=".bones["+t[u].name+"]";n(Tre,i+".position",e,"pos",r),n(Ire,i+".quaternion",e,"rot",r),n(Tre,i+".scale",e,"scl",r)}}if(0===r.length)return null;return new this(i,o,r,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());const t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}};function Pre(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Cre;case"vector":case"vector2":case"vector3":case"vector4":return Tre;case"color":return Ere;case"quaternion":return Ire;case"bool":case"boolean":return wre;case"string":return Mre}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];gre(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Bre={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(Rre(e)||(this.files[e]=t))},get:function(e){if(!1!==this.enabled&&!Rre(e))return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Rre(e){try{const t=e.slice(e.indexOf(":")+1);return"blob:"===new URL(t).protocol}catch(qke){return!1}}class Fre{constructor(e,t,n){const r=this;let i,a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,!1===a&&void 0!==r.onStart&&r.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==r.onProgress&&r.onProgress(e,s,o),s===o&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const Lre=new Fre;class kre{constructor(e){this.manager=void 0!==e?e:Lre,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,i){n.load(e,r,t,i)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}kre.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ore={};class zre extends Error{constructor(e,t){super(e),this.response=t}}class Nre extends kre{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=Bre.get(`file:${e}`);if(void 0!==i)return this.manager.itemStart(e),void setTimeout(()=>{t&&t(i),this.manager.itemEnd(e)},0);if(void 0!==Ore[e])return void Ore[e].push({onLoad:t,onProgress:n,onError:r});Ore[e]=[],Ore[e].push({onLoad:t,onProgress:n,onError:r});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&M5("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Ore[e],r=t.body.getReader(),i=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=i?parseInt(i):0,s=0!==a;let o=0;const l=new ReadableStream({start(e){!function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:o,total:a});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}},t=>{e.error(t)})}()}});return new Response(l)}throw new zre(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,s));case"json":return e.json();default:if(""===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{Bre.add(`file:${e}`,t);const n=Ore[e];delete Ore[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}}).catch(t=>{const n=Ore[e];if(void 0===n)throw this.manager.itemError(e),t;delete Ore[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const Ure=new WeakMap;let Vre=class extends kre{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=Bre.get(`image:${e}`);if(void 0!==a){if(!0===a.complete)i.manager.itemStart(e),setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);else{let e=Ure.get(a);void 0===e&&(e=[],Ure.set(a,e)),e.push({onLoad:t,onError:r})}return a}const s=_5("img");function o(){u(),t&&t(this);const n=Ure.get(this)||[];for(let e=0;e<n.length;e++){const t=n[e];t.onLoad&&t.onLoad(this)}Ure.delete(this),i.manager.itemEnd(e)}function l(t){u(),r&&r(t),Bre.remove(`image:${e}`);const n=Ure.get(this)||[];for(let e=0;e<n.length;e++){const r=n[e];r.onError&&r.onError(t)}Ure.delete(this),i.manager.itemError(e),i.manager.itemEnd(e)}function u(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),Bre.add(`image:${e}`,s),i.manager.itemStart(e),s.src=e,s}};class Gre extends kre{constructor(e){super(e)}load(e,t,n,r){const i=new c8,a=new Vre(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)},n,r),i}}class jre extends j8{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new X8(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}}class qre extends jre{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(j8.DEFAULT_UP),this.updateMatrix(),this.groundColor=new X8(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){const t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}}const Hre=new g8,Qre=new Q5,Wre=new Q5;class Kre{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new q5(512,512),this.mapType=V4,this.map=null,this.mapPass=null,this.matrix=new g8,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new wee,this._frameExtents=new q5(1,1),this._viewportCount=1,this._viewports=[new h8(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Qre.setFromMatrixPosition(e.matrixWorld),t.position.copy(Qre),Wre.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Wre),t.updateMatrixWorld(),Hre.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Hre,t.coordinateSystem,t.reversedDepth),t.coordinateSystem===y5||t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Hre)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 1!==this.intensity&&(e.intensity=this.intensity),0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}const Zre=new Q5,Yre=new H5,Xre=new Q5;class Jre extends j8{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new g8,this.projectionMatrix=new g8,this.projectionMatrixInverse=new g8,this.coordinateSystem=A5,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(Zre,Yre,Xre),1===Xre.x&&1===Xre.y&&1===Xre.z?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Zre,Yre,Xre.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(Zre,Yre,Xre),1===Xre.x&&1===Xre.y&&1===Xre.z?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Zre,Yre,Xre.set(1,1,1)).invert()}clone(){return(new this.constructor).copy(this)}}const $re=new Q5,eie=new q5,tie=new q5;class nie extends Jre{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*k5*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*L5*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*k5*Math.atan(Math.tan(.5*L5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){$re.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set($re.x,$re.y).multiplyScalar(-e/$re.z),$re.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set($re.x,$re.y).multiplyScalar(-e/$re.z)}getViewSize(e,t){return this.getViewBounds(e,eie,tie),t.subVectors(tie,eie)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*L5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class rie extends Kre{constructor(){super(new nie(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=2*k5*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height*this.aspect,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class iie extends jre{constructor(e,t,n=0,r=Math.PI/3,i=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(j8.DEFAULT_UP),this.updateMatrix(),this.target=new j8,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new rie}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}}class aie extends Kre{constructor(){super(new nie(90,1,.5,500)),this.isPointLightShadow=!0}}class sie extends jre{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new aie}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}}class oie extends Jre{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}class lie extends Kre{constructor(){super(new oie(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}let uie=class extends jre{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(j8.DEFAULT_UP),this.updateMatrix(),this.target=new j8,this.shadow=new lie}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}},cie=class extends jre{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}};class hie extends jre{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class die{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Q5)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class pie extends jre{constructor(e=new die,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class fie extends kre{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,a=new Nre(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(qke){r?r(qke):T5(qke),i.manager.itemError(e)}},n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&M5("MaterialLoader: Undefined texture",e),t[e]}const r=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new X8).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(r.dispersion=e.dispersion),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(r.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(r.depthFunc=e.depthFunc),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(r.blendSrc=e.blendSrc),void 0!==e.blendDst&&(r.blendDst=e.blendDst),void 0!==e.blendEquation&&(r.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(r.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&(r.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(r.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==r.blendColor&&r.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(r.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),void 0!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.allowOverride&&(r.allowOverride=e.allowOverride),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const i in e.uniforms){const t=e.uniforms[i];switch(r.uniforms[i]={},t.type){case"t":r.uniforms[i].value=n(t.value);break;case"c":r.uniforms[i].value=(new X8).setHex(t.value);break;case"v2":r.uniforms[i].value=(new q5).fromArray(t.value);break;case"v3":r.uniforms[i].value=(new Q5).fromArray(t.value);break;case"v4":r.uniforms[i].value=(new h8).fromArray(t.value);break;case"m3":r.uniforms[i].value=(new Z5).fromArray(t.value);break;case"m4":r.uniforms[i].value=(new g8).fromArray(t.value);break;default:r.uniforms[i].value=t.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const i in e.extensions)r.extensions[i]=e.extensions[i];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new q5).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapRotation&&r.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new q5).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return fie.createMaterialFromType(e)}static createMaterialFromType(e){return new{ShadowMaterial:Zne,SpriteMaterial:s9,RawShaderMaterial:nre,ShaderMaterial:tre,PointsMaterial:ste,MeshPhysicalMaterial:ire,MeshStandardMaterial:rre,MeshPhongMaterial:are,MeshToonMaterial:sre,MeshNormalMaterial:ore,MeshLambertMaterial:lre,MeshDepthMaterial:ure,MeshDistanceMaterial:cre,MeshBasicMaterial:B9,MeshMatcapMaterial:hre,LineDashedMaterial:dre,LineBasicMaterial:Qee,Material:a9}[e]}}class mie{static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class gie extends $7{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class Aie extends kre{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new Nre(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(qke){r?r(qke):T5(qke),i.manager.itemError(e)}},n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers,i=r[t],a=new Uint32Array(i).buffer;return n[t]=a,a}(e,i.buffer),s=b5(i.type,a),o=new e9(s,i.stride);return o.uuid=i.uuid,t[r]=o,o}const i=e.isInstancedBufferGeometry?new gie:new $7,a=e.data.index;if(void 0!==a){const e=b5(a.type,a.array);i.setIndex(new z7(e,1))}const s=e.data.attributes;for(const c in s){const t=s[c];let n;if(t.isInterleavedBufferAttribute){const i=r(e.data,t.data);n=new n9(i,t.itemSize,t.offset,t.normalized)}else{const e=b5(t.type,t.array);n=new(t.isInstancedBufferAttribute?oee:z7)(e,t.itemSize,t.normalized)}void 0!==t.name&&(n.name=t.name),void 0!==t.usage&&n.setUsage(t.usage),i.setAttribute(c,n)}const o=e.data.morphAttributes;if(o)for(const c in o){const t=o[c],n=[];for(let i=0,a=t.length;i<a;i++){const a=t[i];let s;if(a.isInterleavedBufferAttribute){const t=r(e.data,a.data);s=new n9(t,a.itemSize,a.offset,a.normalized)}else{const e=b5(a.type,a.array);s=new z7(e,a.itemSize,a.normalized)}void 0!==a.name&&(s.name=a.name),n.push(s)}i.morphAttributes[c]=n}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let c=0,h=l.length;c!==h;++c){const e=l[c];i.addGroup(e.start,e.count,e.materialIndex)}const u=e.data.boundingSphere;return void 0!==u&&(i.boundingSphere=(new H7).fromJSON(u)),e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}const yie={};const vie={UVMapping:S4,CubeReflectionMapping:I4,CubeRefractionMapping:M4,EquirectangularReflectionMapping:T4,EquirectangularRefractionMapping:D4,CubeUVReflectionMapping:P4},bie={RepeatWrapping:B4,ClampToEdgeWrapping:R4,MirroredRepeatWrapping:F4},xie={NearestFilter:L4,NearestMipmapNearestFilter:k4,NearestMipmapLinearFilter:O4,LinearFilter:z4,LinearMipmapNearestFilter:N4,LinearMipmapLinearFilter:U4},_ie=new WeakMap;class wie extends kre{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&M5("ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&M5("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=Bre.get(`image-bitmap:${e}`);if(void 0!==a)return i.manager.itemStart(e),a.then?void a.then(n=>{!0===_ie.has(a)?(r&&r(_ie.get(a)),i.manager.itemError(e),i.manager.itemEnd(e)):(t&&t(n),i.manager.itemEnd(e))}):void setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))}).then(function(n){Bre.add(`image-bitmap:${e}`,n),t&&t(n),i.manager.itemEnd(e)}).catch(function(t){r&&r(t),_ie.set(o,t),Bre.remove(`image-bitmap:${e}`),i.manager.itemError(e),i.manager.itemEnd(e)});Bre.add(`image-bitmap:${e}`,o),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let Eie;class Cie{static getContext(){return void 0===Eie&&(Eie=new(window.AudioContext||window.webkitAudioContext)),Eie}static setContext(e){Eie=e}}const Sie=new g8,Iie=new g8,Mie=new g8;const Tie=-90;class Die extends j8{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new nie(Tie,1,e,t);r.layers=this.layers,this.add(r);const i=new nie(Tie,1,e,t);i.layers=this.layers,this.add(i);const a=new nie(Tie,1,e,t);a.layers=this.layers,this.add(a);const s=new nie(Tie,1,e,t);s.layers=this.layers,this.add(s);const o=new nie(Tie,1,e,t);o.layers=this.layers,this.add(o);const l=new nie(Tie,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(const l of t)this.remove(l);if(e===A5)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(e!==y5)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const l of t)this.add(l),l.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[i,a,s,o,l,u]=this.children,c=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let m=!1;m=!0===e.isWebGLRenderer?e.state.buffers.depth.getReversed():e.reversedDepthBuffer,e.setRenderTarget(n,0,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,i),e.setRenderTarget(n,1,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,s),e.setRenderTarget(n,3,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,4,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,u),e.setRenderTarget(c,h,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class Pie extends nie{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Bie{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,void 0!==e.hidden&&(this._pageVisibilityHandler=Rie.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){null!==this._pageVisibilityHandler&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return null!==this._pageVisibilityHandler&&!0===this._document.hidden?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(void 0!==e?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function Rie(){!1===this._document.hidden&&this.reset()}const Fie=new Q5,Lie=new H5,kie=new Q5,Oie=new Q5,zie=new Q5;class Nie extends j8{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void M5("Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void M5("Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;M5("Audio: this Audio has no playback control.")}stop(e=0){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this;M5("Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(!1!==this._connected){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,!0===this.isPlaying&&void 0!==this.source.detune&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;M5("Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return!1===this.hasPlaybackControl?(M5("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;M5("Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return super.copy(e,t),"buffer"!==e.sourceType?(M5("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const Uie=new Q5,Vie=new H5,Gie=new Q5,jie=new Q5;class qie{constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let a=this.cumulativeWeight;if(0===a){for(let e=0;e!==r;++e)n[i+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=a}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let o=t,l=t+t;o!==l;++o)if(n[o]!==n[o+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,a=r;i!==a;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let a=0;a!==i;++a)e[t+a]=e[n+a]}_slerp(e,t,n,r){H5.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;H5.multiplyQuaternionsFlat(e,a,e,t,e,n),H5.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){const a=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*a+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]+e[n+a]*r}}}const Hie="\\[\\]\\.:\\/",Qie=new RegExp("["+Hie+"]","g"),Wie="[^"+Hie+"]",Kie="[^"+Hie.replace("\\.","")+"]",Zie=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Wie)+/(WCOD+)?/.source.replace("WCOD",Kie)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Wie)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Wie)+"$"),Yie=["material","materials","bones","map"];class Xie{constructor(e,t,n){this.path=t,this.parsedPath=n||Xie.parseTrackName(t),this.node=Xie.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Xie.Composite(e,t,n):new Xie(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Qie,"")}static parseTrackName(e){const t=Zie.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Yie.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Xie.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void M5("PropertyBinding: No target node found for track: "+this.path+".");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void T5("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void T5("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void T5("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void T5("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void T5("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void T5("PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void T5("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const a=e[r];if(void 0===a){return void T5("PropertyBinding: Trying to update property for track: "+t.nodeName+"."+r+" but it wasn't found.",e)}let s=this.Versioning.None;this.targetObject=e,!0===e.isMaterial?s=this.Versioning.NeedsUpdate:!0===e.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void T5("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void T5("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}o=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(o=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Xie.Composite=class{constructor(e,t,n){const r=n||Xie.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Xie.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Xie.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Xie.prototype.GetterByBindingType=[Xie.prototype._getValue_direct,Xie.prototype._getValue_array,Xie.prototype._getValue_arrayElement,Xie.prototype._getValue_toArray],Xie.prototype.SetterByBindingTypeAndVersioning=[[Xie.prototype._setValue_direct,Xie.prototype._setValue_direct_setNeedsUpdate,Xie.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Xie.prototype._setValue_array,Xie.prototype._setValue_array_setNeedsUpdate,Xie.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Xie.prototype._setValue_arrayElement,Xie.prototype._setValue_arrayElement_setNeedsUpdate,Xie.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Xie.prototype._setValue_fromArray,Xie.prototype._setValue_fromArray_setNeedsUpdate,Xie.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];let Jie=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,a=i.length,s=new Array(a),o={endingStart:Y6,endingEnd:Y6};for(let l=0;l!==a;++l){const e=i[l].createInterpolant(null);s[l]=e,e.settings&&Object.assign(o,e.settings),e.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),!0===n){const n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,a=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const a=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===e5)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const a=2202===n;if(0===e)return-1===i||!a||1&~i?r:t-r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this._loopCount=i,this.time=r;if(a&&!(1&~i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=X6,r.endingEnd=X6):(r.endingStart=e?this.zeroSlopeAtStart?X6:Y6:J6,r.endingEnd=t?this.zeroSlopeAtEnd?X6:Y6:J6)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=n,this}};const $ie=new Float32Array(1);class eae{constructor(e){this.value=e}clone(){return new eae(void 0===this.value.clone?this.value:this.value.clone())}}let tae=0;const nae=new g8;function rae(e,t){return e.distance-t.distance}function iae(e,t,n,r){let i=!0;if(e.layers.test(t.layers)){!1===e.raycast(t,n)&&(i=!1)}if(!0===i&&!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)iae(r[e],t,n,!0)}}class aae{static{aae.prototype.isMatrix2=!0}constructor(e,t,n,r){this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,n,r)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,r){const i=this.elements;return i[0]=e,i[2]=t,i[1]=n,i[3]=r,this}}const sae=new q5;const oae=new Q5,lae=new Q5,uae=new Q5,cae=new Q5,hae=new Q5,dae=new Q5,pae=new Q5;const fae=new Q5;const mae=new Q5,gae=new g8,Aae=new g8;function yae(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push(...yae(e.children[n]));return t}const vae=new Q5,bae=new X8,xae=new X8;const _ae=new Q5,wae=new Q5,Eae=new Q5;const Cae=new Q5,Sae=new Jre;function Iae(e,t,n,r,i,a,s){Cae.set(i,a,s).unproject(r);const o=t[e];if(void 0!==o){const e=n.getAttribute("position");for(let t=0,n=o.length;t<n;t++)e.setXYZ(o[t],Cae.x,Cae.y,Cae.z)}}const Mae=new g7;const Tae=new Q5;let Dae,Pae;function Bae(e,t,n,r){const i=function(e){switch(e){case V4:case G4:return{byteLength:1,components:1};case q4:case j4:case K4:return{byteLength:2,components:1};case Z4:case Y4:return{byteLength:2,components:4};case Q4:case H4:case W4:return{byteLength:4,components:1};case J4:case $4:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${e}.`)}(r);switch(n){case e6:return e*t;case a6:case s6:return e*t/i.components*i.byteLength;case o6:case l6:return e*t*2/i.components*i.byteLength;case t6:return e*t*3/i.components*i.byteLength;case n6:case u6:return e*t*4/i.components*i.byteLength;case c6:case h6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case d6:case p6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case m6:case A6:return Math.max(e,16)*Math.max(t,8)/4;case f6:case g6:return Math.max(e,8)*Math.max(t,8)/2;case y6:case v6:case x6:case _6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case b6:case w6:case E6:case C6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case S6:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case I6:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case M6:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case T6:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case D6:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case P6:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case B6:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case R6:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case F6:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case L6:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case k6:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case O6:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case z6:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case N6:case U6:case V6:return Math.ceil(e/4)*Math.ceil(t/4)*16;case G6:case j6:return Math.ceil(e/4)*Math.ceil(t/4)*8;case q6:case H6:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}
466
+ `}};y3=new WeakMap,v3=new WeakMap,b3=new WeakMap,x3=new WeakMap,_3=new WeakMap,w3=new WeakMap,E3=new WeakMap,R3.styles=[o(":host{position:absolute;top:0;left:0;padding:1rem;z-index:10;font-family:Poppins!important;user-select:none}svg{vertical-align:middle}.back-panel{background-color:#11032b;color:#fff;margin-bottom:5px;padding-left:1.2rem;align-items:center;height:55px;position:relative}.back-content{margin:0;position:relative;top:50%;transform:translateY(-50%);font-size:22px;color:#fff;display:flex;align-items:center;gap:8px;cursor:pointer}.route-panel,qr-modal.full{width:29.79vw;min-width:415px}.route-panel{max-height:75vh;overflow-y:auto;overflow-x:hidden;border-radius:24px;background:#fff;box-shadow:0 0 24px #00000026}.back-text{font-size:24px;font-weight:600}.back-content img{vertical-align:middle}.route-modal{padding:19px 13px 22px 32px}.icon_switcher_user_type{position:relative;color:#000}.d-flex{display:flex!important}.flex-fill{flex:1 1 auto!important}.place-name{font-weight:700;font-size:32px;line-height:1;letter-spacing:-1.6px;color:#333;margin-left:2px}.repeat-route-btn{display:flex;gap:10px;justify-content:center;align-items:center;text-align:center;background-color:#fff;border:2px solid #000000;border-radius:999px;margin-left:auto;margin-right:0;padding:12px 20px;font-size:20px;font-weight:700;line-height:20px;letter-spacing:-1px;color:#000;transition:background-color .3s ease,color .3s ease;cursor:pointer}.repeat-route-btn[disabled]{color:gray;border-color:gray;cursor:not-allowed;pointer-events:none}.floor-name{font-size:1rem;color:#427553}.floor-specs{font-family:Poppins;font-weight:600;line-height:14px;size:18px}.route-distance{color:#666}.container-controls{margin-top:16px;align-items:end;gap:11px}.c-route-input{color:#000;display:flex;padding:15px;font-size:16px;font-style:normal;font-weight:600;line-height:16px;letter-spacing:-.8px;align-items:center;gap:9px;border-radius:30px;background:#fff;box-shadow:0 0 10px #0000001a;position:relative;margin-top:12px}.c-route-input .c-route-input-icon svg{width:22px;height:22px}.c-route-input-from{margin-top:0}.c-route-input-from:after{content:\"\";position:absolute;bottom:-50%;left:24px;width:3.998px;height:34.5px;z-index:1;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='38' viewBox='0 0 4 38' fill='none'%3E%3Cpath d='M-0.00028944 18.9386C-0.00028944 17.8347 0.894666 16.9397 1.99864 16.9397C3.10259 16.9397 3.99756 17.8347 3.99756 18.9386C3.99756 20.0426 3.10259 20.9375 1.99864 20.9375C0.894666 20.9375 -0.00028944 20.0426 -0.00028944 18.9386ZM-0.00028944 27.2198C-0.00028944 26.1159 0.894666 25.2209 1.99864 25.2209C3.10259 25.2209 3.99756 26.1159 3.99756 27.2198C3.99756 28.3238 3.10259 29.2188 1.99864 29.2188C0.894666 29.2188 -0.00028944 28.3238 -0.00028944 27.2198ZM-0.00028944 35.5011C-0.00028944 34.3971 0.894666 33.5021 1.99864 33.5021C3.10259 33.5021 3.99756 34.3971 3.99756 35.5011C3.99756 36.605 3.10259 37.5 1.99864 37.5C0.894666 37.5 -0.00028944 36.605 -0.00028944 35.5011Z' fill='%23D0D0D0'/%3E%3Cpath d='M1.99864 8.49999C0.894666 8.49999 -0.00028944 9.39496 -0.00028944 10.4989C-0.00028944 11.6029 0.894666 12.4978 1.99864 12.4978C3.10259 12.4978 3.99756 11.6029 3.99756 10.4989C3.99756 9.39496 3.10259 8.49999 1.99864 8.49999Z' fill='%23D0D0D0'/%3E%3Cpath d='M1.99864 0C0.894666 0 -0.00028944 0.894973 -0.00028944 1.99892C-0.00028944 3.10289 0.894666 3.99784 1.99864 3.99784C3.10259 3.99784 3.99756 3.10289 3.99756 1.99892C3.99756 0.894973 3.10259 0 1.99864 0Z' fill='%23D0D0D0'/%3E%3C/svg%3E\")}.c-route-input span{padding:0 6px;border-radius:15px;color:#454545;background:#f2f2f2;font-size:10px;font-style:normal;font-weight:600;line-height:14px;letter-spacing:-.5px}.accessibility-switch{display:flex;align-items:center;justify-content:center;min-width:100px;height:50px;border-radius:48px;background-color:#fff;box-shadow:0 0 15px #0003;position:relative}.accessibility-switch:before,.accessibility-switch:after{content:\"\";border-radius:50%;width:50%;height:100%;background:#000;position:absolute;bottom:0;left:0;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0;transition:transform .5s ease}.accessibility-switch:after{background:var(--mvx-accessibility-switch-active-color, #000);clip-path:circle(22px);z-index:1}.accessibility-switch.accessible:before,.accessibility-switch.accessible:after{transform:translate(100%)}.accessibility-switch-icon{width:50px;height:100%;display:grid;place-items:center;cursor:pointer;z-index:2;transition:color .5s ease;color:#000}.accessibility-switch-icon.active{color:#fff}.generate-route-btn{border-style:solid;width:100%;border-radius:30px;height:58px;background-color:#11032b;cursor:pointer}.generate-route-btn span{font-family:Poppins;font-size:1rem;line-height:16px;font-weight:600;text-align:center;color:#fff}.generate-route-container{width:100%}.route-panel.compact{width:auto;min-width:0}.route-panel.compact,qr-modal.compact{max-width:480px}@container (max-width: 1100px){.route-panel.compact,qr-modal.compact{max-width:min(calc(100cqw - var(--floor-selector-inline-size, 102px) - 1rem),480px)}}.compact-modal{display:flex;align-items:center;gap:16px;padding:16px 16px 16px 24px}.compact-info{flex:1 1 auto;min-width:0}.compact .place-name{font-size:26px;letter-spacing:-1.2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact .floor-specs{margin-top:6px;font-size:14px}.compact .accessibility-switch{flex:0 0 auto;min-width:88px;height:44px}.compact .accessibility-switch:after{clip-path:circle(19px)}.compact .accessibility-switch-icon{width:44px}.compact-generate-route{padding:0 16px 16px}.compact-generate-route .generate-route-container{margin-top:0!important}.compact-generate-route .generate-route-btn{height:48px}.mt-3{margin-top:1rem!important}.align-items-center{align-items:center!important}.justify-content-center{justify-content:center!important}.error-modal-overlay{position:fixed;inset:0;background:#00000080;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000}.error-modal{background:#fff;color:#11032b;border-radius:24px;padding:32px;text-align:center;max-width:350px;box-shadow:0 0 24px #0000004d;animation:fadeInScale .2s ease-out}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.error-icon{margin-bottom:16px;color:#11032b}.error-message{font-size:18px;margin:0 0 24px;line-height:1.4;font-weight:500}.error-btn{background:#11032b;color:#fff;border:none;border-radius:30px;padding:12px 40px;font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s ease}.error-btn:hover{background:#1a0540}.loading-overlay{position:fixed;inset:0;background:#ffffffd9;backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999}.loading-spinner{width:60px;height:60px;border:4px solid #f3f3f3;border-top:4px solid #11032b;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loading-text{margin-top:16px;font-size:18px;font-weight:600;color:#11032b}.error-icon.network-error{color:#e74c3c}")],M3([ys({context:pV,subscribe:!0})],R3.prototype,"sdkData",2),M3([pe({type:Boolean,attribute:"hide-back"})],R3.prototype,"hideBack",1),M3([pe({type:Boolean,attribute:"hide-repeat-route"})],R3.prototype,"hideRepeatRoute",1),M3([pe({type:Boolean,attribute:"hide-route-inputs"})],R3.prototype,"hideRouteInputs",1),M3([pe({type:Boolean,attribute:"hide-accessibility-switch"})],R3.prototype,"hideAccessibilitySwitch",1),M3([pe({type:Boolean,attribute:"hide-generate-route"})],R3.prototype,"hideGenerateRoute",1),M3([pe({type:Boolean,attribute:"auto-generate-route"})],R3.prototype,"autoGenerateRoute",1),M3([pe({type:String,attribute:"panel-variant"})],R3.prototype,"panelVariant",1),R3=M3([ce("route-options")],R3);const F3=Object.freeze(Object.defineProperty({__proto__:null,get RouteOptions(){return R3}},Symbol.toStringTag,{value:"Module"})),L3=Object.freeze(Object.defineProperty({__proto__:null,default:'.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media(forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media(forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media(hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}}.maplibregl-ctrl button:not(:disabled):active{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E)}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E)}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E)}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media(forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E)}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E)}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media(forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}}@media(forced-colors:active)and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate%2815.553%202.85%29scale%28.88807%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:#ffffff80;margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E);background-color:#ffffff80;width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E)}}@media screen and (forced-colors:active)and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E)}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px #00000059}@media(prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:#0006;position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media(hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}.mapvx-marker{display:flex;border:none;cursor:pointer;padding:0;align-items:center;justify-content:center;box-sizing:border-box}.mapvx-marker .text-container{position:absolute;display:block;width:max-content;max-width:var(--mapvx-label-max-width, 200px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;pointer-events:none;box-sizing:border-box}.mapvx-marker .text-container.top{bottom:100%;left:50%;transform:translate(-50%);margin-bottom:var(--mapvx-label-vertical-gap, 4px)}.mapvx-marker .text-container.bottom{top:100%;left:50%;transform:translate(-50%);margin-top:var(--mapvx-label-vertical-gap, 4px)}.mapvx-marker .text-container.left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--mapvx-label-gap, 8px)}.mapvx-marker .text-container.right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--mapvx-label-gap, 8px)}.icon-default{background-color:#007cbf;border-radius:50%;display:block}.mapvx-map-container{width:100%;height:100%;position:relative}.mapvx-popup{max-width:300px}.mapvx-popup .maplibregl-popup-content{padding:12px;border-radius:8px;box-shadow:0 4px 6px #0000001a}.mapvx-controls{position:absolute;top:10px;right:10px;z-index:1000}'},Symbol.toStringTag,{value:"Module"})),k3="184",O3=1,z3=3,N3=0,U3=1,V3=2,G3=100,j3=101,q3=102,H3=200,Q3=201,W3=202,K3=203,Z3=204,Y3=205,X3=206,J3=207,$3=208,e4=209,t4=210,n4=211,r4=212,i4=213,a4=214,s4=0,o4=1,l4=2,u4=3,c4=4,h4=5,d4=6,p4=7,f4=0,m4=1,g4=2,A4=1,y4=2,v4=3,b4=4,x4=5,_4=6,w4=7,E4="attached",C4="detached",S4=300,I4=301,M4=302,T4=303,D4=304,P4=306,B4=1e3,R4=1001,F4=1002,L4=1003,k4=1004,O4=1005,z4=1006,N4=1007,U4=1008,V4=1009,G4=1010,j4=1011,q4=1012,H4=1013,Q4=1014,W4=1015,K4=1016,Z4=1017,Y4=1018,X4=1020,J4=35902,$4=35899,e6=1021,t6=1022,n6=1023,r6=1026,i6=1027,a6=1028,s6=1029,o6=1030,l6=1031,u6=1033,c6=33776,h6=33777,d6=33778,p6=33779,f6=35840,m6=35841,g6=35842,A6=35843,y6=36196,v6=37492,b6=37496,x6=37488,_6=37489,w6=37490,E6=37491,C6=37808,S6=37809,I6=37810,M6=37811,T6=37812,D6=37813,P6=37814,B6=37815,R6=37816,F6=37817,L6=37818,k6=37819,O6=37820,z6=37821,N6=36492,U6=36494,V6=36495,G6=36283,j6=36284,q6=36285,H6=36286,Q6=2300,W6=2301,K6=2302,Z6=2303,Y6=2400,X6=2401,J6=2402,$6=2500,e5=2501,t5="",n5="srgb",r5="srgb-linear",i5="linear",a5="srgb",s5=7680,o5=512,l5=513,u5=514,c5=515,h5=516,d5=517,p5=518,f5=519,m5=35044,g5="300 es",A5=2e3,y5=2001;const v5={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function b5(e,t){return new v5[e](t)}function x5(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _5(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function w5(){const e=_5("canvas");return e.style.display="block",e}const E5={};let C5=null;function S5(...e){const t="THREE."+e.shift();C5?C5("log",t,...e):console.log(t,...e)}function I5(e){const t=e[0];if("string"==typeof t&&t.startsWith("TSL:")){const t=e[1];t&&t.isStackTrace?e[0]+=" "+t.getLocation():e[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return e}function M5(...e){const t="THREE."+(e=I5(e)).shift();if(C5)C5("warn",t,...e);else{const n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function T5(...e){const t="THREE."+(e=I5(e)).shift();if(C5)C5("error",t,...e);else{const n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function D5(...e){const t=e.join(" ");t in E5||(E5[t]=!0,M5(...e))}const P5={[s4]:1,[l4]:6,[c4]:7,[u4]:5,[o4]:0,[d4]:2,[p4]:4,[h4]:3};class B5{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return void 0!==n&&(void 0!==n[e]&&-1!==n[e].indexOf(t))}removeEventListener(e,t){const n=this._listeners;if(void 0===n)return;const r=n[e];if(void 0!==r){const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){const t=this._listeners;if(void 0===t)return;const n=t[e.type];if(void 0!==n){e.target=this;const t=n.slice(0);for(let n=0,r=t.length;n<r;n++)t[n].call(this,e);e.target=null}}}const R5=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let F5=1234567;const L5=Math.PI/180,k5=180/Math.PI;function O5(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(R5[255&e]+R5[e>>8&255]+R5[e>>16&255]+R5[e>>24&255]+"-"+R5[255&t]+R5[t>>8&255]+"-"+R5[t>>16&15|64]+R5[t>>24&255]+"-"+R5[63&n|128]+R5[n>>8&255]+"-"+R5[n>>16&255]+R5[n>>24&255]+R5[255&r]+R5[r>>8&255]+R5[r>>16&255]+R5[r>>24&255]).toLowerCase()}function z5(e,t,n){return Math.max(t,Math.min(n,e))}function N5(e,t){return(e%t+t)%t}function U5(e,t,n){return(1-n)*e+n*t}function V5(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function G5(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const j5={DEG2RAD:L5,RAD2DEG:k5,generateUUID:O5,clamp:z5,euclideanModulo:N5,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:U5,damp:function(e,t,n,r){return U5(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(N5(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(F5=e);let t=F5+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*L5},radToDeg:function(e){return e*k5},isPowerOfTwo:function(e){return!(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),u=a((t+r)/2),c=s((t+r)/2),h=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(o*c,l*h,l*d,o*u);break;case"YZY":e.set(l*d,o*c,l*h,o*u);break;case"ZXZ":e.set(l*h,l*d,o*c,o*u);break;case"XZX":e.set(o*c,l*f,l*p,o*u);break;case"YXY":e.set(l*p,o*c,l*f,o*u);break;case"ZYZ":e.set(l*f,l*p,o*c,o*u);break;default:M5("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:G5,denormalize:V5};let q5=class e{static{e.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=z5(this.x,e.x,t.x),this.y=z5(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=z5(this.x,e,t),this.y=z5(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(z5(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(z5(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},H5=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3],h=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(c!==f||o!==h||l!==d||u!==p){let e=o*h+l*d+u*p+c*f;e<0&&(h=-h,d=-d,p=-p,f=-f,e=-e);let t=1-s;if(e<.9995){const n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=o*t+h*(s=Math.sin(s*n)/r),l=l*t+d*s,u=u*t+p*s,c=c*t+f*s}else{o=o*t+h*s,l=l*t+d*s,u=u*t+p*s,c=c*t+f*s;const e=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){const s=n[r],o=n[r+1],l=n[r+2],u=n[r+3],c=i[a],h=i[a+1],d=i[a+2],p=i[a+3];return e[t]=s*p+u*c+o*d-l*h,e[t+1]=o*p+u*h+l*c-s*d,e[t+2]=l*p+u*d+s*h-o*c,e[t+3]=u*p-s*c-o*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),u=s(r/2),c=s(i/2),h=o(n/2),d=o(r/2),p=o(i/2);switch(a){case"XYZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"YXZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"ZXY":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"ZYX":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"YZX":this._x=h*u*c+l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c-h*d*p;break;case"XZY":this._x=h*u*c-l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c+h*d*p;break;default:M5("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],h=n+s+c;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>c){const e=2*Math.sqrt(1+n-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>c){const e=2*Math.sqrt(1+s-n-c);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+u)/e}else{const e=2*Math.sqrt(1+c-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(z5(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=n*u+a*s+r*l-i*o,this._y=r*u+a*o+i*s-n*l,this._z=i*u+a*l+n*o-r*s,this._w=a*u-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,s=this.dot(e);s<0&&(n=-n,r=-r,i=-i,a=-a,s=-s);let o=1-t;if(s<.9995){const e=Math.acos(s),l=Math.sin(e);o=Math.sin(o*e)/l,t=Math.sin(t*e)/l,this._x=this._x*o+n*t,this._y=this._y*o+r*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this._onChangeCallback()}else this._x=this._x*o+n*t,this._y=this._y*o+r*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Q5=class e{static{e.prototype.isVector3=!0}constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(K5.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(K5.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*r-s*n),u=2*(s*t-i*r),c=2*(i*n-a*t);return this.x=t+o*l+a*c-s*u,this.y=n+o*u+s*l-i*c,this.z=r+o*c+i*u-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=z5(this.x,e.x,t.x),this.y=z5(this.y,e.y,t.y),this.z=z5(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=z5(this.x,e,t),this.y=z5(this.y,e,t),this.z=z5(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(z5(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return W5.copy(this).projectOnVector(e),this.sub(W5)}reflect(e){return this.sub(W5.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(z5(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=2*Math.random()-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const W5=new Q5,K5=new H5;let Z5=class e{static{e.prototype.isMatrix3=!0}constructor(e,t,n,r,i,a,s,o,l){this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}set(e,t,n,r,i,a,s,o,l){const u=this.elements;return u[0]=e,u[1]=r,u[2]=s,u[3]=t,u[4]=i,u[5]=o,u[6]=n,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],A=r[1],y=r[4],v=r[7],b=r[2],x=r[5],_=r[8];return i[0]=a*f+s*A+o*b,i[3]=a*m+s*y+o*x,i[6]=a*g+s*v+o*_,i[1]=l*f+u*A+c*b,i[4]=l*m+u*y+c*x,i[7]=l*g+u*v+c*_,i[2]=h*f+d*A+p*b,i[5]=h*m+d*y+p*x,i[8]=h*g+d*v+p*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-n*i*u+n*s*o+r*i*l-r*a*o}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,h=s*o-u*i,d=l*i-a*o,p=t*c+n*h+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=c*f,e[1]=(r*l-u*n)*f,e[2]=(s*n-r*a)*f,e[3]=h*f,e[4]=(u*t-r*o)*f,e[5]=(r*i-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,s){const o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Y5.makeScale(e,t)),this}rotate(e){return this.premultiply(Y5.makeRotation(-e)),this}translate(e,t){return this.premultiply(Y5.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}};const Y5=new Z5,X5=(new Z5).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),J5=(new Z5).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function $5(){const e={enabled:!0,workingColorSpace:r5,spaces:{},convert:function(e,t,n){return!1!==this.enabled&&t!==n&&t&&n?(this.spaces[t].transfer===a5&&(e.r=t8(e.r),e.g=t8(e.g),e.b=t8(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===a5&&(e.r=n8(e.r),e.g=n8(e.g),e.b=n8(e.b)),e):e},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===t5?i5:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return D5("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return D5("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[r5]:{primaries:t,whitePoint:r,transfer:i5,toXYZ:X5,fromXYZ:J5,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:n5},outputColorSpaceConfig:{drawingBufferColorSpace:n5}},[n5]:{primaries:t,whitePoint:r,transfer:a5,toXYZ:X5,fromXYZ:J5,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:n5}}}),e}const e8=$5();function t8(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function n8(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let r8;class i8{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{void 0===r8&&(r8=_5("canvas")),r8.width=e.width,r8.height=e.height;const t=r8.getContext("2d");e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=r8}return n.toDataURL(t)}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=_5("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*t8(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*t8(t[e]/255)):t[e]=t8(t[e]);return{data:t,width:e.width,height:e.height}}return M5("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let a8=0;class s8{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:a8++}),this.uuid=O5(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):null!==t?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(o8(r[t].image)):e.push(o8(r[t]))}else e=o8(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function o8(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?i8.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(M5("Texture: Unable to serialize Texture."),{})}let l8=0;const u8=new Q5;let c8=class e extends B5{constructor(t=e.DEFAULT_IMAGE,n=e.DEFAULT_MAPPING,r=1001,i=1001,a=1006,s=1008,o=1023,l=V4,u=e.DEFAULT_ANISOTROPY,c=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:l8++}),this.uuid=O5(),this.name="",this.source=new s8(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=a,this.minFilter=s,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new q5(0,0),this.repeat=new q5(1,1),this.center=new q5(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Z5,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(u8).x}get height(){return this.source.getSize(u8).y}get depth(){return this.source.getSize(u8).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(void 0===n){M5(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n:M5(`Texture.setValues(): property '${t}' does not exist.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==S4)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case B4:e.x=e.x-Math.floor(e.x);break;case R4:e.x=e.x<0?0:1;break;case F4:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case B4:e.y=e.y-Math.floor(e.y);break;case R4:e.y=e.y<0?0:1;break;case F4:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}};c8.DEFAULT_IMAGE=null,c8.DEFAULT_MAPPING=S4,c8.DEFAULT_ANISOTROPY=1;let h8=class e{static{e.prototype.isVector4=!0}constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,s=.1,o=e.elements,l=o[0],u=o[4],c=o[8],h=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(u-h)<a&&Math.abs(c-f)<a&&Math.abs(p-m)<a){if(Math.abs(u+h)<s&&Math.abs(c+f)<s&&Math.abs(p+m)<s&&Math.abs(l+d+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,o=(d+1)/2,A=(g+1)/2,y=(u+h)/4,v=(c+f)/4,b=(p+m)/4;return e>o&&e>A?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=v/n):o>A?o<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=y/r,i=b/r):A<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(A),n=v/i,r=b/i),this.set(n,r,i,t),this}let A=Math.sqrt((m-p)*(m-p)+(c-f)*(c-f)+(h-u)*(h-u));return Math.abs(A)<.001&&(A=1),this.x=(m-p)/A,this.y=(c-f)/A,this.z=(h-u)/A,this.w=Math.acos((l+d+g-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=z5(this.x,e.x,t.x),this.y=z5(this.y,e.y,t.y),this.z=z5(this.z,e.z,t.z),this.w=z5(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=z5(this.x,e,t),this.y=z5(this.y,e,t),this.z=z5(this.z,e,t),this.w=z5(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(z5(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};class d8 extends B5{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:z4,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new h8(0,0,e,t),this.scissorTest=!1,this.viewport=new h8(0,0,e,t),this.textures=[];const r={width:e,height:t,depth:n.depth},i=new c8(r),a=n.count;for(let s=0;s<a;s++)this.textures[s]=i.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:z4,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++){this.textures[n].setValues(t)}}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==e&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.textures.length;r<i;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,!0!==this.textures[r].isData3DTexture&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const n=Object.assign({},e.textures[t].image);this.textures[t].source=new s8(n)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this}dispose(){this.dispatchEvent({type:"dispose"})}}class p8 extends d8{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class f8 extends c8{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=L4,this.minFilter=L4,this.wrapR=R4,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class m8 extends c8{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=L4,this.minFilter=L4,this.wrapR=R4,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}let g8=class e{static{e.prototype.isMatrix4=!0}constructor(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m)}set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new e).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return 0===this.determinant()?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(0===e.determinant())return this.identity();const t=this.elements,n=e.elements,r=1/A8.setFromMatrixColumn(e,0).length(),i=1/A8.setFromMatrixColumn(e,1).length(),a=1/A8.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){const e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){const e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){const e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e-i*s,t[4]=-a*c,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*u,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){const e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*c,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=n*c-r,t[2]=r*c-n,t[6]=s*u,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(v8,e,b8)}lookAt(e,t,n){const r=this.elements;return w8.subVectors(e,t),0===w8.lengthSq()&&(w8.z=1),w8.normalize(),x8.crossVectors(n,w8),0===x8.lengthSq()&&(1===Math.abs(n.z)?w8.x+=1e-4:w8.z+=1e-4,w8.normalize(),x8.crossVectors(n,w8)),x8.normalize(),_8.crossVectors(w8,x8),r[0]=x8.x,r[4]=_8.x,r[8]=w8.x,r[1]=x8.y,r[5]=_8.y,r[9]=w8.y,r[2]=x8.z,r[6]=_8.z,r[10]=w8.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],A=n[3],y=n[7],v=n[11],b=n[15],x=r[0],_=r[4],w=r[8],E=r[12],C=r[1],S=r[5],I=r[9],M=r[13],T=r[2],D=r[6],P=r[10],B=r[14],R=r[3],F=r[7],L=r[11],k=r[15];return i[0]=a*x+s*C+o*T+l*R,i[4]=a*_+s*S+o*D+l*F,i[8]=a*w+s*I+o*P+l*L,i[12]=a*E+s*M+o*B+l*k,i[1]=u*x+c*C+h*T+d*R,i[5]=u*_+c*S+h*D+d*F,i[9]=u*w+c*I+h*P+d*L,i[13]=u*E+c*M+h*B+d*k,i[2]=p*x+f*C+m*T+g*R,i[6]=p*_+f*S+m*D+g*F,i[10]=p*w+f*I+m*P+g*L,i[14]=p*E+f*M+m*B+g*k,i[3]=A*x+y*C+v*T+b*R,i[7]=A*_+y*S+v*D+b*F,i[11]=A*w+y*I+v*P+b*L,i[15]=A*E+y*M+v*B+b*k,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14],p=e[3],f=e[7],m=e[11],g=e[15],A=o*d-l*h,y=s*d-l*c,v=s*h-o*c,b=a*d-l*u,x=a*h-o*u,_=a*c-s*u;return t*(f*A-m*y+g*v)-n*(p*A-m*b+g*x)+r*(p*y-f*b+g*_)-i*(p*v-f*x+m*_)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],A=t*s-n*a,y=t*o-r*a,v=t*l-i*a,b=n*o-r*s,x=n*l-i*s,_=r*l-i*o,w=u*f-c*p,E=u*m-h*p,C=u*g-d*p,S=c*m-h*f,I=c*g-d*f,M=h*g-d*m,T=A*M-y*I+v*S+b*C-x*E+_*w;if(0===T)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/T;return e[0]=(s*M-o*I+l*S)*D,e[1]=(r*I-n*M-i*S)*D,e[2]=(f*_-m*x+g*b)*D,e[3]=(h*x-c*_-d*b)*D,e[4]=(o*C-a*M-l*E)*D,e[5]=(t*M-r*C+i*E)*D,e[6]=(m*v-p*_-g*y)*D,e[7]=(u*_-h*v+d*y)*D,e[8]=(a*I-s*C+l*w)*D,e[9]=(n*C-t*I-i*w)*D,e[10]=(p*x-f*v+g*A)*D,e[11]=(c*v-u*x-d*A)*D,e[12]=(s*E-a*S-o*w)*D,e[13]=(t*S-n*E+r*w)*D,e[14]=(f*y-p*b-m*A)*D,e[15]=(u*b-c*y+h*A)*D,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,u=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,u*s+n,u*o-r*a,0,l*o-r*s,u*o+r*a,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,u=a+a,c=s+s,h=i*l,d=i*u,p=i*c,f=a*u,m=a*c,g=s*c,A=o*l,y=o*u,v=o*c,b=n.x,x=n.y,_=n.z;return r[0]=(1-(f+g))*b,r[1]=(d+v)*b,r[2]=(p-y)*b,r[3]=0,r[4]=(d-v)*x,r[5]=(1-(h+g))*x,r[6]=(m+A)*x,r[7]=0,r[8]=(p+y)*_,r[9]=(m-A)*_,r[10]=(1-(h+f))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;e.x=r[12],e.y=r[13],e.z=r[14];const i=this.determinant();if(0===i)return n.set(1,1,1),t.identity(),this;let a=A8.set(r[0],r[1],r[2]).length();const s=A8.set(r[4],r[5],r[6]).length(),o=A8.set(r[8],r[9],r[10]).length();i<0&&(a=-a),y8.copy(this);const l=1/a,u=1/s,c=1/o;return y8.elements[0]*=l,y8.elements[1]*=l,y8.elements[2]*=l,y8.elements[4]*=u,y8.elements[5]*=u,y8.elements[6]*=u,y8.elements[8]*=c,y8.elements[9]*=c,y8.elements[10]*=c,t.setFromRotationMatrix(y8),n.x=a,n.y=s,n.z=o,this}makePerspective(e,t,n,r,i,a,s=2e3,o=!1){const l=this.elements,u=2*i/(t-e),c=2*i/(n-r),h=(t+e)/(t-e),d=(n+r)/(n-r);let p,f;if(o)p=i/(a-i),f=a*i/(a-i);else if(s===A5)p=-(a+i)/(a-i),f=-2*a*i/(a-i);else{if(s!==y5)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);p=-a/(a-i),f=-a*i/(a-i)}return l[0]=u,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=c,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,r,i,a,s=2e3,o=!1){const l=this.elements,u=2/(t-e),c=2/(n-r),h=-(t+e)/(t-e),d=-(n+r)/(n-r);let p,f;if(o)p=1/(a-i),f=a/(a-i);else if(s===A5)p=-2/(a-i),f=-(a+i)/(a-i);else{if(s!==y5)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);p=-1/(a-i),f=-i/(a-i)}return l[0]=u,l[4]=0,l[8]=0,l[12]=h,l[1]=0,l[5]=c,l[9]=0,l[13]=d,l[2]=0,l[6]=0,l[10]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};const A8=new Q5,y8=new g8,v8=new Q5(0,0,0),b8=new Q5(1,1,1),x8=new Q5,_8=new Q5,w8=new Q5,E8=new g8,C8=new H5;class S8{constructor(e=0,t=0,n=0,r=S8.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(z5(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-z5(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(z5(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-z5(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(z5(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-z5(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:M5("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return E8.makeRotationFromQuaternion(e),this.setFromRotationMatrix(E8,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return C8.setFromEuler(this),this.setFromQuaternion(C8,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}S8.DEFAULT_ORDER="XYZ";class I8{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}isEnabled(e){return!!(this.mask&1<<e)}}let M8=0;const T8=new Q5,D8=new H5,P8=new g8,B8=new Q5,R8=new Q5,F8=new Q5,L8=new H5,k8=new Q5(1,0,0),O8=new Q5(0,1,0),z8=new Q5(0,0,1),N8={type:"added"},U8={type:"removed"},V8={type:"childadded",child:null},G8={type:"childremoved",child:null};class j8 extends B5{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:M8++}),this.uuid=O5(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=j8.DEFAULT_UP.clone();const e=new Q5,t=new S8,n=new H5,r=new Q5(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new g8},normalMatrix:{value:new Z5}}),this.matrix=new g8,this.matrixWorld=new g8,this.matrixAutoUpdate=j8.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=j8.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new I8,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return D8.setFromAxisAngle(e,t),this.quaternion.multiply(D8),this}rotateOnWorldAxis(e,t){return D8.setFromAxisAngle(e,t),this.quaternion.premultiply(D8),this}rotateX(e){return this.rotateOnAxis(k8,e)}rotateY(e){return this.rotateOnAxis(O8,e)}rotateZ(e){return this.rotateOnAxis(z8,e)}translateOnAxis(e,t){return T8.copy(e).applyQuaternion(this.quaternion),this.position.add(T8.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(k8,e)}translateY(e){return this.translateOnAxis(O8,e)}translateZ(e){return this.translateOnAxis(z8,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(P8.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?B8.copy(e):B8.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),R8.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?P8.lookAt(R8,B8,this.up):P8.lookAt(B8,R8,this.up),this.quaternion.setFromRotationMatrix(P8),r&&(P8.extractRotation(r.matrixWorld),D8.setFromRotationMatrix(P8),this.quaternion.premultiply(D8.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(T5("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(N8),V8.child=e,this.dispatchEvent(V8),V8.child=null):T5("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(U8),G8.child=e,this.dispatchEvent(G8),G8.child=null),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),P8.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),P8.multiply(e.parent.matrixWorld)),e.applyMatrix4(P8),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(N8),V8.child=e,this.dispatchEvent(V8),V8.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const r=this.children;for(let i=0,a=r.length;i<a;i++)r[i].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(R8,e,F8),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(R8,L8,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(null!==e){const t=e.x,n=e.y,r=e.z,i=this.matrix.elements;i[12]+=t-i[0]*t-i[4]*n-i[8]*r,i[13]+=n-i[1]*t-i[5]*n-i[9]*r,i[14]+=r-i[2]*t-i[6]*n-i[10]*r}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++){t[n].updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){e[t].updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),!1!==this.static&&(r.static=this.static),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),null!==this.pivot&&(r.pivot=this.pivot.toArray()),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.morphTargetDictionary&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),void 0!==this.morphTargetInfluences&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(r.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(r.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(r.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=a(e.geometries),r=a(e.materials),i=a(e.textures),s=a(e.images),o=a(e.shapes),l=a(e.skeletons),u=a(e.animations),c=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=null!==e.pivot?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}j8.DEFAULT_UP=new Q5(0,1,0),j8.DEFAULT_MATRIX_AUTO_UPDATE=!0,j8.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class q8 extends j8{constructor(){super(),this.isGroup=!0,this.type="Group"}}const H8={type:"move"};class Q8{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new q8,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new q8,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Q5,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Q5),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new q8,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Q5,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Q5,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null;const s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){a=!0;for(const a of e.hand.values()){const e=t.getJointPose(a,n),r=this._getHandJoint(l,a);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),o=.02,u=.005;l.inputState.pinching&&s>o+u?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=o-u&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,o.eventsEnabled&&o.dispatchEvent({type:"gripUpdated",data:e,target:this})));null!==s&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(H8)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new q8;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const W8={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},K8={h:0,s:0,l:0},Z8={h:0,s:0,l:0};function Y8(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class X8{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=n5){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,e8.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=e8.workingColorSpace){return this.r=e,this.g=t,this.b=n,e8.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=e8.workingColorSpace){if(e=N5(e,1),t=z5(t,0,1),n=z5(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Y8(i,r,e+1/3),this.g=Y8(i,r,e),this.b=Y8(i,r,e-1/3)}return e8.colorSpaceToWorking(this,r),this}setStyle(e,t=n5){function n(t){void 0!==t&&parseFloat(t)<1&&M5("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:M5("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);M5("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=n5){const n=W8[e.toLowerCase()];return void 0!==n?this.setHex(n,t):M5("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=t8(e.r),this.g=t8(e.g),this.b=t8(e.b),this}copyLinearToSRGB(e){return this.r=n8(e.r),this.g=n8(e.g),this.b=n8(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=n5){return e8.workingToColorSpace(J8.copy(this),e),65536*Math.round(z5(255*J8.r,0,255))+256*Math.round(z5(255*J8.g,0,255))+Math.round(z5(255*J8.b,0,255))}getHexString(e=n5){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=e8.workingColorSpace){e8.workingToColorSpace(J8.copy(this),t);const n=J8.r,r=J8.g,i=J8.b,a=Math.max(n,r,i),s=Math.min(n,r,i);let o,l;const u=(s+a)/2;if(s===a)o=0,l=0;else{const e=a-s;switch(l=u<=.5?e/(a+s):e/(2-a-s),a){case n:o=(r-i)/e+(r<i?6:0);break;case r:o=(i-n)/e+2;break;case i:o=(n-r)/e+4}o/=6}return e.h=o,e.s=l,e.l=u,e}getRGB(e,t=e8.workingColorSpace){return e8.workingToColorSpace(J8.copy(this),t),e.r=J8.r,e.g=J8.g,e.b=J8.b,e}getStyle(e=n5){e8.workingToColorSpace(J8.copy(this),e);const t=J8.r,n=J8.g,r=J8.b;return e!==n5?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(e,t,n){return this.getHSL(K8),this.setHSL(K8.h+e,K8.s+t,K8.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(K8),e.getHSL(Z8);const n=U5(K8.h,Z8.h,t),r=U5(K8.s,Z8.s,t),i=U5(K8.l,Z8.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const J8=new X8;X8.NAMES=W8;class $8{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new X8(e),this.density=t}clone(){return new $8(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class e7{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new X8(e),this.near=t,this.far=n}clone(){return new e7(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class t7 extends j8{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new S8,this.environmentIntensity=1,this.environmentRotation=new S8,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}const n7=new Q5,r7=new Q5,i7=new Q5,a7=new Q5,s7=new Q5,o7=new Q5,l7=new Q5,u7=new Q5,c7=new Q5,h7=new Q5,d7=new h8,p7=new h8,f7=new h8;class m7{constructor(e=new Q5,t=new Q5,n=new Q5){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),n7.subVectors(e,t),r.cross(n7);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){n7.subVectors(r,t),r7.subVectors(n,t),i7.subVectors(e,t);const a=n7.dot(n7),s=n7.dot(r7),o=n7.dot(i7),l=r7.dot(r7),u=r7.dot(i7),c=a*l-s*s;if(0===c)return i.set(0,0,0),null;const h=1/c,d=(l*o-s*u)*h,p=(a*u-s*o)*h;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return null!==this.getBarycoord(e,t,n,r,a7)&&(a7.x>=0&&a7.y>=0&&a7.x+a7.y<=1)}static getInterpolation(e,t,n,r,i,a,s,o){return null===this.getBarycoord(e,t,n,r,a7)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(i,a7.x),o.addScaledVector(a,a7.y),o.addScaledVector(s,a7.z),o)}static getInterpolatedAttribute(e,t,n,r,i,a){return d7.setScalar(0),p7.setScalar(0),f7.setScalar(0),d7.fromBufferAttribute(e,t),p7.fromBufferAttribute(e,n),f7.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(d7,i.x),a.addScaledVector(p7,i.y),a.addScaledVector(f7,i.z),a}static isFrontFacing(e,t,n,r){return n7.subVectors(n,t),r7.subVectors(e,t),n7.cross(r7).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return n7.subVectors(this.c,this.b),r7.subVectors(this.a,this.b),.5*n7.cross(r7).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return m7.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return m7.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,i){return m7.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return m7.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return m7.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,s;s7.subVectors(r,n),o7.subVectors(i,n),u7.subVectors(e,n);const o=s7.dot(u7),l=o7.dot(u7);if(o<=0&&l<=0)return t.copy(n);c7.subVectors(e,r);const u=s7.dot(c7),c=o7.dot(c7);if(u>=0&&c<=u)return t.copy(r);const h=o*c-u*l;if(h<=0&&o>=0&&u<=0)return a=o/(o-u),t.copy(n).addScaledVector(s7,a);h7.subVectors(e,i);const d=s7.dot(h7),p=o7.dot(h7);if(p>=0&&d<=p)return t.copy(i);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(o7,s);const m=u*p-d*c;if(m<=0&&c-u>=0&&d-p>=0)return l7.subVectors(i,r),s=(c-u)/(c-u+(d-p)),t.copy(r).addScaledVector(l7,s);const g=1/(m+f+h);return a=f*g,s=h*g,t.copy(n).addScaledVector(s7,a).addScaledVector(o7,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class g7{constructor(e=new Q5(1/0,1/0,1/0),t=new Q5(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(y7.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(y7.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=y7.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n){const r=n.getAttribute("position");if(!0===t&&void 0!==r&&!0!==e.isInstancedMesh)for(let t=0,n=r.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,y7):y7.fromBufferAttribute(r,t),y7.applyMatrix4(e.matrixWorld),this.expandByPoint(y7);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),v7.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),v7.copy(n.boundingBox)),v7.applyMatrix4(e.matrixWorld),this.union(v7)}const r=e.children;for(let i=0,a=r.length;i<a;i++)this.expandByObject(r[i],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,y7),y7.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(S7),I7.subVectors(this.max,S7),b7.subVectors(e.a,S7),x7.subVectors(e.b,S7),_7.subVectors(e.c,S7),w7.subVectors(x7,b7),E7.subVectors(_7,x7),C7.subVectors(b7,_7);let t=[0,-w7.z,w7.y,0,-E7.z,E7.y,0,-C7.z,C7.y,w7.z,0,-w7.x,E7.z,0,-E7.x,C7.z,0,-C7.x,-w7.y,w7.x,0,-E7.y,E7.x,0,-C7.y,C7.x,0];return!!D7(t,b7,x7,_7,I7)&&(t=[1,0,0,0,1,0,0,0,1],!!D7(t,b7,x7,_7,I7)&&(M7.crossVectors(w7,E7),t=[M7.x,M7.y,M7.z],D7(t,b7,x7,_7,I7)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,y7).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(y7).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(A7[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),A7[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),A7[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),A7[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),A7[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),A7[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),A7[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),A7[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(A7)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const A7=[new Q5,new Q5,new Q5,new Q5,new Q5,new Q5,new Q5,new Q5],y7=new Q5,v7=new g7,b7=new Q5,x7=new Q5,_7=new Q5,w7=new Q5,E7=new Q5,C7=new Q5,S7=new Q5,I7=new Q5,M7=new Q5,T7=new Q5;function D7(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){T7.fromArray(e,a);const s=i.x*Math.abs(T7.x)+i.y*Math.abs(T7.y)+i.z*Math.abs(T7.z),o=t.dot(T7),l=n.dot(T7),u=r.dot(T7);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}const P7=B7();function B7(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const e=l-127;e<-27?(r[l]=0,r[256|l]=32768,i[l]=24,i[256|l]=24):e<-14?(r[l]=1024>>-e-14,r[256|l]=1024>>-e-14|32768,i[l]=-e-1,i[256|l]=-e-1):e<=15?(r[l]=e+15<<10,r[256|l]=e+15<<10|32768,i[l]=13,i[256|l]=13):e<128?(r[l]=31744,r[256|l]=64512,i[l]=24,i[256|l]=24):(r[l]=31744,r[256|l]=64512,i[l]=13,i[256|l]=13)}const a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let e=l<<13,t=0;for(;!(8388608&e);)e<<=1,t-=8388608;e&=-8388609,t+=947912704,a[l]=e|t}for(let l=1024;l<2048;++l)a[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)32!==l&&(o[l]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}function R7(e){Math.abs(e)>65504&&M5("DataUtils.toHalfFloat(): Value out of range."),e=z5(e,-65504,65504),P7.floatView[0]=e;const t=P7.uint32View[0],n=t>>23&511;return P7.baseTable[n]+((8388607&t)>>P7.shiftTable[n])}function F7(e){const t=e>>10;return P7.uint32View[0]=P7.mantissaTable[P7.offsetTable[t]+(1023&e)]+P7.exponentTable[t],P7.floatView[0]}const L7=new Q5,k7=new q5;let O7=0;class z7 extends B5{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:O7++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=m5,this.updateRanges=[],this.gpuType=W4,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)k7.fromBufferAttribute(this,t),k7.applyMatrix3(e),this.setXY(t,k7.x,k7.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.applyMatrix3(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.applyMatrix4(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.applyNormalMatrix(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)L7.fromBufferAttribute(this,t),L7.transformDirection(e),this.setXYZ(t,L7.x,L7.y,L7.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=V5(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=G5(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=V5(t,this.array)),t}setX(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=V5(t,this.array)),t}setY(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=V5(t,this.array)),t}setZ(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=V5(t,this.array)),t}setW(e,t){return this.normalized&&(t=G5(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array),i=G5(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==m5&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class N7 extends z7{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class U7 extends z7{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class V7 extends z7{constructor(e,t,n){super(new Float32Array(e),t,n)}}const G7=new g7,j7=new Q5,q7=new Q5;class H7{constructor(e=new Q5,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):G7.setFromPoints(e).getCenter(n);let r=0;for(let i=0,a=e.length;i<a;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;j7.subVectors(e,this.center);const t=j7.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(j7,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(q7.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(j7.copy(e.center).add(q7)),this.expandByPoint(j7.copy(e.center).sub(q7))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let Q7=0;const W7=new g8,K7=new j8,Z7=new Q5,Y7=new g7,X7=new g7,J7=new Q5;class $7 extends B5{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Q7++}),this.uuid=O5(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(function(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}(e)?U7:N7)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Z5).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return W7.makeRotationFromQuaternion(e),this.applyMatrix4(W7),this}rotateX(e){return W7.makeRotationX(e),this.applyMatrix4(W7),this}rotateY(e){return W7.makeRotationY(e),this.applyMatrix4(W7),this}rotateZ(e){return W7.makeRotationZ(e),this.applyMatrix4(W7),this}translate(e,t,n){return W7.makeTranslation(e,t,n),this.applyMatrix4(W7),this}scale(e,t,n){return W7.makeScale(e,t,n),this.applyMatrix4(W7),this}lookAt(e){return K7.lookAt(e),K7.updateMatrix(),this.applyMatrix4(K7.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Z7).negate(),this.translate(Z7.x,Z7.y,Z7.z),this}setFromPoints(e){const t=this.getAttribute("position");if(void 0===t){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}this.setAttribute("position",new V7(t,3))}else{const n=Math.min(e.length,t.count);for(let r=0;r<n;r++){const n=e[r];t.setXYZ(r,n.x,n.y,n.z||0)}e.length>t.count&&M5("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new g7);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return T5("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new Q5(-1/0,-1/0,-1/0),new Q5(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];Y7.setFromBufferAttribute(e),this.morphTargetsRelative?(J7.addVectors(this.boundingBox.min,Y7.min),this.boundingBox.expandByPoint(J7),J7.addVectors(this.boundingBox.max,Y7.max),this.boundingBox.expandByPoint(J7)):(this.boundingBox.expandByPoint(Y7.min),this.boundingBox.expandByPoint(Y7.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&T5('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new H7);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return T5("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new Q5,1/0);if(e){const n=this.boundingSphere.center;if(Y7.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];X7.setFromBufferAttribute(n),this.morphTargetsRelative?(J7.addVectors(Y7.min,X7.min),Y7.expandByPoint(J7),J7.addVectors(Y7.max,X7.max),Y7.expandByPoint(J7)):(Y7.expandByPoint(X7.min),Y7.expandByPoint(X7.max))}Y7.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)J7.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(J7));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],s=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)J7.fromBufferAttribute(a,t),s&&(Z7.fromBufferAttribute(e,t),J7.add(Z7)),r=Math.max(r,n.distanceToSquared(J7))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&T5('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void T5("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.position,r=t.normal,i=t.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new z7(new Float32Array(4*n.count),4));const a=this.getAttribute("tangent"),s=[],o=[];for(let w=0;w<n.count;w++)s[w]=new Q5,o[w]=new Q5;const l=new Q5,u=new Q5,c=new Q5,h=new q5,d=new q5,p=new q5,f=new Q5,m=new Q5;function g(e,t,r){l.fromBufferAttribute(n,e),u.fromBufferAttribute(n,t),c.fromBufferAttribute(n,r),h.fromBufferAttribute(i,e),d.fromBufferAttribute(i,t),p.fromBufferAttribute(i,r),u.sub(l),c.sub(l),d.sub(h),p.sub(h);const a=1/(d.x*p.y-p.x*d.y);isFinite(a)&&(f.copy(u).multiplyScalar(p.y).addScaledVector(c,-d.y).multiplyScalar(a),m.copy(c).multiplyScalar(d.x).addScaledVector(u,-p.x).multiplyScalar(a),s[e].add(f),s[t].add(f),s[r].add(f),o[e].add(m),o[t].add(m),o[r].add(m))}let A=this.groups;0===A.length&&(A=[{start:0,count:e.count}]);for(let w=0,E=A.length;w<E;++w){const t=A[w],n=t.start;for(let r=n,i=n+t.count;r<i;r+=3)g(e.getX(r+0),e.getX(r+1),e.getX(r+2))}const y=new Q5,v=new Q5,b=new Q5,x=new Q5;function _(e){b.fromBufferAttribute(r,e),x.copy(b);const t=s[e];y.copy(t),y.sub(b.multiplyScalar(b.dot(t))).normalize(),v.crossVectors(x,t);const n=v.dot(o[e])<0?-1:1;a.setXYZW(e,y.x,y.y,y.z,n)}for(let w=0,E=A.length;w<E;++w){const t=A[w],n=t.start;for(let r=n,i=n+t.count;r<i;r+=3)_(e.getX(r+0)),_(e.getX(r+1)),_(e.getX(r+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new z7(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new Q5,i=new Q5,a=new Q5,s=new Q5,o=new Q5,l=new Q5,u=new Q5,c=new Q5;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),p=e.getX(h+1),f=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,p),a.fromBufferAttribute(t,f),u.subVectors(a,i),c.subVectors(r,i),u.cross(c),s.fromBufferAttribute(n,d),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(u),o.add(u),l.add(u),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,h=t.count;e<h;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),u.subVectors(a,i),c.subVectors(r,i),u.cross(c),n.setXYZ(e+0,u.x,u.y,u.z),n.setXYZ(e+1,u.x,u.y,u.z),n.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)J7.fromBufferAttribute(e,t),J7.normalize(),e.setXYZ(t,J7.x,J7.y,J7.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r);let s=0,o=0;for(let l=0,u=t.length;l<u;l++){s=e.isInterleavedBufferAttribute?t[l]*e.data.stride+e.offset:t[l]*r;for(let e=0;e<r;e++)a[o++]=n[s++]}return new z7(a,r,i)}if(null===this.index)return M5("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new $7,n=this.index.array,r=this.attributes;for(const s in r){const i=e(r[s],n);t.setAttribute(s,i)}const i=this.morphAttributes;for(const s in i){const r=[],a=i[s];for(let t=0,i=a.length;t<i;t++){const i=e(a[t],n);r.push(i)}t.morphAttributes[s]=r}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let s=0,o=a.length;s<o;s++){const e=a[s];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const o in n){const t=n[o];e.data.attributes[o]=t.toJSON(e.data)}const r={};let i=!1;for(const o in this.morphAttributes){const t=this.morphAttributes[o],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[o]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere=s.toJSON()),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone());const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let l=0,u=a.length;l<u;l++){const e=a[l];this.addGroup(e.start,e.count,e.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}class e9{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=m5,this.updateRanges=[],this.version=0,this.uuid=O5()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=O5()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=O5()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const t9=new Q5;class n9{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)t9.fromBufferAttribute(this,t),t9.applyMatrix4(e),this.setXYZ(t,t9.x,t9.y,t9.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)t9.fromBufferAttribute(this,t),t9.applyNormalMatrix(e),this.setXYZ(t,t9.x,t9.y,t9.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)t9.fromBufferAttribute(this,t),t9.transformDirection(e),this.setXYZ(t,t9.x,t9.y,t9.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=V5(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=G5(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=G5(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=V5(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=V5(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=V5(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=V5(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=G5(t,this.array),n=G5(n,this.array),r=G5(r,this.array),i=G5(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){S5("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new z7(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new n9(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){S5("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}let r9,i9=0,a9=class extends B5{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:i9++}),this.uuid=O5(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Z3,this.blendDst=Y3,this.blendEquation=G3,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new X8(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=s5,this.stencilZFail=s5,this.stencilZPass=s5,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){M5(`Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:M5(`Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==Z3&&(n.blendSrc=this.blendSrc),this.blendDst!==Y3&&(n.blendDst=this.blendDst),this.blendEquation!==G3&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==s5&&(n.stencilFail=this.stencilFail),this.stencilZFail!==s5&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==s5&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!1===this.allowOverride&&(n.allowOverride=!1),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}};class s9 extends a9{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new X8(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const o9=new Q5,l9=new Q5,u9=new Q5,c9=new q5,h9=new q5,d9=new g8,p9=new Q5,f9=new Q5,m9=new Q5,g9=new q5,A9=new q5,y9=new q5;class v9 extends j8{constructor(e=new s9){if(super(),this.isSprite=!0,this.type="Sprite",void 0===r9){r9=new $7;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new e9(e,5);r9.setIndex([0,1,2,0,2,3]),r9.setAttribute("position",new n9(t,3,0,!1)),r9.setAttribute("uv",new n9(t,2,3,!1))}this.geometry=r9,this.material=e,this.center=new q5(.5,.5),this.count=1}raycast(e,t){null===e.camera&&T5('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),l9.setFromMatrixScale(this.matrixWorld),d9.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),u9.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&l9.multiplyScalar(-u9.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;b9(p9.set(-.5,-.5,0),u9,a,l9,r,i),b9(f9.set(.5,-.5,0),u9,a,l9,r,i),b9(m9.set(.5,.5,0),u9,a,l9,r,i),g9.set(0,0),A9.set(1,0),y9.set(1,1);let s=e.ray.intersectTriangle(p9,f9,m9,!1,o9);if(null===s&&(b9(f9.set(-.5,.5,0),u9,a,l9,r,i),A9.set(0,1),s=e.ray.intersectTriangle(p9,m9,f9,!1,o9),null===s))return;const o=e.ray.origin.distanceTo(o9);o<e.near||o>e.far||t.push({distance:o,point:o9.clone(),uv:m7.getInterpolation(o9,p9,f9,m9,g9,A9,y9,new q5),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function b9(e,t,n,r,i,a){c9.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(h9.x=a*c9.x-i*c9.y,h9.y=i*c9.x+a*c9.y):h9.copy(c9),e.copy(t),e.x+=h9.x,e.y+=h9.y,e.applyMatrix4(d9)}const x9=new Q5,_9=new Q5;class w9 extends j8{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,r=t.length;n<r;n++){const e=t[n];this.addLevel(e.object.clone(),e.distance,e.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const r=this.levels;let i;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const e=t.splice(n,1);return this.remove(e[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){x9.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(x9);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){x9.setFromMatrixPosition(e.matrixWorld),_9.setFromMatrixPosition(this.matrixWorld);const n=x9.distanceTo(_9)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),!(n>=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let r=0,i=n.length;r<i;r++){const e=n[r];t.object.levels.push({object:e.object.uuid,distance:e.distance,hysteresis:e.hysteresis})}return t}}const E9=new Q5,C9=new Q5,S9=new Q5,I9=new Q5,M9=new Q5,T9=new Q5,D9=new Q5;class P9{constructor(e=new Q5,t=new Q5(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,E9)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=E9.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(E9.copy(this.origin).addScaledVector(this.direction,t),E9.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){C9.copy(e).add(t).multiplyScalar(.5),S9.copy(t).sub(e).normalize(),I9.copy(this.origin).sub(C9);const i=.5*e.distanceTo(t),a=-this.direction.dot(S9),s=I9.dot(this.direction),o=-I9.dot(S9),l=I9.lengthSq(),u=Math.abs(1-a*a);let c,h,d,p;if(u>0)if(c=a*o-s,h=a*s-o,p=i*u,c>=0)if(h>=-p)if(h<=p){const e=1/u;c*=e,h*=e,d=c*(c+a*h+2*s)+h*(a*c+h+2*o)+l}else h=i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;else h=-i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;else h<=-p?(c=Math.max(0,-(-a*i+s)),h=c>0?-i:Math.min(Math.max(-i,-o),i),d=-c*c+h*(h+2*o)+l):h<=p?(c=0,h=Math.min(Math.max(-i,-o),i),d=h*(h+2*o)+l):(c=Math.max(0,-(a*i+s)),h=c>0?i:Math.min(Math.max(-i,-o),i),d=-c*c+h*(h+2*o)+l);else h=a>0?-i:i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,c),r&&r.copy(C9).addScaledVector(S9,h),d}intersectSphere(e,t){E9.subVectors(e.center,this.origin);const n=E9.dot(this.direction),r=E9.dot(E9)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,s,o;const l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),u>=0?(i=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(i=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),c>=0?(s=(e.min.z-h.z)*c,o=(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,o=(e.min.z-h.z)*c),n>o||s>r?null:((s>n||n!=n)&&(n=s),(o<r||r!=r)&&(r=o),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,E9)}intersectTriangle(e,t,n,r,i){M9.subVectors(t,e),T9.subVectors(n,e),D9.crossVectors(M9,T9);let a,s=this.direction.dot(D9);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}I9.subVectors(this.origin,e);const o=a*this.direction.dot(T9.crossVectors(I9,T9));if(o<0)return null;const l=a*this.direction.dot(M9.cross(I9));if(l<0)return null;if(o+l>s)return null;const u=-a*I9.dot(D9);return u<0?null:this.at(u/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class B9 extends a9{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new X8(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const R9=new g8,F9=new P9,L9=new H7,k9=new Q5,O9=new Q5,z9=new Q5,N9=new Q5,U9=new Q5,V9=new Q5,G9=new Q5,j9=new Q5;class q9 extends j8{constructor(e=new $7,t=new B9){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const s=this.morphTargetInfluences;if(i&&s){V9.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],o=i[n];0!==r&&(U9.fromBufferAttribute(o,e),a?V9.addScaledVector(U9,r):V9.addScaledVector(U9.sub(t),r))}t.add(V9)}return t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r){if(null===n.boundingSphere&&n.computeBoundingSphere(),L9.copy(n.boundingSphere),L9.applyMatrix4(i),F9.copy(e.ray).recast(e.near),!1===L9.containsPoint(F9.origin)){if(null===F9.intersectSphere(L9,k9))return;if(F9.origin.distanceToSquared(k9)>(e.far-e.near)**2)return}R9.copy(i).invert(),F9.copy(e.ray).applyMatrix4(R9),null!==n.boundingBox&&!1===F9.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,F9)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==s)if(Array.isArray(a))for(let p=0,f=h.length;p<f;p++){const i=h[p],o=a[i.materialIndex];for(let a=Math.max(i.start,d.start),h=Math.min(s.count,Math.min(i.start+i.count,d.start+d.count));a<h;a+=3){r=H9(this,o,e,n,l,u,c,s.getX(a),s.getX(a+1),s.getX(a+2)),r&&(r.faceIndex=Math.floor(a/3),r.face.materialIndex=i.materialIndex,t.push(r))}}else{for(let i=Math.max(0,d.start),o=Math.min(s.count,d.start+d.count);i<o;i+=3){r=H9(this,a,e,n,l,u,c,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}else if(void 0!==o)if(Array.isArray(a))for(let p=0,f=h.length;p<f;p++){const i=h[p],s=a[i.materialIndex];for(let a=Math.max(i.start,d.start),h=Math.min(o.count,Math.min(i.start+i.count,d.start+d.count));a<h;a+=3){r=H9(this,s,e,n,l,u,c,a,a+1,a+2),r&&(r.faceIndex=Math.floor(a/3),r.face.materialIndex=i.materialIndex,t.push(r))}}else{for(let i=Math.max(0,d.start),s=Math.min(o.count,d.start+d.count);i<s;i+=3){r=H9(this,a,e,n,l,u,c,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}}}function H9(e,t,n,r,i,a,s,o,l,u){e.getVertexPosition(o,O9),e.getVertexPosition(l,z9),e.getVertexPosition(u,N9);const c=function(e,t,n,r,i,a,s,o){let l;if(l=1===t.side?r.intersectTriangle(s,a,i,!0,o):r.intersectTriangle(i,a,s,0===t.side,o),null===l)return null;j9.copy(o),j9.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(j9);return u<n.near||u>n.far?null:{distance:u,point:j9.clone(),object:e}}(e,t,n,r,O9,z9,N9,G9);if(c){const e=new Q5;m7.getBarycoord(G9,O9,z9,N9,e),i&&(c.uv=m7.getInterpolatedAttribute(i,o,l,u,e,new q5)),a&&(c.uv1=m7.getInterpolatedAttribute(a,o,l,u,e,new q5)),s&&(c.normal=m7.getInterpolatedAttribute(s,o,l,u,e,new Q5),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const t={a:o,b:l,c:u,normal:new Q5,materialIndex:0};m7.getNormal(O9,z9,N9,t.normal),c.face=t,c.barycoord=e}return c}const Q9=new h8,W9=new h8,K9=new h8,Z9=new h8,Y9=new g8,X9=new Q5,J9=new H7,$9=new g8,eee=new P9;class tee extends q9{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=E4,this.bindMatrix=new g8,this.bindMatrixInverse=new g8,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new g7),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,X9),this.boundingBox.expandByPoint(X9)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new H7),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,X9),this.boundingSphere.expandByPoint(X9)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),J9.copy(this.boundingSphere),J9.applyMatrix4(r),!1!==e.ray.intersectsSphere(J9)&&($9.copy(r).invert(),eee.copy(e.ray).applyMatrix4($9),null!==this.boundingBox&&!1===eee.intersectsBox(this.boundingBox)||this._computeIntersections(e,t,eee)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new h8,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===E4?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===C4?this.bindMatrixInverse.copy(this.bindMatrix).invert():M5("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;W9.fromBufferAttribute(r.attributes.skinIndex,e),K9.fromBufferAttribute(r.attributes.skinWeight,e),t.isVector4?(Q9.copy(t),t.set(0,0,0,0)):(Q9.set(...t,1),t.set(0,0,0)),Q9.applyMatrix4(this.bindMatrix);for(let i=0;i<4;i++){const e=K9.getComponent(i);if(0!==e){const r=W9.getComponent(i);Y9.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Z9.copy(Q9).applyMatrix4(Y9),e)}}return t.isVector4&&(t.w=Q9.w),t.applyMatrix4(this.bindMatrixInverse)}}class nee extends j8{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ree extends c8{constructor(e=null,t=1,n=1,r,i,a,s,o,l=1003,u=1003,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const iee=new g8,aee=new g8;class see{constructor(e=[],t=[]){this.uuid=O5(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){M5("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new g8)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new g8;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let i=0,a=e.length;i<a;i++){const r=e[i]?e[i].matrixWorld:aee;iee.multiplyMatrices(r,t[i]),iee.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)}clone(){return new see(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new ree(t,e,e,n6,W4);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(M5("Skeleton: No bone found with UUID:",r),i=new nee),this.bones.push(i),this.boneInverses.push((new g8).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class oee extends z7{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const lee=new g8,uee=new g8,cee=[],hee=new g7,dee=new g8,pee=new q9,fee=new H7;class mee extends q9{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new oee(new Float32Array(16*n),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,dee)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new g7),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,lee),hee.copy(e.boundingBox).applyMatrix4(lee),this.boundingBox.union(hee)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new H7),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,lee),fee.copy(e.boundingSphere).applyMatrix4(lee),this.boundingSphere.union(fee)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.previousInstanceMatrix&&(this.previousInstanceMatrix=e.previousInstanceMatrix.clone()),null!==e.morphTexture&&(this.morphTexture=e.morphTexture.clone()),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return null===this.instanceColor?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,16*e)}getMorphAt(e,t){const n=t.morphTargetInfluences,r=this.morphTexture.source.data.data,i=e*(n.length+1)+1;for(let a=0;a<n.length;a++)n[a]=r[i+a]}raycast(e,t){const n=this.matrixWorld,r=this.count;if(pee.geometry=this.geometry,pee.material=this.material,void 0!==pee.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),fee.copy(this.boundingSphere),fee.applyMatrix4(n),!1!==e.ray.intersectsSphere(fee)))for(let i=0;i<r;i++){this.getMatrixAt(i,lee),uee.multiplyMatrices(n,lee),pee.matrixWorld=uee,pee.raycast(e,cee);for(let e=0,n=cee.length;e<n;e++){const n=cee[e];n.instanceId=i,n.object=this,t.push(n)}cee.length=0}}setColorAt(e,t){return null===this.instanceColor&&(this.instanceColor=new oee(new Float32Array(3*this.instanceMatrix.count).fill(1),3)),t.toArray(this.instanceColor.array,3*e),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,16*e),this}setMorphAt(e,t){const n=t.morphTargetInfluences,r=n.length+1;null===this.morphTexture&&(this.morphTexture=new ree(new Float32Array(r*this.count),r,this.count,a6,W4));const i=this.morphTexture.source.data.data;let a=0;for(let l=0;l<n.length;l++)a+=n[l];const s=this.geometry.morphTargetsRelative?1:1-a,o=r*e;return i[o]=s,i.set(n,o+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null)}}const gee=new Q5,Aee=new Q5,yee=new Z5;let vee=class{constructor(e=new Q5(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=gee.subVectors(n,t).cross(Aee.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,n=!0){const r=e.delta(gee),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/i;return!0===n&&(a<0||a>1)?null:t.copy(e.start).addScaledVector(r,a)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||yee.getNormalMatrix(e),r=this.coplanarPoint(gee).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}};const bee=new H7,xee=new q5(.5,.5),_ee=new Q5;class wee{constructor(e=new vee,t=new vee,n=new vee,r=new vee,i=new vee,a=new vee){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3,n=!1){const r=this.planes,i=e.elements,a=i[0],s=i[1],o=i[2],l=i[3],u=i[4],c=i[5],h=i[6],d=i[7],p=i[8],f=i[9],m=i[10],g=i[11],A=i[12],y=i[13],v=i[14],b=i[15];if(r[0].setComponents(l-a,d-u,g-p,b-A).normalize(),r[1].setComponents(l+a,d+u,g+p,b+A).normalize(),r[2].setComponents(l+s,d+c,g+f,b+y).normalize(),r[3].setComponents(l-s,d-c,g-f,b-y).normalize(),n)r[4].setComponents(o,h,m,v).normalize(),r[5].setComponents(l-o,d-h,g-m,b-v).normalize();else if(r[4].setComponents(l-o,d-h,g-m,b-v).normalize(),t===A5)r[5].setComponents(l+o,d+h,g+m,b+v).normalize();else{if(t!==y5)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);r[5].setComponents(o,h,m,v).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),bee.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),bee.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(bee)}intersectsSprite(e){bee.center.set(0,0,0);const t=xee.distanceTo(e.center);return bee.radius=.7071067811865476+t,bee.applyMatrix4(e.matrixWorld),this.intersectsSphere(bee)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(_ee.x=r.normal.x>0?e.max.x:e.min.x,_ee.y=r.normal.y>0?e.max.y:e.min.y,_ee.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(_ee)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}const Eee=new g8,Cee=new wee;class See{constructor(){this.coordinateSystem=A5}intersectsObject(e,t){if(!t.isArrayCamera||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(Eee.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Cee.setFromProjectionMatrix(Eee,r.coordinateSystem,r.reversedDepth),Cee.containsPoint(e))return!0}return!1}clone(){return new See}}function Iee(e,t){return e-t}function Mee(e,t){return e.z-t.z}function Tee(e,t){return t.z-e.z}class Dee{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,r){const i=this.pool,a=this.list;this.index>=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});const s=i[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}}const Pee=new g8,Bee=new X8(1,1,1),Ree=new wee,Fee=new See,Lee=new g7,kee=new H7,Oee=new Q5,zee=new Q5,Nee=new Q5,Uee=new Dee,Vee=new q9,Gee=[];function jee(e,t,n=0){const r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const i=e.count;for(let a=0;a<i;a++)for(let i=0;i<r;i++)t.setComponent(a+n,i,e.getComponent(a,i))}else t.array.set(e.array,n*r);t.needsUpdate=!0}function qee(e,t){if(e.constructor!==t.constructor){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)t[r]=e[r]}else{const n=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,n))}}class Hee extends q9{constructor(e,t,n=2*t,r){super(new $7,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(4*this._maxInstanceCount);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new ree(t,e,e,n6,W4);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new ree(t,e,e,s6,Q4);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new ree(t,e,e,n6,W4);n.colorSpace=e8.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxIndexCount;if(!1===this._geometryInitialized){for(const r in e.attributes){const i=e.getAttribute(r),{array:a,itemSize:s,normalized:o}=i,l=new a.constructor(n*s),u=new z7(l,s,o);t.setAttribute(r,u)}if(null!==e.getIndex()){const e=n>65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new z7(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(t.getIndex()))throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||!1===t[e].active)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||!1===t[e].active)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new g7);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(!1===t[n].active)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,Pee),this.getBoundingBoxAt(r,Lee).applyMatrix4(Pee),e.union(Lee)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new H7);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(!1===t[n].active)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,Pee),this.getBoundingSphereAt(r,kee).applyMatrix4(Pee),e.union(kee)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const t={visible:!0,active:!0,geometryIndex:e};let n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Iee),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));const r=this._matricesTexture;Pee.identity().toArray(r.image.data,16*n),r.needsUpdate=!0;const i=this._colorsTexture;return i&&(Bee.toArray(i.image.data,4*n),i.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},i=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=-1===t?e.getAttribute("position").count:t;const a=e.getIndex();if(null!==a&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=-1===n?a.count:n),-1!==r.indexStart&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let s;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Iee),s=this._availableGeometryIds.shift(),i[s]=r):(s=this._geometryCount,this._geometryCount++,i.push(r)),this.setGeometryAt(s,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,s}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,r=null!==n.getIndex(),i=n.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(r&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const o=s.vertexStart,l=s.reservedVertexCount;s.vertexCount=t.getAttribute("position").count;for(const u in n.attributes){const e=t.getAttribute(u),r=n.getAttribute(u);jee(e,r,o);const i=e.itemSize;for(let t=e.count,n=l;t<n;t++){const e=o+t;for(let t=0;t<i;t++)r.setComponent(e,t,0)}r.needsUpdate=!0,r.addUpdateRange(o*i,l*i)}if(r){const e=s.indexStart,n=s.reservedIndexCount;s.indexCount=t.getIndex().count;for(let t=0;t<a.count;t++)i.setX(e+t,o+a.getX(t));for(let t=a.count,r=n;t<r;t++)i.setX(e+t,o);i.needsUpdate=!0,i.addUpdateRange(e,s.reservedIndexCount)}return s.start=r?s.indexStart:s.vertexStart,s.count=r?s.indexCount:s.vertexCount,s.boundingBox=null,null!==t.boundingBox&&(s.boundingBox=t.boundingBox.clone()),s.boundingSphere=null,null!==t.boundingSphere&&(s.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||!1===t[e].active)return this;const n=this._instanceInfo;for(let r=0,i=n.length;r<i;r++)n[r].active&&n[r].geometryIndex===e&&this.deleteInstance(r);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const n=this._geometryInfo,r=n.map((e,t)=>t).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,s=n.length;a<s;a++){const s=r[a],o=n[s];if(!1!==o.active){if(null!==i.index){if(o.indexStart!==t){const{indexStart:n,vertexStart:r,reservedIndexCount:a}=o,s=i.index,l=s.array,u=e-r;for(let e=n;e<n+a;e++)l[e]=l[e]+u;s.array.copyWithin(t,n,n+a),s.addUpdateRange(t,a),s.needsUpdate=!0,o.indexStart=t}t+=o.reservedIndexCount}if(o.vertexStart!==e){const{vertexStart:t,reservedVertexCount:n}=o,r=i.attributes;for(const i in r){const a=r[i],{array:s,itemSize:o}=a;s.copyWithin(e*o,t*o,(t+n)*o),a.addUpdateRange(e*o,n*o),a.needsUpdate=!0}o.vertexStart=e}e+=o.reservedVertexCount,o.start=i.index?o.indexStart:o.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingBox){const e=new g7,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n<a;n++){let r=n;t&&(r=t.getX(r)),e.expandByPoint(Oee.fromBufferAttribute(i,r))}r.boundingBox=e}return t.copy(r.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingSphere){const t=new H7;this.getBoundingBoxAt(e,Lee),Lee.getCenter(t.center);const i=n.index,a=n.attributes.position;let s=0;for(let e=r.start,n=r.start+r.count;e<n;e++){let n=e;i&&(n=i.getX(n)),Oee.fromBufferAttribute(a,n),s=Math.max(s,t.center.distanceToSquared(Oee))}t.radius=Math.sqrt(s),r.boundingSphere=t}return t.copy(r.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,r=this._matricesTexture.image.data;return t.toArray(r,16*e),n.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,16*e)}setColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,4*e),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture?t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1):t.fromArray(this._colorsTexture.image.data,4*e)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t||(this._instanceInfo[e].visible=t,this._visibilityChanged=!0),this}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){const t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(Iee);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const r=new Int32Array(e),i=new Int32Array(e);qee(this._multiDrawCounts,r),qee(this._multiDrawStarts,i),this._multiDrawCounts=r,this._multiDrawStarts=i,this._maxInstanceCount=e;const a=this._indirectTexture,s=this._matricesTexture,o=this._colorsTexture;a.dispose(),this._initIndirectTexture(),qee(a.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),qee(s.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),qee(o.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(e=>e.active);if(Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index){if(Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`)}const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new $7,this._initializeGeometry(r));const i=this.geometry;r.index&&qee(r.index.array,i.index.array);for(const a in r.attributes)qee(r.attributes[a].array,i.attributes[a].array)}raycast(e,t){const n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;Vee.material=this.material,Vee.geometry.index=a.index,Vee.geometry.attributes=a.attributes,null===Vee.geometry.boundingBox&&(Vee.geometry.boundingBox=new g7),null===Vee.geometry.boundingSphere&&(Vee.geometry.boundingSphere=new H7);for(let s=0,o=n.length;s<o;s++){if(!n[s].visible||!n[s].active)continue;const a=n[s].geometryIndex,o=r[a];Vee.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(s,Vee.matrixWorld).premultiply(i),this.getBoundingBoxAt(a,Vee.geometry.boundingBox),this.getBoundingSphereAt(a,Vee.geometry.boundingSphere),Vee.raycast(e,Gee);for(let e=0,n=Gee.length;e<n;e++){const n=Gee[e];n.object=this,n.batchId=s,t.push(n)}Gee.length=0}Vee.material=null,Vee.geometry.index=null,Vee.geometry.attributes={},Vee.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=null!==e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=null!==e.boundingSphere?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(e=>({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=r.getIndex();let s=null===a?1:a.array.BYTES_PER_ELEMENT,o=1;i.wireframe&&(o=2,s=r.attributes.position.count>65535?4:2);const l=this._instanceInfo,u=this._multiDrawStarts,c=this._multiDrawCounts,h=this._geometryInfo,d=this.perObjectFrustumCulled,p=this._indirectTexture,f=p.image.data,m=n.isArrayCamera?Fee:Ree;d&&!n.isArrayCamera&&(Pee.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),Ree.setFromProjectionMatrix(Pee,n.coordinateSystem,n.reversedDepth));let g=0;if(this.sortObjects){Pee.copy(this.matrixWorld).invert(),Oee.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Pee),zee.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Pee);for(let r=0,i=l.length;r<i;r++)if(l[r].visible&&l[r].active){const e=l[r].geometryIndex;this.getMatrixAt(r,Pee),this.getBoundingSphereAt(e,kee).applyMatrix4(Pee);let t=!1;if(d&&(t=!m.intersectsSphere(kee,n)),!t){const t=h[e],n=Nee.subVectors(kee.center,Oee).dot(zee);Uee.push(t.start,t.count,n,r)}}const e=Uee.list,t=this.customSort;null===t?e.sort(i.transparent?Tee:Mee):t.call(this,e,n);for(let n=0,r=e.length;n<r;n++){const t=e[n];u[g]=t.start*s*o,c[g]=t.count*o,f[g]=t.index,g++}Uee.reset()}else for(let A=0,y=l.length;A<y;A++)if(l[A].visible&&l[A].active){const e=l[A].geometryIndex;let t=!1;if(d&&(this.getMatrixAt(A,Pee),this.getBoundingSphereAt(e,kee).applyMatrix4(Pee),t=!m.intersectsSphere(kee,n)),!t){const t=h[e];u[g]=t.start*s*o,c[g]=t.count*o,f[g]=A,g++}}p.needsUpdate=!0,this._multiDrawCount=g,this._visibilityChanged=!1}onBeforeShadow(e,t,n,r,i,a){this.onBeforeRender(e,null,r,i,a)}}class Qee extends a9{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new X8(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Wee=new Q5,Kee=new Q5,Zee=new g8,Yee=new P9,Xee=new H7,Jee=new Q5,$ee=new Q5;class ete extends j8{constructor(e=new $7,t=new Qee){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Wee.fromBufferAttribute(t,e-1),Kee.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Wee.distanceTo(Kee);e.setAttribute("lineDistance",new V7(n,1))}else M5("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Xee.copy(n.boundingSphere),Xee.applyMatrix4(r),Xee.radius+=i,!1===e.ray.intersectsSphere(Xee))return;Zee.copy(r).invert(),Yee.copy(e.ray).applyMatrix4(Zee);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=this.isLineSegments?2:1,u=n.index,c=n.attributes.position;if(null!==u){const n=Math.max(0,a.start),r=Math.min(u.count,a.start+a.count);for(let i=n,a=r-1;i<a;i+=l){const n=u.getX(i),r=u.getX(i+1),a=tte(this,e,Yee,o,n,r,i);a&&t.push(a)}if(this.isLineLoop){const i=u.getX(r-1),a=u.getX(n),s=tte(this,e,Yee,o,i,a,r-1);s&&t.push(s)}}else{const n=Math.max(0,a.start),r=Math.min(c.count,a.start+a.count);for(let i=n,a=r-1;i<a;i+=l){const n=tte(this,e,Yee,o,i,i+1,i);n&&t.push(n)}if(this.isLineLoop){const i=tte(this,e,Yee,o,r-1,n,r-1);i&&t.push(i)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function tte(e,t,n,r,i,a,s){const o=e.geometry.attributes.position;Wee.fromBufferAttribute(o,i),Kee.fromBufferAttribute(o,a);if(n.distanceSqToSegment(Wee,Kee,Jee,$ee)>r)return;Jee.applyMatrix4(e.matrixWorld);const l=t.ray.origin.distanceTo(Jee);return l<t.near||l>t.far?void 0:{distance:l,point:$ee.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}const nte=new Q5,rte=new Q5;class ite extends ete{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)nte.fromBufferAttribute(t,e),rte.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+nte.distanceTo(rte);e.setAttribute("lineDistance",new V7(n,1))}else M5("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class ate extends ete{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class ste extends a9{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new X8(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const ote=new g8,lte=new P9,ute=new H7,cte=new Q5;class hte extends j8{constructor(e=new $7,t=new ste){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ute.copy(n.boundingSphere),ute.applyMatrix4(r),ute.radius+=i,!1===e.ray.intersectsSphere(ute))return;ote.copy(r).invert(),lte.copy(e.ray).applyMatrix4(ote);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=n.index,u=n.attributes.position;if(null!==l){for(let n=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);n<i;n++){const i=l.getX(n);cte.fromBufferAttribute(u,i),dte(cte,i,o,r,e,t,this)}}else{for(let n=Math.max(0,a.start),i=Math.min(u.count,a.start+a.count);n<i;n++)cte.fromBufferAttribute(u,n),dte(cte,n,o,r,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function dte(e,t,n,r,i,a,s){const o=lte.distanceSqToPoint(e);if(o<n){const n=new Q5;lte.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class pte extends c8{constructor(e,t,n,r,i=1006,a=1006,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const u=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){0!==this._requestVideoFrameCallbackId&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class fte extends c8{constructor(e,t,n,r,i,a,s,o,l,u,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class mte extends fte{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=R4,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class gte extends fte{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,I4),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class Ate extends c8{constructor(e=[],t=301,n,r,i,a,s,o,l,u){super(e,t,n,r,i,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class yte extends c8{constructor(e,t,n=1014,r,i,a,s=1003,o=1003,l,u=1026,c=1){if(u!==r6&&u!==i6)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:c},r,i,a,s,o,u,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new s8(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class vte extends yte{constructor(e,t=1014,n=301,r,i,a=1003,s=1003,o,l=1026){const u={width:e,height:e,depth:1},c=[u,u,u,u,u,u];super(e,e,t,n,r,i,a,s,o,l),this.image=c,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}let bte=class extends c8{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}};class xte extends $7{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const s=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const o=[],l=[],u=[],c=[];let h=0,d=0;function p(e,t,n,r,i,a,p,f,m,g,A){const y=a/m,v=p/g,b=a/2,x=p/2,_=f/2,w=m+1,E=g+1;let C=0,S=0;const I=new Q5;for(let s=0;s<E;s++){const a=s*v-x;for(let o=0;o<w;o++){const h=o*y-b;I[e]=h*r,I[t]=a*i,I[n]=_,l.push(I.x,I.y,I.z),I[e]=0,I[t]=0,I[n]=f>0?1:-1,u.push(I.x,I.y,I.z),c.push(o/m),c.push(1-s/g),C+=1}}for(let s=0;s<g;s++)for(let e=0;e<m;e++){const t=h+e+w*s,n=h+e+w*(s+1),r=h+(e+1)+w*(s+1),i=h+(e+1)+w*s;o.push(t,n,i),o.push(n,r,i),S+=6}s.addGroup(d,S,A),d+=S,h+=C}p("z","y","x",-1,-1,n,t,e,a,i,0),p("z","y","x",1,-1,n,t,-e,a,i,1),p("x","z","y",1,1,e,n,t,r,a,2),p("x","z","y",1,-1,e,n,-t,r,a,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(o),this.setAttribute("position",new V7(l,3)),this.setAttribute("normal",new V7(u,3)),this.setAttribute("uv",new V7(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new xte(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class _te extends $7{constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),i=Math.max(1,Math.floor(i));const a=[],s=[],o=[],l=[],u=t/2,c=Math.PI/2*e,h=t,d=2*c+h,p=2*n+i,f=r+1,m=new Q5,g=new Q5;for(let A=0;A<=p;A++){let y=0,v=0,b=0,x=0;if(A<=n){const t=A/n,r=t*Math.PI/2;v=-u-e*Math.cos(r),b=e*Math.sin(r),x=-e*Math.cos(r),y=t*c}else if(A<=n+i){const r=(A-n)/i;v=r*t-u,b=e,x=0,y=c+r*h}else{const t=(A-n-i)/n,r=t*Math.PI/2;v=u+e*Math.sin(r),b=e*Math.cos(r),x=e*Math.sin(r),y=c+h+t*c}const _=Math.max(0,Math.min(1,y/d));let w=0;0===A?w=.5/r:A===p&&(w=-.5/r);for(let e=0;e<=r;e++){const t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=v,g.z=b*i,s.push(g.x,g.y,g.z),m.set(-b*a,x,b*i),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+w,_)}if(A>0){const e=(A-1)*f;for(let t=0;t<r;t++){const n=e+t,r=e+t+1,i=A*f+t,s=A*f+t+1;a.push(n,r,i),a.push(r,s,i)}}}this.setIndex(a),this.setAttribute("position",new V7(s,3)),this.setAttribute("normal",new V7(o,3)),this.setAttribute("uv",new V7(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _te(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class wte extends $7{constructor(e=1,t=32,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],a=[],s=[],o=[],l=new Q5,u=new q5;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let c=0,h=3;c<=t;c++,h+=3){const i=n+c/t*r;l.x=e*Math.cos(i),l.y=e*Math.sin(i),a.push(l.x,l.y,l.z),s.push(0,0,1),u.x=(a[h]/e+1)/2,u.y=(a[h+1]/e+1)/2,o.push(u.x,u.y)}for(let c=1;c<=t;c++)i.push(c,c+1,0);this.setIndex(i),this.setAttribute("position",new V7(a,3)),this.setAttribute("normal",new V7(s,3)),this.setAttribute("uv",new V7(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new wte(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Ete extends $7{constructor(e=1,t=1,n=1,r=32,i=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:s,thetaLength:o};const l=this;r=Math.floor(r),i=Math.floor(i);const u=[],c=[],h=[],d=[];let p=0;const f=[],m=n/2;let g=0;function A(n){const i=p,a=new q5,f=new Q5;let A=0;const y=!0===n?e:t,v=!0===n?1:-1;for(let e=1;e<=r;e++)c.push(0,m*v,0),h.push(0,v,0),d.push(.5,.5),p++;const b=p;for(let e=0;e<=r;e++){const t=e/r*o+s,n=Math.cos(t),i=Math.sin(t);f.x=y*i,f.y=m*v,f.z=y*n,c.push(f.x,f.y,f.z),h.push(0,v,0),a.x=.5*n+.5,a.y=.5*i*v+.5,d.push(a.x,a.y),p++}for(let e=0;e<r;e++){const t=i+e,r=b+e;!0===n?u.push(r,r+1,t):u.push(r+1,r,t),A+=3}l.addGroup(g,A,!0===n?1:2),g+=A}!function(){const a=new Q5,A=new Q5;let y=0;const v=(t-e)/n;for(let l=0;l<=i;l++){const u=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*o+s,l=Math.sin(i),f=Math.cos(i);A.x=y*l,A.y=-g*n+m,A.z=y*f,c.push(A.x,A.y,A.z),a.set(l,v,f).normalize(),h.push(a.x,a.y,a.z),d.push(t,1-g),u.push(p++)}f.push(u)}for(let n=0;n<r;n++)for(let r=0;r<i;r++){const a=f[r][n],s=f[r+1][n],o=f[r+1][n+1],l=f[r][n+1];(e>0||0!==r)&&(u.push(a,s,l),y+=3),(t>0||r!==i-1)&&(u.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y}(),!1===a&&(e>0&&A(!0),t>0&&A(!1)),this.setIndex(u),this.setAttribute("position",new V7(c,3)),this.setAttribute("normal",new V7(h,3)),this.setAttribute("uv",new V7(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ete(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Cte extends Ete{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}static fromJSON(e){return new Cte(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ste extends $7{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],a=[];function s(e,t,n,r){const i=r+1,a=[];for(let s=0;s<=i;s++){a[s]=[];const r=e.clone().lerp(n,s/i),o=t.clone().lerp(n,s/i),l=i-s;for(let e=0;e<=l;e++)a[s][e]=0===e&&s===i?r:r.clone().lerp(o,e/l)}for(let s=0;s<i;s++)for(let e=0;e<2*(i-s)-1;e++){const t=Math.floor(e/2);e%2==0?(o(a[s][t+1]),o(a[s+1][t]),o(a[s][t])):(o(a[s][t+1]),o(a[s+1][t+1]),o(a[s+1][t]))}}function o(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function u(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function c(e){return Math.atan2(e.z,-e.x)}function h(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){const n=new Q5,r=new Q5,i=new Q5;for(let a=0;a<t.length;a+=3)l(t[a+0],n),l(t[a+1],r),l(t[a+2],i),s(n,r,i,e)}(r),function(e){const t=new Q5;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new Q5;for(let t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];const n=c(e)/2/Math.PI+.5,r=h(e)/Math.PI+.5;a.push(n,1-r)}(function(){const e=new Q5,t=new Q5,n=new Q5,r=new Q5,s=new q5,o=new q5,l=new q5;for(let h=0,d=0;h<i.length;h+=9,d+=6){e.set(i[h+0],i[h+1],i[h+2]),t.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),s.set(a[d+0],a[d+1]),o.set(a[d+2],a[d+3]),l.set(a[d+4],a[d+5]),r.copy(e).add(t).add(n).divideScalar(3);const p=c(r);u(s,d+0,e,p),u(o,d+2,t,p),u(l,d+4,n,p)}})(),function(){for(let e=0;e<a.length;e+=6){const t=a[e+0],n=a[e+2],r=a[e+4],i=Math.max(t,n,r),s=Math.min(t,n,r);i>.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new V7(i,3)),this.setAttribute("normal",new V7(i.slice(),3)),this.setAttribute("uv",new V7(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ste(e.vertices,e.indices,e.radius,e.detail)}}class Ite extends Ste{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Ite(e.radius,e.detail)}}const Mte=new Q5,Tte=new Q5,Dte=new Q5,Pte=new m7;class Bte extends $7{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(L5*t),a=e.getIndex(),s=e.getAttribute("position"),o=a?a.count:s.count,l=[0,0,0],u=["a","b","c"],c=new Array(3),h={},d=[];for(let e=0;e<o;e+=3){a?(l[0]=a.getX(e),l[1]=a.getX(e+1),l[2]=a.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:o}=Pte;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),o.fromBufferAttribute(s,l[2]),Pte.getNormal(Dte),c[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,c[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,c[2]=`${Math.round(o.x*r)},${Math.round(o.y*r)},${Math.round(o.z*r)}`,c[0]!==c[1]&&c[1]!==c[2]&&c[2]!==c[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=c[e],r=c[t],a=Pte[u[e]],s=Pte[u[t]],o=`${n}_${r}`,p=`${r}_${n}`;p in h&&h[p]?(Dte.dot(h[p].normal)<=i&&(d.push(a.x,a.y,a.z),d.push(s.x,s.y,s.z)),h[p]=null):o in h||(h[o]={index0:l[e],index1:l[t],normal:Dte.clone()})}}for(const e in h)if(h[e]){const{index0:t,index1:n}=h[e];Mte.fromBufferAttribute(s,t),Tte.fromBufferAttribute(s,n),d.push(Mte.x,Mte.y,Mte.z),d.push(Tte.x,Tte.y,Tte.z)}this.setAttribute("position",new V7(d,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Rte{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){M5("Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let s,o=0,l=i-1;for(;o<=l;)if(r=Math.floor(o+(l-o)/2),s=n[r]-a,s<0)o=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===a)return r/(i-1);const u=n[r];return(r+(a-u)/(n[r+1]-u))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),s=this.getPoint(i),o=t||(a.isVector2?new q5:new Q5);return o.copy(s).sub(a).normalize(),o}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new Q5,r=[],i=[],a=[],s=new Q5,o=new g8;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new Q5)}i[0]=new Q5,a[0]=new Q5;let l=Number.MAX_VALUE;const u=Math.abs(r[0].x),c=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=l&&(l=u,n.set(1,0,0)),c<=l&&(l=c,n.set(0,1,0)),h<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),a[d]=a[d-1].clone(),s.crossVectors(r[d-1],r[d]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(z5(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(o.makeRotationAxis(s,e))}a[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(z5(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Fte extends Rte{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t=new q5){const n=t,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);const s=this.aStartAngle+e*i;let o=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=o-this.aX,r=l-this.aY;o=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(o,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class Lte extends Fte{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function kte(){let e=0,t=0,n=0,r=0;function i(i,a,s,o){e=i,t=s,n=-3*i+3*a-2*s-o,r=2*i-2*a+s+o}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,s,o){let l=(t-e)/a-(n-e)/(a+s)+(n-t)/s,u=(n-t)/s-(r-t)/(s+o)+(r-n)/o;l*=s,u*=s,i(t,n,l,u)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}const Ote=new Q5,zte=new Q5,Nte=new kte,Ute=new kte,Vte=new kte;class Gte extends Rte{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new Q5){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let s,o,l=Math.floor(a),u=a-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===u&&l===i-1&&(l=i-2,u=1),this.closed||l>0?s=r[(l-1)%i]:(zte.subVectors(r[0],r[1]).add(r[0]),s=zte);const c=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?o=r[(l+2)%i]:(Ote.subVectors(r[i-1],r[i-2]).add(r[i-1]),o=Ote),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(c),e),n=Math.pow(c.distanceToSquared(h),e),r=Math.pow(h.distanceToSquared(o),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),Nte.initNonuniformCatmullRom(s.x,c.x,h.x,o.x,t,n,r),Ute.initNonuniformCatmullRom(s.y,c.y,h.y,o.y,t,n,r),Vte.initNonuniformCatmullRom(s.z,c.z,h.z,o.z,t,n,r)}else"catmullrom"===this.curveType&&(Nte.initCatmullRom(s.x,c.x,h.x,o.x,this.tension),Ute.initCatmullRom(s.y,c.y,h.y,o.y,this.tension),Vte.initCatmullRom(s.z,c.z,h.z,o.z,this.tension));return n.set(Nte.calc(u),Ute.calc(u),Vte.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Q5).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function jte(e,t,n,r,i){const a=.5*(r-t),s=.5*(i-n),o=e*e;return(2*n-2*r+a+s)*(e*o)+(-3*n+3*r-2*a-s)*o+a*e+n}function qte(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Hte(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}class Qte extends Rte{constructor(e=new q5,t=new q5,n=new q5,r=new q5){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new q5){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(Hte(e,r.x,i.x,a.x,s.x),Hte(e,r.y,i.y,a.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Wte extends Rte{constructor(e=new Q5,t=new Q5,n=new Q5,r=new Q5){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Q5){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(Hte(e,r.x,i.x,a.x,s.x),Hte(e,r.y,i.y,a.y,s.y),Hte(e,r.z,i.z,a.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Kte extends Rte{constructor(e=new q5,t=new q5){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new q5){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new q5){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Zte extends Rte{constructor(e=new Q5,t=new Q5){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new Q5){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Q5){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Yte extends Rte{constructor(e=new q5,t=new q5,n=new q5){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new q5){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(qte(e,r.x,i.x,a.x),qte(e,r.y,i.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Xte extends Rte{constructor(e=new Q5,t=new Q5,n=new Q5){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Q5){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(qte(e,r.x,i.x,a.x),qte(e,r.y,i.y,a.y),qte(e,r.z,i.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Jte extends Rte{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new q5){const n=t,r=this.points,i=(r.length-1)*e,a=Math.floor(i),s=i-a,o=r[0===a?a:a-1],l=r[a],u=r[a>r.length-2?r.length-1:a+1],c=r[a>r.length-3?r.length-1:a+2];return n.set(jte(s,o.x,l.x,u.x,c.x),jte(s,o.y,l.y,u.y,c.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new q5).fromArray(n))}return this}}var $te=Object.freeze({__proto__:null,ArcCurve:Lte,CatmullRomCurve3:Gte,CubicBezierCurve:Qte,CubicBezierCurve3:Wte,EllipseCurve:Fte,LineCurve:Kte,LineCurve3:Zte,QuadraticBezierCurve:Yte,QuadraticBezierCurve3:Xte,SplineCurve:Jte});class ene extends Rte{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new $te[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const a=i[r],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){const r=o[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new $te[n.type]).fromJSON(n))}return this}}class tne extends ene{constructor(e){super(),this.type="Path",this.currentPoint=new q5,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Kte(this.currentPoint.clone(),new q5(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new Yte(this.currentPoint.clone(),new q5(e,t),new q5(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const s=new Qte(this.currentPoint.clone(),new q5(e,t),new q5(n,r),new q5(i,a));return this.curves.push(s),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Jte(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,a){const s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,n,r,i,a),this}absarc(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this}ellipse(e,t,n,r,i,a,s,o){const l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,n,r,i,a,s,o),this}absellipse(e,t,n,r,i,a,s,o){const l=new Fte(e,t,n,r,i,a,s,o);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class nne extends tne{constructor(e){super(e),this.uuid=O5(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new tne).fromJSON(n))}return this}}function rne(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=ine(e,0,i,n,!0);const s=[];if(!a||a.next===a.prev)return s;let o,l,u;if(r&&(a=function(e,t,n,r){const i=[];for(let a=0,s=t.length;a<s;a++){const n=ine(e,t[a]*r,a<s-1?t[a+1]*r:e.length,r,!1);n===n.next&&(n.steiner=!0),i.push(mne(n))}i.sort(hne);for(let a=0;a<i.length;a++)n=dne(i[a],n);return n}(e,t,a,n)),e.length>80*n){o=e[0],l=e[1];let t=o,r=l;for(let a=n;a<i;a+=n){const n=e[a],i=e[a+1];n<o&&(o=n),i<l&&(l=i),n>t&&(t=n),i>r&&(r=i)}u=Math.max(t-o,r-l),u=0!==u?32767/u:0}return sne(a,s,n,o,l,u,0),s}function ine(e,t,n,r,i){let a;if(i===function(e,t,n,r){let i=0;for(let a=t,s=n-r;a<n;a+=r)i+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return i}(e,t,n,r)>0)for(let s=t;s<n;s+=r)a=Sne(s/r|0,e[s],e[s+1],a);else for(let s=n-r;s>=t;s-=r)a=Sne(s/r|0,e[s],e[s+1],a);return a&&bne(a,a.next)&&(Ine(a),a=a.next),a}function ane(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!bne(r,r.next)&&0!==vne(r.prev,r,r.next))r=r.next;else{if(Ine(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function sne(e,t,n,r,i,a,s){if(!e)return;!s&&a&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=fne(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n=1;do{let r,i=e;e=null;let a=null;for(t=0;i;){t++;let s=i,o=0;for(let e=0;e<n&&(o++,s=s.nextZ,s);e++);let l=n;for(;o>0||l>0&&s;)0!==o&&(0===l||!s||i.z<=s.z)?(r=i,i=i.nextZ,o--):(r=s,s=s.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=s}a.nextZ=null,n*=2}while(t>1)}(i)}(e,r,i,a);let o=e;for(;e.prev!==e.next;){const l=e.prev,u=e.next;if(a?lne(e,r,i,a):one(e))t.push(l.i,e.i,u.i),Ine(e),e=u.next,o=u.next;else if((e=u)===o){s?1===s?sne(e=une(ane(e),t),t,n,r,i,a,2):2===s&&cne(e,t,n,r,i,a):sne(ane(e),t,n,r,i,a,1);break}}}function one(e){const t=e.prev,n=e,r=e.next;if(vne(t,n,r)>=0)return!1;const i=t.x,a=n.x,s=r.x,o=t.y,l=n.y,u=r.y,c=Math.min(i,a,s),h=Math.min(o,l,u),d=Math.max(i,a,s),p=Math.max(o,l,u);let f=r.next;for(;f!==t;){if(f.x>=c&&f.x<=d&&f.y>=h&&f.y<=p&&Ane(i,o,a,l,s,u,f.x,f.y)&&vne(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function lne(e,t,n,r){const i=e.prev,a=e,s=e.next;if(vne(i,a,s)>=0)return!1;const o=i.x,l=a.x,u=s.x,c=i.y,h=a.y,d=s.y,p=Math.min(o,l,u),f=Math.min(c,h,d),m=Math.max(o,l,u),g=Math.max(c,h,d),A=fne(p,f,t,n,r),y=fne(m,g,t,n,r);let v=e.prevZ,b=e.nextZ;for(;v&&v.z>=A&&b&&b.z<=y;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==s&&Ane(o,c,l,h,u,d,v.x,v.y)&&vne(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==i&&b!==s&&Ane(o,c,l,h,u,d,b.x,b.y)&&vne(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=A;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==s&&Ane(o,c,l,h,u,d,v.x,v.y)&&vne(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=y;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==i&&b!==s&&Ane(o,c,l,h,u,d,b.x,b.y)&&vne(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function une(e,t){let n=e;do{const r=n.prev,i=n.next.next;!bne(r,i)&&xne(r,n,n.next,i)&&Ene(r,i)&&Ene(i,r)&&(t.push(r.i,n.i,i.i),Ine(n),Ine(n.next),n=e=i),n=n.next}while(n!==e);return ane(n)}function cne(e,t,n,r,i,a){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&yne(s,e)){let o=Cne(s,e);return s=ane(s,s.next),o=ane(o,o.next),sne(s,t,n,r,i,a,0),void sne(o,t,n,r,i,a,0)}e=e.next}s=s.next}while(s!==e)}function hne(e,t){let n=e.x-t.x;if(0===n&&(n=e.y-t.y,0===n)){n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}return n}function dne(e,t){const n=function(e,t){let n=t;const r=e.x,i=e.y;let a,s=-1/0;if(bne(e,n))return n;do{if(bne(e,n.next))return n.next;if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>s&&(s=e,a=n.x<n.next.x?n:n.next,e===r))return a}n=n.next}while(n!==t);if(!a)return null;const o=a,l=a.x,u=a.y;let c=1/0;n=a;do{if(r>=n.x&&n.x>=l&&r!==n.x&&gne(i<u?r:s,i,l,u,i<u?s:r,i,n.x,n.y)){const t=Math.abs(i-n.y)/(r-n.x);Ene(n,e)&&(t<c||t===c&&(n.x>a.x||n.x===a.x&&pne(a,n)))&&(a=n,c=t)}n=n.next}while(n!==o);return a}(e,t);if(!n)return t;const r=Cne(n,e);return ane(r,r.next),ane(n,n.next)}function pne(e,t){return vne(e.prev,e,t.prev)<0&&vne(t.next,e,e.next)<0}function fne(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function mne(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function gne(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function Ane(e,t,n,r,i,a,s,o){return!(e===s&&t===o)&&gne(e,t,n,r,i,a,s,o)}function yne(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&xne(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Ene(e,t)&&Ene(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(vne(e.prev,e,t.prev)||vne(e,t.prev,t))||bne(e,t)&&vne(e.prev,e,e.next)>0&&vne(t.prev,t,t.next)>0)}function vne(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function bne(e,t){return e.x===t.x&&e.y===t.y}function xne(e,t,n,r){const i=wne(vne(e,t,n)),a=wne(vne(e,t,r)),s=wne(vne(n,r,e)),o=wne(vne(n,r,t));return i!==a&&s!==o||(!(0!==i||!_ne(e,n,t))||(!(0!==a||!_ne(e,r,t))||(!(0!==s||!_ne(n,e,r))||!(0!==o||!_ne(n,t,r)))))}function _ne(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function wne(e){return e>0?1:e<0?-1:0}function Ene(e,t){return vne(e.prev,e,e.next)<0?vne(e,t,e.next)>=0&&vne(e,e.prev,t)>=0:vne(e,t,e.prev)<0||vne(e,e.next,t)<0}function Cne(e,t){const n=Mne(e.i,e.x,e.y),r=Mne(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function Sne(e,t,n,r){const i=Mne(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Ine(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Mne(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Tne{static triangulate(e,t,n=2){return rne(e,t,n)}}class Dne{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return Dne.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];Pne(e),Bne(n,e);let a=e.length;t.forEach(Pne);for(let o=0;o<t.length;o++)r.push(a),a+=t[o].length,Bne(n,t[o]);const s=Tne.triangulate(n,r);for(let o=0;o<s.length;o+=3)i.push(s.slice(o,o+3));return i}}function Pne(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Bne(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Rne extends $7{constructor(e=new nne([new q5(.5,.5),new q5(-.5,.5),new q5(-.5,-.5),new q5(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let s=0,o=e.length;s<o;s++){a(e[s])}function a(e){const a=[],s=void 0!==t.curveSegments?t.curveSegments:12,o=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let u=void 0===t.bevelEnabled||t.bevelEnabled,c=void 0!==t.bevelThickness?t.bevelThickness:.2,h=void 0!==t.bevelSize?t.bevelSize:c-.1,d=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Fne;let g,A,y,v,b,x=!1;if(f){g=f.getSpacedPoints(o),x=!0,u=!1;const e=!!f.isCatmullRomCurve3&&f.closed;A=f.computeFrenetFrames(o,e),y=new Q5,v=new Q5,b=new Q5}u||(p=0,c=0,h=0,d=0);const _=e.extractPoints(s);let w=_.shape;const E=_.holes;if(!Dne.isClockWise(w)){w=w.reverse();for(let e=0,t=E.length;e<t;e++){const t=E[e];Dne.isClockWise(t)&&(E[e]=t.reverse())}}function C(e){const t=1e-10*1e-10;let n=e[0];for(let r=1;r<=e.length;r++){const i=r%e.length,a=e[i],s=a.x-n.x,o=a.y-n.y,l=s*s+o*o,u=Math.max(Math.abs(a.x),Math.abs(a.y),Math.abs(n.x),Math.abs(n.y));l<=t*u*u?(e.splice(i,1),r--):n=a}}C(w),E.forEach(C);const S=E.length,I=w;for(let t=0;t<S;t++){const e=E[t];w=w.concat(e)}function M(e,t,n){return t||T5("ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,n)}const T=w.length;function D(e,t,n){let r,i,a;const s=e.x-t.x,o=e.y-t.y,l=n.x-e.x,u=n.y-e.y,c=s*s+o*o,h=s*u-o*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(c),d=Math.sqrt(l*l+u*u),p=t.x-o/h,f=t.y+s/h,m=((n.x-u/d-p)*u-(n.y+l/d-f)*l)/(s*u-o*l);r=p+s*m-e.x,i=f+o*m-e.y;const g=r*r+i*i;if(g<=2)return new q5(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(c)):(r=s,i=o,a=Math.sqrt(c/2))}return new q5(r/a,i/a)}const P=[];for(let t=0,n=I.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),P[t]=D(I[t],I[r],I[i]);const B=[];let R,F,L=P.concat();for(let t=0,n=S;t<n;t++){const e=E[t];R=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),R[t]=D(e[t],e[r],e[i]);B.push(R),L=L.concat(R)}if(0===p)F=Dne.triangulateShape(I,E);else{const e=[],t=[];for(let n=0;n<p;n++){const r=n/p,i=c*Math.cos(r*Math.PI/2),a=h*Math.sin(r*Math.PI/2)+d;for(let t=0,n=I.length;t<n;t++){const n=M(I[t],P[t],a);N(n.x,n.y,-i),0===r&&e.push(n)}for(let e=0,n=S;e<n;e++){const n=E[e];R=B[e];const s=[];for(let e=0,t=n.length;e<t;e++){const t=M(n[e],R[e],a);N(t.x,t.y,-i),0===r&&s.push(t)}0===r&&t.push(s)}}F=Dne.triangulateShape(e,t)}const k=F.length,O=h+d;for(let t=0;t<T;t++){const e=u?M(w[t],L[t],O):w[t];x?(v.copy(A.normals[0]).multiplyScalar(e.x),y.copy(A.binormals[0]).multiplyScalar(e.y),b.copy(g[0]).add(v).add(y),N(b.x,b.y,b.z)):N(e.x,e.y,0)}for(let t=1;t<=o;t++)for(let e=0;e<T;e++){const n=u?M(w[e],L[e],O):w[e];x?(v.copy(A.normals[t]).multiplyScalar(n.x),y.copy(A.binormals[t]).multiplyScalar(n.y),b.copy(g[t]).add(v).add(y),N(b.x,b.y,b.z)):N(n.x,n.y,l/o*t)}for(let t=p-1;t>=0;t--){const e=t/p,n=c*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=I.length;t<i;t++){const e=M(I[t],P[t],r);N(e.x,e.y,l+n)}for(let t=0,i=E.length;t<i;t++){const e=E[t];R=B[t];for(let t=0,i=e.length;t<i;t++){const i=M(e[t],R[t],r);x?N(i.x,i.y+g[o-1].y,g[o-1].x+n):N(i.x,i.y,l+n)}}}function z(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=o+2*p;e<n;e++){const n=T*e,a=T*(e+1);V(t+r+n,t+i+n,t+i+a,t+r+a)}}}function N(e,t,n){a.push(e),a.push(t),a.push(n)}function U(e,t,i){G(e),G(t),G(i);const a=r.length/3,s=m.generateTopUV(n,r,a-3,a-2,a-1);j(s[0]),j(s[1]),j(s[2])}function V(e,t,i,a){G(e),G(t),G(a),G(t),G(i),G(a);const s=r.length/3,o=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);j(o[0]),j(o[1]),j(o[3]),j(o[1]),j(o[2]),j(o[3])}function G(e){r.push(a[3*e+0]),r.push(a[3*e+1]),r.push(a[3*e+2])}function j(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(u){let e=0,t=T*e;for(let n=0;n<k;n++){const e=F[n];U(e[2]+t,e[1]+t,e[0]+t)}e=o+2*p,t=T*e;for(let n=0;n<k;n++){const e=F[n];U(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<k;e++){const t=F[e];U(t[2],t[1],t[0])}for(let e=0;e<k;e++){const t=F[e];U(t[0]+T*o,t[1]+T*o,t[2]+T*o)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;z(I,t),t+=I.length;for(let n=0,r=E.length;n<r;n++){const e=E[n];z(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new V7(r,3)),this.setAttribute("uv",new V7(i,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const r=t[e.shapes[i]];n.push(r)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new $te[r.type]).fromJSON(r)),new Rne(n,e.options)}}const Fne={generateTopUV:function(e,t,n,r,i){const a=t[3*n],s=t[3*n+1],o=t[3*r],l=t[3*r+1],u=t[3*i],c=t[3*i+1];return[new q5(a,s),new q5(o,l),new q5(u,c)]},generateSideWallUV:function(e,t,n,r,i,a){const s=t[3*n],o=t[3*n+1],l=t[3*n+2],u=t[3*r],c=t[3*r+1],h=t[3*r+2],d=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*a],g=t[3*a+1],A=t[3*a+2];return Math.abs(o-c)<Math.abs(s-u)?[new q5(s,1-l),new q5(u,1-h),new q5(d,1-f),new q5(m,1-A)]:[new q5(o,1-l),new q5(c,1-h),new q5(p,1-f),new q5(g,1-A)]}};class Lne extends Ste{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Lne(e.radius,e.detail)}}class kne extends $7{constructor(e=[new q5(0,-.5),new q5(.5,0),new q5(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=z5(r,0,2*Math.PI);const i=[],a=[],s=[],o=[],l=[],u=1/t,c=new Q5,h=new q5,d=new Q5,p=new Q5,f=new Q5;let m=0,g=0;for(let A=0;A<=e.length-1;A++)switch(A){case 0:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),o.push(d.x,d.y,d.z),f.copy(p)}for(let A=0;A<=t;A++){const i=n+A*u*r,d=Math.sin(i),p=Math.cos(i);for(let n=0;n<=e.length-1;n++){c.x=e[n].x*d,c.y=e[n].y,c.z=e[n].x*p,a.push(c.x,c.y,c.z),h.x=A/t,h.y=n/(e.length-1),s.push(h.x,h.y);const r=o[3*n+0]*d,i=o[3*n+1],u=o[3*n+0]*p;l.push(r,i,u)}}for(let A=0;A<t;A++)for(let t=0;t<e.length-1;t++){const n=t+A*e.length,r=n,a=n+e.length,s=n+e.length+1,o=n+1;i.push(r,a,o),i.push(s,o,a)}this.setIndex(i),this.setAttribute("position",new V7(a,3)),this.setAttribute("uv",new V7(s,2)),this.setAttribute("normal",new V7(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new kne(e.points,e.segments,e.phiStart,e.phiLength)}}class One extends Ste{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new One(e.radius,e.detail)}}class zne extends $7{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,a=t/2,s=Math.floor(n),o=Math.floor(r),l=s+1,u=o+1,c=e/s,h=t/o,d=[],p=[],f=[],m=[];for(let g=0;g<u;g++){const e=g*h-a;for(let t=0;t<l;t++){const n=t*c-i;p.push(n,-e,0),f.push(0,0,1),m.push(t/s),m.push(1-g/o)}}for(let g=0;g<o;g++)for(let e=0;e<s;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;d.push(t,n,i),d.push(n,r,i)}this.setIndex(d),this.setAttribute("position",new V7(p,3)),this.setAttribute("normal",new V7(f,3)),this.setAttribute("uv",new V7(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new zne(e.width,e.height,e.widthSegments,e.heightSegments)}}class Nne extends $7{constructor(e=.5,t=1,n=32,r=1,i=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},n=Math.max(3,n);const s=[],o=[],l=[],u=[];let c=e;const h=(t-e)/(r=Math.max(1,r)),d=new Q5,p=new q5;for(let f=0;f<=r;f++){for(let e=0;e<=n;e++){const r=i+e/n*a;d.x=c*Math.cos(r),d.y=c*Math.sin(r),o.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/t+1)/2,p.y=(d.y/t+1)/2,u.push(p.x,p.y)}c+=h}for(let f=0;f<r;f++){const e=f*(n+1);for(let t=0;t<n;t++){const r=t+e,i=r,a=r+n+1,o=r+n+2,l=r+1;s.push(i,a,l),s.push(a,o,l)}}this.setIndex(s),this.setAttribute("position",new V7(o,3)),this.setAttribute("normal",new V7(l,3)),this.setAttribute("uv",new V7(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Nne(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Une extends $7{constructor(e=new nne([new q5(0,.5),new q5(-.5,-.5),new q5(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],a=[];let s=0,o=0;if(!1===Array.isArray(e))l(e);else for(let u=0;u<e.length;u++)l(e[u]),this.addGroup(s,o,u),s+=o,o=0;function l(e){const s=r.length/3,l=e.extractPoints(t);let u=l.shape;const c=l.holes;!1===Dne.isClockWise(u)&&(u=u.reverse());for(let t=0,n=c.length;t<n;t++){const e=c[t];!0===Dne.isClockWise(e)&&(c[t]=e.reverse())}const h=Dne.triangulateShape(u,c);for(let t=0,n=c.length;t<n;t++){const e=c[t];u=u.concat(e)}for(let t=0,n=u.length;t<n;t++){const e=u[t];r.push(e.x,e.y,0),i.push(0,0,1),a.push(e.x,e.y)}for(let t=0,r=h.length;t<r;t++){const e=h[t],r=e[0]+s,i=e[1]+s,a=e[2]+s;n.push(r,i,a),o+=3}}this.setIndex(n),this.setAttribute("position",new V7(r,3)),this.setAttribute("normal",new V7(i,3)),this.setAttribute("uv",new V7(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new Une(n,e.curveSegments)}}class Vne extends $7{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const o=Math.min(a+s,Math.PI);let l=0;const u=[],c=new Q5,h=new Q5,d=[],p=[],f=[],m=[];for(let g=0;g<=n;g++){const d=[],A=g/n;let y=0;0===g&&0===a?y=.5/t:g===n&&o===Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const o=n/t;c.x=-e*Math.cos(r+o*i)*Math.sin(a+A*s),c.y=e*Math.cos(a+A*s),c.z=e*Math.sin(r+o*i)*Math.sin(a+A*s),p.push(c.x,c.y,c.z),h.copy(c).normalize(),f.push(h.x,h.y,h.z),m.push(o+y,1-A),d.push(l++)}u.push(d)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=u[g][e+1],r=u[g][e],i=u[g+1][e],s=u[g+1][e+1];(0!==g||a>0)&&d.push(t,r,s),(g!==n-1||o<Math.PI)&&d.push(r,i,s)}this.setIndex(d),this.setAttribute("position",new V7(p,3)),this.setAttribute("normal",new V7(f,3)),this.setAttribute("uv",new V7(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Vne(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Gne extends Ste{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Gne(e.radius,e.detail)}}class jne extends $7{constructor(e=1,t=.4,n=12,r=48,i=2*Math.PI,a=0,s=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i,thetaStart:a,thetaLength:s},n=Math.floor(n),r=Math.floor(r);const o=[],l=[],u=[],c=[],h=new Q5,d=new Q5,p=new Q5;for(let f=0;f<=n;f++){const o=a+f/n*s;for(let a=0;a<=r;a++){const s=a/r*i;d.x=(e+t*Math.cos(o))*Math.cos(s),d.y=(e+t*Math.cos(o))*Math.sin(s),d.z=t*Math.sin(o),l.push(d.x,d.y,d.z),h.x=e*Math.cos(s),h.y=e*Math.sin(s),p.subVectors(d,h).normalize(),u.push(p.x,p.y,p.z),c.push(a/r),c.push(f/n)}}for(let f=1;f<=n;f++)for(let e=1;e<=r;e++){const t=(r+1)*f+e-1,n=(r+1)*(f-1)+e-1,i=(r+1)*(f-1)+e,a=(r+1)*f+e;o.push(t,n,a),o.push(n,i,a)}this.setIndex(o),this.setAttribute("position",new V7(l,3)),this.setAttribute("normal",new V7(u,3)),this.setAttribute("uv",new V7(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new jne(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class qne extends $7{constructor(e=1,t=.4,n=64,r=8,i=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},n=Math.floor(n),r=Math.floor(r);const s=[],o=[],l=[],u=[],c=new Q5,h=new Q5,d=new Q5,p=new Q5,f=new Q5,m=new Q5,g=new Q5;for(let y=0;y<=n;++y){const s=y/n*i*Math.PI*2;A(s,i,a,e,d),A(s+.01,i,a,e,p),m.subVectors(p,d),g.addVectors(p,d),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,a=-t*Math.cos(i),s=t*Math.sin(i);c.x=d.x+(a*g.x+s*f.x),c.y=d.y+(a*g.y+s*f.y),c.z=d.z+(a*g.z+s*f.z),o.push(c.x,c.y,c.z),h.subVectors(c,d).normalize(),l.push(h.x,h.y,h.z),u.push(y/n),u.push(e/r)}}for(let y=1;y<=n;y++)for(let e=1;e<=r;e++){const t=(r+1)*(y-1)+(e-1),n=(r+1)*y+(e-1),i=(r+1)*y+e,a=(r+1)*(y-1)+e;s.push(t,n,a),s.push(n,i,a)}function A(e,t,n,r,i){const a=Math.cos(e),s=Math.sin(e),o=n/t*e,l=Math.cos(o);i.x=r*(2+l)*.5*a,i.y=r*(2+l)*s*.5,i.z=r*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new V7(o,3)),this.setAttribute("normal",new V7(l,3)),this.setAttribute("uv",new V7(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qne(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Hne extends $7{constructor(e=new Xte(new Q5(-1,-1,0),new Q5(-1,1,0),new Q5(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new Q5,o=new Q5,l=new q5;let u=new Q5;const c=[],h=[],d=[],p=[];function f(i){u=e.getPointAt(i/t,u);const l=a.normals[i],d=a.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+i*d.x,o.y=a*l.y+i*d.y,o.z=a*l.z+i*d.z,o.normalize(),h.push(o.x,o.y,o.z),s.x=u.x+n*o.x,s.y=u.y+n*o.y,s.z=u.z+n*o.z,c.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,s=(r+1)*(e-1)+t;p.push(n,i,s),p.push(i,a,s)}}()}(),this.setIndex(p),this.setAttribute("position",new V7(c,3)),this.setAttribute("normal",new V7(h,3)),this.setAttribute("uv",new V7(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Hne((new $te[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Qne extends $7{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new Q5,i=new Q5;if(null!==e.index){const a=e.attributes.position,s=e.index;let o=e.groups;0===o.length&&(o=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=o.length;e<l;++e){const l=o[e],u=l.start;for(let e=u,o=u+l.count;e<o;e+=3)for(let l=0;l<3;l++){const o=s.getX(e+l),u=s.getX(e+(l+1)%3);r.fromBufferAttribute(a,o),i.fromBufferAttribute(a,u),!0===Wne(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,s=a.count/3;e<s;e++)for(let o=0;o<3;o++){const s=3*e+o,l=3*e+(o+1)%3;r.fromBufferAttribute(a,s),i.fromBufferAttribute(a,l),!0===Wne(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new V7(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function Wne(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var Kne=Object.freeze({__proto__:null,BoxGeometry:xte,CapsuleGeometry:_te,CircleGeometry:wte,ConeGeometry:Cte,CylinderGeometry:Ete,DodecahedronGeometry:Ite,EdgesGeometry:Bte,ExtrudeGeometry:Rne,IcosahedronGeometry:Lne,LatheGeometry:kne,OctahedronGeometry:One,PlaneGeometry:zne,PolyhedronGeometry:Ste,RingGeometry:Nne,ShapeGeometry:Une,SphereGeometry:Vne,TetrahedronGeometry:Gne,TorusGeometry:jne,TorusKnotGeometry:qne,TubeGeometry:Hne,WireframeGeometry:Qne});class Zne extends a9{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new X8(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}function Yne(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];if(Jne(i))i.isRenderTargetTexture?(M5("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][r]=null):t[n][r]=i.clone();else if(Array.isArray(i))if(Jne(i[0])){const e=[];for(let t=0,n=i.length;t<n;t++)e[t]=i[t].clone();t[n][r]=e}else t[n][r]=i.slice();else t[n][r]=i}}return t}function Xne(e){const t={};for(let n=0;n<e.length;n++){const r=Yne(e[n]);for(const e in r)t[e]=r[e]}return t}function Jne(e){return e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture||e.isQuaternion)}function $ne(e){const t=e.getRenderTarget();return null===t?e.outputColorSpace:!0===t.isXRRenderTarget?t.texture.colorSpace:e8.workingColorSpace}const ere={clone:Yne,merge:Xne};class tre extends a9{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Yne(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class nre extends tre{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class rre extends a9{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new X8(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ire extends rre{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new q5(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return z5(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new X8(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new X8(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new X8(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class are extends a9{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new X8(16777215),this.specular=new X8(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class sre extends a9{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new X8(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class ore extends a9{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class lre extends a9{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new X8(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X8(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new S8,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ure extends a9{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class cre extends a9{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class hre extends a9{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new X8(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new q5(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class dre extends Qee{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function pre(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function fre(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(function(t,n){return e[t]-e[n]}),n}function mre(e,t,n){const r=e.length,i=new e.constructor(r);for(let a=0,s=0;s!==r;++a){const r=n[a]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function gre(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let s=a[r];if(void 0!==s)if(Array.isArray(s))do{s=a[r],void 0!==s&&(t.push(a.time),n.push(...s)),a=e[i++]}while(void 0!==a);else if(void 0!==s.toArray)do{s=a[r],void 0!==s&&(t.push(a.time),s.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{s=a[r],void 0!==s&&(t.push(a.time),n.push(s)),a=e[i++]}while(void 0!==a)}class Are{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let a;n:{r:if(!(e<r)){for(let a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}a=t.length;break n}if(!(e>=i)){const s=t[1];e<s&&(n=2,i=s);for(let a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}a=n,n=0;break n}break e}for(;n<a;){const r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let a=0;a!==r;++a)t[a]=n[i+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class yre extends Are{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Y6,endingEnd:Y6}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,a=e+1,s=r[i],o=r[a];if(void 0===s)switch(this.getSettings_().endingStart){case X6:i=e,s=2*t-n;break;case J6:i=r.length-2,s=t+r[i]-r[i+1];break;default:i=e,s=n}if(void 0===o)switch(this.getSettings_().endingEnd){case X6:a=e,o=2*n-t;break;case J6:a=1,o=n+r[1]-r[0];break;default:a=e-1,o=t}const l=.5*(n-t),u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=i*u,this._offsetNext=a*u}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(n-t)/(r-t),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,A=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,v=d*m-d*f;for(let b=0;b!==s;++b)i[b]=g*a[u+b]+A*a[l+b]+y*a[o+b]+v*a[c+b];return i}}class vre extends Are{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(n-t)/(r-t),c=1-u;for(let h=0;h!==s;++h)i[h]=a[l+h]*c+a[o+h]*u;return i}}class bre extends Are{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class xre extends Are{interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this.settings||this.DefaultSettings_,c=u.inTangents,h=u.outTangents;if(!c||!h){const e=(n-t)/(r-t),u=1-e;for(let t=0;t!==s;++t)i[t]=a[l+t]*u+a[o+t]*e;return i}const d=2*s,p=e-1;for(let f=0;f!==s;++f){const s=a[l+f],u=a[o+f],m=p*d+2*f,g=h[m],A=h[m+1],y=e*d+2*f,v=c[y],b=c[y+1];let x,_,w,E,C,S=(n-t)/(r-t);for(let e=0;e<8;e++){x=S*S,_=x*S,w=1-S,E=w*w,C=E*w;const e=C*t+3*E*S*g+3*w*x*v+_*r-n;if(Math.abs(e)<1e-10)break;const i=3*E*(g-t)+6*w*S*(v-g)+3*x*(r-v);if(Math.abs(i)<1e-10)break;S-=e/i,S=Math.max(0,Math.min(1,S))}i[f]=C*s+3*E*S*A+3*w*x*b+_*u}return i}}class _re{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=pre(t,this.TimeBufferType),this.values=pre(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:pre(e.times,Array),values:pre(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new bre(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new vre(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new yre(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){const t=new xre(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case Q6:t=this.InterpolantFactoryMethodDiscrete;break;case W6:t=this.InterpolantFactoryMethodLinear;break;case K6:t=this.InterpolantFactoryMethodSmooth;break;case Z6:t=this.InterpolantFactoryMethodBezier}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return M5("KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Q6;case this.InterpolantFactoryMethodLinear:return W6;case this.InterpolantFactoryMethodSmooth:return K6;case this.InterpolantFactoryMethodBezier:return Z6}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(T5("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(T5("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let s=0;s!==i;s++){const t=n[s];if("number"==typeof t&&isNaN(t)){T5("KeyframeTrack: Time is not a valid number.",this,s,t),e=!1;break}if(null!==a&&a>t){T5("KeyframeTrack: Out of order keys.",this,s,t,a),e=!1;break}a=t}if(void 0!==r&&x5(r))for(let s=0,o=r.length;s!==o;++s){const t=r[s];if(isNaN(t)){T5("KeyframeTrack: Value is not a valid number.",this,s,t),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===K6,i=e.length-1;let a=1;for(let s=1;s<i;++s){let i=!1;const o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(r)i=!0;else{const e=s*n,r=e-n,a=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[r+s]||n!==t[a+s]){i=!0;break}}}if(i){if(s!==a){e[a]=e[s];const r=s*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}_re.prototype.ValueTypeName="",_re.prototype.TimeBufferType=Float32Array,_re.prototype.ValueBufferType=Float32Array,_re.prototype.DefaultInterpolation=W6;class wre extends _re{constructor(e,t,n){super(e,t,n)}}wre.prototype.ValueTypeName="bool",wre.prototype.ValueBufferType=Array,wre.prototype.DefaultInterpolation=Q6,wre.prototype.InterpolantFactoryMethodLinear=void 0,wre.prototype.InterpolantFactoryMethodSmooth=void 0;class Ere extends _re{constructor(e,t,n,r){super(e,t,n,r)}}Ere.prototype.ValueTypeName="color";class Cre extends _re{constructor(e,t,n,r){super(e,t,n,r)}}Cre.prototype.ValueTypeName="number";class Sre extends Are{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t);let l=e*s;for(let u=l+s;l!==u;l+=4)H5.slerpFlat(i,0,a,l-s,a,l,o);return i}}class Ire extends _re{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new Sre(this.times,this.values,this.getValueSize(),e)}}Ire.prototype.ValueTypeName="quaternion",Ire.prototype.InterpolantFactoryMethodSmooth=void 0;class Mre extends _re{constructor(e,t,n){super(e,t,n)}}Mre.prototype.ValueTypeName="string",Mre.prototype.ValueBufferType=Array,Mre.prototype.DefaultInterpolation=Q6,Mre.prototype.InterpolantFactoryMethodLinear=void 0,Mre.prototype.InterpolantFactoryMethodSmooth=void 0;class Tre extends _re{constructor(e,t,n,r){super(e,t,n,r)}}Tre.prototype.ValueTypeName="vector";let Dre=class{constructor(e="",t=-1,n=[],r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=O5(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let a=0,s=n.length;a!==s;++a)t.push(Pre(n[a]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||"{}"),i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let i=0,a=n.length;i!==a;++i)t.push(_re.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,a=[];for(let s=0;s<i;s++){let e=[],o=[];e.push((s+i-1)%i,s,(s+1)%i),o.push(0,1,0);const l=fre(e);e=mre(e,1,l),o=mre(o,1,l),r||0!==e[0]||(e.push(i),o.push(o[0])),a.push(new Cre(".morphTargetInfluences["+t[s].name+"]",e,o).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let s=0,o=e.length;s<o;s++){const t=e[s],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const a=[];for(const s in r)a.push(this.CreateFromMorphTargetSequence(s,r[s],t,n));return a}static parseAnimation(e,t){if(M5("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return T5("AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const a=[],s=[];gre(n,a,s,r),0!==a.length&&i.push(new e(t,a,s))}},r=[],i=e.name||"default",a=e.fps||30,s=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let u=0;u<l.length;u++){const e=l[u].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],a=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),a.push(r.morphTarget===i?1:0)}r.push(new Cre(".morphTargetInfluence["+i+"]",t,a))}o=t.length*a}else{const i=".bones["+t[u].name+"]";n(Tre,i+".position",e,"pos",r),n(Ire,i+".quaternion",e,"rot",r),n(Tre,i+".scale",e,"scl",r)}}if(0===r.length)return null;return new this(i,o,r,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());const t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}};function Pre(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Cre;case"vector":case"vector2":case"vector3":case"vector4":return Tre;case"color":return Ere;case"quaternion":return Ire;case"bool":case"boolean":return wre;case"string":return Mre}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];gre(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Bre={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(Rre(e)||(this.files[e]=t))},get:function(e){if(!1!==this.enabled&&!Rre(e))return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Rre(e){try{const t=e.slice(e.indexOf(":")+1);return"blob:"===new URL(t).protocol}catch(qke){return!1}}class Fre{constructor(e,t,n){const r=this;let i,a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,!1===a&&void 0!==r.onStart&&r.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==r.onProgress&&r.onProgress(e,s,o),s===o&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const Lre=new Fre;class kre{constructor(e){this.manager=void 0!==e?e:Lre,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,i){n.load(e,r,t,i)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}kre.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ore={};class zre extends Error{constructor(e,t){super(e),this.response=t}}class Nre extends kre{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=Bre.get(`file:${e}`);if(void 0!==i)return this.manager.itemStart(e),void setTimeout(()=>{t&&t(i),this.manager.itemEnd(e)},0);if(void 0!==Ore[e])return void Ore[e].push({onLoad:t,onProgress:n,onError:r});Ore[e]=[],Ore[e].push({onLoad:t,onProgress:n,onError:r});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&M5("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Ore[e],r=t.body.getReader(),i=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=i?parseInt(i):0,s=0!==a;let o=0;const l=new ReadableStream({start(e){!function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:o,total:a});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}},t=>{e.error(t)})}()}});return new Response(l)}throw new zre(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,s));case"json":return e.json();default:if(""===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{Bre.add(`file:${e}`,t);const n=Ore[e];delete Ore[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}}).catch(t=>{const n=Ore[e];if(void 0===n)throw this.manager.itemError(e),t;delete Ore[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const Ure=new WeakMap;let Vre=class extends kre{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=Bre.get(`image:${e}`);if(void 0!==a){if(!0===a.complete)i.manager.itemStart(e),setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);else{let e=Ure.get(a);void 0===e&&(e=[],Ure.set(a,e)),e.push({onLoad:t,onError:r})}return a}const s=_5("img");function o(){u(),t&&t(this);const n=Ure.get(this)||[];for(let e=0;e<n.length;e++){const t=n[e];t.onLoad&&t.onLoad(this)}Ure.delete(this),i.manager.itemEnd(e)}function l(t){u(),r&&r(t),Bre.remove(`image:${e}`);const n=Ure.get(this)||[];for(let e=0;e<n.length;e++){const r=n[e];r.onError&&r.onError(t)}Ure.delete(this),i.manager.itemError(e),i.manager.itemEnd(e)}function u(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),Bre.add(`image:${e}`,s),i.manager.itemStart(e),s.src=e,s}};class Gre extends kre{constructor(e){super(e)}load(e,t,n,r){const i=new c8,a=new Vre(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)},n,r),i}}class jre extends j8{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new X8(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}}class qre extends jre{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(j8.DEFAULT_UP),this.updateMatrix(),this.groundColor=new X8(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){const t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}}const Hre=new g8,Qre=new Q5,Wre=new Q5;class Kre{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new q5(512,512),this.mapType=V4,this.map=null,this.mapPass=null,this.matrix=new g8,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new wee,this._frameExtents=new q5(1,1),this._viewportCount=1,this._viewports=[new h8(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Qre.setFromMatrixPosition(e.matrixWorld),t.position.copy(Qre),Wre.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Wre),t.updateMatrixWorld(),Hre.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Hre,t.coordinateSystem,t.reversedDepth),t.coordinateSystem===y5||t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Hre)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 1!==this.intensity&&(e.intensity=this.intensity),0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}const Zre=new Q5,Yre=new H5,Xre=new Q5;class Jre extends j8{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new g8,this.projectionMatrix=new g8,this.projectionMatrixInverse=new g8,this.coordinateSystem=A5,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(Zre,Yre,Xre),1===Xre.x&&1===Xre.y&&1===Xre.z?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Zre,Yre,Xre.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(Zre,Yre,Xre),1===Xre.x&&1===Xre.y&&1===Xre.z?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Zre,Yre,Xre.set(1,1,1)).invert()}clone(){return(new this.constructor).copy(this)}}const $re=new Q5,eie=new q5,tie=new q5;class nie extends Jre{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*k5*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*L5*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*k5*Math.atan(Math.tan(.5*L5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){$re.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set($re.x,$re.y).multiplyScalar(-e/$re.z),$re.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set($re.x,$re.y).multiplyScalar(-e/$re.z)}getViewSize(e,t){return this.getViewBounds(e,eie,tie),t.subVectors(tie,eie)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*L5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class rie extends Kre{constructor(){super(new nie(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=2*k5*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height*this.aspect,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class iie extends jre{constructor(e,t,n=0,r=Math.PI/3,i=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(j8.DEFAULT_UP),this.updateMatrix(),this.target=new j8,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new rie}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}}class aie extends Kre{constructor(){super(new nie(90,1,.5,500)),this.isPointLightShadow=!0}}class sie extends jre{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new aie}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}}class oie extends Jre{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}class lie extends Kre{constructor(){super(new oie(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}let uie=class extends jre{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(j8.DEFAULT_UP),this.updateMatrix(),this.target=new j8,this.shadow=new lie}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}},cie=class extends jre{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}};class hie extends jre{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class die{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Q5)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class pie extends jre{constructor(e=new die,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class fie extends kre{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,a=new Nre(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(qke){r?r(qke):T5(qke),i.manager.itemError(e)}},n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&M5("MaterialLoader: Undefined texture",e),t[e]}const r=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new X8).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(r.dispersion=e.dispersion),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(r.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(r.depthFunc=e.depthFunc),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(r.blendSrc=e.blendSrc),void 0!==e.blendDst&&(r.blendDst=e.blendDst),void 0!==e.blendEquation&&(r.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(r.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&(r.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(r.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==r.blendColor&&r.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(r.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),void 0!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.allowOverride&&(r.allowOverride=e.allowOverride),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const i in e.uniforms){const t=e.uniforms[i];switch(r.uniforms[i]={},t.type){case"t":r.uniforms[i].value=n(t.value);break;case"c":r.uniforms[i].value=(new X8).setHex(t.value);break;case"v2":r.uniforms[i].value=(new q5).fromArray(t.value);break;case"v3":r.uniforms[i].value=(new Q5).fromArray(t.value);break;case"v4":r.uniforms[i].value=(new h8).fromArray(t.value);break;case"m3":r.uniforms[i].value=(new Z5).fromArray(t.value);break;case"m4":r.uniforms[i].value=(new g8).fromArray(t.value);break;default:r.uniforms[i].value=t.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const i in e.extensions)r.extensions[i]=e.extensions[i];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new q5).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapRotation&&r.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new q5).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return fie.createMaterialFromType(e)}static createMaterialFromType(e){return new{ShadowMaterial:Zne,SpriteMaterial:s9,RawShaderMaterial:nre,ShaderMaterial:tre,PointsMaterial:ste,MeshPhysicalMaterial:ire,MeshStandardMaterial:rre,MeshPhongMaterial:are,MeshToonMaterial:sre,MeshNormalMaterial:ore,MeshLambertMaterial:lre,MeshDepthMaterial:ure,MeshDistanceMaterial:cre,MeshBasicMaterial:B9,MeshMatcapMaterial:hre,LineDashedMaterial:dre,LineBasicMaterial:Qee,Material:a9}[e]}}class mie{static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class gie extends $7{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class Aie extends kre{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new Nre(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(qke){r?r(qke):T5(qke),i.manager.itemError(e)}},n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers,i=r[t],a=new Uint32Array(i).buffer;return n[t]=a,a}(e,i.buffer),s=b5(i.type,a),o=new e9(s,i.stride);return o.uuid=i.uuid,t[r]=o,o}const i=e.isInstancedBufferGeometry?new gie:new $7,a=e.data.index;if(void 0!==a){const e=b5(a.type,a.array);i.setIndex(new z7(e,1))}const s=e.data.attributes;for(const c in s){const t=s[c];let n;if(t.isInterleavedBufferAttribute){const i=r(e.data,t.data);n=new n9(i,t.itemSize,t.offset,t.normalized)}else{const e=b5(t.type,t.array);n=new(t.isInstancedBufferAttribute?oee:z7)(e,t.itemSize,t.normalized)}void 0!==t.name&&(n.name=t.name),void 0!==t.usage&&n.setUsage(t.usage),i.setAttribute(c,n)}const o=e.data.morphAttributes;if(o)for(const c in o){const t=o[c],n=[];for(let i=0,a=t.length;i<a;i++){const a=t[i];let s;if(a.isInterleavedBufferAttribute){const t=r(e.data,a.data);s=new n9(t,a.itemSize,a.offset,a.normalized)}else{const e=b5(a.type,a.array);s=new z7(e,a.itemSize,a.normalized)}void 0!==a.name&&(s.name=a.name),n.push(s)}i.morphAttributes[c]=n}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let c=0,h=l.length;c!==h;++c){const e=l[c];i.addGroup(e.start,e.count,e.materialIndex)}const u=e.data.boundingSphere;return void 0!==u&&(i.boundingSphere=(new H7).fromJSON(u)),e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}const yie={};const vie={UVMapping:S4,CubeReflectionMapping:I4,CubeRefractionMapping:M4,EquirectangularReflectionMapping:T4,EquirectangularRefractionMapping:D4,CubeUVReflectionMapping:P4},bie={RepeatWrapping:B4,ClampToEdgeWrapping:R4,MirroredRepeatWrapping:F4},xie={NearestFilter:L4,NearestMipmapNearestFilter:k4,NearestMipmapLinearFilter:O4,LinearFilter:z4,LinearMipmapNearestFilter:N4,LinearMipmapLinearFilter:U4},_ie=new WeakMap;class wie extends kre{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&M5("ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&M5("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=Bre.get(`image-bitmap:${e}`);if(void 0!==a)return i.manager.itemStart(e),a.then?void a.then(n=>{!0===_ie.has(a)?(r&&r(_ie.get(a)),i.manager.itemError(e),i.manager.itemEnd(e)):(t&&t(n),i.manager.itemEnd(e))}):void setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))}).then(function(n){Bre.add(`image-bitmap:${e}`,n),t&&t(n),i.manager.itemEnd(e)}).catch(function(t){r&&r(t),_ie.set(o,t),Bre.remove(`image-bitmap:${e}`),i.manager.itemError(e),i.manager.itemEnd(e)});Bre.add(`image-bitmap:${e}`,o),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let Eie;class Cie{static getContext(){return void 0===Eie&&(Eie=new(window.AudioContext||window.webkitAudioContext)),Eie}static setContext(e){Eie=e}}const Sie=new g8,Iie=new g8,Mie=new g8;const Tie=-90;class Die extends j8{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new nie(Tie,1,e,t);r.layers=this.layers,this.add(r);const i=new nie(Tie,1,e,t);i.layers=this.layers,this.add(i);const a=new nie(Tie,1,e,t);a.layers=this.layers,this.add(a);const s=new nie(Tie,1,e,t);s.layers=this.layers,this.add(s);const o=new nie(Tie,1,e,t);o.layers=this.layers,this.add(o);const l=new nie(Tie,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(const l of t)this.remove(l);if(e===A5)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(e!==y5)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const l of t)this.add(l),l.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[i,a,s,o,l,u]=this.children,c=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let m=!1;m=!0===e.isWebGLRenderer?e.state.buffers.depth.getReversed():e.reversedDepthBuffer,e.setRenderTarget(n,0,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,i),e.setRenderTarget(n,1,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,s),e.setRenderTarget(n,3,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,4,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,r),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,u),e.setRenderTarget(c,h,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class Pie extends nie{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Bie{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,void 0!==e.hidden&&(this._pageVisibilityHandler=Rie.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){null!==this._pageVisibilityHandler&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return null!==this._pageVisibilityHandler&&!0===this._document.hidden?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(void 0!==e?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function Rie(){!1===this._document.hidden&&this.reset()}const Fie=new Q5,Lie=new H5,kie=new Q5,Oie=new Q5,zie=new Q5;class Nie extends j8{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void M5("Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void M5("Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;M5("Audio: this Audio has no playback control.")}stop(e=0){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this;M5("Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(!1!==this._connected){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,!0===this.isPlaying&&void 0!==this.source.detune&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;M5("Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return!1===this.hasPlaybackControl?(M5("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;M5("Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return super.copy(e,t),"buffer"!==e.sourceType?(M5("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const Uie=new Q5,Vie=new H5,Gie=new Q5,jie=new Q5;class qie{constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let a=this.cumulativeWeight;if(0===a){for(let e=0;e!==r;++e)n[i+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=a}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let o=t,l=t+t;o!==l;++o)if(n[o]!==n[o+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,a=r;i!==a;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let a=0;a!==i;++a)e[t+a]=e[n+a]}_slerp(e,t,n,r){H5.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;H5.multiplyQuaternionsFlat(e,a,e,t,e,n),H5.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){const a=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*a+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]+e[n+a]*r}}}const Hie="\\[\\]\\.:\\/",Qie=new RegExp("["+Hie+"]","g"),Wie="[^"+Hie+"]",Kie="[^"+Hie.replace("\\.","")+"]",Zie=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Wie)+/(WCOD+)?/.source.replace("WCOD",Kie)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Wie)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Wie)+"$"),Yie=["material","materials","bones","map"];class Xie{constructor(e,t,n){this.path=t,this.parsedPath=n||Xie.parseTrackName(t),this.node=Xie.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Xie.Composite(e,t,n):new Xie(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Qie,"")}static parseTrackName(e){const t=Zie.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Yie.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Xie.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void M5("PropertyBinding: No target node found for track: "+this.path+".");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void T5("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void T5("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void T5("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void T5("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void T5("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void T5("PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void T5("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const a=e[r];if(void 0===a){return void T5("PropertyBinding: Trying to update property for track: "+t.nodeName+"."+r+" but it wasn't found.",e)}let s=this.Versioning.None;this.targetObject=e,!0===e.isMaterial?s=this.Versioning.NeedsUpdate:!0===e.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void T5("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void T5("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}o=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(o=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Xie.Composite=class{constructor(e,t,n){const r=n||Xie.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Xie.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Xie.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Xie.prototype.GetterByBindingType=[Xie.prototype._getValue_direct,Xie.prototype._getValue_array,Xie.prototype._getValue_arrayElement,Xie.prototype._getValue_toArray],Xie.prototype.SetterByBindingTypeAndVersioning=[[Xie.prototype._setValue_direct,Xie.prototype._setValue_direct_setNeedsUpdate,Xie.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Xie.prototype._setValue_array,Xie.prototype._setValue_array_setNeedsUpdate,Xie.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Xie.prototype._setValue_arrayElement,Xie.prototype._setValue_arrayElement_setNeedsUpdate,Xie.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Xie.prototype._setValue_fromArray,Xie.prototype._setValue_fromArray_setNeedsUpdate,Xie.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];let Jie=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,a=i.length,s=new Array(a),o={endingStart:Y6,endingEnd:Y6};for(let l=0;l!==a;++l){const e=i[l].createInterpolant(null);s[l]=e,e.settings&&Object.assign(o,e.settings),e.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),!0===n){const n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,a=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const a=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===e5)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const a=2202===n;if(0===e)return-1===i||!a||1&~i?r:t-r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this._loopCount=i,this.time=r;if(a&&!(1&~i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=X6,r.endingEnd=X6):(r.endingStart=e?this.zeroSlopeAtStart?X6:Y6:J6,r.endingEnd=t?this.zeroSlopeAtEnd?X6:Y6:J6)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=n,this}};const $ie=new Float32Array(1);class eae{constructor(e){this.value=e}clone(){return new eae(void 0===this.value.clone?this.value:this.value.clone())}}let tae=0;const nae=new g8;function rae(e,t){return e.distance-t.distance}function iae(e,t,n,r){let i=!0;if(e.layers.test(t.layers)){!1===e.raycast(t,n)&&(i=!1)}if(!0===i&&!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)iae(r[e],t,n,!0)}}class aae{static{aae.prototype.isMatrix2=!0}constructor(e,t,n,r){this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,n,r)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,r){const i=this.elements;return i[0]=e,i[2]=t,i[1]=n,i[3]=r,this}}const sae=new q5;const oae=new Q5,lae=new Q5,uae=new Q5,cae=new Q5,hae=new Q5,dae=new Q5,pae=new Q5;const fae=new Q5;const mae=new Q5,gae=new g8,Aae=new g8;function yae(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push(...yae(e.children[n]));return t}const vae=new Q5,bae=new X8,xae=new X8;const _ae=new Q5,wae=new Q5,Eae=new Q5;const Cae=new Q5,Sae=new Jre;function Iae(e,t,n,r,i,a,s){Cae.set(i,a,s).unproject(r);const o=t[e];if(void 0!==o){const e=n.getAttribute("position");for(let t=0,n=o.length;t<n;t++)e.setXYZ(o[t],Cae.x,Cae.y,Cae.z)}}const Mae=new g7;const Tae=new Q5;let Dae,Pae;function Bae(e,t,n,r){const i=function(e){switch(e){case V4:case G4:return{byteLength:1,components:1};case q4:case j4:case K4:return{byteLength:2,components:1};case Z4:case Y4:return{byteLength:2,components:4};case Q4:case H4:case W4:return{byteLength:4,components:1};case J4:case $4:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${e}.`)}(r);switch(n){case e6:return e*t;case a6:case s6:return e*t/i.components*i.byteLength;case o6:case l6:return e*t*2/i.components*i.byteLength;case t6:return e*t*3/i.components*i.byteLength;case n6:case u6:return e*t*4/i.components*i.byteLength;case c6:case h6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case d6:case p6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case m6:case A6:return Math.max(e,16)*Math.max(t,8)/4;case f6:case g6:return Math.max(e,8)*Math.max(t,8)/2;case y6:case v6:case x6:case _6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case b6:case w6:case E6:case C6:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case S6:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case I6:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case M6:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case T6:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case D6:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case P6:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case B6:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case R6:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case F6:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case L6:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case k6:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case O6:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case z6:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case N6:case U6:case V6:return Math.ceil(e/4)*Math.ceil(t/4)*16;case G6:case j6:return Math.ceil(e/4)*Math.ceil(t/4)*8;case q6:case H6:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}
467
467
  /**
468
468
  * @license
469
469
  * Copyright 2010-2026 Three.js Authors
@@ -497,4 +497,4 @@ function(e,t){jGe&&jGe.exports?jGe.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t(
497
497
  */var c1e=null;try{c1e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function h1e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function d1e(e){return!0===(e&&e.__isLong__)}function p1e(e){var t=Math.clz32(e&-e);return e?31-t:t}h1e.prototype.__isLong__,Object.defineProperty(h1e.prototype,"__isLong__",{value:!0}),h1e.isLong=d1e;var f1e={},m1e={};function g1e(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=m1e[e])?r:(n=y1e(e,0,!0),i&&(m1e[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=f1e[e])?r:(n=y1e(e,e<0?-1:0,!1),i&&(f1e[e]=n),n)}function A1e(e,t){if(isNaN(e))return t?I1e:S1e;if(t){if(e<0)return I1e;if(e>=w1e)return B1e}else{if(e<=-E1e)return R1e;if(e+1>=E1e)return P1e}return e<0?A1e(-e,t).neg():y1e(e%_1e|0,e/_1e|0,t)}function y1e(e,t,n){return new h1e(e,t,n)}h1e.fromInt=g1e,h1e.fromNumber=A1e,h1e.fromBits=y1e;var v1e=Math.pow;function b1e(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?I1e:S1e;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return b1e(e.substring(1),t,n).neg();for(var i=A1e(v1e(n,8)),a=S1e,s=0;s<e.length;s+=8){var o=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+o),n);if(o<8){var u=A1e(v1e(n,o));a=a.mul(u).add(A1e(l))}else a=(a=a.mul(i)).add(A1e(l))}return a.unsigned=t,a}function x1e(e,t){return"number"==typeof e?A1e(e,t):"string"==typeof e?b1e(e,t):y1e(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}h1e.fromString=b1e,h1e.fromValue=x1e;var _1e=4294967296,w1e=_1e*_1e,E1e=w1e/2,C1e=g1e(1<<24),S1e=g1e(0);h1e.ZERO=S1e;var I1e=g1e(0,!0);h1e.UZERO=I1e;var M1e=g1e(1);h1e.ONE=M1e;var T1e=g1e(1,!0);h1e.UONE=T1e;var D1e=g1e(-1);h1e.NEG_ONE=D1e;var P1e=y1e(-1,2147483647,!1);h1e.MAX_VALUE=P1e;var B1e=y1e(-1,-1,!0);h1e.MAX_UNSIGNED_VALUE=B1e;var R1e=y1e(0,-2147483648,!1);h1e.MIN_VALUE=R1e;var F1e=h1e.prototype;F1e.toInt=function(){return this.unsigned?this.low>>>0:this.low},F1e.toNumber=function(){return this.unsigned?(this.high>>>0)*_1e+(this.low>>>0):this.high*_1e+(this.low>>>0)},F1e.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R1e)){var t=A1e(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=A1e(v1e(e,6),this.unsigned),a=this,s="";;){var o=a.div(i),l=(a.sub(o.mul(i)).toInt()>>>0).toString(e);if((a=o).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},F1e.getHighBits=function(){return this.high},F1e.getHighBitsUnsigned=function(){return this.high>>>0},F1e.getLowBits=function(){return this.low},F1e.getLowBitsUnsigned=function(){return this.low>>>0},F1e.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R1e)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},F1e.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&(-1===e&&!(0===this.low&&-2097152===this.high))},F1e.isZero=function(){return 0===this.high&&0===this.low},F1e.eqz=F1e.isZero,F1e.isNegative=function(){return!this.unsigned&&this.high<0},F1e.isPositive=function(){return this.unsigned||this.high>=0},F1e.isOdd=function(){return!(1&~this.low)},F1e.isEven=function(){return!(1&this.low)},F1e.equals=function(e){return d1e(e)||(e=x1e(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},F1e.eq=F1e.equals,F1e.notEquals=function(e){return!this.eq(e)},F1e.neq=F1e.notEquals,F1e.ne=F1e.notEquals,F1e.lessThan=function(e){return this.comp(e)<0},F1e.lt=F1e.lessThan,F1e.lessThanOrEqual=function(e){return this.comp(e)<=0},F1e.lte=F1e.lessThanOrEqual,F1e.le=F1e.lessThanOrEqual,F1e.greaterThan=function(e){return this.comp(e)>0},F1e.gt=F1e.greaterThan,F1e.greaterThanOrEqual=function(e){return this.comp(e)>=0},F1e.gte=F1e.greaterThanOrEqual,F1e.ge=F1e.greaterThanOrEqual,F1e.compare=function(e){if(d1e(e)||(e=x1e(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},F1e.comp=F1e.compare,F1e.negate=function(){return!this.unsigned&&this.eq(R1e)?R1e:this.not().add(M1e)},F1e.neg=F1e.negate,F1e.add=function(e){d1e(e)||(e=x1e(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,o=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=i+(65535&e.low))>>>16,u+=(c+=r+o)>>>16,l+=(u+=n+s)>>>16,l+=t+a,y1e((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},F1e.subtract=function(e){return d1e(e)||(e=x1e(e)),this.add(e.neg())},F1e.sub=F1e.subtract,F1e.multiply=function(e){if(this.isZero())return this;if(d1e(e)||(e=x1e(e)),c1e)return y1e(c1e.mul(this.low,this.high,e.low,e.high),c1e.get_high(),this.unsigned);if(e.isZero())return this.unsigned?I1e:S1e;if(this.eq(R1e))return e.isOdd()?R1e:S1e;if(e.eq(R1e))return this.isOdd()?R1e:S1e;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(C1e)&&e.lt(C1e))return A1e(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,o=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=i*l)>>>16,c+=(h+=r*l)>>>16,h&=65535,c+=(h+=i*o)>>>16,u+=(c+=n*l)>>>16,c&=65535,u+=(c+=r*o)>>>16,c&=65535,u+=(c+=i*s)>>>16,u+=t*l+n*o+r*s+i*a,y1e((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},F1e.mul=F1e.multiply,F1e.divide=function(e){if(d1e(e)||(e=x1e(e)),e.isZero())throw Error("division by zero");var t,n,r;if(c1e)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?y1e((this.unsigned?c1e.div_u:c1e.div_s)(this.low,this.high,e.low,e.high),c1e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?I1e:S1e;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return I1e;if(e.gt(this.shru(1)))return T1e;r=I1e}else{if(this.eq(R1e))return e.eq(M1e)||e.eq(D1e)?R1e:e.eq(R1e)?M1e:(t=this.shr(1).div(e).shl(1)).eq(S1e)?e.isNegative()?M1e:D1e:(n=this.sub(e.mul(t)),r=t.add(n.div(e)));if(e.eq(R1e))return this.unsigned?I1e:S1e;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=S1e}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(t)/Math.LN2),a=i<=48?1:v1e(2,i-48),s=A1e(t),o=s.mul(e);o.isNegative()||o.gt(n);)o=(s=A1e(t-=a,this.unsigned)).mul(e);s.isZero()&&(s=M1e),r=r.add(s),n=n.sub(o)}return r},F1e.div=F1e.divide,F1e.modulo=function(e){return d1e(e)||(e=x1e(e)),c1e?y1e((this.unsigned?c1e.rem_u:c1e.rem_s)(this.low,this.high,e.low,e.high),c1e.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},F1e.mod=F1e.modulo,F1e.rem=F1e.modulo,F1e.not=function(){return y1e(~this.low,~this.high,this.unsigned)},F1e.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},F1e.clz=F1e.countLeadingZeros,F1e.countTrailingZeros=function(){return this.low?p1e(this.low):p1e(this.high)+32},F1e.ctz=F1e.countTrailingZeros,F1e.and=function(e){return d1e(e)||(e=x1e(e)),y1e(this.low&e.low,this.high&e.high,this.unsigned)},F1e.or=function(e){return d1e(e)||(e=x1e(e)),y1e(this.low|e.low,this.high|e.high,this.unsigned)},F1e.xor=function(e){return d1e(e)||(e=x1e(e)),y1e(this.low^e.low,this.high^e.high,this.unsigned)},F1e.shiftLeft=function(e){return d1e(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?y1e(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):y1e(0,this.low<<e-32,this.unsigned)},F1e.shl=F1e.shiftLeft,F1e.shiftRight=function(e){return d1e(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?y1e(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):y1e(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},F1e.shr=F1e.shiftRight,F1e.shiftRightUnsigned=function(e){return d1e(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?y1e(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):y1e(32===e?this.high:this.high>>>e-32,0,this.unsigned)},F1e.shru=F1e.shiftRightUnsigned,F1e.shr_u=F1e.shiftRightUnsigned,F1e.rotateLeft=function(e){var t;return d1e(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?y1e(this.high,this.low,this.unsigned):e<32?(t=32-e,y1e(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),y1e(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},F1e.rotl=F1e.rotateLeft,F1e.rotateRight=function(e){var t;return d1e(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?y1e(this.high,this.low,this.unsigned):e<32?(t=32-e,y1e(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),y1e(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},F1e.rotr=F1e.rotateRight,F1e.toSigned=function(){return this.unsigned?y1e(this.low,this.high,!1):this},F1e.toUnsigned=function(){return this.unsigned?this:y1e(this.low,this.high,!0)},F1e.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},F1e.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},F1e.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},h1e.fromBytes=function(e,t,n){return n?h1e.fromBytesLE(e,t):h1e.fromBytesBE(e,t)},h1e.fromBytesLE=function(e,t){return new h1e(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},h1e.fromBytesBE=function(e,t){return new h1e(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(h1e.fromBigInt=function(e,t){return y1e(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},h1e.fromValue=function(e,t){return"bigint"==typeof e?h1e.fromBigInt(e,t):x1e(e,t)},F1e.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});function L1e(e){"X"===e&&(e="");const t=e.padEnd(16,"0");return h1e.fromString(t,!0,16)}const k1e=180/Math.PI;function O1e(e,t,n){const r=1<<t;return[(e[0]+n[0])/r,(e[1]+n[1])/r]}function z1e(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function N1e(e){return[z1e(e[0]),z1e(e[1])]}function U1e(e,[t,n]){switch(e){case 0:return[1,t,n];case 1:return[-t,1,n];case 2:return[-t,-n,1];case 3:return[-1,-n,-t];case 4:return[n,-1,-t];case 5:return[n,t,-1];default:throw new Error("Invalid face")}}function V1e([e,t,n]){const r=Math.atan2(n,Math.sqrt(e*e+t*t));return[Math.atan2(t,e)*k1e,r*k1e]}function G1e(e,t,n,r){if(0===r){1===n&&(t[0]=e-1-t[0],t[1]=e-1-t[1]);const r=t[0];t[0]=t[1],t[1]=r}}function j1e(e){const{face:t,ij:n,level:r}=e,i=[[0,0],[0,1],[1,1],[1,0],[0,0]],a=Math.max(1,Math.ceil(100*Math.pow(2,-r))),s=new Float64Array(4*a*2+2);let o=0,l=0;for(let u=0;u<4;u++){const e=i[u].slice(0),c=i[u+1],h=(c[0]-e[0])/a,d=(c[1]-e[1])/a;for(let i=0;i<a;i++){e[0]+=h,e[1]+=d;const i=V1e(U1e(t,N1e(O1e(n,r,e))));Math.abs(i[1])>89.999&&(i[0]=l);const a=i[0]-l;i[0]+=a>180?-360:a<-180?360:0,s[o++]=i[0],s[o++]=i[1],l=i[0]}}return s[o++]=s[0],s[o++]=s[1],s}function q1e(e){const t=function(e){if(e.indexOf("/")>0)return e;const t=L1e(e);return function(e){if(e.isZero())return"";let t=e.toString(2);for(;t.length<64;)t="0"+t;const n=t.lastIndexOf("1"),r=t.substring(0,3),i=t.substring(3,n),a=i.length/2,s=h1e.fromString(r,!0,2).toString(10);let o="";if(0!==a)for(o=h1e.fromString(i,!0,2).toString(4);o.length<a;)o="0"+o;return`${s}/${o}`}(t)}(e),n=function(e){if(0===e.length)throw new Error(`Invalid Hilbert quad key ${e}`);const t=e.split("/"),n=parseInt(t[0],10),r=t[1],i=r.length;let a=0;const s=[0,0];for(let o=i-1;o>=0;o--){a=i-o;const e=r[o];let t=0,n=0;"1"===e?n=1:"2"===e?(t=1,n=1):"3"===e&&(t=1);const l=Math.pow(2,a-1);G1e(l,s,t,n),s[0]+=l*t,s[1]+=l*n}if(n%2==1){const e=s[0];s[0]=s[1],s[1]=e}return{face:n,ij:s,level:a}}(t);return n}function H1e(e){return function(e){const t=N1e(O1e(e.ij,e.level,[.5,.5]));return V1e(U1e(e.face,t))}(q1e(e))}function Q1e(e){if(e.length%2!=0)throw new Error("Invalid corners");const t=[],n=[];for(let r=0;r<e.length;r+=2)t.push(e[r]),n.push(e[r+1]);return t.sort((e,t)=>e-t),n.sort((e,t)=>e-t),{west:t[0],east:t[t.length-1],north:n[n.length-1],south:n[0]}}function W1e(e,t){const n=t?.minimumHeight||0,r=t?.maximumHeight||0,i=function(e){let t;if(2===e.face||5===e.face){let n=null,r=0;for(let t=0;t<4;t++){const i=j1e(q1e(`${e.face}/${t}`));null==n&&(n=new Float64Array(4*i.length)),n.set(i,r),r+=i.length}t=Q1e(n)}else t=Q1e(j1e(e));return t}(q1e(e)),a=i.west,s=i.south,o=i.east,l=i.north,u=[];return u.push(new Ave(a,l,n)),u.push(new Ave(o,l,n)),u.push(new Ave(o,s,n)),u.push(new Ave(a,s,n)),u.push(new Ave(a,l,r)),u.push(new Ave(o,l,r)),u.push(new Ave(o,s,r)),u.push(new Ave(a,s,r)),u}function K1e(e){const t=e.token,n={minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight},r=W1e(t,n),i=H1e(t),a=i[0],s=i[1],o=qZe.WGS84.cartographicToCartesian([a,s,n.maximumHeight]),l=new Ave(o[0],o[1],o[2]);r.push(l);const u=tqe(r);return[...u.center,...u.halfAxes]}const Z1e={QUADTREE:4,OCTREE:8};function Y1e(e,t,n){if(e?.box){const r=function(e,t){const n=function(e){return e.and(e.not().add(1))}(e).shiftRightUnsigned(2);return e.add(h1e.fromNumber(2*t+1-4).multiply(n))}(L1e(e.s2VolumeInfo.token),t),i=function(e){if(e.isZero())return"X";let t=e.countTrailingZeros();t=(t-t%4)/4;const n=t;t*=4;const r=e.shiftRightUnsigned(t).toString(16).replace(/0+$/,"");return Array(17-n-r.length).join("0")+r}(r),a={...e.s2VolumeInfo};if(a.token=i,"OCTREE"===n){const t=e.s2VolumeInfo,n=t.maximumHeight-t.minimumHeight,r=n/2,i=t.minimumHeight+n/2;t.minimumHeight=i-r,t.maximumHeight=i+r}return{box:K1e(a),s2VolumeInfo:a}}}async function X1e(e){const{subtree:t,subtreeData:n={level:0,x:0,y:0,z:0},parentData:r={mortonIndex:0,localLevel:-1,localX:0,localY:0,localZ:0},childIndex:i=0,implicitOptions:a,loaderOptions:s,s2VolumeBox:o}=e,{subdivisionScheme:l,subtreeLevels:u,maximumLevel:c,contentUrlTemplate:h,subtreesUriTemplate:d,basePath:p}=a,f={children:[],lodMetricValue:0,contentUrl:""};if(!c)return uhe.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${h} won't be loaded...`),f;const m=r.localLevel+1,g=n.level+m;if(g>c)return f;const A=Z1e[l],y=Math.log2(A),v=1&i,b=i>>1&1,x=i>>2&1,_=$1e(r.localX,v,1),w=$1e(r.localY,b,1),E=$1e(r.localZ,x,1),C=$1e(n.x,_,m),S=$1e(n.y,w,m),I=$1e(n.z,E,m),M=$1e(r.mortonIndex,i,y);let T,D,P,B;if(m===u&&J1e(t.childSubtreeAvailability,M)){const e=e2e(`${p}/${d}`,g,C,S,I);T=await ope(e,u1e,s),B=0,D={level:g,x:C,y:S,z:I},P={mortonIndex:0,localLevel:0,localX:0,localY:0,localZ:0}}else{T=t;B=(A**m-1)/(A-1)+M,D=n,P={mortonIndex:M,localLevel:m,localX:_,localY:w,localZ:E}}if(!J1e(T.tileAvailability,B))return f;J1e(T.contentAvailability,B)&&(f.contentUrl=e2e(h,g,C,S,I));for(let R=0;R<A;R++){const e=Y1e(o,R,l),t=await X1e({subtree:T,subtreeData:D,parentData:P,childIndex:R,implicitOptions:a,loaderOptions:s,s2VolumeBox:e});(t.contentUrl||t.children.length)&&f.children.push(t)}if(f.contentUrl||f.children.length){const e=function(e,t,n,r){const{basePath:i,refine:a,getRefine:s,lodMetricType:o,getTileType:l,rootLodMetricValue:u,rootBoundingVolume:c}=n,h=e.contentUrl&&e.contentUrl.replace(`${i}/`,""),d=u/2**t.level,p=r?.box?{box:r.box}:c,f=function(e,t,n){if(e.region){const{level:r,x:i,y:a,z:s}=t,[o,l,u,c,h,d]=e.region,p=2**r,f=(u-o)/p,[m,g]=[o+f*i,o+f*(i+1)],A=(c-l)/p,[y,v]=[l+A*a,l+A*(a+1)];let b,x;if("OCTREE"===n){const e=(d-h)/p;[b,x]=[h+e*s,h+e*(s+1)]}else[b,x]=[h,d];return{region:[m,y,g,v,b,x]}}if(e.box)return e;throw new Error(`Unsupported bounding volume type ${JSON.stringify(e)}`)}(p,t,n.subdivisionScheme);return{children:e.children,contentUrl:e.contentUrl,content:{uri:h},id:e.contentUrl,refine:s(a),type:l(e),lodMetricType:o,lodMetricValue:d,geometricError:d,transform:e.transform,boundingVolume:f}}(f,{level:g,x:C,y:S,z:I},a,o);return e}return f}function J1e(e,t){let n;return Array.isArray(e)?(n=e[0],e.length>1&&uhe.once('Not supported extension "3DTILES_multiple_contents" has been detected')):n=e,"constant"in n?Boolean(n.constant):!!n.explicitBitstream&&function(e,t){const n=Math.floor(e/8),r=e%8;return 1==(t[n]>>r&1)}(t,n.explicitBitstream)}function $1e(e,t,n){return(e<<n)+t}function e2e(e,t,n,r,i){const a=function(e){const t={};for(const n in e)t[`{${n}}`]=e[n];return t}({level:t,x:n,y:r,z:i});return e.replace(/{level}|{x}|{y}|{z}/gi,e=>a[e])}function t2e(e,t=""){if(!t)return dYe.EMPTY;const n=t.split("?")[0].split(".").pop();switch(n){case"pnts":return dYe.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return dYe.SCENEGRAPH;default:return n||dYe.EMPTY}}function n2e(e){switch(e){case"REPLACE":case"replace":return hYe.REPLACE;case"ADD":case"add":return hYe.ADD;default:return e}}function r2e(e,t){if(/^[a-z][0-9a-z+.-]*:/i.test(t)){const n=new URL(e,`${t}/`);return decodeURI(n.toString())}return e.startsWith("/")?e:qVe(t,e)}function i2e(e,t){if(!e)return null;let n;if(e.content){const r=e.content.uri||e.content?.url;void 0!==r&&(n=r2e(r,t))}return{...e,id:n,contentUrl:n,lodMetricType:fYe.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:t2e(0,n),refine:n2e(e.refine)}}async function a2e(e,t,n,r,i){const{subdivisionScheme:a,maximumLevel:s,availableLevels:o,subtreeLevels:l,subtrees:{uri:u}}=r,c=r2e(e2e(u,0,0,0,0),n),h=await ope(c,u1e,i),d=e.content?.uri,p=d?r2e(d,n):"",f=t?.root?.refine,m=e.geometricError,g=e.boundingVolume.extensions?.["3DTILES_bounding_volume_S2"];if(g){const t={box:K1e(g),s2VolumeInfo:g};e.boundingVolume=t}const A=e.boundingVolume,y={contentUrlTemplate:p,subtreesUriTemplate:u,subdivisionScheme:a,subtreeLevels:l,maximumLevel:Number.isFinite(o)?o-1:s,refine:f,basePath:n,lodMetricType:fYe.GEOMETRIC_ERROR,rootLodMetricValue:m,rootBoundingVolume:A,getTileType:t2e,getRefine:n2e};return await async function(e,t,n,r,i){if(!e)return null;const{children:a,contentUrl:s}=await X1e({subtree:n,implicitOptions:r,loaderOptions:i});let o,l=null;s&&(o=s,l={uri:s.replace(`${t}/`,"")});const u={...e,id:o,contentUrl:o,lodMetricType:fYe.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:t2e(0,o),refine:n2e(e.refine),content:l||e.content,children:a};return u}(e,n,h,y,i)}function s2e(e){return e?.extensions?.["3DTILES_implicit_tiling"]||e?.implicitTiling}const o2e={dataType:null,batchType:null,id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:cXe,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(e,t={},n){const r=t["3d-tiles"]||{};let i;i="auto"===r.isTileset?n?.url&&-1!==n.url.indexOf(".json"):r.isTileset;return i?async function(e,t,n){const r=JSON.parse((new TextDecoder).decode(e)),i=n?.url||"",a=function(e){return jVe(e)}(i),s=await async function(e,t,n){let r=null;const i=s2e(e.root);r=i&&e.root?await a2e(e.root,e,t,i,n):i2e(e.root,t);const a=[];for(a.push(r);a.length>0;){const r=a.pop()||{},i=r.children||[],s=[];for(const o of i){const r=s2e(o);let i;i=r?await a2e(o,e,t,r,n):i2e(o,t),i&&(s.push(i),a.push(i))}r.children=s}return r}(r,a,t||{}),o={...r,shape:"tileset3d",loader:o2e,url:i,queryString:n?.queryString||"",basePath:a,root:s||r.root,type:pYe.TILES3D,lodMetricType:fYe.GEOMETRIC_ERROR,lodMetricValue:r.root?.geometricError||0};return o}(e,t,n):async function(e,t,n){const r={content:{shape:"tile3d",featureIds:null}},i=0;return await s1e(e,i,t,n,r.content),r.content}(e,t,n)},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};const l2e=[0],u2e={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:o2e,onTilesetLoad:{type:"function",value:e=>{}},onTileLoad:{type:"function",value:e=>{}},onTileUnload:{type:"function",value:e=>{}},onTileError:{type:"function",value:(e,t,n)=>{}},_getMeshColor:{type:"function",value:e=>[255,255,255]}};class c2e extends bBe{initializeState(){"onTileLoadFail"in this.props&&Dpe.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){return Boolean(this.state?.tileset3d?.isLoaded()&&super.isLoaded)}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState({props:e,oldProps:t,changeFlags:n}){if(e.data&&e.data!==t.data&&this._loadTileset(e.data),n.viewportChanged){const{activeViewports:e}=this.state;Object.keys(e).length&&(this._updateTileset(e),this.state.lastUpdatedViewports=e,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:e}=this.state;for(const t in e)e[t].needsUpdate=!0}}finalizeState(e){this.state.tileset3d?.destroy(),this.state.tileset3d=null,this.state.layerMap={},this.state.activeViewports={},this.state.lastUpdatedViewports=null,super.finalizeState(e)}activateViewport(e){const{activeViewports:t,lastUpdatedViewports:n}=this.state;this.internalState.viewport=e,t[e.id]=e;const r=n?.[e.id];r&&e.equals(r)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:e,sourceLayer:t}){const n=t&&t.props.tile;return e.picked&&(e.object=n),e.sourceTile=n,e}filterSubLayer({layer:e,viewport:t,cullRect:n,isPicking:r}){const{tile:i}=e.props,{id:a}=t;if(!i.selected||!i.viewportIds.includes(a))return!1;if(r&&n&&i.content?.cartographicOrigin){const[e,r]=t.project(i.content.cartographicOrigin),a=n.x+n.width/2,s=n.y+n.height/2,o=Math.max(t.width,t.height)/4,l=e-a,u=r-s;if(l*l+u*u>o*o)return!1}return!0}_updateAutoHighlight(e){const t=e.sourceTile,n=this.state.layerMap[t?.id];n&&n.layer&&n.layer.updateAutoHighlight(e)}async _loadTileset(e){const t=this.props.loadOptions||{},n=this.props.loaders?.length?this.props.loaders:this.props.loader,r=Array.isArray(n)?n[0]:n,{tileset:i,...a}=t,s={loadOptions:{...a},...i};let o=e;if("preload"in r&&"function"==typeof r.preload){const n=await r.preload(e,t);n.url&&(o=n.url),n.headers&&(s.loadOptions.core={...s.loadOptions.core,fetch:{...s.loadOptions.core?.fetch,headers:n.headers}}),Object.assign(s,n)}const l=await ope(o,r,s.loadOptions),u=new uXe(l,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,onUpdate:()=>this.setNeedsUpdate(),...s});this.setState({tileset3d:u,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(u)}_onTileLoad(e){const{lastUpdatedViewports:t}=this.state;e.tileDrawn=!1,this.props.onTileLoad(e),this._updateTileset(t),this.setNeedsUpdate()}_onTileUnload(e){delete this.state.layerMap[e.id],this.props.onTileUnload(e)}_updateTileset(e){if(!e)return;const{tileset3d:t}=this.state,{timeline:n}=this.context,r=Object.keys(e).length;n&&r&&t&&t.selectTiles(Object.values(e)).then(e=>{this.state.frameNumber!==e&&this.setState({frameNumber:e})})}_getSubLayer(e,t){if(!e.content)return null;switch(e.type){case dYe.POINTCLOUD:return this._makePointCloudLayer(e,t);case dYe.SCENEGRAPH:return this._make3DModelLayer(e);case dYe.MESH:return this._makeSimpleMeshLayer(e,t);default:throw new Error(`Tile3DLayer: Failed to render layer of type ${e.content.type}`)}}_makePointCloudLayer(e,t){const{attributes:n,pointCount:r,constantRGBA:i,cartographicOrigin:a,modelMatrix:s}=e.content,{positions:o,normals:l,colors:u}=n;if(!o)return null;const c=t&&t.props.data||{header:{vertexCount:r},attributes:{POSITION:o,NORMAL:l,COLOR_0:u}},{pointSize:h,getPointColor:d}=this.props;return new(this.getSubLayerClass("pointcloud",jRe))({pointSize:h},this.getSubLayerProps({id:"pointcloud"}),{id:`${this.id}-pointcloud-${e.id}`,tile:e,data:c,coordinateSystem:Yxe.METER_OFFSETS,coordinateOrigin:a,modelMatrix:s,getColor:i||d,_offset:0})}_make3DModelLayer(e){const{gltf:t,instances:n,cartographicOrigin:r,modelMatrix:i}=e.content;return new(this.getSubLayerClass("scenegraph",yZe))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:`${this.id}-scenegraph-${e.id}`,tile:e,data:n||l2e,scenegraph:t,coordinateSystem:Yxe.METER_OFFSETS,coordinateOrigin:r,modelMatrix:i,getTransformMatrix:e=>e.modelMatrix,getPosition:[0,0,0],_offset:0,onFirstDraw:()=>{e.tileDrawn=!0}})}_makeSimpleMeshLayer(e,t){const n=e.content,{attributes:r,indices:i,modelMatrix:a,cartographicOrigin:s,coordinateSystem:o=Yxe.METER_OFFSETS,material:l,featureIds:u}=n,{_getMeshColor:c}=this.props,h=t&&t.props.mesh||new $we({topology:"triangle-list",attributes:h2e(r),indices:i});return new(this.getSubLayerClass("mesh",wZe))(this.getSubLayerProps({id:"mesh"}),{id:`${this.id}-mesh-${e.id}`,tile:e,mesh:h,data:l2e,getColor:c(e),pbrMaterial:l,modelMatrix:a,coordinateOrigin:s,coordinateSystem:o,featureIds:u,_offset:0})}renderLayers(){const{tileset3d:e,layerMap:t}=this.state;return e?e.tiles.map(e=>{const n=t[e.id]=t[e.id]||{tile:e};let{layer:r}=n;return e.selected&&(r?n.needsUpdate&&(r=this._getSubLayer(e,r),n.needsUpdate=!1):r=this._getSubLayer(e)),n.layer=r,r}).filter(Boolean):null}}function h2e(e){const t={};return t.positions={...e.positions,value:new Float32Array(e.positions.value)},e.normals&&(t.normals=e.normals),e.texCoords&&(t.texCoords=e.texCoords),e.colors&&(t.colors=e.colors),e.uvRegions&&(t.uvRegions=e.uvRegions),t}c2e.defaultProps=u2e,c2e.layerName="Tile3DLayer";const d2e={dataType:null,batchType:null,name:"Terrain",id:"terrain",module:"terrain",version:"4.4.3",worker:!0,extensions:["png","pngraw","jpg","jpeg","gif","webp","bmp"],mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp"],options:{terrain:{tesselator:"auto",bounds:void 0,meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0},skirtHeight:void 0}}},p2e=[1],f2e=180,m2e={...Bqe.defaultProps,elevationData:uqe,texture:{...uqe,optional:!0},meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:"",wireframe:!1,material:!0,loaders:[d2e]};function g2e(e){return Array.isArray(e)?e.join(";"):e||""}class A2e extends bBe{updateState({props:e,oldProps:t}){const n=e.elevationData!==t.elevationData;if(n){const{elevationData:t}=e,n=t&&(Array.isArray(t)||y2e(t));this.setState({isTiled:n})}const r=n||e.meshMaxError!==t.meshMaxError||e.elevationDecoder!==t.elevationDecoder||e.bounds!==t.bounds;if(!this.state.isTiled&&r){const t=this.loadTerrain(e);this.setState({terrain:t})}e.workerUrl&&Dpe.removed("workerUrl","loadOptions.terrain.workerUrl")()}loadTerrain({elevationData:e,bounds:t,elevationDecoder:n,meshMaxError:r,signal:i}){if(!e)return null;const a=function(e){return!Number.isFinite(e)||e<=0?1:Math.max(e,1)}(r);let s=this.getLoadOptions();s={...s,terrain:{skirtHeight:this.state.isTiled?2*a:0,...s?.terrain,bounds:t,meshMaxError:a,elevationDecoder:n}};const{fetch:o}=this.props;return o(e,{propName:"elevationData",layer:this,loadOptions:s,signal:i})}getTiledTerrainData(e){const{elevationData:t,fetch:n,texture:r,elevationDecoder:i,meshMaxError:a}=this.props,{viewport:s}=this.context,o=hqe(t,e),l=r&&hqe(r,e),{signal:u}=e;let c=[0,0],h=[0,0];if(s.isGeospatial){const t=e.bbox;c=s.projectFlat([t.west,t.south]),h=s.projectFlat([t.east,t.north])}else{const t=e.bbox;c=[t.left,t.bottom],h=[t.right,t.top]}const d=function(e,t,n){const r=(e[2]-e[0])/t*1,i=(e[3]-e[1])/t*1,a=[e[0]-r,e[1]-i,e[2]+r,e[3]+i];return n?[Math.max(a[0],-180),Math.max(a[1],-90),Math.min(a[2],f2e),Math.min(a[3],90)]:a}([c[0],c[1],h[0],h[1]],this.props.tileSize,s instanceof IBe),p=this.loadTerrain({elevationData:o,bounds:d,elevationDecoder:i,meshMaxError:a,signal:u}),f=l?n(l,{propName:"texture",layer:this,loaders:[],signal:u}).catch(e=>null):Promise.resolve(null);return Promise.all([p,f])}renderSubLayers(e){const t=this.getSubLayerClass("mesh",eHe),{color:n,wireframe:r,material:i}=this.props,{data:a}=e;if(!a)return null;const[s,o]=a,{viewport:l}=this.context,u=l instanceof IBe,c=s?.header?.boundingBox,h=c&&c.every(([e,t])=>e>=-180&&e<=f2e&&t>=-90&&t<=90),d=u&&h?Yxe.LNGLAT:Yxe.CARTESIAN;return new t(e,{data:p2e,mesh:s,texture:o,_instanced:!1,coordinateSystem:d,getPosition:e=>[0,0,0],getColor:n,wireframe:r,material:i})}onViewportLoad(e){if(!e)return;const{zRange:t}=this.state,n=e.map(e=>e.content).filter(Boolean).map(e=>e[0].header.boundingBox.map(e=>e[2]));if(0===n.length)return;const r=Math.min(...n.map(e=>e[0])),i=Math.max(...n.map(e=>e[1]));(!t||r<t[0]||i>t[1])&&this.setState({zRange:[r,i]})}renderLayers(){const{color:e,material:t,elevationData:n,texture:r,wireframe:i,meshMaxError:a,elevationDecoder:s,tileSize:o,maxZoom:l,minZoom:u,extent:c,maxRequests:h,onTileLoad:d,onTileUnload:p,onTileError:f,maxCacheSize:m,maxCacheByteSize:g,refinementStrategy:A,zoomOffset:y}=this.props;if(this.state.isTiled)return new Bqe(this.getSubLayerProps({id:"tiles"}),{getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:g2e(n),texture:g2e(r),meshMaxError:a,elevationDecoder:s,projectionMode:this.context.viewport.projectionMode,zoomOffset:y}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:o,maxZoom:l,minZoom:u,extent:c,maxRequests:h,onTileLoad:d,onTileUnload:p,onTileError:f,maxCacheSize:m,maxCacheByteSize:g,refinementStrategy:A,zoomOffset:y});if(!n)return null;return new(this.getSubLayerClass("mesh",eHe))(this.getSubLayerProps({id:"mesh"}),{data:p2e,mesh:this.state.terrain,texture:r,_instanced:!1,getPosition:e=>[0,0,0],getColor:e,material:t,wireframe:i})}}A2e.defaultProps=m2e,A2e.layerName="TerrainLayer";const y2e=e=>e.includes("{x}")&&(e.includes("{y}")||e.includes("{-y}")),v2e={clipBounds:[0,0,1,1],clipByInstance:void 0},b2e="\nlayout(std140) uniform clipUniforms {\n vec4 bounds;\n} clip;\n\nbool clip_isInBounds(vec2 position) {\n return position.x >= clip.bounds[0] && position.y >= clip.bounds[1] && position.x < clip.bounds[2] && position.y < clip.bounds[3];\n}\n",x2e={name:"clip",vs:b2e,uniformTypes:{bounds:"vec4<f32>"}},_2e={"vs:#decl":"\nout float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nin float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n if (clip_isVisible < 0.5) discard;\n"},w2e={name:"clip",fs:b2e,uniformTypes:{bounds:"vec4<f32>"}},E2e={"vs:#decl":"\nout vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nin vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n if (!clip_isInBounds(clip_commonPosition)) discard;\n"};class C2e extends qBe{getShaders(){let e="instancePositions"in this.getAttributeManager().attributes;return void 0!==this.props.clipByInstance&&(e=Boolean(this.props.clipByInstance)),this.state.clipByInstance=e,"webgpu"===this.context.device.type?{}:e?{modules:[x2e],inject:_2e}:{modules:[w2e],inject:E2e}}draw(){const{clipBounds:e}=this.props,t={};if(this.state.clipByInstance)t.bounds=e;else{const n=this.projectPosition([e[0],e[1],0]),r=this.projectPosition([e[2],e[3],0]);t.bounds=[Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.max(n[0],r[0]),Math.max(n[1],r[1])]}"webgpu"===this.context.device.type&&(t.enabled=!0,t.mode=this.state.clipByInstance?"instance":"geometry"),this.setShaderModuleProps({clip:t})}}function S2e(e,t,n){switch(e.type){case"Point":return function(e,t,n){const{positions:r}=e,i=M2e(r,t,n);if(i.length>1)return{type:"MultiPoint",coordinates:i};return{type:"Point",coordinates:i[0]}}(e,t,n);case"LineString":return function(e,t=-1/0,n=1/0){const{positions:r}=e,i=e.pathIndices.value.filter(e=>e>=t&&e<=n);if(!(i.length>2)){return{type:"LineString",coordinates:M2e(r,i[0],i[1])}}const a=[];for(let s=0;s<i.length-1;s++){const e=M2e(r,i[s],i[s+1]);a.push(e)}return{type:"MultiLineString",coordinates:a}}(e,t,n);case"Polygon":return I2e(e,t,n);default:const r=e;throw new Error(`Unsupported geometry type: ${r?.type}`)}}function I2e(e,t=-1/0,n=1/0){const{positions:r}=e,i=e.polygonIndices.value.filter(e=>e>=t&&e<=n),a=e.primitivePolygonIndices.value.filter(e=>e>=t&&e<=n);if(!(i.length>2)){const e=[];for(let t=0;t<a.length-1;t++){const n=M2e(r,a[t],a[t+1]);e.push(n)}return{type:"Polygon",coordinates:e}}const s=[];for(let o=0;o<i.length-1;o++){const t=I2e(e,i[o],i[o+1]).coordinates;s.push(t)}return{type:"MultiPolygon",coordinates:s}}function M2e(e,t,n){t=t||0,n=n||e.value.length/e.size;const r=[];for(let i=t;i<n;i++){const t=Array();for(let n=i*e.size;n<(i+1)*e.size;n++)t.push(Number(e.value[n]));r.push(t)}return r}function T2e(e,t){const n=t?.globalFeatureId;return void 0!==n?function(e,t){const n=D2e(e);for(const r of n){let e=0,n=r.featureIds.value[0];for(let i=0;i<r.featureIds.value.length;i++){const a=r.featureIds.value[i];if(a!==n){if(t===r.globalFeatureIds.value[e])return P2e(r,e,i);e=i,n=a}}if(t===r.globalFeatureIds.value[e])return P2e(r,e,r.featureIds.value.length)}throw new Error(`featureId:${t} not found`)}(e,n):function(e){const t=D2e(e);return function(e){const t=[];for(const n of e){if(0===n.featureIds.value.length)continue;let e=0,r=n.featureIds.value[0];for(let i=0;i<n.featureIds.value.length;i++){const a=n.featureIds.value[i];a!==r&&(t.push(P2e(n,e,i)),e=i,r=a)}t.push(P2e(n,e,n.featureIds.value.length))}return t}(t)}(e)}function D2e(e,t){const n=[];return e.points&&(e.points.type="Point",n.push(e.points)),e.lines&&(e.lines.type="LineString",n.push(e.lines)),e.polygons&&(e.polygons.type="Polygon",n.push(e.polygons)),n}function P2e(e,t,n){const r=S2e(e,t,n),i=function(e,t=0){const n=Object.assign({},e.properties[e.featureIds.value[t]]);for(const r in e.numericProps)n[r]=e.numericProps[r].value[t];return n}(e,t),a=function(e,t=0){return e.fields&&e.fields[e.featureIds.value[t]]}(e,t);return{type:"Feature",geometry:r,properties:i,...a}}C2e.defaultProps=v2e,C2e.extensionName="ClipExtension";var B2e,R2e,F2e,L2e={};
498
498
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function k2e(){return B2e||(B2e=1,L2e.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,l=(1<<o)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+h],h+=d,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=u}return(p?-1:1)*s*Math.pow(2,a-r)},L2e.write=function(e,t,n,r,i,a){var s,o,l,u=8*a-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(o=0,s=c):s+h>=1?(o=(t*l-1)*Math.pow(2,i),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&o,p+=f,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;e[n+p]=255&s,p+=f,s/=256,u-=8);e[n+p-f]|=128*m}),L2e}!function(){if(F2e)return R2e;F2e=1,R2e=t;var e=k2e();function t(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var n=4294967296,r=1/n,i="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function a(e){return e.type===t.Bytes?e.readVarint()+e.pos:e.pos+1}function s(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function o(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function l(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function u(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function c(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function h(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function d(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function p(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function f(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function m(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function g(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function A(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function y(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function v(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}t.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,a=this.pos;this.type=7&r,e(i,t,this),this.pos===a&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=A(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=v(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=A(this.buf,this.pos)+A(this.buf,this.pos+4)*n;return this.pos+=8,e},readSFixed64:function(){var e=A(this.buf,this.pos)+v(this.buf,this.pos+4)*n;return this.pos+=8,e},readFloat:function(){var t=e.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=e.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,a=n.buf;if(i=a[n.pos++],r=(112&i)>>4,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<3,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<10,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<17,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<24,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(1&i)<<31,i<128)return s(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&i?function(e,t,n){return i.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){var r="",i=t;for(;i<n;){var a,s,o,l=e[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&((u=(15&l)<<12|(63&a)<<6|63&s)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&((u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,n){if(this.type!==t.Bytes)return e.push(this.readVarint(n));var r=a(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(n));return e},readPackedSVarint:function(e){if(this.type!==t.Bytes)return e.push(this.readSVarint());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==t.Bytes)return e.push(this.readBoolean());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==t.Bytes)return e.push(this.readFloat());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==t.Bytes)return e.push(this.readDouble());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==t.Bytes)return e.push(this.readFixed32());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==t.Bytes)return e.push(this.readSFixed32());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==t.Bytes)return e.push(this.readFixed64());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==t.Bytes)return e.push(this.readSFixed64());var n=a(this);for(e=e||[];this.pos<n;)e.push(this.readSFixed64());return e},skip:function(e){var n=7&e;if(n===t.Varint)for(;this.buf[this.pos++]>127;);else if(n===t.Bytes)this.pos=this.readVarint()+this.pos;else if(n===t.Fixed32)this.pos+=4;else{if(n!==t.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),y(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),y(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),y(this.buf,-1&e,this.pos),y(this.buf,Math.floor(e*r),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),y(this.buf,-1&e,this.pos),y(this.buf,Math.floor(e*r),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,r;e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;if(t.buf[t.pos++]|=n|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,a=0;a<t.length;a++){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){r>56319||a+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&o(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),e.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),e.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var r=this.pos-n;r>=128&&o(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,n,r){this.writeTag(e,t.Bytes),this.writeRawMessage(n,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,l,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,m,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,g,t)},writeBytesField:function(e,n){this.writeTag(e,t.Bytes),this.writeBytes(n)},writeFixed32Field:function(e,n){this.writeTag(e,t.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(e,n){this.writeTag(e,t.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(e,n){this.writeTag(e,t.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(e,n){this.writeTag(e,t.Fixed64),this.writeSFixed64(n)},writeVarintField:function(e,n){this.writeTag(e,t.Varint),this.writeVarint(n)},writeSVarintField:function(e,n){this.writeTag(e,t.Varint),this.writeSVarint(n)},writeStringField:function(e,n){this.writeTag(e,t.Bytes),this.writeString(n)},writeFloatField:function(e,n){this.writeTag(e,t.Fixed32),this.writeFloat(n)},writeDoubleField:function(e,n){this.writeTag(e,t.Fixed64),this.writeDouble(n)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}}();const O2e={name:"Mapbox Vector Tile",id:"mvt",module:"mvt",extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","application/x-protobuf"],category:"geometry",dataType:null,batchType:null,version:"4.4.3",worker:!0,options:{mvt:{shape:"geojson",coordinates:"local",layerProperty:"layerName",layers:void 0,tileIndex:void 0}}},z2e={Point:N2e,MultiPoint:function(e,t,n){return U2e(e,t,n)},LineString:V2e,MultiLineString:function(e,t,n){return e.map(e=>V2e(e,t,n))},Polygon:G2e,MultiPolygon:function(e,t,n){return e.map(e=>G2e(e,t,n))}};function N2e([e,t],[n,r],i){const a=Oye(n[0],r[0],e),s=Oye(n[1],r[1],t);return i.unprojectFlat([a,s])}function U2e(e,t,n){return e.map(e=>N2e(e,t,n))}function V2e(e,t,n){return U2e(e,t,n)}function G2e(e,t,n){return e.map(e=>U2e(e,t,n))}const j2e=["points","lines","polygons"];function q2e(e,t,n,r){const i=e.featureIds.value;if(!i.length)return-1;let a=0,s=i[i.length-1]+1;if(r){const t=function(e,t){if(!e.__layers){const t={},{properties:n}=e;for(let e=0;e<n.length;e++){const{layerName:r}=n[e];r&&(t[r]?t[r][1]=e:t[r]=[e,e])}e.__layers=t}return e.__layers[t]}(e,r);if(!t)return-1;a=t[0],s=t[1]+1}let o=-1;if(t in e.numericProps){const r=e.numericProps[t].value.findIndex((e,t)=>e===n&&i[t]>=a&&i[t]<s);return r>=0?e.globalFeatureIds.value[r]:-1}return t?o=H2e(e.properties,e=>e[t]===n,a,s):e.fields&&(o=H2e(e.fields,e=>e.id===n,a,s)),o>=0?function(e,t){if(!e.__ids){const t=[],n=e.featureIds.value,r=e.globalFeatureIds.value;for(let e=0;e<n.length;e++)t[n[e]]=r[e];e.__ids=t}return e.__ids[t]}(e,o):-1}function H2e(e,t,n,r){for(let i=n;i<r;i++)if(t(e[i],i))return i;return-1}const Q2e={...ske.defaultProps,data:uqe,onDataLoad:{type:"function",value:null,optional:!0,compare:!1},uniqueIdProperty:"",highlightedFeatureId:null,loaders:[O2e],binary:!0};class W2e extends Bqe{initializeState(){super.initializeState();const e=void 0===this.context.viewport.resolution&&this.props.binary;this.setState({binary:e,data:null,tileJSON:null,hoveredFeatureId:null,hoveredFeatureLayerName:null})}get isLoaded(){return Boolean(this.state?.data&&super.isLoaded)}updateState({props:e,oldProps:t,context:n,changeFlags:r}){r.dataChanged&&this._updateTileData(),this.state?.data&&(super.updateState({props:e,oldProps:t,context:n,changeFlags:r}),this._setWGS84PropertyForTiles());const{highlightColor:i}=e;i!==t.highlightColor&&Array.isArray(i)&&this.setState({highlightColor:i})}async _updateTileData(){let e=this.props.data,t=null;if("string"!=typeof e||function(e){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(e)}(e))e&&"object"==typeof e&&"tilejson"in e&&(t=e);else{const{onDataLoad:n,fetch:r}=this.props;this.setState({data:null,tileJSON:null});try{t=await r(e,{propName:"data",layer:this,loaders:[]})}catch(T5){this.raiseError(T5,"loading TileJSON"),e=null}n&&n(t,{propName:"data",layer:this})}t&&(e=t.tiles),this.setState({data:e,tileJSON:t})}_getTilesetOptions(){const e=super._getTilesetOptions(),t=this.state.tileJSON,{minZoom:n,maxZoom:r}=this.props;return t&&(Number.isFinite(t.minzoom)&&t.minzoom>n&&(e.minZoom=t.minzoom),Number.isFinite(t.maxzoom)&&(!Number.isFinite(r)||t.maxzoom<r)&&(e.maxZoom=t.maxzoom)),e}renderLayers(){return this.state?.data?super.renderLayers():null}getTileData(e){const{data:t,binary:n}=this.state,{index:r,signal:i}=e,a=hqe(t,e);if(!a)return Promise.reject("Invalid URL");let s=this.getLoadOptions();const{fetch:o}=this.props;return s={...s,core:{...s?.core,mimeType:"application/x-protobuf"},mvt:{...s?.mvt,shape:n?"binary":"geojson",coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:r}},o(a,{propName:"data",layer:this,loadOptions:s,signal:i})}renderSubLayers(e){const{x:t,y:n,z:r}=e.tile.index,i=Math.pow(2,r),a=512/i,s=-a,o=512*t/i,l=512*(1-n/i),u=(new jve).scale([a,s,1]);e.autoHighlight=!1,this.context.viewport.resolution||(e.modelMatrix=u,e.coordinateOrigin=[o,l,0],e.coordinateSystem=Yxe.CARTESIAN,e.extensions=[...e.extensions||[],new C2e]);const c=super.renderSubLayers(e);return!this.state.binary||c instanceof ske||Dpe.warn("renderSubLayers() must return GeoJsonLayer when using binary:true")(),c}_updateAutoHighlight(e){const{uniqueIdProperty:t}=this.props,{hoveredFeatureId:n,hoveredFeatureLayerName:r}=this.state,i=e.object;let a=null,s=null;i&&(a=K2e(i,t),s=Z2e(i));let{highlightColor:o}=this.props;"function"==typeof o&&(o=o(e)),n===a&&r===s||this.setState({highlightColor:o,hoveredFeatureId:a,hoveredFeatureLayerName:s})}_isWGS84(){return Boolean(this.context.viewport.resolution)}getPickingInfo(e){const t=super.getPickingInfo(e);if(this.state.binary&&-1!==t.index){const{data:n}=e.sourceLayer.props;t.object=T2e(n,{globalFeatureId:t.index})}return t.object&&!this._isWGS84()&&(t.object=X2e(t.object,t.tile.bbox,this.context.viewport)),t}getSubLayerPropsByTile(e){return{highlightedObjectIndex:this.getHighlightedObjectIndex(e),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(e){const{hoveredFeatureId:t,hoveredFeatureLayerName:n,binary:r}=this.state,{uniqueIdProperty:i,highlightedFeatureId:a}=this.props,s=e.content,o=Y2e(a);if(!(Y2e(t)||o))return-1;const l=o?a:t;return Array.isArray(s)?s.findIndex(e=>{const t=K2e(e,i)===l,r=o||Z2e(e)===n;return t&&r}):s&&r?function(e,t,n,r){for(const i of j2e){const a=e[i]&&q2e(e[i],t,n,r);if(a>=0)return a}return-1}(s,i,l,o?"":n):-1}_pickObjects(e){const{deck:t,viewport:n}=this.context,r=n.width,i=n.height,a=n.x,s=n.y,o=[this.id];return t.pickObjects({x:a,y:s,width:r,height:i,layerIds:o,maxObjects:e})}getRenderedFeatures(e=null){const t=this._pickObjects(e),n=new Set,r=[];for(const i of t){const e=K2e(i.object,this.props.uniqueIdProperty);void 0===e?r.push(i.object):n.has(e)||(n.add(e),r.push(i.object))}return r}_setWGS84PropertyForTiles(){const e="dataInWGS84";this.state.tileset.selectedTiles.forEach(t=>{t.hasOwnProperty(e)||Object.defineProperty(t,e,{get:()=>{if(!t.content)return null;if(this.state.binary&&Array.isArray(t.content)&&!t.content.length)return[];const{bbox:e}=t;if(void 0===t._contentWGS84&&function(e){return Number.isFinite(e.west)&&Number.isFinite(e.north)&&Number.isFinite(e.east)&&Number.isFinite(e.south)}(e)){const n=this.state.binary?T2e(t.content):t.content;t._contentWGS84=n.map(t=>X2e(t,e,this.context.viewport))}return t._contentWGS84}})})}}function K2e(e,t){return e.properties&&t?e.properties[t]:"id"in e?e.id:void 0}function Z2e(e){return e.properties?.layerName||null}function Y2e(e){return null!=e&&""!==e}function X2e(e,t,n){const r={...e,geometry:{type:e.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>{const r=function(e,t,n){const r=[n.projectFlat([t.west,t.north]),n.projectFlat([t.east,t.south])];return{...e,coordinates:z2e[e.type](e.coordinates,r,n)}}(e.geometry,t,n);return r.coordinates}}),r}W2e.layerName="MVTLayer",W2e.defaultProps=Q2e;const J2e="0123456789bcdefghjkmnpqrstuvwxyz",$2e={};for(let GL=0;GL<32;GL++)$2e[J2e.charAt(GL)]=GL;function e3e(e){const[t,n,r,i]=function(e){let t,n=!0,r=90,i=-90,a=180,s=-180,o=0;for(let l=0,u=e.length;l<u;l++){const u=e[l].toLowerCase();o=$2e[u];for(let e=4;e>=0;e--){const l=o>>e&1;n?(t=(a+s)/2,1===l?s=t:a=t):(t=(r+i)/2,1===l?i=t:r=t),n=!n}}return[i,s,r,a]}(e);return[i,r,i,t,n,t,n,r,i,r]}class t3e extends uke{indexToBounds(){const{data:e,getGeohash:t}=this.props;return{data:e,_normalize:!1,positionFormat:"XY",getPolygon:(e,n)=>e3e(t(e,n))}}}t3e.layerName="GeohashLayer",t3e.defaultProps={getGeohash:{type:"accessor",value:e=>e.geohash}};const n3e=Object.freeze(Object.defineProperty({__proto__:null,A5Layer:gNe,GeohashLayer:t3e,GreatCircleLayer:UGe,H3ClusterLayer:Vqe,H3HexagonLayer:Uqe,MVTLayer:W2e,QuadkeyLayer:rje,S2Layer:tje,TerrainLayer:A2e,Tile3DLayer:c2e,TileLayer:Bqe,TripsLayer:zqe,_GeoCellLayer:uke,_Tile2DHeader:ije,_Tileset2D:Mqe,_WMSLayer:NGe,_getURLFromTemplate:hqe},Symbol.toStringTag,{value:"Module"})),r3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 29 29" fill="none">\n <path d="M28.9058 23.8967C28.5889 22.9479 27.573 22.4331 26.6134 22.7514L25.5156 23.1161L23.1535 17.4537C22.8788 16.7146 22.2161 16.3125 21.474 16.3125H15.9353L15.3462 13.5938H19.0343C20.0364 13.5938 20.847 12.7832 20.847 11.7812C20.847 10.7793 20.0364 9.96875 19.0343 9.96875H14.5605L14.4784 9.58359C14.2632 8.04863 12.8697 7.06875 11.3969 7.27832C9.86185 7.48789 8.87623 8.86426 9.09148 10.3539L10.4328 18.3062C10.5246 19.2352 11.3063 19.9375 12.2353 19.9375H20.2448L22.7859 26.049C23.0714 26.7514 23.7511 27.1875 24.4705 27.1875C24.66 27.1875 24.8546 27.1574 25.0438 27.0937L27.7627 26.1875C28.7132 25.8734 29.223 24.8482 28.9058 23.8967ZM9.06316 26.2812C5.56478 26.2812 2.71895 23.4356 2.71895 19.9375C2.71895 16.8647 4.91563 14.2989 7.82037 13.7184L7.36948 11.0449C3.17551 11.8379 0 15.5139 0 19.9375C0 24.9428 4.05746 29 9.06316 29C13.4475 29 17.1011 25.8865 17.9451 21.75H15.1638C14.3255 24.3611 11.9294 26.2812 9.06316 26.2812ZM10.8758 5.4375C12.3774 5.4375 13.5947 4.22029 13.5947 2.71875C13.5947 1.21721 12.3769 0 10.8758 0C9.37471 0 8.15684 1.21721 8.15684 2.71875C8.15684 4.22029 9.37471 5.4375 10.8758 5.4375Z" fill="currentColor"/>\n</svg>'},Symbol.toStringTag,{value:"Module"})),i3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M32.4635 16.4726H8.95498L23.0255 4.25832C23.2505 4.06144 23.1139 3.69582 22.8166 3.69582H19.2608C19.1041 3.69582 18.9554 3.75207 18.8389 3.85251L3.65542 17.0271C3.51636 17.1476 3.40483 17.2966 3.3284 17.464C3.25196 17.6315 3.2124 17.8133 3.2124 17.9974C3.2124 18.1814 3.25196 18.3633 3.3284 18.5307C3.40483 18.6981 3.51636 18.8471 3.65542 18.9677L18.9273 32.2226C18.9876 32.2748 19.0599 32.303 19.1362 32.303H22.8126C23.1099 32.303 23.2465 31.9333 23.0215 31.7405L8.95498 19.5262H32.4635C32.6402 19.5262 32.7849 19.3815 32.7849 19.2047V16.794C32.7849 16.6172 32.6402 16.4726 32.4635 16.4726Z" fill="white"/>\n</svg>\n'},Symbol.toStringTag,{value:"Module"})),a3e=Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='11'%20cy='11'%20r='11'%20fill='%23E7F1F7'/%3e%3ccircle%20cx='11.0002'%20cy='10.9999'%20r='6.61538'%20fill='%23396FE5'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e"},Symbol.toStringTag,{value:"Module"})),s3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg width="21" height="20" viewBox="0 0 21 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.36016 17.7535C6.43073 18.1345 6.36016 18.4258 6.17199 18.6051C5.98381 18.7843 5.6545 18.8292 5.27816 18.7395L0.691401 17.4622C-0.0848194 17.2605 -0.22595 16.6555 0.362095 16.1401L1.60875 15.042C1.58523 15.0196 1.58523 14.9972 1.56171 14.9748C-0.978649 10.8964 -0.0848196 5.80955 3.39641 2.73953C3.91389 2.26894 4.50194 1.86558 5.13702 1.48462C6.71299 0.588264 8.43008 0.140085 10.1472 0.117676V1.59667C8.71234 1.64149 7.25399 2.02244 5.93677 2.76193C5.39576 3.07566 4.90181 3.4342 4.45489 3.81516C1.53819 6.39219 0.761966 10.6051 2.76132 14.0112L4.0315 12.8908C4.61954 12.3754 5.23111 12.5547 5.39576 13.2941L6.36016 17.7535ZM15.6278 6.70591C15.7924 7.44541 16.404 7.62468 16.992 7.10927L18.2622 5.98883C20.2616 9.39499 19.4853 13.6079 16.5922 16.1849C16.1452 16.5883 15.6513 16.9244 15.1103 17.2381C13.7931 18 12.3347 18.3586 10.8999 18.4034V19.8824C12.617 19.8376 14.3341 19.3894 15.91 18.5154C16.5451 18.1569 17.1332 17.7311 17.6506 17.2605C21.1083 14.1905 21.9786 9.10367 19.4383 5.04765C19.4148 5.02524 19.4148 5.00283 19.3913 4.98042L20.6379 3.88238C21.226 3.36698 21.0848 2.76193 20.3086 2.56025L15.7218 1.30535C15.3455 1.19331 15.0162 1.26053 14.828 1.4398C14.6398 1.61908 14.5458 1.91039 14.6398 2.29135L15.6278 6.70591Z" fill="currentColor"/>\n</svg>\n'},Symbol.toStringTag,{value:"Module"})),o3e=Object.freeze(Object.defineProperty({__proto__:null,default:'<svg width="24" height="24" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M23.3111 5.74765C23.3048 7.25788 22.0259 8.47682 20.4559 8.47028C18.8858 8.46374 17.6171 7.23418 17.6234 5.72394C17.6297 4.21371 18.9086 2.99477 20.4787 3.00131C22.0487 3.00785 23.3174 4.23741 23.3111 5.74765ZM15.6027 14.335C15.5493 14.3576 15.49 14.3801 15.4365 14.4027L14.7837 14.6791C13.8762 15.0627 13.1628 15.7662 12.7918 16.6476L12.7015 16.8637C12.3089 17.7964 11.2038 18.2476 10.2331 17.8675C9.26247 17.4875 8.79409 16.4259 9.18665 15.4932L9.27701 15.2771C10.0184 13.5198 11.4457 12.1073 13.2548 11.34L13.9076 11.0636C15.1445 10.5446 16.4254 10.2765 17.8236 10.2823C20.4661 10.2933 22.8414 11.83 23.8448 14.1756L24.6951 16.2757L26.0079 16.8907C26.9421 17.3447 27.3167 18.44 26.8449 19.3382C26.3731 20.2363 25.2341 20.5962 24.2998 20.1422L22.7211 19.378C22.1121 19.0792 21.6343 18.5816 21.3761 17.9766L20.8128 16.664L19.6538 20.3906L22.5736 23.4849C22.8922 23.8223 23.1215 24.2277 23.2323 24.6726L24.5731 29.9193C24.8238 30.9003 24.2035 31.8889 23.1894 32.124C22.1693 32.3647 21.1409 31.7679 20.8428 30.7925L19.6077 25.7627L15.4431 21.353C14.5701 20.4321 14.1962 19.1487 14.5864 17.9483L15.6027 14.335ZM12.1328 25.6404L13.6265 22.0917C13.7531 22.2631 13.8899 22.4232 14.0397 22.5834L16.4406 25.1228L15.5729 27.1815C15.4292 27.5284 15.2146 27.8408 14.941 28.096L11.2726 31.5958C10.5291 32.3048 9.32871 32.2998 8.59121 31.5846C7.85382 30.8694 7.85862 29.7186 8.60194 29.0096L12.1328 25.6404Z"\n fill="currentColor" />\n</svg>'},Symbol.toStringTag,{value:"Module"}));function l3e(e,t,n=!1){if(n)return 1===t?"float":`vec${t}`;switch(e){case"uint8":case"uint16":case"uint32":return 1===t?"uint":`uvec${t}`;case"sint8":case"sint16":case"sint32":return 1===t?"int":`ivec${t}`;default:return 1===t?"float":`vec${t}`}}function u3e(e,t,n=!1){let r;if(n)switch(e){case"uint8":r="unorm8";break;case"sint8":r="snorm8";break;case"uint16":r="unorm16";break;case"sint16":r="snorm16";break;case"float32":r="float32";break;default:throw new Error(`Unsupported normalized vertex format for ${e}`)}else r=e;return 1===t?r:3!==t||r.startsWith("float32")||r.endsWith("32")?`${r}x${t}`:`${r}x3-webgl`}function c3e(e){switch(e[0]){case"u":return"0u";case"s":return"0";default:return"0."}}function h3e(e){switch(e){case"uint8":return"r8uint";case"sint8":return"r8sint";case"uint16":return"r16uint";case"sint16":return"r16sint";case"uint32":return"r32uint";case"sint32":return"r32sint";case"float32":return"r32float";default:throw new Error(`Unsupported WebGL gather texture format for ${e}`)}}const d3e=new Cye;function p3e({module:e,elementWise:t=!1,expression:n,inputs:r,output:i,operationType:a=i.type,outputBuffer:s}){const o=s.device,l=g3e("result",i.type,i.size,i.normalized),u=[e,l],c=[],h={},d=l3e(i.type,1,i.normalized),p=l3e(a,1,i.normalized);let f="",m=null;const g={TYPE:p,RESULT_LEN:i.size.toString()},A=function(e){return Array.isArray(e)?e.map((e,t)=>[`x${t}`,e]):Object.entries(e)}(r);for(const[x,_]of A)u.push(f3e(x,_.type,_.size,_.normalized,a)),c.push(m3e(x,_)),_ instanceof bDe?h[x]=_.buffer:(m=m||vDe.createOrReuse(o,s.byteLength),h[x]=m),f+=`TYPE ${x}[${_.size}]; get_${x}(${x});\n`,g[`${x.toUpperCase()}_LEN`]=_.size.toString();let y="";if(n)for(let x=0;x<i.size;x++)y+=`result[${x}]=${n(x)};\n`;else if(t)for(let x=0;x<i.size;x++){const t=c3e(p),n=A.map(([e,n])=>x<n.size?`${e}[${x}]`:t);y+=`result[${x}]=${e.name}(${n.join(", ")});\n`}else y=`${e.name}(${A.map(([e])=>e).join(", ")}, result);`;const v=`#version 300 es\n\nvoid main() {\n${f}\n${d} result[${i.size}];\n${y}\nset_result(result);\n}\n `,b=new nCe(o,{vs:v,shaderAssembler:d3e,defines:g,modules:u,bufferLayout:c,vertexCount:1,instanceCount:i.length,attributes:h,feedbackBufferMode:"interleaved",outputs:l.varyings});o.statsManager.getStats("GPGPU Operation Counts").get("Transform Runs").incrementCount(),b.run({inputBuffers:h,outputBuffers:{[l.varyings[0]]:0===i.offset?s:{buffer:s,byteOffset:i.offset,byteLength:i.byteLength}}}),m&&vDe.recycle(m)}function f3e(e,t,n,r=!1,i=t){let a="",s="";for(let o=0;o<n;o+=4){const l=Math.min(n-o,4);a+=`in ${l3e(t,l,r)} a${e}_${o};\n`;for(let n=0;n<l;n++){let a=`a${e}_${o}`;l>1&&(a=`${a}[${n}]`),(r||t!==i)&&(a=`TYPE(${a})`),s+=`v[${o+n}]=${a};\n`}}return{name:e,vs:`\n${a}\nvoid get_${e}(out TYPE v[${n}]) {\n ${s}\n}\n`}}function m3e(e,t){const n={name:e,stepMode:t.isConstant?"vertex":"instance",byteStride:t.stride,attributes:[]};for(let r=0;r<t.size;r+=4){const i=Math.min(t.size-r,4);n.attributes.push({attribute:`a${e}_${r}`,format:u3e(t.type,i,t.normalized),byteOffset:t.offset+t.ValueType.BYTES_PER_ELEMENT*r})}return n}function g3e(e,t,n,r=!1){const i=[],a=l3e(t,1,r);let s="",o="";for(let l=0;l<n;l+=4){const a=Math.min(n-l,4),u=l3e(t,a,r);i.push(`${e}_${l}`),s+=`flat out ${u} ${e}_${l};\n`;const c=Array.from({length:a},(e,t)=>l+t);o+=`${e}_${l} = ${u}(${c.map(e=>`v[${e}]`).join(",")});\n`}return{name:e,varyings:i,vs:`\n${s}\nvoid set_${e}(in ${a} v[${n}]) {\n ${o}\n}\n`}}const A3e=({inputs:e,output:t,target:n})=>{const r=t.type,i=l3e(r,1,t.normalized),a=c3e(i),s=e.namedInputs;return p3e({module:{name:"arithmetic",dependencies:[hbe],vs:"TYPE arithmetic_add(TYPE x, TYPE y) {\n return x + y;\n}\n\nTYPE arithmetic_subtract(TYPE x, TYPE y) {\n return x - y;\n}\n\nTYPE arithmetic_multiply(TYPE x, TYPE y) {\n return x * y;\n}\n\nTYPE arithmetic_divide(TYPE x, TYPE y) {\n return x / y;\n}\n\nfloat arithmetic_tan(float x) {\n return tan_fp32(x);\n}\n"},inputs:s,output:t,operationType:r,outputBuffer:n,expression:t=>UDe(e.expression,{operations:MDe,inputs:s,laneIndex:t,formatInput:e=>`${e}[${t}]`,formatOutOfBoundsInput:e=>1===s[e].size?`${e}[0]`:a,formatLiteral:e=>{const n=Array.isArray(e)?e[t]??0:e;return`${i}(${function(e,t){switch(e){case"uint8":case"uint16":case"uint32":return`${Math.trunc(t)}u`;case"sint8":case"sint16":case"sint32":return`${Math.trunc(t)}`;default:return Number.isInteger(t)?`${t}.0`:`${t}`}}(r,n)})`},formatCall:(e,t)=>`${e}(${t.join(", ")})`})}),{success:!0}},y3e=3e38;const v3e=`#define LE ${function(){const e=new Uint16Array([255]);return new Uint8Array(e.buffer)[0]>0}()?1:0}\nconst uint F32_NAN = 0xffffffffu;\nconst uint F32_INF = 0x7f800000u;\n\n// Find first set bit using binary search\n// https://en.wikipedia.org/wiki/Find_first_set#CLZ\nint countLeadingZeros(uint a) {\n if (a == 0u) return 32;\n int n = 0;\n if ((a & 0xffff0000u) == 0u) { n += 16; a = a << 16; }\n if ((a & 0xff000000u) == 0u) { n += 8; a = a << 8; }\n if ((a & 0xf0000000u) == 0u) { n += 4; a = a << 4; }\n if ((a & 0xc0000000u) == 0u) { n += 2; a = a << 2; }\n if ((a & 0x80000000u) == 0u) return n + 1;\n return n;\n}\n\nuint roundShiftRight(uint value, int shift) {\n if (shift <= 0) {\n return value << (-shift);\n }\n\n if (shift >= 32) {\n if (shift == 32 && value > 0x80000000u) {\n return 1u;\n }\n return 0u;\n }\n\n uint truncated = value >> shift;\n uint halfShift = 1u << (shift - 1);\n uint remainder = value & ((1u << shift) - 1u);\n if (remainder > halfShift || (remainder == halfShift && (truncated & 1u) == 1u)) {\n return truncated + 1u;\n }\n return truncated;\n}\n\nuint makeFloat_(uint sign, int exponent, uint mantissa) {\n return (sign << 31) | (uint(exponent + 127) << 23) | (mantissa & 0x7fffffu);\n}\n\n/**\n * Assemble a float32 in bit representation according to IEEE 754\n * https://en.wikipedia.org/wiki/Single-precision_floating-point_format\n */\nuint makeFloat(uint sign, int exponent, uint significand) {\n if (significand == 0u) {\n return sign << 31;\n }\n\n // Remove any extra leading zeros for better precision\n int lead_zeros = countLeadingZeros(significand);\n // Significand is encoded as 1.fraction\n int normalizedExponent = exponent + 31 - lead_zeros;\n\n if (normalizedExponent > 127) {\n return (sign << 31) | F32_INF;\n }\n\n uint mantissa;\n if (normalizedExponent >= -126) {\n mantissa = roundShiftRight(significand, 8 - lead_zeros);\n if (mantissa >= 0x1000000u) {\n mantissa >>= 1;\n normalizedExponent++;\n if (normalizedExponent > 127) {\n return (sign << 31) | F32_INF;\n }\n }\n return makeFloat_(sign, normalizedExponent, mantissa);\n }\n\n int subnormalShift = -149 - exponent;\n mantissa = roundShiftRight(significand, subnormalShift);\n if (mantissa >= 0x800000u) {\n return (sign << 31) | (1u << 23);\n }\n return (sign << 31) | mantissa;\n}\n\n/**\n * Parse 8-byte memory as a float64 number according to IEEE 754\n * https://en.wikipedia.org/wiki/Double-precision_floating-point_format\n * Returns 8-byte memory as 2 float32 numbers, consisting of\n * high part: fround(d)\n * low part: d - fround(d)\n */\nuvec2 parseAsDouble(uvec2 d) {\n #if LE\n d = d.yx; // to big endian\n #endif\n\n uint sign = (d[0] >> 31) & 1u; // first bit\n uint exponentBits = (d[0] >> 20) & 0x7ffu;\n int exponent = int(exponentBits) - 1023; // next 11 bits\n uint fractionHigh = d[0] & 0xfffffu;\n uint fractionLow = d[1];\n\n if (exponentBits == 0x7ffu) {\n if (fractionHigh == 0u && fractionLow == 0u) {\n return uvec2((sign << 31) | F32_INF, F32_NAN);\n }\n return uvec2(F32_NAN);\n }\n \n if (exponentBits == 0u) {\n // All float64 subnormals are too small to survive a float32 split.\n return uvec2(sign << 31);\n }\n\n if (exponent > 127) {\n return uvec2((sign << 31) | F32_INF, ((1u - sign) << 31) | F32_INF);\n }\n\n uint hi_part;\n uint low_part;\n\n // float64 significand has 52 bits\n // float32 significand has 23 bits\n // The significand of the high part is the significand of the double, trimmed\n uint f_hi = 0x800000u | (fractionHigh << 3) | (fractionLow >> 29);\n uint f_low = fractionLow & 0x1fffffffu;\n\n if (exponent < -126) {\n // For tiny normals, the top 24 significand bits still contribute to the float32\n // high part, but they land in the float32 subnormal range.\n hi_part = makeFloat(sign, exponent - 23, f_hi);\n\n // The residual keeps the remaining 29 significand bits at the original double scale.\n low_part = makeFloat(sign, exponent - 52, f_low);\n return uvec2(hi_part, low_part);\n }\n\n bool roundUp = f_low > 0x10000000u || (f_low == 0x10000000u && (f_hi & 1u) == 1u);\n\n uint f_rounded = f_hi + (roundUp ? 1u : 0u);\n int exponent_hi = exponent;\n if (f_rounded == 0x1000000u) {\n f_rounded = 0x800000u;\n exponent_hi++;\n }\n\n if (exponent_hi > 127) {\n // Overflows float32 limit\n hi_part = (sign << 31) | F32_INF;\n low_part = ((1u - sign) << 31) | F32_INF;\n return uvec2(hi_part, low_part);\n }\n \n hi_part = makeFloat_(sign, exponent_hi, f_rounded);\n\n int remainder = int(f_low);\n uint sign_low = sign;\n if (roundUp) {\n remainder -= 0x20000000;\n }\n if (remainder < 0) {\n sign_low = 1u - sign;\n remainder = -remainder;\n }\n low_part = makeFloat(sign_low, exponent - 52, uint(remainder));\n\n return uvec2(hi_part, low_part);\n}\n\nvoid fround(in uint x[X_LEN], out float result[X_LEN]) {\n int n = X_LEN / 2;\n for (int i = 0; i < n; i++) {\n uvec2 f = parseAsDouble(uvec2(x[i * 2], x[i * 2 + 1]));\n result[i] = uintBitsToFloat(f.x);\n result[i + n] = uintBitsToFloat(f.y);\n }\n}\n`;function b3e(e,t,n){const r=function(e){switch(e){case"uint32":return"usampler2D";case"sint32":return"isampler2D";case"float32":return"sampler2D";default:throw new Error(`Unsupported WebGL gather sampler type for ${e}`)}}(n),i=l3e(t,1),a=Array.from({length:e.size},(e,t)=>` v[${t}] = ${i}(texelFetch(source_values_texture, ivec2(${t}, rowIndex), 0).r);`).join("\n");return{name:"source_values_texture",vs:`\nuniform highp ${r} source_values_texture;\nvoid read_source_values(int rowIndex, out TYPE v[${e.size}]) {\n${a}\n}\n`}}function x3e(e,t,n){const r=n.createTexture({width:Math.max(e.size,1),height:e.length,format:h3e(t),usage:Kme.SAMPLE|Kme.COPY_DST});if(0===e.length)return r;const i=n.createCommandEncoder();return i.copyBufferToTexture({sourceBuffer:e.buffer,destinationTexture:r,byteOffset:e.offset,bytesPerRow:e.stride,rowsPerImage:e.length,size:[e.size,e.length,1]}),n.submit(i.finish()),r}function _3e(e,t){const n=l3e(e.type,1);let r="aids_0";return e.type!==function(e){switch(e){case"uint":return"uint32";case"int":return"sint32";default:return"float32"}}(t)&&(r=`${t}(${r})`),{name:"ids",vs:`\nin ${n} aids_0;\nvoid get_ids(out INDEX_TYPE v[1]) {\n v[0] = ${r};\n}\n`}}function w3e(e){return{name:"ids",stepMode:e.isConstant?"vertex":"instance",byteStride:e.stride,attributes:[{attribute:"aids_0",format:u3e(e.type,1,e.normalized),byteOffset:e.offset}]}}function E3e(e){return{name:"gather",vs:`\nvoid zero_result(out TYPE result[RESULT_LEN]) {\n for (int i = 0; i < RESULT_LEN; i++) {\n result[i] = ${c3e(e)};\n }\n}\n\nvoid gather(in INDEX_TYPE ids[1], out TYPE result[RESULT_LEN]) {\n int sourceIndex = int(ids[0]);\n if (sourceIndex < 0 || sourceIndex >= SOURCE_VALUES_ROWS) {\n zero_result(result);\n return;\n }\n read_source_values(sourceIndex, result);\n}\n`}}function C3e(e,t,n,r){return n<t.size?`${e}[${n}]`:1===t.size?`${e}[0]`:r}const S3e=Object.freeze(Object.defineProperty({__proto__:null,arithmetic:A3e,dot:({inputs:e,output:t,target:n})=>(p3e({module:{name:"row_dot",vs:"void row_dot(in TYPE x[X_LEN], in TYPE y[Y_LEN], out float result[1]) {\n float sum = 0.0;\n for (int i = 0; i < X_LEN; i++) {\n sum += float(x[i]) * float(y[i]);\n }\n result[0] = sum;\n}\n"},inputs:e,output:t,operationType:"float32",outputBuffer:n}),{success:!0}),equalAll:({inputs:e,output:t,target:n})=>(p3e({module:{name:"equalAll",vs:"void equalAll(in TYPE x[X_LEN], in TYPE y[Y_LEN], out uint result[1]) {\n uint allEqual = uint(1);\n for (int i = 0; i < X_LEN; i++) {\n if (x[i] != y[i]) {\n allEqual = uint(0);\n break;\n }\n }\n result[0] = allEqual;\n}\n"},inputs:e,output:t,operationType:"uint32"===t.type?e.x.type:t.type,outputBuffer:n}),{success:!0}),extent:({inputs:e,output:t,target:n})=>{const{sourceValues:r}=e,i=n.device;if(0===r.length){const e=new t.ValueType(t.length*t.size);return n.write(e),{success:!0,value:e}}if(r.isConstant){const e=r.value,i=new t.ValueType(t.length*t.size);for(let n=0;n<t.length;n++){const t=e[n];i[2*n]=t,i[2*n+1]=t}return n.write(i),{success:!0,value:i}}const a=i.createTexture({width:1,height:t.length,format:"rg32float",usage:Kme.RENDER|Kme.COPY_SRC|Kme.COPY_DST}),s=i.createFramebuffer({colorAttachments:[a]}),o=new WEe(i,{vs:"#version 300 es\n\nflat out float extent_value;\n\nvoid main() {\n float sourceValues[SOURCE_VALUES_LEN];\n get_sourceValues(sourceValues);\n extent_value = sourceValues[gl_VertexID];\n\n float y = (float(gl_VertexID) + 0.5) / float(CHANNEL_COUNT) * 2.0 - 1.0;\n gl_Position = vec4(0.0, y, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n ",fs:"#version 300 es\n\nprecision highp float;\n\nflat in float extent_value;\nout vec2 fragColor;\n\nvoid main() {\n fragColor = vec2(-extent_value, extent_value);\n}\n ",topology:"point-list",parameters:{depthCompare:"always",blend:!0,blendColorSrcFactor:"one",blendColorDstFactor:"one",blendColorOperation:"max",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one",blendAlphaOperation:"max"},modules:[f3e("sourceValues",r.type,r.size,r.normalized)],defines:{TYPE:"float",SOURCE_VALUES_LEN:r.size.toString(),CHANNEL_COUNT:t.length.toString()},attributes:{sourceValues:r.buffer},bufferLayout:[m3e("sourceValues",r)],instanceCount:r.length,vertexCount:t.length,disableWarnings:!0}),l=vDe.createOrReuse(i,t.byteLength);try{const e=i.beginRenderPass({framebuffer:s,parameters:{viewport:[0,0,1,t.length]},clearColor:[-y3e,-y3e,0,0],clearDepth:!1,clearStencil:!1});i.statsManager.getStats("GPGPU Operation Counts").get("Transform Runs").incrementCount(),o.draw(e),e.end();const r=i.createCommandEncoder();return r.copyTextureToBuffer({sourceTexture:a,width:1,height:t.length,destinationBuffer:l,byteOffset:0,bytesPerRow:8}),i.submit(r.finish()),A3e({device:i,inputs:{expression:{kind:"call",op:"multiply",args:[{kind:"input",name:"x"},{kind:"literal",value:[-1,1]}]},namedInputs:{x:new bDe({buffer:l,size:2,type:"float32",length:t.length})}},output:t,target:n})}finally{o.destroy(),vDe.recycle(l),s.destroy(),a.destroy()}},fround:({inputs:e,output:t,target:n})=>(p3e({module:{name:"fround",vs:v3e},inputs:e,output:t,operationType:"uint32",outputBuffer:n}),{success:!0}),gather:async({inputs:e,output:t,target:n})=>{const{ids:r,sourceValues:i}=e,a=n.device,s=g3e("result",t.type,t.size),o=l3e(r.type,1),l=l3e(t.type,1),u=t.type,c=x3e(i,u,a),h=`#version 300 es\n\nvoid main() {\n INDEX_TYPE ids[1];\n get_ids(ids);\n TYPE result[${t.size}];\n gather(ids, result);\n set_result(result);\n}\n `,d=new nCe(a,{vs:h,defines:{INDEX_TYPE:o,TYPE:l,RESULT_LEN:t.size.toString(),SOURCE_VALUES_ROWS:i.length.toString()},modules:[_3e(r,o),b3e(i,t.type,u),E3e(t.type),s],bindings:{source_values_texture:c},bufferLayout:[w3e(r)],vertexCount:1,instanceCount:t.length,feedbackBufferMode:"interleaved",outputs:s.varyings});try{return d.run({inputBuffers:{ids:r.buffer},outputBuffers:{[s.varyings[0]]:n}}),{success:!0}}finally{d.destroy(),c.destroy()}},interleave:({inputs:e,output:t,target:n})=>{const r=e.map((e,t)=>[`x${t}`,e]);!function(e,t){const n=t.reduce((e,[,t])=>e+Math.ceil(t.size/4),0);if(n>e)throw new Error(`interleave() requires ${n} vertex attributes, exceeding device limit ${e}`)}(n.device.limits.maxVertexAttributes,r),function(e,t){if(t.size>e)throw new Error(`interleave() output size ${t.size} exceeds device inter-stage component limit ${e}`)}(n.device.limits.maxInterStageShaderVariables,t);const i=r.map(([e,t])=>`in TYPE ${e}[${t.size}]`).join(", ");let a=0;const s=r.map(([e,t])=>{const n=Array.from({length:t.size},(t,n)=>` result[${a+n}] = ${e}[${n}];`).join("\n");return a+=t.size,n}).join("\n");return p3e({module:{name:"interleave",vs:`void interleave(${i}, out TYPE result[RESULT_LEN]) {\n${s}\n}\n`},inputs:e,output:t,outputBuffer:n}),{success:!0}},length:({inputs:e,output:t,target:n})=>(p3e({module:{name:"row_length",vs:"void row_length(in TYPE x[X_LEN], out float result[1]) {\n float sum = 0.0;\n for (int i = 0; i < X_LEN; i++) {\n sum += float(x[i]) * float(x[i]);\n }\n result[0] = sqrt(sum);\n}\n"},inputs:e,output:t,operationType:"float32",outputBuffer:n}),{success:!0}),segmentedMap:async({inputs:e,output:t,target:n})=>{const{segments:r}=e,i=n.device,a=g3e("result",t.type,t.size),s=r.type,o=x3e(r,s,i),l=new nCe(i,{vs:"#version 300 es\n\nvoid main() {\n TYPE result[RESULT_LEN];\n segmentedMap(result);\n set_result(result);\n}\n",defines:{TYPE:"uint",RESULT_LEN:t.size.toString(),SEGMENTS_LENGTH:r.length.toString()},modules:[b3e(r,t.type,s),{name:"segmentedMap",vs:"\nuint read_segment_start(int segmentIndex) {\n TYPE value[1];\n read_source_values(segmentIndex, value);\n return uint(value[0]);\n}\n\nvoid segmentedMap(out TYPE result[RESULT_LEN]) {\n uint vertexIndex = uint(gl_InstanceID);\n int low = 0;\n int high = SEGMENTS_LENGTH;\n\n while (low < high) {\n int mid = low + (high - low) / 2;\n uint midStart = read_segment_start(mid);\n if (midStart <= vertexIndex) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n\n uint segmentIndex = uint(max(low - 1, 0));\n uint segmentStart = read_segment_start(int(segmentIndex));\n result[0] = segmentIndex;\n result[1] = vertexIndex - segmentStart;\n}\n"},a],bindings:{source_values_texture:o},vertexCount:1,instanceCount:t.length,feedbackBufferMode:"interleaved",outputs:a.varyings});try{return l.run({outputBuffers:{[a.varyings[0]]:n}}),{success:!0}}finally{l.destroy(),o.destroy()}},select:async({inputs:e,output:t,target:n})=>{const r=c3e(l3e(t.type,1,t.normalized));return p3e({module:{name:"select",vs:""},inputs:e,output:t,operationType:t.type,outputBuffer:n,expression:t=>{const n=C3e("condition",e.condition,t,r),i=C3e("whenTrue",e.whenTrue,t,r),a=C3e("whenFalse",e.whenFalse,t,r);return`(${n} != ${r} ? ${i} : ${a})`}}),{success:!0}},sequence:({inputs:e,output:t,target:n})=>{const r=g3e("result",t.type,t.size),i=new nCe(n.device,{vs:"#version 300 es\n\nvoid main() {\n int result[1];\n result[0] = START + gl_InstanceID * STEP;\n set_result(result);\n}\n",defines:{START:e.start.toString(),STEP:e.step.toString()},modules:[r],vertexCount:1,instanceCount:t.length,feedbackBufferMode:"interleaved",outputs:r.varyings});try{return i.run({outputBuffers:{[r.varyings[0]]:n}}),{success:!0}}finally{i.destroy()}},swizzle:({inputs:e,output:t,target:n})=>{const{columns:r}=e;return p3e({module:{name:"swizzle",vs:"// swizzle expression handled inline"},expression:e=>`x[${r[e]}]`,inputs:{x:e.x},output:t,outputBuffer:n}),{success:!0}}},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});
499
499
 
500
- //# debugId=b502fcef-edbc-5faf-b1de-e748059e34ac
500
+ //# debugId=44e794d3-6f08-54de-b652-848528f55dc5