@perceptimagery/dita-configurator-staging 1.2.2128 → 1.2.2201

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 (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* (c) 2023, Abhishek Deb (vikz91.deb@gmail.com) */
2
2
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Work+Sans:wght@200;300;400;500;600;700;800&display=swap";#Sprie-config-html{font-size:87.5%}#Sprie-config-html,#Sprie-config-body{width:100%;height:100%;margin:0;padding:0;font-family:Work Sans,sans-serif;box-sizing:border-box}#Sprie-config-body *{box-sizing:border-box;margin:0;padding:0}.sprie-config-sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sprie-config-loadingBox{position:fixed;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:24px;font-weight:500;z-index:10000;background:#f2f2f2}.drawer.drawer--full.hidden-phone.lens-customizer .drawer__header{display:none!important}.drawer.drawer--full.hidden-phone.lens-customizer .drawer__content.drawer__content--padded-start{padding-top:0!important}.drawer.drawer--full.hidden-phone.lens-customizer #dita-3dconfig-element{height:100%!important}.popover.hidden-lap-and-up.popover-full .popover__header{display:none!important}#sprie-config-main-container{width:100%;height:100%}#sprie-config-main-header{border-bottom:.5px solid #aeaeae;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:.5rem}.sprie-config-main-header-close{position:absolute;right:2%;width:3rem;height:3rem;background-color:transparent;border:none}#sprie-config-header-content{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.5rem}#sprie-config-header-content .sprie-config-mainHeader-frameName{color:#373737;font-size:1.3rem;font-weight:400;line-height:1.5275rem;letter-spacing:-.05rem;text-transform:uppercase}#sprie-config-viewer-container{position:relative;width:100%;img {position: absolute; top: 2rem; left: 2rem;}}.sprie-config-loadingFrame{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:24px;font-weight:500;z-index:1000;background:#fafafa;opacity:.7}.sprie-config-loader{border:8px solid #222222;width:60px;padding:8px;aspect-ratio:1;border-radius:50%;background:#222222;--_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;-webkit-mask:var(--_m);mask:var(--_m);-webkit-mask-composite:source-out;mask-composite:subtract;animation:spin 1s infinite linear}@keyframes spin{to{transform:rotate(1turn)}}#Sprie-config-Cust-block{display:flex;align-items:center;background-color:#f2f2f2;border-top:1px solid #91847e;position:relative;flex-grow:1}.sprie-config-price-block{position:absolute;bottom:100%;right:0;z-index:1000;display:flex;flex-direction:column;align-items:end;gap:.4rem;p {font-size: 1.5rem; font-weight: 500; color: #121212;}}.frameName{color:#4d4d4d;font-size:.875rem;font-weight:500;line-height:1.5275rem;letter-spacing:-.05rem;text-transform:uppercase}.price-tag{color:#222;font-size:1.3125rem;font-weight:400;line-height:2.275rem}@media (max-width: 576px){#Sprie-config-Viewer-Container{img {position: absolute; top: 1.2rem; left: 1.2rem;}}#Sprie-config-Cust-block{display:flex;align-items:center}.popover__content.threedConfig{height:100%;width:100%;padding:0}.popover.hidden-lap-and-up.popover-full[open]{transform:translateY(8.5%)}}.sprie-config-palette{overflow-y:hidden;height:100%;display:flex;justify-content:flex-start;overflow-x:auto}.sprie-config-palette-img-box{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;height:50%}.sprie-config-palette-img-box .sprie-config-image{width:60px;height:60px}.sprie-config-palette-img-box .sprie-config-image.mobile-view{width:45px;height:45px}.sprie-config-palette-img-box>button{background-color:transparent}.sprie-config-palette-img-text{top:80%;width:175%;height:150%;position:absolute;text-align:center;z-index:100}.sprie-config-palette-img-text .sprie-config-palette-imgName{z-index:100}.sprie-config-palette-img-text .sprie-config-price-tag{text-align:center;font-size:small;white-space:nowrap;z-index:100}.sprie-config-engraving-block{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:.8rem}.sprie-config-engraving-checkbox[type=checkbox]{width:1rem;height:1rem;accent-color:#000;border:.25rem solid #000;border-radius:.5rem;background-color:transparent}.sprie-config-engraving-inputField-block{width:25rem;position:relative}.sprie-config-engraving-inputField{width:100%;font-size:.8rem;font-weight:500;background:transparent;border-width:1px}.sprie-config-engraving-inputInfo{position:absolute;white-space:nowrap;font-size:.6rem;bottom:.2rem;right:.4rem;color:#686868}.sprie-config-engraving-link{position:absolute;background-color:transparent;border:none;white-space:nowrap;font-size:.7rem;bottom:-1.7rem;right:0;color:#686868;text-decoration:underline;cursor:pointer}@media (max-width: 576px){.sprie-config-engraving-inputField-block{width:70%}}.carousel{position:relative;overflow:hidden;width:100%;height:100%;display:flex;flex-direction:column;align-items:center}.carousel-container{width:90%;height:100%;display:flex;position:relative;overflow:hidden}.carousel-item{display:flex;align-items:start;justify-content:center;min-width:100%;height:100%;transition-property:transform;transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.5s}.carousel-header{display:flex;align-items:center;justify-content:center;gap:2rem}.carousel-header .step-syntax{font-size:1rem;font-weight:400;line-height:1.5rem;color:#4d4d4d}.carousel-header .select-syntax{font-size:1rem;font-weight:600;line-height:1.5rem;color:#91847e}.carousel-btn{border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:transparent}.arrow{border:solid #91847e;border-width:0 3px 3px 0;display:inline-block}.right-arrow{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.left-arrow{transform:rotate(135deg);-webkit-transform:rotate(135deg)}.step-tracker-block{padding:1%!important;display:flex;flex-direction:column;justify-content:center;align-items:center;border-bottom:1px solid #aeaeae;width:26.25rem}.step-tracker{display:flex;gap:1rem}.step-circle{width:10px;height:10px;border-radius:50%;border:1px solid #7d7d7d;background-color:transparent;display:flex;justify-content:center;align-items:center;margin-right:10px;font-size:14px}.step-circle.active{background-color:#000;border-color:#000}@media (max-width: 576px){.carousel-container{align-items:start;height:70%;width:100%}.step-tracker-block{width:100%}}.sprie-config-add-to-cart-block{width:14.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.5rem}.sprie-config-add-to-cart-btn{width:100%;height:2.75rem;background-color:#000;display:flex;align-items:center;justify-content:center;cursor:pointer;border:0;font-size:.875rem;letter-spacing:.1rem;font-weight:500;color:#fff}#Sprie-Config-return-policy-label{display:flex;justify-content:center;width:16rem;p {font-size: .8rem; margin: .05rem .08rem .05rem .5rem;}}#Sprie-Config-return-policy-checkbox[type=checkbox]{align-self:center;width:1rem;height:1rem;accent-color:#000;border:.25rem solid #000;border-radius:.5rem;background-color:#efefef}.sprie-config-add-to-cart-btn:disabled,.sprie-config-add-to-cart-btn [disabled]{background-color:#504f4f;cursor:default}@media (max-width: 576px){.sprie-config-add-to-cart-block{width:100%}.sprie-config-add-to-cart-btn{width:100%;height:4rem}#Sprie-Config-return-policy-label{width:100%;margin-bottom:.5rem}}.sprie-3d-snap-button-block{position:absolute;top:1.5rem;right:2rem;display:flex;flex-direction:column}.sprie-3d-snap-button{cursor:pointer!important;border:none;font-size:.9rem;padding:.5rem 1.5rem!important;margin:.5rem 0rem!important;text-align:center}@media (max-width: 576px){.sprie-3d-snap-button-block{top:1rem;right:1.3rem;gap:0}.sprie-3d-snap-button{font-size:.7rem;padding:.3rem 1rem!important;margin:.2rem 0!important}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
3
- var KQ=Object.defineProperty;var JQ=(Wa,us,hs)=>us in Wa?KQ(Wa,us,{enumerable:!0,configurable:!0,writable:!0,value:hs}):Wa[us]=hs;var Rt=(Wa,us,hs)=>(JQ(Wa,typeof us!="symbol"?us+"":us,hs),hs);(function(){var mC,vC;"use strict";class Wa{constructor(e){Rt(this,"config");this.config=e}IsTokenExpired(){if(!this.config.EXPIRES)return!1;const e=this.config.EXPIRES;if(!e)return!0;const t=new Date().getTime(),i=new Date(e).getTime()-t;return e===""||i<=0}IsConfigExpired(){return this.LoadConfig(),!this.config.JWT||!this.config.ORGID}RequestOptions(e,t){return{method:e,headers:{...{Accept:"application/json","Content-Type":"application/json"},...this.config.JWT&&{Authorization:this.config.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.config.HOST+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.config.HOST+e,this.RequestOptions("POST",t||{}))).json()}StoreConfig(e){e.JWT&&(localStorage.setItem(`${this.config.STORE_PREFIX}jwtToken`,e.JWT),this.config.JWT=e.JWT),e.EXPIRES&&(localStorage.setItem(`${this.config.STORE_PREFIX}expires`,e.EXPIRES),this.config.EXPIRES=e.EXPIRES),e.ORGID&&(localStorage.setItem(`${this.config.STORE_PREFIX}orgId`,e.ORGID),this.config.ORGID=e.ORGID)}LoadConfig(){const e=localStorage.getItem(`${this.config.STORE_PREFIX}jwtToken`);e&&(this.config.JWT=e);const t=localStorage.getItem(`${this.config.STORE_PREFIX}orgId`);t&&(this.config.ORGID=t);const n=localStorage.getItem(`${this.config.STORE_PREFIX}expires`);return n&&(this.config.EXPIRES=n),this.config}}const us={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"sprie-embed-",host:"https://api.sprie.io"},hs=Object.freeze(us),H3="1.2.2128";function G3(r,e){const t=r.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...r.slice(0,t),...r.slice(t+1)]:r}class V3{constructor(e,t){Rt(this,"isAuthenticated");Rt(this,"fetcher");Rt(this,"shopifyAPI");Rt(this,"org");Rt(this,"apiKey");Rt(this,"dataVariants");this.isAuthenticated=!1,this.fetcher=e,this.shopifyAPI=t,this.dataVariants=[]}async Authenticate(e){if(this.fetcher.LoadConfig(),(this.fetcher.IsTokenExpired()||this.fetcher.IsConfigExpired())&&await this.AuthServiceApi(e),this.isAuthenticated=!(this.fetcher.IsTokenExpired()&&this.fetcher.IsConfigExpired()),this.org=this.fetcher.config.ORGID,this.apiKey=e,!this.isAuthenticated)throw new Error("Sprie Authentication failed!")}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await this.fetcher.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");this.fetcher.StoreConfig({...this.fetcher.config,JWT:n.access,ORGID:n.orgId,EXPIRES:n.expires})}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await this.fetcher.Get(t)}async FetchCustomisationList(e,t){const n=`/v1/widget/list-customisation?search=type:${e},org:${this.fetcher.config.ORGID},usage:customizer&limit=50`,i=await this.fetcher.Get(n),s=i.data.findIndex(h=>h.sku===`${e.toLowerCase()}-default`),o=i.data[s];return!t&&s>-1&&i.data.splice(s,1),{...i,data:t&&o?G3(i.data,o):i.data}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await this.fetcher.Get(t),i=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:i}}catch{throw new Error("Failed to download model asset.")}}async HandleAssetUsage(e){if(!this.fetcher.IsConfigExpired()&&e){const t={org:this.fetcher.config.ORGID,asset:e,timestamp:new Date().toISOString()},n="/v1/analytics/trigger";await this.fetcher.Post(n,t)}}async PopulateDataList(e){var n;const t=(n=document.querySelector(`#${e}`))==null?void 0:n.textContent;if(t){const i=await JSON.parse(t);return Object.values(i)[0]}return null}async HandleShopifyAddToCart(e,t){e.forEach(s=>{var l;const o=(l=s.properties)==null?void 0:l.customText;o&&(delete s.properties.customText,Object.assign(s.properties,{"custom-laser-etching":"Add Laser Engraving"}),Object.assign(s.properties,{"custom-text":o}),Object.assign(s.properties,{"This customized item cannot be returned or exchanged":"I agree"}),Object.assign(s.properties,{_uniqueTimestamp:t}))});let n={items:e,sections:"mini-cart"};const i=await this.shopifyAPI.Post(n);if(i){const s=await this.shopifyAPI.Get();document.querySelector("#shopify-section-mini-cart").outerHTML=i.sections["mini-cart"],document.querySelector(".header__cart-count").textContent=s.item_count;const o=document.querySelector(".drawer.drawer--full");o&&o.hasAttribute("open")&&o.removeAttribute("open");const l=document.querySelector(".popover.hidden-lap-and-up.popover-full");l&&l.hasAttribute("open")&&l.removeAttribute("open"),document.querySelector(".mini-cart.drawer.drawer--large").setAttribute("open","")}}}var Rp=(r=>(r.Init="init",r.Preparing="preparing",r.Authenticating="authenticating",r.Fetching="fetching",r.Loading="loading",r.Done="done",r))(Rp||{});class j3{constructor({log:e,logErr:t,apiService:n,metaData:i,config:s}){Rt(this,"log");Rt(this,"logErr");Rt(this,"metaData");Rt(this,"loaderName");Rt(this,"apiKey");Rt(this,"scriptStreamEncoderId");Rt(this,"rawNodeList");Rt(this,"targetNodeList");Rt(this,"status");Rt(this,"isLoaded");Rt(this,"loadCount");Rt(this,"mutationObserver");Rt(this,"config");Rt(this,"apiService");this.config=s,this.apiService=n,this.metaData=i,this.apiKey=null,this.scriptStreamEncoderId=`sprie-embed🔴${Date.now().toString()}`,this.rawNodeList=document.getElementsByClassName(this.metaData.targetClassName),this.targetNodeList=[],this.status=Rp.Init,this.isLoaded=!1,this.loadCount=0,this.loaderName="sprie-embed-loader",this.log=e.bind(this),this.logErr=t.bind(this),this.mutationObserver=null}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey&&(e==null||e.setAttribute("data-enc-stream-id",this.scriptStreamEncoderId))}async authenticate(){if(this.status=Rp.Authenticating,!this.apiService.isAuthenticated){if(!this.apiKey)throw new Error("Sprie: Unable to authenticate. Need APIKey.");await this.apiService.Authenticate(this.apiKey),this.apiService.isAuthenticated||this.logErr("Authentication failed! Check apikey and/or expiration.")}}async Init(){try{return this.scanApiKeyFromCurrentScriptTag(),await this.authenticate(),!0}catch(e){return this.log("SprieEmbed Loading failed."),this.logErr(e),this.isLoaded=!1,!1}}}function W3(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Y1={exports:{}},Uc={},q1={exports:{}},Et={};/**
3
+ var KQ=Object.defineProperty;var JQ=(Wa,us,hs)=>us in Wa?KQ(Wa,us,{enumerable:!0,configurable:!0,writable:!0,value:hs}):Wa[us]=hs;var Rt=(Wa,us,hs)=>(JQ(Wa,typeof us!="symbol"?us+"":us,hs),hs);(function(){var mC,vC;"use strict";class Wa{constructor(e){Rt(this,"config");this.config=e}IsTokenExpired(){if(!this.config.EXPIRES)return!1;const e=this.config.EXPIRES;if(!e)return!0;const t=new Date().getTime(),i=new Date(e).getTime()-t;return e===""||i<=0}IsConfigExpired(){return this.LoadConfig(),!this.config.JWT||!this.config.ORGID}RequestOptions(e,t){return{method:e,headers:{...{Accept:"application/json","Content-Type":"application/json"},...this.config.JWT&&{Authorization:this.config.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.config.HOST+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.config.HOST+e,this.RequestOptions("POST",t||{}))).json()}StoreConfig(e){e.JWT&&(localStorage.setItem(`${this.config.STORE_PREFIX}jwtToken`,e.JWT),this.config.JWT=e.JWT),e.EXPIRES&&(localStorage.setItem(`${this.config.STORE_PREFIX}expires`,e.EXPIRES),this.config.EXPIRES=e.EXPIRES),e.ORGID&&(localStorage.setItem(`${this.config.STORE_PREFIX}orgId`,e.ORGID),this.config.ORGID=e.ORGID)}LoadConfig(){const e=localStorage.getItem(`${this.config.STORE_PREFIX}jwtToken`);e&&(this.config.JWT=e);const t=localStorage.getItem(`${this.config.STORE_PREFIX}orgId`);t&&(this.config.ORGID=t);const n=localStorage.getItem(`${this.config.STORE_PREFIX}expires`);return n&&(this.config.EXPIRES=n),this.config}}const us={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"sprie-embed-",host:"https://api.sprie.io"},hs=Object.freeze(us),H3="1.2.2201";function G3(r,e){const t=r.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...r.slice(0,t),...r.slice(t+1)]:r}class V3{constructor(e,t){Rt(this,"isAuthenticated");Rt(this,"fetcher");Rt(this,"shopifyAPI");Rt(this,"org");Rt(this,"apiKey");Rt(this,"dataVariants");this.isAuthenticated=!1,this.fetcher=e,this.shopifyAPI=t,this.dataVariants=[]}async Authenticate(e){if(this.fetcher.LoadConfig(),(this.fetcher.IsTokenExpired()||this.fetcher.IsConfigExpired())&&await this.AuthServiceApi(e),this.isAuthenticated=!(this.fetcher.IsTokenExpired()&&this.fetcher.IsConfigExpired()),this.org=this.fetcher.config.ORGID,this.apiKey=e,!this.isAuthenticated)throw new Error("Sprie Authentication failed!")}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await this.fetcher.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");this.fetcher.StoreConfig({...this.fetcher.config,JWT:n.access,ORGID:n.orgId,EXPIRES:n.expires})}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await this.fetcher.Get(t)}async FetchCustomisationList(e,t){const n=`/v1/widget/list-customisation?search=type:${e},org:${this.fetcher.config.ORGID},usage:customizer&limit=50`,i=await this.fetcher.Get(n),s=i.data.findIndex(h=>h.sku===`${e.toLowerCase()}-default`),o=i.data[s];return!t&&s>-1&&i.data.splice(s,1),{...i,data:t&&o?G3(i.data,o):i.data}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await this.fetcher.Get(t),i=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:i}}catch{throw new Error("Failed to download model asset.")}}async HandleAssetUsage(e){if(!this.fetcher.IsConfigExpired()&&e){const t={org:this.fetcher.config.ORGID,asset:e,timestamp:new Date().toISOString()},n="/v1/analytics/trigger";await this.fetcher.Post(n,t)}}async PopulateDataList(e){var n;const t=(n=document.querySelector(`#${e}`))==null?void 0:n.textContent;if(t){const i=await JSON.parse(t);return Object.values(i)[0]}return null}async HandleShopifyAddToCart(e,t){e.forEach(s=>{var l;const o=(l=s.properties)==null?void 0:l.customText;o&&(delete s.properties.customText,Object.assign(s.properties,{"custom-laser-etching":"Add Laser Engraving"}),Object.assign(s.properties,{"custom-text":o}),Object.assign(s.properties,{"This customized item cannot be returned or exchanged":"I agree"}),Object.assign(s.properties,{_uniqueTimestamp:t}))});let n={items:e,sections:"mini-cart"};const i=await this.shopifyAPI.Post(n);if(i){const s=await this.shopifyAPI.Get();document.querySelector("#shopify-section-mini-cart").outerHTML=i.sections["mini-cart"],document.querySelector(".header__cart-count").textContent=s.item_count;const o=document.querySelector(".drawer.drawer--full");o&&o.hasAttribute("open")&&o.removeAttribute("open");const l=document.querySelector(".popover.hidden-lap-and-up.popover-full");l&&l.hasAttribute("open")&&l.removeAttribute("open"),document.querySelector(".mini-cart.drawer.drawer--large").setAttribute("open","")}}}var Rp=(r=>(r.Init="init",r.Preparing="preparing",r.Authenticating="authenticating",r.Fetching="fetching",r.Loading="loading",r.Done="done",r))(Rp||{});class j3{constructor({log:e,logErr:t,apiService:n,metaData:i,config:s}){Rt(this,"log");Rt(this,"logErr");Rt(this,"metaData");Rt(this,"loaderName");Rt(this,"apiKey");Rt(this,"scriptStreamEncoderId");Rt(this,"rawNodeList");Rt(this,"targetNodeList");Rt(this,"status");Rt(this,"isLoaded");Rt(this,"loadCount");Rt(this,"mutationObserver");Rt(this,"config");Rt(this,"apiService");this.config=s,this.apiService=n,this.metaData=i,this.apiKey=null,this.scriptStreamEncoderId=`sprie-embed🔴${Date.now().toString()}`,this.rawNodeList=document.getElementsByClassName(this.metaData.targetClassName),this.targetNodeList=[],this.status=Rp.Init,this.isLoaded=!1,this.loadCount=0,this.loaderName="sprie-embed-loader",this.log=e.bind(this),this.logErr=t.bind(this),this.mutationObserver=null}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey&&(e==null||e.setAttribute("data-enc-stream-id",this.scriptStreamEncoderId))}async authenticate(){if(this.status=Rp.Authenticating,!this.apiService.isAuthenticated){if(!this.apiKey)throw new Error("Sprie: Unable to authenticate. Need APIKey.");await this.apiService.Authenticate(this.apiKey),this.apiService.isAuthenticated||this.logErr("Authentication failed! Check apikey and/or expiration.")}}async Init(){try{return this.scanApiKeyFromCurrentScriptTag(),await this.authenticate(),!0}catch(e){return this.log("SprieEmbed Loading failed."),this.logErr(e),this.isLoaded=!1,!1}}}function W3(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Y1={exports:{}},Uc={},q1={exports:{}},Et={};/**
4
4
  * @license React
5
5
  * react.production.min.js
6
6
  *
@@ -16,7 +16,7 @@ var KQ=Object.defineProperty;var JQ=(Wa,us,hs)=>us in Wa?KQ(Wa,us,{enumerable:!0
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var K1;function q3(){if(K1)return Uc;K1=1;var r=Ye,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,h,u){var d,A={},p=null,g=null;u!==void 0&&(p=""+u),h.key!==void 0&&(p=""+h.key),h.ref!==void 0&&(g=h.ref);for(d in h)n.call(h,d)&&!s.hasOwnProperty(d)&&(A[d]=h[d]);if(l&&l.defaultProps)for(d in h=l.defaultProps,h)A[d]===void 0&&(A[d]=h[d]);return{$$typeof:e,type:l,key:p,ref:g,props:A,_owner:i.current}}return Uc.Fragment=t,Uc.jsx=o,Uc.jsxs=o,Uc}Y1.exports=q3();var Se=Y1.exports;const ZQ="";var X3=Object.defineProperty,K3=(r,e,t)=>e in r?X3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,xt=(r,e,t)=>(K3(r,typeof e!="symbol"?e+"":e,t),t);const J3={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"3d-configurator-",host:"https://api.sprie.io"},J1=Object.freeze(J3);class Z3{constructor(e){xt(this,"baseURL"),xt(this,"JWT"),this.baseURL=e.baseURL}setJWT(e){this.JWT=e}RequestOptions(e,t){return{method:e,headers:{Accept:"application/json","Content-Type":"application/json",...this.JWT&&{Authorization:this.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.baseURL+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.baseURL+e,this.RequestOptions("POST",t||{}))).json()}}const Pc=new Z3({baseURL:J1.host});function $3(r,e){const t=r.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...r.slice(0,t),...r.slice(t+1)]:r}class eS{constructor(){}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await Pc.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");return n}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await Pc.Get(t)}async FetchCustomisationList(){const e="/v1/widget/list-customisation?search=type:Lens,usage:customizer&limit=50",t=await Pc.Get(e),n=t.data.find(i=>i.sku==="lens-default");return{...t,data:$3(t.data,n)}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await Pc.Get(t),i=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:i}}catch{throw new Error("Failed to download model asset.")}}}const Dp=new eS;class tS{constructor(e){xt(this,"prefix"),this.prefix=e}makeKey(e){return`${this.prefix}${e}`}getItem(e){return localStorage.getItem(this.makeKey(e))}setItem(e,t){return localStorage.setItem(this.makeKey(e),t)}}const kc=new tS(J1.storePrefix);class rS{constructor(){xt(this,"authPayload"),xt(this,"apiKey"),xt(this,"isAuthenticated"),this.isAuthenticated=!1,this.authPayload={}}async Init(e){try{return this.apiKey=e,await this.authenticate(),this.isAuthenticated=!0,!0}catch(t){return console.log(t),this.isAuthenticated=!1,!1}}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey}async authenticate(){if(this.isAuthenticated)return;if(!this.apiKey)throw new Error("Spire: Unable to authenticate . Need APIKey.");const e=await Dp.AuthServiceApi(this.apiKey);this.setAuthConfig({EXPIRES:e.expires,JWT:e.access,ORGID:e.orgId})}setAuthConfig(e){e.JWT&&(kc.setItem("jwtToken",e.JWT),this.authPayload.JWT=e.JWT),e.EXPIRES&&(kc.setItem("expires",e.EXPIRES),this.authPayload.EXPIRES=e.EXPIRES),e.ORGID&&(kc.setItem("orgId",e.ORGID),this.authPayload.ORGID=e.ORGID)}LoadConfig(){const e=kc.getItem("jwtToken");e&&(this.authPayload.JWT=e);const t=kc.getItem("orgId");t&&(this.authPayload.ORGID=t);const n=localStorage.getItem("expires");return n&&(this.authPayload.EXPIRES=n),this.authPayload}}var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nS(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function iS(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Lp={exports:{}},qo=typeof Reflect=="object"?Reflect:null,Z1=qo&&typeof qo.apply=="function"?qo.apply:function(r,e,t){return Function.prototype.apply.call(r,e,t)},Nh;qo&&typeof qo.ownKeys=="function"?Nh=qo.ownKeys:Object.getOwnPropertySymbols?Nh=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Nh=function(r){return Object.getOwnPropertyNames(r)};function sS(r){console&&console.warn&&console.warn(r)}var $1=Number.isNaN||function(r){return r!==r};function Qt(){Qt.init.call(this)}Lp.exports=Qt,Lp.exports.once=cS,Qt.EventEmitter=Qt,Qt.prototype._events=void 0,Qt.prototype._eventsCount=0,Qt.prototype._maxListeners=void 0;var ev=10;function Uh(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Qt,"defaultMaxListeners",{enumerable:!0,get:function(){return ev},set:function(r){if(typeof r!="number"||r<0||$1(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");ev=r}}),Qt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||$1(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function tv(r){return r._maxListeners===void 0?Qt.defaultMaxListeners:r._maxListeners}Qt.prototype.getMaxListeners=function(){return tv(this)},Qt.prototype.emit=function(r){for(var e=[],t=1;t<arguments.length;t++)e.push(arguments[t]);var n=r==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=i[r];if(l===void 0)return!1;if(typeof l=="function")Z1(l,this,e);else for(var h=l.length,u=av(l,h),t=0;t<h;++t)Z1(u[t],this,e);return!0};function rv(r,e,t,n){var i,s,o;if(Uh(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),o=s[e]),o===void 0)o=s[e]=t,++r._eventsCount;else if(typeof o=="function"?o=s[e]=n?[t,o]:[o,t]:n?o.unshift(t):o.push(t),i=tv(r),i>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=r,l.type=e,l.count=o.length,sS(l)}return r}Qt.prototype.addListener=function(r,e){return rv(this,r,e,!1)},Qt.prototype.on=Qt.prototype.addListener,Qt.prototype.prependListener=function(r,e){return rv(this,r,e,!0)};function aS(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function nv(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=aS.bind(n);return i.listener=t,n.wrapFn=i,i}Qt.prototype.once=function(r,e){return Uh(e),this.on(r,nv(this,r,e)),this},Qt.prototype.prependOnceListener=function(r,e){return Uh(e),this.prependListener(r,nv(this,r,e)),this},Qt.prototype.removeListener=function(r,e){var t,n,i,s,o;if(Uh(e),n=this._events,n===void 0)return this;if(t=n[r],t===void 0)return this;if(t===e||t.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,t.listener||e));else if(typeof t!="function"){for(i=-1,s=t.length-1;s>=0;s--)if(t[s]===e||t[s].listener===e){o=t[s].listener,i=s;break}if(i<0)return this;i===0?t.shift():oS(t,i),t.length===1&&(n[r]=t[0]),n.removeListener!==void 0&&this.emit("removeListener",r,o||e)}return this},Qt.prototype.off=Qt.prototype.removeListener,Qt.prototype.removeAllListeners=function(r){var e,t,n;if(t=this._events,t===void 0)return this;if(t.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):t[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete t[r]),this;if(arguments.length===0){var i=Object.keys(t),s;for(n=0;n<i.length;++n)s=i[n],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=t[r],typeof e=="function")this.removeListener(r,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(r,e[n]);return this};function iv(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?lS(i):av(i,i.length)}Qt.prototype.listeners=function(r){return iv(this,r,!0)},Qt.prototype.rawListeners=function(r){return iv(this,r,!1)},Qt.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):sv.call(r,e)},Qt.prototype.listenerCount=sv;function sv(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Qt.prototype.eventNames=function(){return this._eventsCount>0?Nh(this._events):[]};function av(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function oS(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function lS(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function cS(r,e){return new Promise(function(t,n){function i(o){r.removeListener(e,s),n(o)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}ov(r,e,s,{once:!0}),e!=="error"&&uS(r,i,{once:!0})})}function uS(r,e,t){typeof r.on=="function"&&ov(r,"error",e,t)}function ov(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var hS=Lp.exports;const lv=class W1 extends hS.EventEmitter{emitEvent(e,t){Object.keys(W1.EVENTS).includes(e)&&this.emit(W1.EVENTS[e],t)}};xt(lv,"EVENTS",{onAddToCart:"add-to-cart"});let dS=lv;var cv={exports:{}};function fS(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uv={exports:{}};const pS={},AS=Object.freeze(Object.defineProperty({__proto__:null,default:pS},Symbol.toStringTag,{value:"Module"})),gS=iS(AS);var hv;function It(){return hv||(hv=1,function(r,e){(function(t,n){r.exports=n()})(yt,function(){var t=t||function(n,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof yt<"u"&&yt.crypto&&(s=yt.crypto),!s&&typeof fS=="function")try{s=gS}catch{}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(x){var I;return w.prototype=x,I=new w,w.prototype=null,I}}(),h={},u=h.lib={},d=u.Base=function(){return{extend:function(w){var x=l(this);return w&&x.mixIn(w),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var x in w)w.hasOwnProperty(x)&&(this[x]=w[x]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),A=u.WordArray=d.extend({init:function(w,x){w=this.words=w||[],x!=i?this.sigBytes=x:this.sigBytes=w.length*4},toString:function(w){return(w||g).stringify(this)},concat:function(w){var x=this.words,I=w.words,R=this.sigBytes,S=w.sigBytes;if(this.clamp(),R%4)for(var T=0;T<S;T++){var D=I[T>>>2]>>>24-T%4*8&255;x[R+T>>>2]|=D<<24-(R+T)%4*8}else for(var b=0;b<S;b+=4)x[R+b>>>2]=I[b>>>2];return this.sigBytes+=S,this},clamp:function(){var w=this.words,x=this.sigBytes;w[x>>>2]&=4294967295<<32-x%4*8,w.length=n.ceil(x/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var x=[],I=0;I<w;I+=4)x.push(o());return new A.init(x,w)}}),p=h.enc={},g=p.Hex={stringify:function(w){for(var x=w.words,I=w.sigBytes,R=[],S=0;S<I;S++){var T=x[S>>>2]>>>24-S%4*8&255;R.push((T>>>4).toString(16)),R.push((T&15).toString(16))}return R.join("")},parse:function(w){for(var x=w.length,I=[],R=0;R<x;R+=2)I[R>>>3]|=parseInt(w.substr(R,2),16)<<24-R%8*4;return new A.init(I,x/2)}},_=p.Latin1={stringify:function(w){for(var x=w.words,I=w.sigBytes,R=[],S=0;S<I;S++){var T=x[S>>>2]>>>24-S%4*8&255;R.push(String.fromCharCode(T))}return R.join("")},parse:function(w){for(var x=w.length,I=[],R=0;R<x;R++)I[R>>>2]|=(w.charCodeAt(R)&255)<<24-R%4*8;return new A.init(I,x)}},E=p.Utf8={stringify:function(w){try{return decodeURIComponent(escape(_.stringify(w)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(w){return _.parse(unescape(encodeURIComponent(w)))}},m=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new A.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=E.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var x,I=this._data,R=I.words,S=I.sigBytes,T=this.blockSize,D=T*4,b=S/D;w?b=n.ceil(b):b=n.max((b|0)-this._minBufferSize,0);var M=b*T,L=n.min(M*4,S);if(M){for(var P=0;P<M;P+=T)this._doProcessBlock(R,P);x=R.splice(0,M),I.sigBytes-=L}return new A.init(x,L)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});u.Hasher=m.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(w){return function(x,I){return new w.init(I).finalize(x)}},_createHmacHelper:function(w){return function(x,I){return new v.HMAC.init(w,I).finalize(x)}}});var v=h.algo={};return h}(Math);return t})}(uv)),uv.exports}var dv={exports:{}},fv;function Ph(){return fv||(fv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.Base,l=s.WordArray,h=i.x64={};h.Word=o.extend({init:function(u,d){this.high=u,this.low=d}}),h.WordArray=o.extend({init:function(u,d){u=this.words=u||[],d!=n?this.sigBytes=d:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,d=u.length,A=[],p=0;p<d;p++){var g=u[p];A.push(g.high),A.push(g.low)}return l.create(A,this.sigBytes)},clone:function(){for(var u=o.clone.call(this),d=u.words=this.words.slice(0),A=d.length,p=0;p<A;p++)d[p]=d[p].clone();return u}})}(),t})}(dv)),dv.exports}var pv={exports:{}},Av;function mS(){return Av||(Av=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,i=n.lib,s=i.WordArray,o=s.init,l=s.init=function(h){if(h instanceof ArrayBuffer&&(h=new Uint8Array(h)),(h instanceof Int8Array||typeof Uint8ClampedArray<"u"&&h instanceof Uint8ClampedArray||h instanceof Int16Array||h instanceof Uint16Array||h instanceof Int32Array||h instanceof Uint32Array||h instanceof Float32Array||h instanceof Float64Array)&&(h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength)),h instanceof Uint8Array){for(var u=h.byteLength,d=[],A=0;A<u;A++)d[A>>>2]|=h[A]<<24-A%4*8;o.call(this,d,u)}else o.apply(this,arguments)};l.prototype=s}}(),t.lib.WordArray})}(pv)),pv.exports}var gv={exports:{}},mv;function vS(){return mv||(mv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.enc;o.Utf16=o.Utf16BE={stringify:function(h){for(var u=h.words,d=h.sigBytes,A=[],p=0;p<d;p+=2){var g=u[p>>>2]>>>16-p%4*8&65535;A.push(String.fromCharCode(g))}return A.join("")},parse:function(h){for(var u=h.length,d=[],A=0;A<u;A++)d[A>>>1]|=h.charCodeAt(A)<<16-A%2*16;return s.create(d,u*2)}},o.Utf16LE={stringify:function(h){for(var u=h.words,d=h.sigBytes,A=[],p=0;p<d;p+=2){var g=l(u[p>>>2]>>>16-p%4*8&65535);A.push(String.fromCharCode(g))}return A.join("")},parse:function(h){for(var u=h.length,d=[],A=0;A<u;A++)d[A>>>1]|=l(h.charCodeAt(A)<<16-A%2*16);return s.create(d,u*2)}};function l(h){return h<<8&4278255360|h>>>8&16711935}}(),t.enc.Utf16})}(gv)),gv.exports}var vv={exports:{}},_v;function Ya(){return _v||(_v=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.enc;o.Base64={stringify:function(h){var u=h.words,d=h.sigBytes,A=this._map;h.clamp();for(var p=[],g=0;g<d;g+=3)for(var _=u[g>>>2]>>>24-g%4*8&255,E=u[g+1>>>2]>>>24-(g+1)%4*8&255,m=u[g+2>>>2]>>>24-(g+2)%4*8&255,v=_<<16|E<<8|m,w=0;w<4&&g+w*.75<d;w++)p.push(A.charAt(v>>>6*(3-w)&63));var x=A.charAt(64);if(x)for(;p.length%4;)p.push(x);return p.join("")},parse:function(h){var u=h.length,d=this._map,A=this._reverseMap;if(!A){A=this._reverseMap=[];for(var p=0;p<d.length;p++)A[d.charCodeAt(p)]=p}var g=d.charAt(64);if(g){var _=h.indexOf(g);_!==-1&&(u=_)}return l(h,u,A)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(h,u,d){for(var A=[],p=0,g=0;g<u;g++)if(g%4){var _=d[h.charCodeAt(g-1)]<<g%4*2,E=d[h.charCodeAt(g)]>>>6-g%4*2,m=_|E;A[p>>>2]|=m<<24-p%4*8,p++}return s.create(A,p)}}(),t.enc.Base64})}(vv)),vv.exports}var yv={exports:{}},Ev;function _S(){return Ev||(Ev=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.enc;o.Base64url={stringify:function(h,u){u===void 0&&(u=!0);var d=h.words,A=h.sigBytes,p=u?this._safe_map:this._map;h.clamp();for(var g=[],_=0;_<A;_+=3)for(var E=d[_>>>2]>>>24-_%4*8&255,m=d[_+1>>>2]>>>24-(_+1)%4*8&255,v=d[_+2>>>2]>>>24-(_+2)%4*8&255,w=E<<16|m<<8|v,x=0;x<4&&_+x*.75<A;x++)g.push(p.charAt(w>>>6*(3-x)&63));var I=p.charAt(64);if(I)for(;g.length%4;)g.push(I);return g.join("")},parse:function(h,u){u===void 0&&(u=!0);var d=h.length,A=u?this._safe_map:this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var g=0;g<A.length;g++)p[A.charCodeAt(g)]=g}var _=A.charAt(64);if(_){var E=h.indexOf(_);E!==-1&&(d=E)}return l(h,d,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(h,u,d){for(var A=[],p=0,g=0;g<u;g++)if(g%4){var _=d[h.charCodeAt(g-1)]<<g%4*2,E=d[h.charCodeAt(g)]>>>6-g%4*2,m=_|E;A[p>>>2]|=m<<24-p%4*8,p++}return s.create(A,p)}}(),t.enc.Base64url})}(yv)),yv.exports}var xv={exports:{}},wv;function qa(){return wv||(wv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.WordArray,l=s.Hasher,h=i.algo,u=[];(function(){for(var E=0;E<64;E++)u[E]=n.abs(n.sin(E+1))*4294967296|0})();var d=h.MD5=l.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(E,m){for(var v=0;v<16;v++){var w=m+v,x=E[w];E[w]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var I=this._hash.words,R=E[m+0],S=E[m+1],T=E[m+2],D=E[m+3],b=E[m+4],M=E[m+5],L=E[m+6],P=E[m+7],N=E[m+8],W=E[m+9],X=E[m+10],K=E[m+11],te=E[m+12],V=E[m+13],ee=E[m+14],Q=E[m+15],z=I[0],Z=I[1],re=I[2],j=I[3];z=A(z,Z,re,j,R,7,u[0]),j=A(j,z,Z,re,S,12,u[1]),re=A(re,j,z,Z,T,17,u[2]),Z=A(Z,re,j,z,D,22,u[3]),z=A(z,Z,re,j,b,7,u[4]),j=A(j,z,Z,re,M,12,u[5]),re=A(re,j,z,Z,L,17,u[6]),Z=A(Z,re,j,z,P,22,u[7]),z=A(z,Z,re,j,N,7,u[8]),j=A(j,z,Z,re,W,12,u[9]),re=A(re,j,z,Z,X,17,u[10]),Z=A(Z,re,j,z,K,22,u[11]),z=A(z,Z,re,j,te,7,u[12]),j=A(j,z,Z,re,V,12,u[13]),re=A(re,j,z,Z,ee,17,u[14]),Z=A(Z,re,j,z,Q,22,u[15]),z=p(z,Z,re,j,S,5,u[16]),j=p(j,z,Z,re,L,9,u[17]),re=p(re,j,z,Z,K,14,u[18]),Z=p(Z,re,j,z,R,20,u[19]),z=p(z,Z,re,j,M,5,u[20]),j=p(j,z,Z,re,X,9,u[21]),re=p(re,j,z,Z,Q,14,u[22]),Z=p(Z,re,j,z,b,20,u[23]),z=p(z,Z,re,j,W,5,u[24]),j=p(j,z,Z,re,ee,9,u[25]),re=p(re,j,z,Z,D,14,u[26]),Z=p(Z,re,j,z,N,20,u[27]),z=p(z,Z,re,j,V,5,u[28]),j=p(j,z,Z,re,T,9,u[29]),re=p(re,j,z,Z,P,14,u[30]),Z=p(Z,re,j,z,te,20,u[31]),z=g(z,Z,re,j,M,4,u[32]),j=g(j,z,Z,re,N,11,u[33]),re=g(re,j,z,Z,K,16,u[34]),Z=g(Z,re,j,z,ee,23,u[35]),z=g(z,Z,re,j,S,4,u[36]),j=g(j,z,Z,re,b,11,u[37]),re=g(re,j,z,Z,P,16,u[38]),Z=g(Z,re,j,z,X,23,u[39]),z=g(z,Z,re,j,V,4,u[40]),j=g(j,z,Z,re,R,11,u[41]),re=g(re,j,z,Z,D,16,u[42]),Z=g(Z,re,j,z,L,23,u[43]),z=g(z,Z,re,j,W,4,u[44]),j=g(j,z,Z,re,te,11,u[45]),re=g(re,j,z,Z,Q,16,u[46]),Z=g(Z,re,j,z,T,23,u[47]),z=_(z,Z,re,j,R,6,u[48]),j=_(j,z,Z,re,P,10,u[49]),re=_(re,j,z,Z,ee,15,u[50]),Z=_(Z,re,j,z,M,21,u[51]),z=_(z,Z,re,j,te,6,u[52]),j=_(j,z,Z,re,D,10,u[53]),re=_(re,j,z,Z,X,15,u[54]),Z=_(Z,re,j,z,S,21,u[55]),z=_(z,Z,re,j,N,6,u[56]),j=_(j,z,Z,re,Q,10,u[57]),re=_(re,j,z,Z,L,15,u[58]),Z=_(Z,re,j,z,V,21,u[59]),z=_(z,Z,re,j,b,6,u[60]),j=_(j,z,Z,re,K,10,u[61]),re=_(re,j,z,Z,T,15,u[62]),Z=_(Z,re,j,z,W,21,u[63]),I[0]=I[0]+z|0,I[1]=I[1]+Z|0,I[2]=I[2]+re|0,I[3]=I[3]+j|0},_doFinalize:function(){var E=this._data,m=E.words,v=this._nDataBytes*8,w=E.sigBytes*8;m[w>>>5]|=128<<24-w%32;var x=n.floor(v/4294967296),I=v;m[(w+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,E.sigBytes=(m.length+1)*4,this._process();for(var R=this._hash,S=R.words,T=0;T<4;T++){var D=S[T];S[T]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return R},clone:function(){var E=l.clone.call(this);return E._hash=this._hash.clone(),E}});function A(E,m,v,w,x,I,R){var S=E+(m&v|~m&w)+x+R;return(S<<I|S>>>32-I)+m}function p(E,m,v,w,x,I,R){var S=E+(m&w|v&~w)+x+R;return(S<<I|S>>>32-I)+m}function g(E,m,v,w,x,I,R){var S=E+(m^v^w)+x+R;return(S<<I|S>>>32-I)+m}function _(E,m,v,w,x,I,R){var S=E+(v^(m|~w))+x+R;return(S<<I|S>>>32-I)+m}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(xv)),xv.exports}var Iv={exports:{}},Cv;function Mv(){return Cv||(Cv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=i.Hasher,l=n.algo,h=[],u=l.SHA1=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,A){for(var p=this._hash.words,g=p[0],_=p[1],E=p[2],m=p[3],v=p[4],w=0;w<80;w++){if(w<16)h[w]=d[A+w]|0;else{var x=h[w-3]^h[w-8]^h[w-14]^h[w-16];h[w]=x<<1|x>>>31}var I=(g<<5|g>>>27)+v+h[w];w<20?I+=(_&E|~_&m)+1518500249:w<40?I+=(_^E^m)+1859775393:w<60?I+=(_&E|_&m|E&m)-1894007588:I+=(_^E^m)-899497514,v=m,m=E,E=_<<30|_>>>2,_=g,g=I}p[0]=p[0]+g|0,p[1]=p[1]+_|0,p[2]=p[2]+E|0,p[3]=p[3]+m|0,p[4]=p[4]+v|0},_doFinalize:function(){var d=this._data,A=d.words,p=this._nDataBytes*8,g=d.sigBytes*8;return A[g>>>5]|=128<<24-g%32,A[(g+64>>>9<<4)+14]=Math.floor(p/4294967296),A[(g+64>>>9<<4)+15]=p,d.sigBytes=A.length*4,this._process(),this._hash},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u)}(),t.SHA1})}(Iv)),Iv.exports}var Sv={exports:{}},Tv;function Np(){return Tv||(Tv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.WordArray,l=s.Hasher,h=i.algo,u=[],d=[];(function(){function g(v){for(var w=n.sqrt(v),x=2;x<=w;x++)if(!(v%x))return!1;return!0}function _(v){return(v-(v|0))*4294967296|0}for(var E=2,m=0;m<64;)g(E)&&(m<8&&(u[m]=_(n.pow(E,1/2))),d[m]=_(n.pow(E,1/3)),m++),E++})();var A=[],p=h.SHA256=l.extend({_doReset:function(){this._hash=new o.init(u.slice(0))},_doProcessBlock:function(g,_){for(var E=this._hash.words,m=E[0],v=E[1],w=E[2],x=E[3],I=E[4],R=E[5],S=E[6],T=E[7],D=0;D<64;D++){if(D<16)A[D]=g[_+D]|0;else{var b=A[D-15],M=(b<<25|b>>>7)^(b<<14|b>>>18)^b>>>3,L=A[D-2],P=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;A[D]=M+A[D-7]+P+A[D-16]}var N=I&R^~I&S,W=m&v^m&w^v&w,X=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),K=(I<<26|I>>>6)^(I<<21|I>>>11)^(I<<7|I>>>25),te=T+K+N+d[D]+A[D],V=X+W;T=S,S=R,R=I,I=x+te|0,x=w,w=v,v=m,m=te+V|0}E[0]=E[0]+m|0,E[1]=E[1]+v|0,E[2]=E[2]+w|0,E[3]=E[3]+x|0,E[4]=E[4]+I|0,E[5]=E[5]+R|0,E[6]=E[6]+S|0,E[7]=E[7]+T|0},_doFinalize:function(){var g=this._data,_=g.words,E=this._nDataBytes*8,m=g.sigBytes*8;return _[m>>>5]|=128<<24-m%32,_[(m+64>>>9<<4)+14]=n.floor(E/4294967296),_[(m+64>>>9<<4)+15]=E,g.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});i.SHA256=l._createHelper(p),i.HmacSHA256=l._createHmacHelper(p)}(Math),t.SHA256})}(Sv)),Sv.exports}var Bv={exports:{}},bv;function yS(){return bv||(bv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Np())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.algo,l=o.SHA256,h=o.SHA224=l.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=4,u}});n.SHA224=l._createHelper(h),n.HmacSHA224=l._createHmacHelper(h)}(),t.SHA224})}(Bv)),Bv.exports}var Rv={exports:{}},Dv;function Lv(){return Dv||(Dv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Ph())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.Hasher,o=n.x64,l=o.Word,h=o.WordArray,u=n.algo;function d(){return l.create.apply(l,arguments)}var A=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],p=[];(function(){for(var _=0;_<80;_++)p[_]=d()})();var g=u.SHA512=s.extend({_doReset:function(){this._hash=new h.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(_,E){for(var m=this._hash.words,v=m[0],w=m[1],x=m[2],I=m[3],R=m[4],S=m[5],T=m[6],D=m[7],b=v.high,M=v.low,L=w.high,P=w.low,N=x.high,W=x.low,X=I.high,K=I.low,te=R.high,V=R.low,ee=S.high,Q=S.low,z=T.high,Z=T.low,re=D.high,j=D.low,de=b,Ae=M,_e=L,Ee=P,Le=N,st=W,se=X,et=K,Qe=te,ct=V,Ke=ee,pt=Q,Y=z,k=Z,le=re,pe=j,me=0;me<80;me++){var ye,Ge,Ie=p[me];if(me<16)Ge=Ie.high=_[E+me*2]|0,ye=Ie.low=_[E+me*2+1]|0;else{var je=p[me-15],Ve=je.high,Me=je.low,fe=(Ve>>>1|Me<<31)^(Ve>>>8|Me<<24)^Ve>>>7,De=(Me>>>1|Ve<<31)^(Me>>>8|Ve<<24)^(Me>>>7|Ve<<25),Be=p[me-2],be=Be.high,nt=Be.low,lt=(be>>>19|nt<<13)^(be<<3|nt>>>29)^be>>>6,dt=(nt>>>19|be<<13)^(nt<<3|be>>>29)^(nt>>>6|be<<26),ut=p[me-7],ht=ut.high,G=ut.low,O=p[me-16],ge=O.high,ve=O.low;ye=De+G,Ge=fe+ht+(ye>>>0<De>>>0?1:0),ye=ye+dt,Ge=Ge+lt+(ye>>>0<dt>>>0?1:0),ye=ye+ve,Ge=Ge+ge+(ye>>>0<ve>>>0?1:0),Ie.high=Ge,Ie.low=ye}var Fe=Qe&Ke^~Qe&Y,Pe=ct&pt^~ct&k,vt=de&_e^de&Le^_e&Le,Lt=Ae&Ee^Ae&st^Ee&st,Nt=(de>>>28|Ae<<4)^(de<<30|Ae>>>2)^(de<<25|Ae>>>7),Bt=(Ae>>>28|de<<4)^(Ae<<30|de>>>2)^(Ae<<25|de>>>7),_t=(Qe>>>14|ct<<18)^(Qe>>>18|ct<<14)^(Qe<<23|ct>>>9),fr=(ct>>>14|Qe<<18)^(ct>>>18|Qe<<14)^(ct<<23|Qe>>>9),Vt=A[me],Er=Vt.high,Rn=Vt.low,qt=pe+fr,pi=le+_t+(qt>>>0<pe>>>0?1:0),qt=qt+Pe,pi=pi+Fe+(qt>>>0<Pe>>>0?1:0),qt=qt+Rn,pi=pi+Er+(qt>>>0<Rn>>>0?1:0),qt=qt+ye,pi=pi+Ge+(qt>>>0<ye>>>0?1:0),$n=Bt+Lt,Us=Nt+vt+($n>>>0<Bt>>>0?1:0);le=Y,pe=k,Y=Ke,k=pt,Ke=Qe,pt=ct,ct=et+qt|0,Qe=se+pi+(ct>>>0<et>>>0?1:0)|0,se=Le,et=st,Le=_e,st=Ee,_e=de,Ee=Ae,Ae=qt+$n|0,de=pi+Us+(Ae>>>0<qt>>>0?1:0)|0}M=v.low=M+Ae,v.high=b+de+(M>>>0<Ae>>>0?1:0),P=w.low=P+Ee,w.high=L+_e+(P>>>0<Ee>>>0?1:0),W=x.low=W+st,x.high=N+Le+(W>>>0<st>>>0?1:0),K=I.low=K+et,I.high=X+se+(K>>>0<et>>>0?1:0),V=R.low=V+ct,R.high=te+Qe+(V>>>0<ct>>>0?1:0),Q=S.low=Q+pt,S.high=ee+Ke+(Q>>>0<pt>>>0?1:0),Z=T.low=Z+k,T.high=z+Y+(Z>>>0<k>>>0?1:0),j=D.low=j+pe,D.high=re+le+(j>>>0<pe>>>0?1:0)},_doFinalize:function(){var _=this._data,E=_.words,m=this._nDataBytes*8,v=_.sigBytes*8;E[v>>>5]|=128<<24-v%32,E[(v+128>>>10<<5)+30]=Math.floor(m/4294967296),E[(v+128>>>10<<5)+31]=m,_.sigBytes=E.length*4,this._process();var w=this._hash.toX32();return w},clone:function(){var _=s.clone.call(this);return _._hash=this._hash.clone(),_},blockSize:1024/32});n.SHA512=s._createHelper(g),n.HmacSHA512=s._createHmacHelper(g)}(),t.SHA512})}(Rv)),Rv.exports}var Nv={exports:{}},Uv;function ES(){return Uv||(Uv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Ph(),Lv())})(yt,function(t){return function(){var n=t,i=n.x64,s=i.Word,o=i.WordArray,l=n.algo,h=l.SHA512,u=l.SHA384=h.extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var d=h._doFinalize.call(this);return d.sigBytes-=16,d}});n.SHA384=h._createHelper(u),n.HmacSHA384=h._createHmacHelper(u)}(),t.SHA384})}(Nv)),Nv.exports}var Pv={exports:{}},kv;function xS(){return kv||(kv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Ph())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.WordArray,l=s.Hasher,h=i.x64,u=h.Word,d=i.algo,A=[],p=[],g=[];(function(){for(var m=1,v=0,w=0;w<24;w++){A[m+5*v]=(w+1)*(w+2)/2%64;var x=v%5,I=(2*m+3*v)%5;m=x,v=I}for(var m=0;m<5;m++)for(var v=0;v<5;v++)p[m+5*v]=v+(2*m+3*v)%5*5;for(var R=1,S=0;S<24;S++){for(var T=0,D=0,b=0;b<7;b++){if(R&1){var M=(1<<b)-1;M<32?D^=1<<M:T^=1<<M-32}R&128?R=R<<1^113:R<<=1}g[S]=u.create(T,D)}})();var _=[];(function(){for(var m=0;m<25;m++)_[m]=u.create()})();var E=d.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],v=0;v<25;v++)m[v]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,v){for(var w=this._state,x=this.blockSize/2,I=0;I<x;I++){var R=m[v+2*I],S=m[v+2*I+1];R=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var T=w[I];T.high^=S,T.low^=R}for(var D=0;D<24;D++){for(var b=0;b<5;b++){for(var M=0,L=0,P=0;P<5;P++){var T=w[b+5*P];M^=T.high,L^=T.low}var N=_[b];N.high=M,N.low=L}for(var b=0;b<5;b++)for(var W=_[(b+4)%5],X=_[(b+1)%5],K=X.high,te=X.low,M=W.high^(K<<1|te>>>31),L=W.low^(te<<1|K>>>31),P=0;P<5;P++){var T=w[b+5*P];T.high^=M,T.low^=L}for(var V=1;V<25;V++){var M,L,T=w[V],ee=T.high,Q=T.low,z=A[V];z<32?(M=ee<<z|Q>>>32-z,L=Q<<z|ee>>>32-z):(M=Q<<z-32|ee>>>64-z,L=ee<<z-32|Q>>>64-z);var Z=_[p[V]];Z.high=M,Z.low=L}var re=_[0],j=w[0];re.high=j.high,re.low=j.low;for(var b=0;b<5;b++)for(var P=0;P<5;P++){var V=b+5*P,T=w[V],de=_[V],Ae=_[(b+1)%5+5*P],_e=_[(b+2)%5+5*P];T.high=de.high^~Ae.high&_e.high,T.low=de.low^~Ae.low&_e.low}var T=w[0],Ee=g[D];T.high^=Ee.high,T.low^=Ee.low}},_doFinalize:function(){var m=this._data,v=m.words;this._nDataBytes*8;var w=m.sigBytes*8,x=this.blockSize*32;v[w>>>5]|=1<<24-w%32,v[(n.ceil((w+1)/x)*x>>>5)-1]|=128,m.sigBytes=v.length*4,this._process();for(var I=this._state,R=this.cfg.outputLength/8,S=R/8,T=[],D=0;D<S;D++){var b=I[D],M=b.high,L=b.low;M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,T.push(L),T.push(M)}return new o.init(T,R)},clone:function(){for(var m=l.clone.call(this),v=m._state=this._state.slice(0),w=0;w<25;w++)v[w]=v[w].clone();return m}});i.SHA3=l._createHelper(E),i.HmacSHA3=l._createHmacHelper(E)}(Math),t.SHA3})}(Pv)),Pv.exports}var Qv={exports:{}},Ov;function wS(){return Ov||(Ov=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){/** @preserve
19
+ */var K1;function q3(){if(K1)return Uc;K1=1;var r=Ye,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,h,u){var d,A={},p=null,g=null;u!==void 0&&(p=""+u),h.key!==void 0&&(p=""+h.key),h.ref!==void 0&&(g=h.ref);for(d in h)n.call(h,d)&&!s.hasOwnProperty(d)&&(A[d]=h[d]);if(l&&l.defaultProps)for(d in h=l.defaultProps,h)A[d]===void 0&&(A[d]=h[d]);return{$$typeof:e,type:l,key:p,ref:g,props:A,_owner:i.current}}return Uc.Fragment=t,Uc.jsx=o,Uc.jsxs=o,Uc}Y1.exports=q3();var Se=Y1.exports;const ZQ="";var X3=Object.defineProperty,K3=(r,e,t)=>e in r?X3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,xt=(r,e,t)=>(K3(r,typeof e!="symbol"?e+"":e,t),t);const J3={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"3d-configurator-",host:"https://api.sprie.io"},J1=Object.freeze(J3);class Z3{constructor(e){xt(this,"baseURL"),xt(this,"JWT"),this.baseURL=e.baseURL}setJWT(e){this.JWT=e}RequestOptions(e,t){return{method:e,headers:{Accept:"application/json","Content-Type":"application/json",...this.JWT&&{Authorization:this.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.baseURL+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.baseURL+e,this.RequestOptions("POST",t||{}))).json()}}const Pc=new Z3({baseURL:J1.host});function $3(r,e){const t=r.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...r.slice(0,t),...r.slice(t+1)]:r}class eS{constructor(){}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await Pc.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");return n}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await Pc.Get(t)}async FetchCustomisationList(){const e="/v1/widget/list-customisation?search=type:Lens,usage:customizer&limit=50",t=await Pc.Get(e),n=t.data.find(i=>i.sku==="lens-default");return{...t,data:$3(t.data,n)}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await Pc.Get(t),i=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:i}}catch{throw new Error("Failed to download model asset.")}}}const Dp=new eS;class tS{constructor(e){xt(this,"prefix"),this.prefix=e}makeKey(e){return`${this.prefix}${e}`}getItem(e){return localStorage.getItem(this.makeKey(e))}setItem(e,t){return localStorage.setItem(this.makeKey(e),t)}}const kc=new tS(J1.storePrefix);class rS{constructor(){xt(this,"authPayload"),xt(this,"apiKey"),xt(this,"isAuthenticated"),this.isAuthenticated=!1,this.authPayload={}}async Init(e){try{return this.apiKey=e,await this.authenticate(),this.isAuthenticated=!0,!0}catch(t){return console.log(t),this.isAuthenticated=!1,!1}}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey}async authenticate(){if(this.isAuthenticated)return;if(!this.apiKey)throw new Error("Spire: Unable to authenticate . Need APIKey.");const e=await Dp.AuthServiceApi(this.apiKey);this.setAuthConfig({EXPIRES:e.expires,JWT:e.access,ORGID:e.orgId})}setAuthConfig(e){e.JWT&&(kc.setItem("jwtToken",e.JWT),this.authPayload.JWT=e.JWT),e.EXPIRES&&(kc.setItem("expires",e.EXPIRES),this.authPayload.EXPIRES=e.EXPIRES),e.ORGID&&(kc.setItem("orgId",e.ORGID),this.authPayload.ORGID=e.ORGID)}LoadConfig(){const e=kc.getItem("jwtToken");e&&(this.authPayload.JWT=e);const t=kc.getItem("orgId");t&&(this.authPayload.ORGID=t);const n=localStorage.getItem("expires");return n&&(this.authPayload.EXPIRES=n),this.authPayload}}var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nS(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function iS(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Lp={exports:{}},qo=typeof Reflect=="object"?Reflect:null,Z1=qo&&typeof qo.apply=="function"?qo.apply:function(r,e,t){return Function.prototype.apply.call(r,e,t)},Nh;qo&&typeof qo.ownKeys=="function"?Nh=qo.ownKeys:Object.getOwnPropertySymbols?Nh=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Nh=function(r){return Object.getOwnPropertyNames(r)};function sS(r){console&&console.warn&&console.warn(r)}var $1=Number.isNaN||function(r){return r!==r};function Qt(){Qt.init.call(this)}Lp.exports=Qt,Lp.exports.once=cS,Qt.EventEmitter=Qt,Qt.prototype._events=void 0,Qt.prototype._eventsCount=0,Qt.prototype._maxListeners=void 0;var ev=10;function Uh(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Qt,"defaultMaxListeners",{enumerable:!0,get:function(){return ev},set:function(r){if(typeof r!="number"||r<0||$1(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");ev=r}}),Qt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||$1(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function tv(r){return r._maxListeners===void 0?Qt.defaultMaxListeners:r._maxListeners}Qt.prototype.getMaxListeners=function(){return tv(this)},Qt.prototype.emit=function(r){for(var e=[],t=1;t<arguments.length;t++)e.push(arguments[t]);var n=r==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=i[r];if(l===void 0)return!1;if(typeof l=="function")Z1(l,this,e);else for(var h=l.length,u=av(l,h),t=0;t<h;++t)Z1(u[t],this,e);return!0};function rv(r,e,t,n){var i,s,o;if(Uh(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),o=s[e]),o===void 0)o=s[e]=t,++r._eventsCount;else if(typeof o=="function"?o=s[e]=n?[t,o]:[o,t]:n?o.unshift(t):o.push(t),i=tv(r),i>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=r,l.type=e,l.count=o.length,sS(l)}return r}Qt.prototype.addListener=function(r,e){return rv(this,r,e,!1)},Qt.prototype.on=Qt.prototype.addListener,Qt.prototype.prependListener=function(r,e){return rv(this,r,e,!0)};function aS(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function nv(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=aS.bind(n);return i.listener=t,n.wrapFn=i,i}Qt.prototype.once=function(r,e){return Uh(e),this.on(r,nv(this,r,e)),this},Qt.prototype.prependOnceListener=function(r,e){return Uh(e),this.prependListener(r,nv(this,r,e)),this},Qt.prototype.removeListener=function(r,e){var t,n,i,s,o;if(Uh(e),n=this._events,n===void 0)return this;if(t=n[r],t===void 0)return this;if(t===e||t.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,t.listener||e));else if(typeof t!="function"){for(i=-1,s=t.length-1;s>=0;s--)if(t[s]===e||t[s].listener===e){o=t[s].listener,i=s;break}if(i<0)return this;i===0?t.shift():oS(t,i),t.length===1&&(n[r]=t[0]),n.removeListener!==void 0&&this.emit("removeListener",r,o||e)}return this},Qt.prototype.off=Qt.prototype.removeListener,Qt.prototype.removeAllListeners=function(r){var e,t,n;if(t=this._events,t===void 0)return this;if(t.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):t[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete t[r]),this;if(arguments.length===0){var i=Object.keys(t),s;for(n=0;n<i.length;++n)s=i[n],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=t[r],typeof e=="function")this.removeListener(r,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(r,e[n]);return this};function iv(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?lS(i):av(i,i.length)}Qt.prototype.listeners=function(r){return iv(this,r,!0)},Qt.prototype.rawListeners=function(r){return iv(this,r,!1)},Qt.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):sv.call(r,e)},Qt.prototype.listenerCount=sv;function sv(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Qt.prototype.eventNames=function(){return this._eventsCount>0?Nh(this._events):[]};function av(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function oS(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function lS(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function cS(r,e){return new Promise(function(t,n){function i(o){r.removeListener(e,s),n(o)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}ov(r,e,s,{once:!0}),e!=="error"&&uS(r,i,{once:!0})})}function uS(r,e,t){typeof r.on=="function"&&ov(r,"error",e,t)}function ov(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var hS=Lp.exports;const lv=class W1 extends hS.EventEmitter{emitEvent(e,t){Object.keys(W1.EVENTS).includes(e)&&this.emit(W1.EVENTS[e],t)}};xt(lv,"EVENTS",{onAddToCart:"add-to-cart"});let dS=lv;var cv={exports:{}};function fS(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uv={exports:{}};const pS={},AS=Object.freeze(Object.defineProperty({__proto__:null,default:pS},Symbol.toStringTag,{value:"Module"})),gS=iS(AS);var hv;function It(){return hv||(hv=1,function(r,e){(function(t,n){r.exports=n()})(yt,function(){var t=t||function(n,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof yt<"u"&&yt.crypto&&(s=yt.crypto),!s&&typeof fS=="function")try{s=gS}catch{}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(x){var I;return w.prototype=x,I=new w,w.prototype=null,I}}(),h={},u=h.lib={},d=u.Base=function(){return{extend:function(w){var x=l(this);return w&&x.mixIn(w),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var x in w)w.hasOwnProperty(x)&&(this[x]=w[x]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),A=u.WordArray=d.extend({init:function(w,x){w=this.words=w||[],x!=i?this.sigBytes=x:this.sigBytes=w.length*4},toString:function(w){return(w||g).stringify(this)},concat:function(w){var x=this.words,I=w.words,R=this.sigBytes,S=w.sigBytes;if(this.clamp(),R%4)for(var T=0;T<S;T++){var D=I[T>>>2]>>>24-T%4*8&255;x[R+T>>>2]|=D<<24-(R+T)%4*8}else for(var b=0;b<S;b+=4)x[R+b>>>2]=I[b>>>2];return this.sigBytes+=S,this},clamp:function(){var w=this.words,x=this.sigBytes;w[x>>>2]&=4294967295<<32-x%4*8,w.length=n.ceil(x/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var x=[],I=0;I<w;I+=4)x.push(o());return new A.init(x,w)}}),p=h.enc={},g=p.Hex={stringify:function(w){for(var x=w.words,I=w.sigBytes,R=[],S=0;S<I;S++){var T=x[S>>>2]>>>24-S%4*8&255;R.push((T>>>4).toString(16)),R.push((T&15).toString(16))}return R.join("")},parse:function(w){for(var x=w.length,I=[],R=0;R<x;R+=2)I[R>>>3]|=parseInt(w.substr(R,2),16)<<24-R%8*4;return new A.init(I,x/2)}},_=p.Latin1={stringify:function(w){for(var x=w.words,I=w.sigBytes,R=[],S=0;S<I;S++){var T=x[S>>>2]>>>24-S%4*8&255;R.push(String.fromCharCode(T))}return R.join("")},parse:function(w){for(var x=w.length,I=[],R=0;R<x;R++)I[R>>>2]|=(w.charCodeAt(R)&255)<<24-R%4*8;return new A.init(I,x)}},E=p.Utf8={stringify:function(w){try{return decodeURIComponent(escape(_.stringify(w)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(w){return _.parse(unescape(encodeURIComponent(w)))}},m=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new A.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=E.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var x,I=this._data,R=I.words,S=I.sigBytes,T=this.blockSize,D=T*4,b=S/D;w?b=n.ceil(b):b=n.max((b|0)-this._minBufferSize,0);var M=b*T,L=n.min(M*4,S);if(M){for(var P=0;P<M;P+=T)this._doProcessBlock(R,P);x=R.splice(0,M),I.sigBytes-=L}return new A.init(x,L)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});u.Hasher=m.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(w){return function(x,I){return new w.init(I).finalize(x)}},_createHmacHelper:function(w){return function(x,I){return new v.HMAC.init(w,I).finalize(x)}}});var v=h.algo={};return h}(Math);return t})}(uv)),uv.exports}var dv={exports:{}},fv;function Ph(){return fv||(fv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.Base,l=s.WordArray,h=i.x64={};h.Word=o.extend({init:function(u,d){this.high=u,this.low=d}}),h.WordArray=o.extend({init:function(u,d){u=this.words=u||[],d!=n?this.sigBytes=d:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,d=u.length,A=[],p=0;p<d;p++){var g=u[p];A.push(g.high),A.push(g.low)}return l.create(A,this.sigBytes)},clone:function(){for(var u=o.clone.call(this),d=u.words=this.words.slice(0),A=d.length,p=0;p<A;p++)d[p]=d[p].clone();return u}})}(),t})}(dv)),dv.exports}var pv={exports:{}},Av;function mS(){return Av||(Av=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,i=n.lib,s=i.WordArray,o=s.init,l=s.init=function(h){if(h instanceof ArrayBuffer&&(h=new Uint8Array(h)),(h instanceof Int8Array||typeof Uint8ClampedArray<"u"&&h instanceof Uint8ClampedArray||h instanceof Int16Array||h instanceof Uint16Array||h instanceof Int32Array||h instanceof Uint32Array||h instanceof Float32Array||h instanceof Float64Array)&&(h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength)),h instanceof Uint8Array){for(var u=h.byteLength,d=[],A=0;A<u;A++)d[A>>>2]|=h[A]<<24-A%4*8;o.call(this,d,u)}else o.apply(this,arguments)};l.prototype=s}}(),t.lib.WordArray})}(pv)),pv.exports}var gv={exports:{}},mv;function vS(){return mv||(mv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.enc;o.Utf16=o.Utf16BE={stringify:function(h){for(var u=h.words,d=h.sigBytes,A=[],p=0;p<d;p+=2){var g=u[p>>>2]>>>16-p%4*8&65535;A.push(String.fromCharCode(g))}return A.join("")},parse:function(h){for(var u=h.length,d=[],A=0;A<u;A++)d[A>>>1]|=h.charCodeAt(A)<<16-A%2*16;return s.create(d,u*2)}},o.Utf16LE={stringify:function(h){for(var u=h.words,d=h.sigBytes,A=[],p=0;p<d;p+=2){var g=l(u[p>>>2]>>>16-p%4*8&65535);A.push(String.fromCharCode(g))}return A.join("")},parse:function(h){for(var u=h.length,d=[],A=0;A<u;A++)d[A>>>1]|=l(h.charCodeAt(A)<<16-A%2*16);return s.create(d,u*2)}};function l(h){return h<<8&4278255360|h>>>8&16711935}}(),t.enc.Utf16})}(gv)),gv.exports}var vv={exports:{}},_v;function Ya(){return _v||(_v=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.enc;o.Base64={stringify:function(h){var u=h.words,d=h.sigBytes,A=this._map;h.clamp();for(var p=[],g=0;g<d;g+=3)for(var _=u[g>>>2]>>>24-g%4*8&255,E=u[g+1>>>2]>>>24-(g+1)%4*8&255,m=u[g+2>>>2]>>>24-(g+2)%4*8&255,v=_<<16|E<<8|m,w=0;w<4&&g+w*.75<d;w++)p.push(A.charAt(v>>>6*(3-w)&63));var x=A.charAt(64);if(x)for(;p.length%4;)p.push(x);return p.join("")},parse:function(h){var u=h.length,d=this._map,A=this._reverseMap;if(!A){A=this._reverseMap=[];for(var p=0;p<d.length;p++)A[d.charCodeAt(p)]=p}var g=d.charAt(64);if(g){var _=h.indexOf(g);_!==-1&&(u=_)}return l(h,u,A)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(h,u,d){for(var A=[],p=0,g=0;g<u;g++)if(g%4){var _=d[h.charCodeAt(g-1)]<<g%4*2,E=d[h.charCodeAt(g)]>>>6-g%4*2,m=_|E;A[p>>>2]|=m<<24-p%4*8,p++}return s.create(A,p)}}(),t.enc.Base64})}(vv)),vv.exports}var yv={exports:{}},Ev;function _S(){return Ev||(Ev=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.enc;o.Base64url={stringify:function(h,u){u===void 0&&(u=!0);var d=h.words,A=h.sigBytes,p=u?this._safe_map:this._map;h.clamp();for(var g=[],_=0;_<A;_+=3)for(var E=d[_>>>2]>>>24-_%4*8&255,m=d[_+1>>>2]>>>24-(_+1)%4*8&255,v=d[_+2>>>2]>>>24-(_+2)%4*8&255,w=E<<16|m<<8|v,x=0;x<4&&_+x*.75<A;x++)g.push(p.charAt(w>>>6*(3-x)&63));var I=p.charAt(64);if(I)for(;g.length%4;)g.push(I);return g.join("")},parse:function(h,u){u===void 0&&(u=!0);var d=h.length,A=u?this._safe_map:this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var g=0;g<A.length;g++)p[A.charCodeAt(g)]=g}var _=A.charAt(64);if(_){var E=h.indexOf(_);E!==-1&&(d=E)}return l(h,d,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(h,u,d){for(var A=[],p=0,g=0;g<u;g++)if(g%4){var _=d[h.charCodeAt(g-1)]<<g%4*2,E=d[h.charCodeAt(g)]>>>6-g%4*2,m=_|E;A[p>>>2]|=m<<24-p%4*8,p++}return s.create(A,p)}}(),t.enc.Base64url})}(yv)),yv.exports}var xv={exports:{}},wv;function qa(){return wv||(wv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.WordArray,l=s.Hasher,h=i.algo,u=[];(function(){for(var E=0;E<64;E++)u[E]=n.abs(n.sin(E+1))*4294967296|0})();var d=h.MD5=l.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(E,m){for(var v=0;v<16;v++){var w=m+v,x=E[w];E[w]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var I=this._hash.words,R=E[m+0],S=E[m+1],T=E[m+2],D=E[m+3],b=E[m+4],M=E[m+5],L=E[m+6],P=E[m+7],N=E[m+8],W=E[m+9],X=E[m+10],K=E[m+11],te=E[m+12],V=E[m+13],ee=E[m+14],Q=E[m+15],z=I[0],Z=I[1],re=I[2],j=I[3];z=A(z,Z,re,j,R,7,u[0]),j=A(j,z,Z,re,S,12,u[1]),re=A(re,j,z,Z,T,17,u[2]),Z=A(Z,re,j,z,D,22,u[3]),z=A(z,Z,re,j,b,7,u[4]),j=A(j,z,Z,re,M,12,u[5]),re=A(re,j,z,Z,L,17,u[6]),Z=A(Z,re,j,z,P,22,u[7]),z=A(z,Z,re,j,N,7,u[8]),j=A(j,z,Z,re,W,12,u[9]),re=A(re,j,z,Z,X,17,u[10]),Z=A(Z,re,j,z,K,22,u[11]),z=A(z,Z,re,j,te,7,u[12]),j=A(j,z,Z,re,V,12,u[13]),re=A(re,j,z,Z,ee,17,u[14]),Z=A(Z,re,j,z,Q,22,u[15]),z=p(z,Z,re,j,S,5,u[16]),j=p(j,z,Z,re,L,9,u[17]),re=p(re,j,z,Z,K,14,u[18]),Z=p(Z,re,j,z,R,20,u[19]),z=p(z,Z,re,j,M,5,u[20]),j=p(j,z,Z,re,X,9,u[21]),re=p(re,j,z,Z,Q,14,u[22]),Z=p(Z,re,j,z,b,20,u[23]),z=p(z,Z,re,j,W,5,u[24]),j=p(j,z,Z,re,ee,9,u[25]),re=p(re,j,z,Z,D,14,u[26]),Z=p(Z,re,j,z,N,20,u[27]),z=p(z,Z,re,j,V,5,u[28]),j=p(j,z,Z,re,T,9,u[29]),re=p(re,j,z,Z,P,14,u[30]),Z=p(Z,re,j,z,te,20,u[31]),z=g(z,Z,re,j,M,4,u[32]),j=g(j,z,Z,re,N,11,u[33]),re=g(re,j,z,Z,K,16,u[34]),Z=g(Z,re,j,z,ee,23,u[35]),z=g(z,Z,re,j,S,4,u[36]),j=g(j,z,Z,re,b,11,u[37]),re=g(re,j,z,Z,P,16,u[38]),Z=g(Z,re,j,z,X,23,u[39]),z=g(z,Z,re,j,V,4,u[40]),j=g(j,z,Z,re,R,11,u[41]),re=g(re,j,z,Z,D,16,u[42]),Z=g(Z,re,j,z,L,23,u[43]),z=g(z,Z,re,j,W,4,u[44]),j=g(j,z,Z,re,te,11,u[45]),re=g(re,j,z,Z,Q,16,u[46]),Z=g(Z,re,j,z,T,23,u[47]),z=_(z,Z,re,j,R,6,u[48]),j=_(j,z,Z,re,P,10,u[49]),re=_(re,j,z,Z,ee,15,u[50]),Z=_(Z,re,j,z,M,21,u[51]),z=_(z,Z,re,j,te,6,u[52]),j=_(j,z,Z,re,D,10,u[53]),re=_(re,j,z,Z,X,15,u[54]),Z=_(Z,re,j,z,S,21,u[55]),z=_(z,Z,re,j,N,6,u[56]),j=_(j,z,Z,re,Q,10,u[57]),re=_(re,j,z,Z,L,15,u[58]),Z=_(Z,re,j,z,V,21,u[59]),z=_(z,Z,re,j,b,6,u[60]),j=_(j,z,Z,re,K,10,u[61]),re=_(re,j,z,Z,T,15,u[62]),Z=_(Z,re,j,z,W,21,u[63]),I[0]=I[0]+z|0,I[1]=I[1]+Z|0,I[2]=I[2]+re|0,I[3]=I[3]+j|0},_doFinalize:function(){var E=this._data,m=E.words,v=this._nDataBytes*8,w=E.sigBytes*8;m[w>>>5]|=128<<24-w%32;var x=n.floor(v/4294967296),I=v;m[(w+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,E.sigBytes=(m.length+1)*4,this._process();for(var R=this._hash,S=R.words,T=0;T<4;T++){var D=S[T];S[T]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return R},clone:function(){var E=l.clone.call(this);return E._hash=this._hash.clone(),E}});function A(E,m,v,w,x,I,R){var S=E+(m&v|~m&w)+x+R;return(S<<I|S>>>32-I)+m}function p(E,m,v,w,x,I,R){var S=E+(m&w|v&~w)+x+R;return(S<<I|S>>>32-I)+m}function g(E,m,v,w,x,I,R){var S=E+(m^v^w)+x+R;return(S<<I|S>>>32-I)+m}function _(E,m,v,w,x,I,R){var S=E+(v^(m|~w))+x+R;return(S<<I|S>>>32-I)+m}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(xv)),xv.exports}var Iv={exports:{}},Cv;function Mv(){return Cv||(Cv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=i.Hasher,l=n.algo,h=[],u=l.SHA1=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,A){for(var p=this._hash.words,g=p[0],_=p[1],E=p[2],m=p[3],v=p[4],w=0;w<80;w++){if(w<16)h[w]=d[A+w]|0;else{var x=h[w-3]^h[w-8]^h[w-14]^h[w-16];h[w]=x<<1|x>>>31}var I=(g<<5|g>>>27)+v+h[w];w<20?I+=(_&E|~_&m)+1518500249:w<40?I+=(_^E^m)+1859775393:w<60?I+=(_&E|_&m|E&m)-1894007588:I+=(_^E^m)-899497514,v=m,m=E,E=_<<30|_>>>2,_=g,g=I}p[0]=p[0]+g|0,p[1]=p[1]+_|0,p[2]=p[2]+E|0,p[3]=p[3]+m|0,p[4]=p[4]+v|0},_doFinalize:function(){var d=this._data,A=d.words,p=this._nDataBytes*8,g=d.sigBytes*8;return A[g>>>5]|=128<<24-g%32,A[(g+64>>>9<<4)+14]=Math.floor(p/4294967296),A[(g+64>>>9<<4)+15]=p,d.sigBytes=A.length*4,this._process(),this._hash},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u)}(),t.SHA1})}(Iv)),Iv.exports}var Sv={exports:{}},Tv;function Np(){return Tv||(Tv=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.WordArray,l=s.Hasher,h=i.algo,u=[],d=[];(function(){function g(v){for(var w=n.sqrt(v),x=2;x<=w;x++)if(!(v%x))return!1;return!0}function _(v){return(v-(v|0))*4294967296|0}for(var E=2,m=0;m<64;)g(E)&&(m<8&&(u[m]=_(n.pow(E,1/2))),d[m]=_(n.pow(E,1/3)),m++),E++})();var A=[],p=h.SHA256=l.extend({_doReset:function(){this._hash=new o.init(u.slice(0))},_doProcessBlock:function(g,_){for(var E=this._hash.words,m=E[0],v=E[1],w=E[2],x=E[3],I=E[4],R=E[5],S=E[6],T=E[7],D=0;D<64;D++){if(D<16)A[D]=g[_+D]|0;else{var b=A[D-15],M=(b<<25|b>>>7)^(b<<14|b>>>18)^b>>>3,L=A[D-2],P=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;A[D]=M+A[D-7]+P+A[D-16]}var N=I&R^~I&S,W=m&v^m&w^v&w,X=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),K=(I<<26|I>>>6)^(I<<21|I>>>11)^(I<<7|I>>>25),te=T+K+N+d[D]+A[D],V=X+W;T=S,S=R,R=I,I=x+te|0,x=w,w=v,v=m,m=te+V|0}E[0]=E[0]+m|0,E[1]=E[1]+v|0,E[2]=E[2]+w|0,E[3]=E[3]+x|0,E[4]=E[4]+I|0,E[5]=E[5]+R|0,E[6]=E[6]+S|0,E[7]=E[7]+T|0},_doFinalize:function(){var g=this._data,_=g.words,E=this._nDataBytes*8,m=g.sigBytes*8;return _[m>>>5]|=128<<24-m%32,_[(m+64>>>9<<4)+14]=n.floor(E/4294967296),_[(m+64>>>9<<4)+15]=E,g.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});i.SHA256=l._createHelper(p),i.HmacSHA256=l._createHmacHelper(p)}(Math),t.SHA256})}(Sv)),Sv.exports}var Bv={exports:{}},bv;function yS(){return bv||(bv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Np())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.WordArray,o=n.algo,l=o.SHA256,h=o.SHA224=l.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=4,u}});n.SHA224=l._createHelper(h),n.HmacSHA224=l._createHmacHelper(h)}(),t.SHA224})}(Bv)),Bv.exports}var Rv={exports:{}},Dv;function Lv(){return Dv||(Dv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Ph())})(yt,function(t){return function(){var n=t,i=n.lib,s=i.Hasher,o=n.x64,l=o.Word,h=o.WordArray,u=n.algo;function d(){return l.create.apply(l,arguments)}var A=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],p=[];(function(){for(var _=0;_<80;_++)p[_]=d()})();var g=u.SHA512=s.extend({_doReset:function(){this._hash=new h.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(_,E){for(var m=this._hash.words,v=m[0],w=m[1],x=m[2],I=m[3],R=m[4],S=m[5],T=m[6],D=m[7],b=v.high,M=v.low,L=w.high,P=w.low,N=x.high,W=x.low,X=I.high,K=I.low,te=R.high,V=R.low,ee=S.high,Q=S.low,z=T.high,Z=T.low,re=D.high,j=D.low,de=b,Ae=M,_e=L,Ee=P,Le=N,st=W,se=X,et=K,Qe=te,ht=V,Ke=ee,pt=Q,Y=z,k=Z,le=re,pe=j,me=0;me<80;me++){var ye,Ge,Ie=p[me];if(me<16)Ge=Ie.high=_[E+me*2]|0,ye=Ie.low=_[E+me*2+1]|0;else{var je=p[me-15],Ve=je.high,Me=je.low,fe=(Ve>>>1|Me<<31)^(Ve>>>8|Me<<24)^Ve>>>7,De=(Me>>>1|Ve<<31)^(Me>>>8|Ve<<24)^(Me>>>7|Ve<<25),Be=p[me-2],be=Be.high,nt=Be.low,lt=(be>>>19|nt<<13)^(be<<3|nt>>>29)^be>>>6,dt=(nt>>>19|be<<13)^(nt<<3|be>>>29)^(nt>>>6|be<<26),ct=p[me-7],ut=ct.high,G=ct.low,O=p[me-16],ge=O.high,ve=O.low;ye=De+G,Ge=fe+ut+(ye>>>0<De>>>0?1:0),ye=ye+dt,Ge=Ge+lt+(ye>>>0<dt>>>0?1:0),ye=ye+ve,Ge=Ge+ge+(ye>>>0<ve>>>0?1:0),Ie.high=Ge,Ie.low=ye}var Fe=Qe&Ke^~Qe&Y,Pe=ht&pt^~ht&k,vt=de&_e^de&Le^_e&Le,Lt=Ae&Ee^Ae&st^Ee&st,Nt=(de>>>28|Ae<<4)^(de<<30|Ae>>>2)^(de<<25|Ae>>>7),Bt=(Ae>>>28|de<<4)^(Ae<<30|de>>>2)^(Ae<<25|de>>>7),_t=(Qe>>>14|ht<<18)^(Qe>>>18|ht<<14)^(Qe<<23|ht>>>9),fr=(ht>>>14|Qe<<18)^(ht>>>18|Qe<<14)^(ht<<23|Qe>>>9),Vt=A[me],Er=Vt.high,Rn=Vt.low,qt=pe+fr,pi=le+_t+(qt>>>0<pe>>>0?1:0),qt=qt+Pe,pi=pi+Fe+(qt>>>0<Pe>>>0?1:0),qt=qt+Rn,pi=pi+Er+(qt>>>0<Rn>>>0?1:0),qt=qt+ye,pi=pi+Ge+(qt>>>0<ye>>>0?1:0),$n=Bt+Lt,Us=Nt+vt+($n>>>0<Bt>>>0?1:0);le=Y,pe=k,Y=Ke,k=pt,Ke=Qe,pt=ht,ht=et+qt|0,Qe=se+pi+(ht>>>0<et>>>0?1:0)|0,se=Le,et=st,Le=_e,st=Ee,_e=de,Ee=Ae,Ae=qt+$n|0,de=pi+Us+(Ae>>>0<qt>>>0?1:0)|0}M=v.low=M+Ae,v.high=b+de+(M>>>0<Ae>>>0?1:0),P=w.low=P+Ee,w.high=L+_e+(P>>>0<Ee>>>0?1:0),W=x.low=W+st,x.high=N+Le+(W>>>0<st>>>0?1:0),K=I.low=K+et,I.high=X+se+(K>>>0<et>>>0?1:0),V=R.low=V+ht,R.high=te+Qe+(V>>>0<ht>>>0?1:0),Q=S.low=Q+pt,S.high=ee+Ke+(Q>>>0<pt>>>0?1:0),Z=T.low=Z+k,T.high=z+Y+(Z>>>0<k>>>0?1:0),j=D.low=j+pe,D.high=re+le+(j>>>0<pe>>>0?1:0)},_doFinalize:function(){var _=this._data,E=_.words,m=this._nDataBytes*8,v=_.sigBytes*8;E[v>>>5]|=128<<24-v%32,E[(v+128>>>10<<5)+30]=Math.floor(m/4294967296),E[(v+128>>>10<<5)+31]=m,_.sigBytes=E.length*4,this._process();var w=this._hash.toX32();return w},clone:function(){var _=s.clone.call(this);return _._hash=this._hash.clone(),_},blockSize:1024/32});n.SHA512=s._createHelper(g),n.HmacSHA512=s._createHmacHelper(g)}(),t.SHA512})}(Rv)),Rv.exports}var Nv={exports:{}},Uv;function ES(){return Uv||(Uv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Ph(),Lv())})(yt,function(t){return function(){var n=t,i=n.x64,s=i.Word,o=i.WordArray,l=n.algo,h=l.SHA512,u=l.SHA384=h.extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var d=h._doFinalize.call(this);return d.sigBytes-=16,d}});n.SHA384=h._createHelper(u),n.HmacSHA384=h._createHmacHelper(u)}(),t.SHA384})}(Nv)),Nv.exports}var Pv={exports:{}},kv;function xS(){return kv||(kv=1,function(r,e){(function(t,n,i){r.exports=n(It(),Ph())})(yt,function(t){return function(n){var i=t,s=i.lib,o=s.WordArray,l=s.Hasher,h=i.x64,u=h.Word,d=i.algo,A=[],p=[],g=[];(function(){for(var m=1,v=0,w=0;w<24;w++){A[m+5*v]=(w+1)*(w+2)/2%64;var x=v%5,I=(2*m+3*v)%5;m=x,v=I}for(var m=0;m<5;m++)for(var v=0;v<5;v++)p[m+5*v]=v+(2*m+3*v)%5*5;for(var R=1,S=0;S<24;S++){for(var T=0,D=0,b=0;b<7;b++){if(R&1){var M=(1<<b)-1;M<32?D^=1<<M:T^=1<<M-32}R&128?R=R<<1^113:R<<=1}g[S]=u.create(T,D)}})();var _=[];(function(){for(var m=0;m<25;m++)_[m]=u.create()})();var E=d.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],v=0;v<25;v++)m[v]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,v){for(var w=this._state,x=this.blockSize/2,I=0;I<x;I++){var R=m[v+2*I],S=m[v+2*I+1];R=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var T=w[I];T.high^=S,T.low^=R}for(var D=0;D<24;D++){for(var b=0;b<5;b++){for(var M=0,L=0,P=0;P<5;P++){var T=w[b+5*P];M^=T.high,L^=T.low}var N=_[b];N.high=M,N.low=L}for(var b=0;b<5;b++)for(var W=_[(b+4)%5],X=_[(b+1)%5],K=X.high,te=X.low,M=W.high^(K<<1|te>>>31),L=W.low^(te<<1|K>>>31),P=0;P<5;P++){var T=w[b+5*P];T.high^=M,T.low^=L}for(var V=1;V<25;V++){var M,L,T=w[V],ee=T.high,Q=T.low,z=A[V];z<32?(M=ee<<z|Q>>>32-z,L=Q<<z|ee>>>32-z):(M=Q<<z-32|ee>>>64-z,L=ee<<z-32|Q>>>64-z);var Z=_[p[V]];Z.high=M,Z.low=L}var re=_[0],j=w[0];re.high=j.high,re.low=j.low;for(var b=0;b<5;b++)for(var P=0;P<5;P++){var V=b+5*P,T=w[V],de=_[V],Ae=_[(b+1)%5+5*P],_e=_[(b+2)%5+5*P];T.high=de.high^~Ae.high&_e.high,T.low=de.low^~Ae.low&_e.low}var T=w[0],Ee=g[D];T.high^=Ee.high,T.low^=Ee.low}},_doFinalize:function(){var m=this._data,v=m.words;this._nDataBytes*8;var w=m.sigBytes*8,x=this.blockSize*32;v[w>>>5]|=1<<24-w%32,v[(n.ceil((w+1)/x)*x>>>5)-1]|=128,m.sigBytes=v.length*4,this._process();for(var I=this._state,R=this.cfg.outputLength/8,S=R/8,T=[],D=0;D<S;D++){var b=I[D],M=b.high,L=b.low;M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,T.push(L),T.push(M)}return new o.init(T,R)},clone:function(){for(var m=l.clone.call(this),v=m._state=this._state.slice(0),w=0;w<25;w++)v[w]=v[w].clone();return m}});i.SHA3=l._createHelper(E),i.HmacSHA3=l._createHmacHelper(E)}(Math),t.SHA3})}(Pv)),Pv.exports}var Qv={exports:{}},Ov;function wS(){return Ov||(Ov=1,function(r,e){(function(t,n){r.exports=n(It())})(yt,function(t){/** @preserve
20
20
  (c) 2012 by Cédric Mesnil. All rights reserved.
21
21
 
22
22
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -3773,7 +3773,7 @@ Material Type: `+L.type+`
3773
3773
 
3774
3774
  Program Info Log: `+P+`
3775
3775
  `+te+`
3776
- `+V)}else P!==""?console.warn("THREE.WebGLProgram: Program Info Log:",P):(N===""||W==="")&&(K=!1);K&&(L.diagnostics={runnable:X,programLog:P,vertexShader:{log:N,prefix:m},fragmentShader:{log:W,prefix:v}})}i.deleteShader(R),i.deleteShader(S),D=new Nd(i,E),b=CL(i,E)}let D;this.getUniforms=function(){return D===void 0&&T(this),D};let b;this.getAttributes=function(){return b===void 0&&T(this),b};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(E,mL)),M},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(E),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=vL++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=R,this.fragmentShader=S,this}let kL=0;class QL{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new OL(e),t.set(e,n)),n}}class OL{constructor(e){this.id=kL++,this.code=e,this.usedTimes=0}}function FL(r,e,t,n,i,s,o){const l=new md,h=new QL,u=new Set,d=[],A=i.logarithmicDepthBuffer,p=i.vertexTextures;let g=i.precision;const _={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(b){return u.add(b),b===0?"uv":`uv${b}`}function m(b,M,L,P,N){const W=P.fog,X=N.geometry,K=b.isMeshStandardMaterial?P.environment:null,te=(b.isMeshStandardMaterial?t:e).get(b.envMap||K),V=te&&te.mapping===Jh?te.image.height:null,ee=_[b.type];b.precision!==null&&(g=i.getMaxPrecision(b.precision),g!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",g,"instead."));const Q=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,z=Q!==void 0?Q.length:0;let Z=0;X.morphAttributes.position!==void 0&&(Z=1),X.morphAttributes.normal!==void 0&&(Z=2),X.morphAttributes.color!==void 0&&(Z=3);let re,j,de,Ae;if(ee){const Bt=Zi[ee];re=Bt.vertexShader,j=Bt.fragmentShader}else re=b.vertexShader,j=b.fragmentShader,h.update(b),de=h.getVertexShaderID(b),Ae=h.getFragmentShaderID(b);const _e=r.getRenderTarget(),Ee=N.isInstancedMesh===!0,Le=N.isBatchedMesh===!0,st=!!b.map,se=!!b.matcap,et=!!te,Qe=!!b.aoMap,ct=!!b.lightMap,Ke=!!b.bumpMap,pt=!!b.normalMap,Y=!!b.displacementMap,k=!!b.emissiveMap,le=!!b.metalnessMap,pe=!!b.roughnessMap,me=b.anisotropy>0,ye=b.clearcoat>0,Ge=b.iridescence>0,Ie=b.sheen>0,je=b.transmission>0,Ve=me&&!!b.anisotropyMap,Me=ye&&!!b.clearcoatMap,fe=ye&&!!b.clearcoatNormalMap,De=ye&&!!b.clearcoatRoughnessMap,Be=Ge&&!!b.iridescenceMap,be=Ge&&!!b.iridescenceThicknessMap,nt=Ie&&!!b.sheenColorMap,lt=Ie&&!!b.sheenRoughnessMap,dt=!!b.specularMap,ut=!!b.specularColorMap,ht=!!b.specularIntensityMap,G=je&&!!b.transmissionMap,O=je&&!!b.thicknessMap,ge=!!b.gradientMap,ve=!!b.alphaMap,Fe=b.alphaTest>0,Pe=!!b.alphaHash,vt=!!b.extensions;let Lt=$s;b.toneMapped&&(_e===null||_e.isXRRenderTarget===!0)&&(Lt=r.toneMapping);const Nt={shaderID:ee,shaderType:b.type,shaderName:b.name,vertexShader:re,fragmentShader:j,defines:b.defines,customVertexShaderID:de,customFragmentShaderID:Ae,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:g,batching:Le,instancing:Ee,instancingColor:Ee&&N.instanceColor!==null,instancingMorph:Ee&&N.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:_e===null?r.outputColorSpace:_e.isXRRenderTarget===!0?_e.texture.colorSpace:cr,alphaToCoverage:!!b.alphaToCoverage,map:st,matcap:se,envMap:et,envMapMode:et&&te.mapping,envMapCubeUVHeight:V,aoMap:Qe,lightMap:ct,bumpMap:Ke,normalMap:pt,displacementMap:p&&Y,emissiveMap:k,normalMapObjectSpace:pt&&b.normalMapType===Nb,normalMapTangentSpace:pt&&b.normalMapType===NE,metalnessMap:le,roughnessMap:pe,anisotropy:me,anisotropyMap:Ve,clearcoat:ye,clearcoatMap:Me,clearcoatNormalMap:fe,clearcoatRoughnessMap:De,iridescence:Ge,iridescenceMap:Be,iridescenceThicknessMap:be,sheen:Ie,sheenColorMap:nt,sheenRoughnessMap:lt,specularMap:dt,specularColorMap:ut,specularIntensityMap:ht,transmission:je,transmissionMap:G,thicknessMap:O,gradientMap:ge,opaque:b.transparent===!1&&b.blending===sl&&b.alphaToCoverage===!1,alphaMap:ve,alphaTest:Fe,alphaHash:Pe,combine:b.combine,mapUv:st&&E(b.map.channel),aoMapUv:Qe&&E(b.aoMap.channel),lightMapUv:ct&&E(b.lightMap.channel),bumpMapUv:Ke&&E(b.bumpMap.channel),normalMapUv:pt&&E(b.normalMap.channel),displacementMapUv:Y&&E(b.displacementMap.channel),emissiveMapUv:k&&E(b.emissiveMap.channel),metalnessMapUv:le&&E(b.metalnessMap.channel),roughnessMapUv:pe&&E(b.roughnessMap.channel),anisotropyMapUv:Ve&&E(b.anisotropyMap.channel),clearcoatMapUv:Me&&E(b.clearcoatMap.channel),clearcoatNormalMapUv:fe&&E(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:De&&E(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Be&&E(b.iridescenceMap.channel),iridescenceThicknessMapUv:be&&E(b.iridescenceThicknessMap.channel),sheenColorMapUv:nt&&E(b.sheenColorMap.channel),sheenRoughnessMapUv:lt&&E(b.sheenRoughnessMap.channel),specularMapUv:dt&&E(b.specularMap.channel),specularColorMapUv:ut&&E(b.specularColorMap.channel),specularIntensityMapUv:ht&&E(b.specularIntensityMap.channel),transmissionMapUv:G&&E(b.transmissionMap.channel),thicknessMapUv:O&&E(b.thicknessMap.channel),alphaMapUv:ve&&E(b.alphaMap.channel),vertexTangents:!!X.attributes.tangent&&(pt||me),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,pointsUvs:N.isPoints===!0&&!!X.attributes.uv&&(st||ve),fog:!!W,useFog:b.fog===!0,fogExp2:!!W&&W.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:A,skinning:N.isSkinnedMesh===!0,morphTargets:X.morphAttributes.position!==void 0,morphNormals:X.morphAttributes.normal!==void 0,morphColors:X.morphAttributes.color!==void 0,morphTargetsCount:z,morphTextureStride:Z,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:Lt,useLegacyLights:r._useLegacyLights,decodeVideoTexture:st&&b.map.isVideoTexture===!0&&Tt.getTransfer(b.map.colorSpace)===Ht,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===Ii,flipSided:b.side===Qr,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:vt&&b.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:vt&&b.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return Nt.vertexUv1s=u.has(1),Nt.vertexUv2s=u.has(2),Nt.vertexUv3s=u.has(3),u.clear(),Nt}function v(b){const M=[];if(b.shaderID?M.push(b.shaderID):(M.push(b.customVertexShaderID),M.push(b.customFragmentShaderID)),b.defines!==void 0)for(const L in b.defines)M.push(L),M.push(b.defines[L]);return b.isRawShaderMaterial===!1&&(w(M,b),x(M,b),M.push(r.outputColorSpace)),M.push(b.customProgramCacheKey),M.join()}function w(b,M){b.push(M.precision),b.push(M.outputColorSpace),b.push(M.envMapMode),b.push(M.envMapCubeUVHeight),b.push(M.mapUv),b.push(M.alphaMapUv),b.push(M.lightMapUv),b.push(M.aoMapUv),b.push(M.bumpMapUv),b.push(M.normalMapUv),b.push(M.displacementMapUv),b.push(M.emissiveMapUv),b.push(M.metalnessMapUv),b.push(M.roughnessMapUv),b.push(M.anisotropyMapUv),b.push(M.clearcoatMapUv),b.push(M.clearcoatNormalMapUv),b.push(M.clearcoatRoughnessMapUv),b.push(M.iridescenceMapUv),b.push(M.iridescenceThicknessMapUv),b.push(M.sheenColorMapUv),b.push(M.sheenRoughnessMapUv),b.push(M.specularMapUv),b.push(M.specularColorMapUv),b.push(M.specularIntensityMapUv),b.push(M.transmissionMapUv),b.push(M.thicknessMapUv),b.push(M.combine),b.push(M.fogExp2),b.push(M.sizeAttenuation),b.push(M.morphTargetsCount),b.push(M.morphAttributeCount),b.push(M.numDirLights),b.push(M.numPointLights),b.push(M.numSpotLights),b.push(M.numSpotLightMaps),b.push(M.numHemiLights),b.push(M.numRectAreaLights),b.push(M.numDirLightShadows),b.push(M.numPointLightShadows),b.push(M.numSpotLightShadows),b.push(M.numSpotLightShadowsWithMaps),b.push(M.numLightProbes),b.push(M.shadowMapType),b.push(M.toneMapping),b.push(M.numClippingPlanes),b.push(M.numClipIntersection),b.push(M.depthPacking)}function x(b,M){l.disableAll(),M.supportsVertexTextures&&l.enable(0),M.instancing&&l.enable(1),M.instancingColor&&l.enable(2),M.instancingMorph&&l.enable(3),M.matcap&&l.enable(4),M.envMap&&l.enable(5),M.normalMapObjectSpace&&l.enable(6),M.normalMapTangentSpace&&l.enable(7),M.clearcoat&&l.enable(8),M.iridescence&&l.enable(9),M.alphaTest&&l.enable(10),M.vertexColors&&l.enable(11),M.vertexAlphas&&l.enable(12),M.vertexUv1s&&l.enable(13),M.vertexUv2s&&l.enable(14),M.vertexUv3s&&l.enable(15),M.vertexTangents&&l.enable(16),M.anisotropy&&l.enable(17),M.alphaHash&&l.enable(18),M.batching&&l.enable(19),b.push(l.mask),l.disableAll(),M.fog&&l.enable(0),M.useFog&&l.enable(1),M.flatShading&&l.enable(2),M.logarithmicDepthBuffer&&l.enable(3),M.skinning&&l.enable(4),M.morphTargets&&l.enable(5),M.morphNormals&&l.enable(6),M.morphColors&&l.enable(7),M.premultipliedAlpha&&l.enable(8),M.shadowMapEnabled&&l.enable(9),M.useLegacyLights&&l.enable(10),M.doubleSided&&l.enable(11),M.flipSided&&l.enable(12),M.useDepthPacking&&l.enable(13),M.dithering&&l.enable(14),M.transmission&&l.enable(15),M.sheen&&l.enable(16),M.opaque&&l.enable(17),M.pointsUvs&&l.enable(18),M.decodeVideoTexture&&l.enable(19),M.alphaToCoverage&&l.enable(20),b.push(l.mask)}function I(b){const M=_[b.type];let L;if(M){const P=Zi[M];L=Ml.clone(P.uniforms)}else L=b.uniforms;return L}function R(b,M){let L;for(let P=0,N=d.length;P<N;P++){const W=d[P];if(W.cacheKey===M){L=W,++L.usedTimes;break}}return L===void 0&&(L=new PL(r,M,b,s),d.push(L)),L}function S(b){if(--b.usedTimes===0){const M=d.indexOf(b);d[M]=d[d.length-1],d.pop(),b.destroy()}}function T(b){h.remove(b)}function D(){h.dispose()}return{getParameters:m,getProgramCacheKey:v,getUniforms:I,acquireProgram:R,releaseProgram:S,releaseShaderCache:T,programs:d,dispose:D}}function zL(){let r=new WeakMap;function e(s){let o=r.get(s);return o===void 0&&(o={},r.set(s,o)),o}function t(s){r.delete(s)}function n(s,o,l){r.get(s)[o]=l}function i(){r=new WeakMap}return{get:e,remove:t,update:n,dispose:i}}function HL(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.material.id!==e.material.id?r.material.id-e.material.id:r.z!==e.z?r.z-e.z:r.id-e.id}function z2(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.z!==e.z?e.z-r.z:r.id-e.id}function H2(){const r=[];let e=0;const t=[],n=[],i=[];function s(){e=0,t.length=0,n.length=0,i.length=0}function o(A,p,g,_,E,m){let v=r[e];return v===void 0?(v={id:A.id,object:A,geometry:p,material:g,groupOrder:_,renderOrder:A.renderOrder,z:E,group:m},r[e]=v):(v.id=A.id,v.object=A,v.geometry=p,v.material=g,v.groupOrder=_,v.renderOrder=A.renderOrder,v.z=E,v.group=m),e++,v}function l(A,p,g,_,E,m){const v=o(A,p,g,_,E,m);g.transmission>0?n.push(v):g.transparent===!0?i.push(v):t.push(v)}function h(A,p,g,_,E,m){const v=o(A,p,g,_,E,m);g.transmission>0?n.unshift(v):g.transparent===!0?i.unshift(v):t.unshift(v)}function u(A,p){t.length>1&&t.sort(A||HL),n.length>1&&n.sort(p||z2),i.length>1&&i.sort(p||z2)}function d(){for(let A=e,p=r.length;A<p;A++){const g=r[A];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:n,transparent:i,init:s,push:l,unshift:h,finish:d,sort:u}}function GL(){let r=new WeakMap;function e(n,i){const s=r.get(n);let o;return s===void 0?(o=new H2,r.set(n,[o])):i>=s.length?(o=new H2,s.push(o)):o=s[i],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function VL(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new H,color:new He};break;case"SpotLight":t={position:new H,direction:new H,color:new He,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new H,color:new He,distance:0,decay:0};break;case"HemisphereLight":t={direction:new H,skyColor:new He,groundColor:new He};break;case"RectAreaLight":t={color:new He,position:new H,halfWidth:new H,halfHeight:new H};break}return r[e.id]=t,t}}}function jL(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ue};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ue};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ue,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let WL=0;function YL(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function qL(r){const e=new VL,t=jL(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)n.probe.push(new H);const i=new H,s=new rt,o=new rt;function l(u,d){let A=0,p=0,g=0;for(let L=0;L<9;L++)n.probe[L].set(0,0,0);let _=0,E=0,m=0,v=0,w=0,x=0,I=0,R=0,S=0,T=0,D=0;u.sort(YL);const b=d===!0?Math.PI:1;for(let L=0,P=u.length;L<P;L++){const N=u[L],W=N.color,X=N.intensity,K=N.distance,te=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)A+=W.r*X*b,p+=W.g*X*b,g+=W.b*X*b;else if(N.isLightProbe){for(let V=0;V<9;V++)n.probe[V].addScaledVector(N.sh.coefficients[V],X);D++}else if(N.isDirectionalLight){const V=e.get(N);if(V.color.copy(N.color).multiplyScalar(N.intensity*b),N.castShadow){const ee=N.shadow,Q=t.get(N);Q.shadowBias=ee.bias,Q.shadowNormalBias=ee.normalBias,Q.shadowRadius=ee.radius,Q.shadowMapSize=ee.mapSize,n.directionalShadow[_]=Q,n.directionalShadowMap[_]=te,n.directionalShadowMatrix[_]=N.shadow.matrix,x++}n.directional[_]=V,_++}else if(N.isSpotLight){const V=e.get(N);V.position.setFromMatrixPosition(N.matrixWorld),V.color.copy(W).multiplyScalar(X*b),V.distance=K,V.coneCos=Math.cos(N.angle),V.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),V.decay=N.decay,n.spot[m]=V;const ee=N.shadow;if(N.map&&(n.spotLightMap[S]=N.map,S++,ee.updateMatrices(N),N.castShadow&&T++),n.spotLightMatrix[m]=ee.matrix,N.castShadow){const Q=t.get(N);Q.shadowBias=ee.bias,Q.shadowNormalBias=ee.normalBias,Q.shadowRadius=ee.radius,Q.shadowMapSize=ee.mapSize,n.spotShadow[m]=Q,n.spotShadowMap[m]=te,R++}m++}else if(N.isRectAreaLight){const V=e.get(N);V.color.copy(W).multiplyScalar(X),V.halfWidth.set(N.width*.5,0,0),V.halfHeight.set(0,N.height*.5,0),n.rectArea[v]=V,v++}else if(N.isPointLight){const V=e.get(N);if(V.color.copy(N.color).multiplyScalar(N.intensity*b),V.distance=N.distance,V.decay=N.decay,N.castShadow){const ee=N.shadow,Q=t.get(N);Q.shadowBias=ee.bias,Q.shadowNormalBias=ee.normalBias,Q.shadowRadius=ee.radius,Q.shadowMapSize=ee.mapSize,Q.shadowCameraNear=ee.camera.near,Q.shadowCameraFar=ee.camera.far,n.pointShadow[E]=Q,n.pointShadowMap[E]=te,n.pointShadowMatrix[E]=N.shadow.matrix,I++}n.point[E]=V,E++}else if(N.isHemisphereLight){const V=e.get(N);V.skyColor.copy(N.color).multiplyScalar(X*b),V.groundColor.copy(N.groundColor).multiplyScalar(X*b),n.hemi[w]=V,w++}}v>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ne.LTC_FLOAT_1,n.rectAreaLTC2=Ne.LTC_FLOAT_2):(n.rectAreaLTC1=Ne.LTC_HALF_1,n.rectAreaLTC2=Ne.LTC_HALF_2)),n.ambient[0]=A,n.ambient[1]=p,n.ambient[2]=g;const M=n.hash;(M.directionalLength!==_||M.pointLength!==E||M.spotLength!==m||M.rectAreaLength!==v||M.hemiLength!==w||M.numDirectionalShadows!==x||M.numPointShadows!==I||M.numSpotShadows!==R||M.numSpotMaps!==S||M.numLightProbes!==D)&&(n.directional.length=_,n.spot.length=m,n.rectArea.length=v,n.point.length=E,n.hemi.length=w,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=I,n.pointShadowMap.length=I,n.spotShadow.length=R,n.spotShadowMap.length=R,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=I,n.spotLightMatrix.length=R+S-T,n.spotLightMap.length=S,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=D,M.directionalLength=_,M.pointLength=E,M.spotLength=m,M.rectAreaLength=v,M.hemiLength=w,M.numDirectionalShadows=x,M.numPointShadows=I,M.numSpotShadows=R,M.numSpotMaps=S,M.numLightProbes=D,n.version=WL++)}function h(u,d){let A=0,p=0,g=0,_=0,E=0;const m=d.matrixWorldInverse;for(let v=0,w=u.length;v<w;v++){const x=u[v];if(x.isDirectionalLight){const I=n.directional[A];I.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),I.direction.sub(i),I.direction.transformDirection(m),A++}else if(x.isSpotLight){const I=n.spot[g];I.position.setFromMatrixPosition(x.matrixWorld),I.position.applyMatrix4(m),I.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),I.direction.sub(i),I.direction.transformDirection(m),g++}else if(x.isRectAreaLight){const I=n.rectArea[_];I.position.setFromMatrixPosition(x.matrixWorld),I.position.applyMatrix4(m),o.identity(),s.copy(x.matrixWorld),s.premultiply(m),o.extractRotation(s),I.halfWidth.set(x.width*.5,0,0),I.halfHeight.set(0,x.height*.5,0),I.halfWidth.applyMatrix4(o),I.halfHeight.applyMatrix4(o),_++}else if(x.isPointLight){const I=n.point[p];I.position.setFromMatrixPosition(x.matrixWorld),I.position.applyMatrix4(m),p++}else if(x.isHemisphereLight){const I=n.hemi[E];I.direction.setFromMatrixPosition(x.matrixWorld),I.direction.transformDirection(m),E++}}}return{setup:l,setupView:h,state:n}}function G2(r){const e=new qL(r),t=[],n=[];function i(){t.length=0,n.length=0}function s(u){t.push(u)}function o(u){n.push(u)}function l(u){e.setup(t,u)}function h(u){e.setupView(t,u)}return{init:i,state:{lightsArray:t,shadowsArray:n,lights:e,transmissionRenderTarget:null},setupLights:l,setupLightsView:h,pushLight:s,pushShadow:o}}function XL(r){let e=new WeakMap;function t(i,s=0){const o=e.get(i);let l;return o===void 0?(l=new G2(r),e.set(i,[l])):s>=o.length?(l=new G2(r),o.push(l)):l=o[s],l}function n(){e=new WeakMap}return{get:t,dispose:n}}class V2 extends Xi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Db,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 KL extends Xi{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}}const JL=`void main() {
3776
+ `+V)}else P!==""?console.warn("THREE.WebGLProgram: Program Info Log:",P):(N===""||W==="")&&(K=!1);K&&(L.diagnostics={runnable:X,programLog:P,vertexShader:{log:N,prefix:m},fragmentShader:{log:W,prefix:v}})}i.deleteShader(R),i.deleteShader(S),D=new Nd(i,E),b=CL(i,E)}let D;this.getUniforms=function(){return D===void 0&&T(this),D};let b;this.getAttributes=function(){return b===void 0&&T(this),b};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(E,mL)),M},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(E),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=vL++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=R,this.fragmentShader=S,this}let kL=0;class QL{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new OL(e),t.set(e,n)),n}}class OL{constructor(e){this.id=kL++,this.code=e,this.usedTimes=0}}function FL(r,e,t,n,i,s,o){const l=new md,h=new QL,u=new Set,d=[],A=i.logarithmicDepthBuffer,p=i.vertexTextures;let g=i.precision;const _={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(b){return u.add(b),b===0?"uv":`uv${b}`}function m(b,M,L,P,N){const W=P.fog,X=N.geometry,K=b.isMeshStandardMaterial?P.environment:null,te=(b.isMeshStandardMaterial?t:e).get(b.envMap||K),V=te&&te.mapping===Jh?te.image.height:null,ee=_[b.type];b.precision!==null&&(g=i.getMaxPrecision(b.precision),g!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",g,"instead."));const Q=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,z=Q!==void 0?Q.length:0;let Z=0;X.morphAttributes.position!==void 0&&(Z=1),X.morphAttributes.normal!==void 0&&(Z=2),X.morphAttributes.color!==void 0&&(Z=3);let re,j,de,Ae;if(ee){const Bt=Zi[ee];re=Bt.vertexShader,j=Bt.fragmentShader}else re=b.vertexShader,j=b.fragmentShader,h.update(b),de=h.getVertexShaderID(b),Ae=h.getFragmentShaderID(b);const _e=r.getRenderTarget(),Ee=N.isInstancedMesh===!0,Le=N.isBatchedMesh===!0,st=!!b.map,se=!!b.matcap,et=!!te,Qe=!!b.aoMap,ht=!!b.lightMap,Ke=!!b.bumpMap,pt=!!b.normalMap,Y=!!b.displacementMap,k=!!b.emissiveMap,le=!!b.metalnessMap,pe=!!b.roughnessMap,me=b.anisotropy>0,ye=b.clearcoat>0,Ge=b.iridescence>0,Ie=b.sheen>0,je=b.transmission>0,Ve=me&&!!b.anisotropyMap,Me=ye&&!!b.clearcoatMap,fe=ye&&!!b.clearcoatNormalMap,De=ye&&!!b.clearcoatRoughnessMap,Be=Ge&&!!b.iridescenceMap,be=Ge&&!!b.iridescenceThicknessMap,nt=Ie&&!!b.sheenColorMap,lt=Ie&&!!b.sheenRoughnessMap,dt=!!b.specularMap,ct=!!b.specularColorMap,ut=!!b.specularIntensityMap,G=je&&!!b.transmissionMap,O=je&&!!b.thicknessMap,ge=!!b.gradientMap,ve=!!b.alphaMap,Fe=b.alphaTest>0,Pe=!!b.alphaHash,vt=!!b.extensions;let Lt=$s;b.toneMapped&&(_e===null||_e.isXRRenderTarget===!0)&&(Lt=r.toneMapping);const Nt={shaderID:ee,shaderType:b.type,shaderName:b.name,vertexShader:re,fragmentShader:j,defines:b.defines,customVertexShaderID:de,customFragmentShaderID:Ae,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:g,batching:Le,instancing:Ee,instancingColor:Ee&&N.instanceColor!==null,instancingMorph:Ee&&N.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:_e===null?r.outputColorSpace:_e.isXRRenderTarget===!0?_e.texture.colorSpace:cr,alphaToCoverage:!!b.alphaToCoverage,map:st,matcap:se,envMap:et,envMapMode:et&&te.mapping,envMapCubeUVHeight:V,aoMap:Qe,lightMap:ht,bumpMap:Ke,normalMap:pt,displacementMap:p&&Y,emissiveMap:k,normalMapObjectSpace:pt&&b.normalMapType===Nb,normalMapTangentSpace:pt&&b.normalMapType===NE,metalnessMap:le,roughnessMap:pe,anisotropy:me,anisotropyMap:Ve,clearcoat:ye,clearcoatMap:Me,clearcoatNormalMap:fe,clearcoatRoughnessMap:De,iridescence:Ge,iridescenceMap:Be,iridescenceThicknessMap:be,sheen:Ie,sheenColorMap:nt,sheenRoughnessMap:lt,specularMap:dt,specularColorMap:ct,specularIntensityMap:ut,transmission:je,transmissionMap:G,thicknessMap:O,gradientMap:ge,opaque:b.transparent===!1&&b.blending===sl&&b.alphaToCoverage===!1,alphaMap:ve,alphaTest:Fe,alphaHash:Pe,combine:b.combine,mapUv:st&&E(b.map.channel),aoMapUv:Qe&&E(b.aoMap.channel),lightMapUv:ht&&E(b.lightMap.channel),bumpMapUv:Ke&&E(b.bumpMap.channel),normalMapUv:pt&&E(b.normalMap.channel),displacementMapUv:Y&&E(b.displacementMap.channel),emissiveMapUv:k&&E(b.emissiveMap.channel),metalnessMapUv:le&&E(b.metalnessMap.channel),roughnessMapUv:pe&&E(b.roughnessMap.channel),anisotropyMapUv:Ve&&E(b.anisotropyMap.channel),clearcoatMapUv:Me&&E(b.clearcoatMap.channel),clearcoatNormalMapUv:fe&&E(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:De&&E(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Be&&E(b.iridescenceMap.channel),iridescenceThicknessMapUv:be&&E(b.iridescenceThicknessMap.channel),sheenColorMapUv:nt&&E(b.sheenColorMap.channel),sheenRoughnessMapUv:lt&&E(b.sheenRoughnessMap.channel),specularMapUv:dt&&E(b.specularMap.channel),specularColorMapUv:ct&&E(b.specularColorMap.channel),specularIntensityMapUv:ut&&E(b.specularIntensityMap.channel),transmissionMapUv:G&&E(b.transmissionMap.channel),thicknessMapUv:O&&E(b.thicknessMap.channel),alphaMapUv:ve&&E(b.alphaMap.channel),vertexTangents:!!X.attributes.tangent&&(pt||me),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,pointsUvs:N.isPoints===!0&&!!X.attributes.uv&&(st||ve),fog:!!W,useFog:b.fog===!0,fogExp2:!!W&&W.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:A,skinning:N.isSkinnedMesh===!0,morphTargets:X.morphAttributes.position!==void 0,morphNormals:X.morphAttributes.normal!==void 0,morphColors:X.morphAttributes.color!==void 0,morphTargetsCount:z,morphTextureStride:Z,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:Lt,useLegacyLights:r._useLegacyLights,decodeVideoTexture:st&&b.map.isVideoTexture===!0&&Tt.getTransfer(b.map.colorSpace)===Ht,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===Ii,flipSided:b.side===Qr,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:vt&&b.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:vt&&b.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return Nt.vertexUv1s=u.has(1),Nt.vertexUv2s=u.has(2),Nt.vertexUv3s=u.has(3),u.clear(),Nt}function v(b){const M=[];if(b.shaderID?M.push(b.shaderID):(M.push(b.customVertexShaderID),M.push(b.customFragmentShaderID)),b.defines!==void 0)for(const L in b.defines)M.push(L),M.push(b.defines[L]);return b.isRawShaderMaterial===!1&&(w(M,b),x(M,b),M.push(r.outputColorSpace)),M.push(b.customProgramCacheKey),M.join()}function w(b,M){b.push(M.precision),b.push(M.outputColorSpace),b.push(M.envMapMode),b.push(M.envMapCubeUVHeight),b.push(M.mapUv),b.push(M.alphaMapUv),b.push(M.lightMapUv),b.push(M.aoMapUv),b.push(M.bumpMapUv),b.push(M.normalMapUv),b.push(M.displacementMapUv),b.push(M.emissiveMapUv),b.push(M.metalnessMapUv),b.push(M.roughnessMapUv),b.push(M.anisotropyMapUv),b.push(M.clearcoatMapUv),b.push(M.clearcoatNormalMapUv),b.push(M.clearcoatRoughnessMapUv),b.push(M.iridescenceMapUv),b.push(M.iridescenceThicknessMapUv),b.push(M.sheenColorMapUv),b.push(M.sheenRoughnessMapUv),b.push(M.specularMapUv),b.push(M.specularColorMapUv),b.push(M.specularIntensityMapUv),b.push(M.transmissionMapUv),b.push(M.thicknessMapUv),b.push(M.combine),b.push(M.fogExp2),b.push(M.sizeAttenuation),b.push(M.morphTargetsCount),b.push(M.morphAttributeCount),b.push(M.numDirLights),b.push(M.numPointLights),b.push(M.numSpotLights),b.push(M.numSpotLightMaps),b.push(M.numHemiLights),b.push(M.numRectAreaLights),b.push(M.numDirLightShadows),b.push(M.numPointLightShadows),b.push(M.numSpotLightShadows),b.push(M.numSpotLightShadowsWithMaps),b.push(M.numLightProbes),b.push(M.shadowMapType),b.push(M.toneMapping),b.push(M.numClippingPlanes),b.push(M.numClipIntersection),b.push(M.depthPacking)}function x(b,M){l.disableAll(),M.supportsVertexTextures&&l.enable(0),M.instancing&&l.enable(1),M.instancingColor&&l.enable(2),M.instancingMorph&&l.enable(3),M.matcap&&l.enable(4),M.envMap&&l.enable(5),M.normalMapObjectSpace&&l.enable(6),M.normalMapTangentSpace&&l.enable(7),M.clearcoat&&l.enable(8),M.iridescence&&l.enable(9),M.alphaTest&&l.enable(10),M.vertexColors&&l.enable(11),M.vertexAlphas&&l.enable(12),M.vertexUv1s&&l.enable(13),M.vertexUv2s&&l.enable(14),M.vertexUv3s&&l.enable(15),M.vertexTangents&&l.enable(16),M.anisotropy&&l.enable(17),M.alphaHash&&l.enable(18),M.batching&&l.enable(19),b.push(l.mask),l.disableAll(),M.fog&&l.enable(0),M.useFog&&l.enable(1),M.flatShading&&l.enable(2),M.logarithmicDepthBuffer&&l.enable(3),M.skinning&&l.enable(4),M.morphTargets&&l.enable(5),M.morphNormals&&l.enable(6),M.morphColors&&l.enable(7),M.premultipliedAlpha&&l.enable(8),M.shadowMapEnabled&&l.enable(9),M.useLegacyLights&&l.enable(10),M.doubleSided&&l.enable(11),M.flipSided&&l.enable(12),M.useDepthPacking&&l.enable(13),M.dithering&&l.enable(14),M.transmission&&l.enable(15),M.sheen&&l.enable(16),M.opaque&&l.enable(17),M.pointsUvs&&l.enable(18),M.decodeVideoTexture&&l.enable(19),M.alphaToCoverage&&l.enable(20),b.push(l.mask)}function I(b){const M=_[b.type];let L;if(M){const P=Zi[M];L=Ml.clone(P.uniforms)}else L=b.uniforms;return L}function R(b,M){let L;for(let P=0,N=d.length;P<N;P++){const W=d[P];if(W.cacheKey===M){L=W,++L.usedTimes;break}}return L===void 0&&(L=new PL(r,M,b,s),d.push(L)),L}function S(b){if(--b.usedTimes===0){const M=d.indexOf(b);d[M]=d[d.length-1],d.pop(),b.destroy()}}function T(b){h.remove(b)}function D(){h.dispose()}return{getParameters:m,getProgramCacheKey:v,getUniforms:I,acquireProgram:R,releaseProgram:S,releaseShaderCache:T,programs:d,dispose:D}}function zL(){let r=new WeakMap;function e(s){let o=r.get(s);return o===void 0&&(o={},r.set(s,o)),o}function t(s){r.delete(s)}function n(s,o,l){r.get(s)[o]=l}function i(){r=new WeakMap}return{get:e,remove:t,update:n,dispose:i}}function HL(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.material.id!==e.material.id?r.material.id-e.material.id:r.z!==e.z?r.z-e.z:r.id-e.id}function z2(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.z!==e.z?e.z-r.z:r.id-e.id}function H2(){const r=[];let e=0;const t=[],n=[],i=[];function s(){e=0,t.length=0,n.length=0,i.length=0}function o(A,p,g,_,E,m){let v=r[e];return v===void 0?(v={id:A.id,object:A,geometry:p,material:g,groupOrder:_,renderOrder:A.renderOrder,z:E,group:m},r[e]=v):(v.id=A.id,v.object=A,v.geometry=p,v.material=g,v.groupOrder=_,v.renderOrder=A.renderOrder,v.z=E,v.group=m),e++,v}function l(A,p,g,_,E,m){const v=o(A,p,g,_,E,m);g.transmission>0?n.push(v):g.transparent===!0?i.push(v):t.push(v)}function h(A,p,g,_,E,m){const v=o(A,p,g,_,E,m);g.transmission>0?n.unshift(v):g.transparent===!0?i.unshift(v):t.unshift(v)}function u(A,p){t.length>1&&t.sort(A||HL),n.length>1&&n.sort(p||z2),i.length>1&&i.sort(p||z2)}function d(){for(let A=e,p=r.length;A<p;A++){const g=r[A];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:n,transparent:i,init:s,push:l,unshift:h,finish:d,sort:u}}function GL(){let r=new WeakMap;function e(n,i){const s=r.get(n);let o;return s===void 0?(o=new H2,r.set(n,[o])):i>=s.length?(o=new H2,s.push(o)):o=s[i],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function VL(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new H,color:new He};break;case"SpotLight":t={position:new H,direction:new H,color:new He,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new H,color:new He,distance:0,decay:0};break;case"HemisphereLight":t={direction:new H,skyColor:new He,groundColor:new He};break;case"RectAreaLight":t={color:new He,position:new H,halfWidth:new H,halfHeight:new H};break}return r[e.id]=t,t}}}function jL(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ue};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ue};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ue,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let WL=0;function YL(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function qL(r){const e=new VL,t=jL(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)n.probe.push(new H);const i=new H,s=new rt,o=new rt;function l(u,d){let A=0,p=0,g=0;for(let L=0;L<9;L++)n.probe[L].set(0,0,0);let _=0,E=0,m=0,v=0,w=0,x=0,I=0,R=0,S=0,T=0,D=0;u.sort(YL);const b=d===!0?Math.PI:1;for(let L=0,P=u.length;L<P;L++){const N=u[L],W=N.color,X=N.intensity,K=N.distance,te=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)A+=W.r*X*b,p+=W.g*X*b,g+=W.b*X*b;else if(N.isLightProbe){for(let V=0;V<9;V++)n.probe[V].addScaledVector(N.sh.coefficients[V],X);D++}else if(N.isDirectionalLight){const V=e.get(N);if(V.color.copy(N.color).multiplyScalar(N.intensity*b),N.castShadow){const ee=N.shadow,Q=t.get(N);Q.shadowBias=ee.bias,Q.shadowNormalBias=ee.normalBias,Q.shadowRadius=ee.radius,Q.shadowMapSize=ee.mapSize,n.directionalShadow[_]=Q,n.directionalShadowMap[_]=te,n.directionalShadowMatrix[_]=N.shadow.matrix,x++}n.directional[_]=V,_++}else if(N.isSpotLight){const V=e.get(N);V.position.setFromMatrixPosition(N.matrixWorld),V.color.copy(W).multiplyScalar(X*b),V.distance=K,V.coneCos=Math.cos(N.angle),V.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),V.decay=N.decay,n.spot[m]=V;const ee=N.shadow;if(N.map&&(n.spotLightMap[S]=N.map,S++,ee.updateMatrices(N),N.castShadow&&T++),n.spotLightMatrix[m]=ee.matrix,N.castShadow){const Q=t.get(N);Q.shadowBias=ee.bias,Q.shadowNormalBias=ee.normalBias,Q.shadowRadius=ee.radius,Q.shadowMapSize=ee.mapSize,n.spotShadow[m]=Q,n.spotShadowMap[m]=te,R++}m++}else if(N.isRectAreaLight){const V=e.get(N);V.color.copy(W).multiplyScalar(X),V.halfWidth.set(N.width*.5,0,0),V.halfHeight.set(0,N.height*.5,0),n.rectArea[v]=V,v++}else if(N.isPointLight){const V=e.get(N);if(V.color.copy(N.color).multiplyScalar(N.intensity*b),V.distance=N.distance,V.decay=N.decay,N.castShadow){const ee=N.shadow,Q=t.get(N);Q.shadowBias=ee.bias,Q.shadowNormalBias=ee.normalBias,Q.shadowRadius=ee.radius,Q.shadowMapSize=ee.mapSize,Q.shadowCameraNear=ee.camera.near,Q.shadowCameraFar=ee.camera.far,n.pointShadow[E]=Q,n.pointShadowMap[E]=te,n.pointShadowMatrix[E]=N.shadow.matrix,I++}n.point[E]=V,E++}else if(N.isHemisphereLight){const V=e.get(N);V.skyColor.copy(N.color).multiplyScalar(X*b),V.groundColor.copy(N.groundColor).multiplyScalar(X*b),n.hemi[w]=V,w++}}v>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ne.LTC_FLOAT_1,n.rectAreaLTC2=Ne.LTC_FLOAT_2):(n.rectAreaLTC1=Ne.LTC_HALF_1,n.rectAreaLTC2=Ne.LTC_HALF_2)),n.ambient[0]=A,n.ambient[1]=p,n.ambient[2]=g;const M=n.hash;(M.directionalLength!==_||M.pointLength!==E||M.spotLength!==m||M.rectAreaLength!==v||M.hemiLength!==w||M.numDirectionalShadows!==x||M.numPointShadows!==I||M.numSpotShadows!==R||M.numSpotMaps!==S||M.numLightProbes!==D)&&(n.directional.length=_,n.spot.length=m,n.rectArea.length=v,n.point.length=E,n.hemi.length=w,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=I,n.pointShadowMap.length=I,n.spotShadow.length=R,n.spotShadowMap.length=R,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=I,n.spotLightMatrix.length=R+S-T,n.spotLightMap.length=S,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=D,M.directionalLength=_,M.pointLength=E,M.spotLength=m,M.rectAreaLength=v,M.hemiLength=w,M.numDirectionalShadows=x,M.numPointShadows=I,M.numSpotShadows=R,M.numSpotMaps=S,M.numLightProbes=D,n.version=WL++)}function h(u,d){let A=0,p=0,g=0,_=0,E=0;const m=d.matrixWorldInverse;for(let v=0,w=u.length;v<w;v++){const x=u[v];if(x.isDirectionalLight){const I=n.directional[A];I.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),I.direction.sub(i),I.direction.transformDirection(m),A++}else if(x.isSpotLight){const I=n.spot[g];I.position.setFromMatrixPosition(x.matrixWorld),I.position.applyMatrix4(m),I.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),I.direction.sub(i),I.direction.transformDirection(m),g++}else if(x.isRectAreaLight){const I=n.rectArea[_];I.position.setFromMatrixPosition(x.matrixWorld),I.position.applyMatrix4(m),o.identity(),s.copy(x.matrixWorld),s.premultiply(m),o.extractRotation(s),I.halfWidth.set(x.width*.5,0,0),I.halfHeight.set(0,x.height*.5,0),I.halfWidth.applyMatrix4(o),I.halfHeight.applyMatrix4(o),_++}else if(x.isPointLight){const I=n.point[p];I.position.setFromMatrixPosition(x.matrixWorld),I.position.applyMatrix4(m),p++}else if(x.isHemisphereLight){const I=n.hemi[E];I.direction.setFromMatrixPosition(x.matrixWorld),I.direction.transformDirection(m),E++}}}return{setup:l,setupView:h,state:n}}function G2(r){const e=new qL(r),t=[],n=[];function i(){t.length=0,n.length=0}function s(u){t.push(u)}function o(u){n.push(u)}function l(u){e.setup(t,u)}function h(u){e.setupView(t,u)}return{init:i,state:{lightsArray:t,shadowsArray:n,lights:e,transmissionRenderTarget:null},setupLights:l,setupLightsView:h,pushLight:s,pushShadow:o}}function XL(r){let e=new WeakMap;function t(i,s=0){const o=e.get(i);let l;return o===void 0?(l=new G2(r),e.set(i,[l])):s>=o.length?(l=new G2(r),o.push(l)):l=o[s],l}function n(){e=new WeakMap}return{get:t,dispose:n}}class V2 extends Xi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Db,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 KL extends Xi{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}}const JL=`void main() {
3777
3777
  gl_Position = vec4( position, 1.0 );
3778
3778
  }`,ZL=`uniform sampler2D shadow_pass;
3779
3779
  uniform vec2 resolution;
@@ -3801,7 +3801,7 @@ void main() {
3801
3801
  squared_mean = squared_mean / samples;
3802
3802
  float std_dev = sqrt( squared_mean - mean * mean );
3803
3803
  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
3804
- }`;function $L(r,e,t){let n=new ZA;const i=new Ue,s=new Ue,o=new Ft,l=new V2({depthPacking:Lb}),h=new KL,u={},d=t.maxTextureSize,A={[wi]:Qr,[Qr]:wi,[Ii]:Ii},p=new Cr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ue},radius:{value:4}},vertexShader:JL,fragmentShader:ZL}),g=p.clone();g.defines.HORIZONTAL_PASS=1;const _=new Vn;_.setAttribute("position",new zr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Xr(_,p),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ky;let v=this.type;this.render=function(S,T,D){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||S.length===0)return;const b=r.getRenderTarget(),M=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),P=r.state;P.setBlending(gs),P.buffers.color.setClear(1,1,1,1),P.buffers.depth.setTest(!0),P.setScissorTest(!1);const N=v!==As&&this.type===As,W=v===As&&this.type!==As;for(let X=0,K=S.length;X<K;X++){const te=S[X],V=te.shadow;if(V===void 0){console.warn("THREE.WebGLShadowMap:",te,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;i.copy(V.mapSize);const ee=V.getFrameExtents();if(i.multiply(ee),s.copy(V.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/ee.x),i.x=s.x*ee.x,V.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/ee.y),i.y=s.y*ee.y,V.mapSize.y=s.y)),V.map===null||N===!0||W===!0){const z=this.type!==As?{minFilter:Ar,magFilter:Ar}:{};V.map!==null&&V.map.dispose(),V.map=new cn(i.x,i.y,z),V.map.texture.name=te.name+".shadowMap",V.camera.updateProjectionMatrix()}r.setRenderTarget(V.map),r.clear();const Q=V.getViewportCount();for(let z=0;z<Q;z++){const Z=V.getViewport(z);o.set(s.x*Z.x,s.y*Z.y,s.x*Z.z,s.y*Z.w),P.viewport(o),V.updateMatrices(te,z),n=V.getFrustum(),I(T,D,V.camera,te,this.type)}V.isPointLightShadow!==!0&&this.type===As&&w(V,D),V.needsUpdate=!1}v=this.type,m.needsUpdate=!1,r.setRenderTarget(b,M,L)};function w(S,T){const D=e.update(E);p.defines.VSM_SAMPLES!==S.blurSamples&&(p.defines.VSM_SAMPLES=S.blurSamples,g.defines.VSM_SAMPLES=S.blurSamples,p.needsUpdate=!0,g.needsUpdate=!0),S.mapPass===null&&(S.mapPass=new cn(i.x,i.y)),p.uniforms.shadow_pass.value=S.map.texture,p.uniforms.resolution.value=S.mapSize,p.uniforms.radius.value=S.radius,r.setRenderTarget(S.mapPass),r.clear(),r.renderBufferDirect(T,null,D,p,E,null),g.uniforms.shadow_pass.value=S.mapPass.texture,g.uniforms.resolution.value=S.mapSize,g.uniforms.radius.value=S.radius,r.setRenderTarget(S.map),r.clear(),r.renderBufferDirect(T,null,D,g,E,null)}function x(S,T,D,b){let M=null;const L=D.isPointLight===!0?S.customDistanceMaterial:S.customDepthMaterial;if(L!==void 0)M=L;else if(M=D.isPointLight===!0?h:l,r.localClippingEnabled&&T.clipShadows===!0&&Array.isArray(T.clippingPlanes)&&T.clippingPlanes.length!==0||T.displacementMap&&T.displacementScale!==0||T.alphaMap&&T.alphaTest>0||T.map&&T.alphaTest>0){const P=M.uuid,N=T.uuid;let W=u[P];W===void 0&&(W={},u[P]=W);let X=W[N];X===void 0&&(X=M.clone(),W[N]=X,T.addEventListener("dispose",R)),M=X}if(M.visible=T.visible,M.wireframe=T.wireframe,b===As?M.side=T.shadowSide!==null?T.shadowSide:T.side:M.side=T.shadowSide!==null?T.shadowSide:A[T.side],M.alphaMap=T.alphaMap,M.alphaTest=T.alphaTest,M.map=T.map,M.clipShadows=T.clipShadows,M.clippingPlanes=T.clippingPlanes,M.clipIntersection=T.clipIntersection,M.displacementMap=T.displacementMap,M.displacementScale=T.displacementScale,M.displacementBias=T.displacementBias,M.wireframeLinewidth=T.wireframeLinewidth,M.linewidth=T.linewidth,D.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const P=r.properties.get(M);P.light=D}return M}function I(S,T,D,b,M){if(S.visible===!1)return;if(S.layers.test(T.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&M===As)&&(!S.frustumCulled||n.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,S.matrixWorld);const P=e.update(S),N=S.material;if(Array.isArray(N)){const W=P.groups;for(let X=0,K=W.length;X<K;X++){const te=W[X],V=N[te.materialIndex];if(V&&V.visible){const ee=x(S,V,b,M);S.onBeforeShadow(r,S,T,D,P,ee,te),r.renderBufferDirect(D,null,P,ee,S,te),S.onAfterShadow(r,S,T,D,P,ee,te)}}}else if(N.visible){const W=x(S,N,b,M);S.onBeforeShadow(r,S,T,D,P,W,null),r.renderBufferDirect(D,null,P,W,S,null),S.onAfterShadow(r,S,T,D,P,W,null)}}const L=S.children;for(let P=0,N=L.length;P<N;P++)I(L[P],T,D,b,M)}function R(S){S.target.removeEventListener("dispose",R);for(const T in u){const D=u[T],b=S.target.uuid;b in D&&(D[b].dispose(),delete D[b])}}}function e8(r){function e(){let O=!1;const ge=new Ft;let ve=null;const Fe=new Ft(0,0,0,0);return{setMask:function(Pe){ve!==Pe&&!O&&(r.colorMask(Pe,Pe,Pe,Pe),ve=Pe)},setLocked:function(Pe){O=Pe},setClear:function(Pe,vt,Lt,Nt,Bt){Bt===!0&&(Pe*=Nt,vt*=Nt,Lt*=Nt),ge.set(Pe,vt,Lt,Nt),Fe.equals(ge)===!1&&(r.clearColor(Pe,vt,Lt,Nt),Fe.copy(ge))},reset:function(){O=!1,ve=null,Fe.set(-1,0,0,0)}}}function t(){let O=!1,ge=null,ve=null,Fe=null;return{setTest:function(Pe){Pe?Ae(r.DEPTH_TEST):_e(r.DEPTH_TEST)},setMask:function(Pe){ge!==Pe&&!O&&(r.depthMask(Pe),ge=Pe)},setFunc:function(Pe){if(ve!==Pe){switch(Pe){case db:r.depthFunc(r.NEVER);break;case fb:r.depthFunc(r.ALWAYS);break;case pb:r.depthFunc(r.LESS);break;case Kh:r.depthFunc(r.LEQUAL);break;case Ab:r.depthFunc(r.EQUAL);break;case gb:r.depthFunc(r.GEQUAL);break;case mb:r.depthFunc(r.GREATER);break;case vb:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}ve=Pe}},setLocked:function(Pe){O=Pe},setClear:function(Pe){Fe!==Pe&&(r.clearDepth(Pe),Fe=Pe)},reset:function(){O=!1,ge=null,ve=null,Fe=null}}}function n(){let O=!1,ge=null,ve=null,Fe=null,Pe=null,vt=null,Lt=null,Nt=null,Bt=null;return{setTest:function(_t){O||(_t?Ae(r.STENCIL_TEST):_e(r.STENCIL_TEST))},setMask:function(_t){ge!==_t&&!O&&(r.stencilMask(_t),ge=_t)},setFunc:function(_t,fr,Vt){(ve!==_t||Fe!==fr||Pe!==Vt)&&(r.stencilFunc(_t,fr,Vt),ve=_t,Fe=fr,Pe=Vt)},setOp:function(_t,fr,Vt){(vt!==_t||Lt!==fr||Nt!==Vt)&&(r.stencilOp(_t,fr,Vt),vt=_t,Lt=fr,Nt=Vt)},setLocked:function(_t){O=_t},setClear:function(_t){Bt!==_t&&(r.clearStencil(_t),Bt=_t)},reset:function(){O=!1,ge=null,ve=null,Fe=null,Pe=null,vt=null,Lt=null,Nt=null,Bt=null}}}const i=new e,s=new t,o=new n,l=new WeakMap,h=new WeakMap;let u={},d={},A=new WeakMap,p=[],g=null,_=!1,E=null,m=null,v=null,w=null,x=null,I=null,R=null,S=new He(0,0,0),T=0,D=!1,b=null,M=null,L=null,P=null,N=null;const W=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let X=!1,K=0;const te=r.getParameter(r.VERSION);te.indexOf("WebGL")!==-1?(K=parseFloat(/^WebGL (\d)/.exec(te)[1]),X=K>=1):te.indexOf("OpenGL ES")!==-1&&(K=parseFloat(/^OpenGL ES (\d)/.exec(te)[1]),X=K>=2);let V=null,ee={};const Q=r.getParameter(r.SCISSOR_BOX),z=r.getParameter(r.VIEWPORT),Z=new Ft().fromArray(Q),re=new Ft().fromArray(z);function j(O,ge,ve,Fe){const Pe=new Uint8Array(4),vt=r.createTexture();r.bindTexture(O,vt),r.texParameteri(O,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(O,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let Lt=0;Lt<ve;Lt++)O===r.TEXTURE_3D||O===r.TEXTURE_2D_ARRAY?r.texImage3D(ge,0,r.RGBA,1,1,Fe,0,r.RGBA,r.UNSIGNED_BYTE,Pe):r.texImage2D(ge+Lt,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,Pe);return vt}const de={};de[r.TEXTURE_2D]=j(r.TEXTURE_2D,r.TEXTURE_2D,1),de[r.TEXTURE_CUBE_MAP]=j(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),de[r.TEXTURE_2D_ARRAY]=j(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),de[r.TEXTURE_3D]=j(r.TEXTURE_3D,r.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),Ae(r.DEPTH_TEST),s.setFunc(Kh),Ke(!1),pt(Xy),Ae(r.CULL_FACE),Qe(gs);function Ae(O){u[O]!==!0&&(r.enable(O),u[O]=!0)}function _e(O){u[O]!==!1&&(r.disable(O),u[O]=!1)}function Ee(O,ge){return d[O]!==ge?(r.bindFramebuffer(O,ge),d[O]=ge,O===r.DRAW_FRAMEBUFFER&&(d[r.FRAMEBUFFER]=ge),O===r.FRAMEBUFFER&&(d[r.DRAW_FRAMEBUFFER]=ge),!0):!1}function Le(O,ge){let ve=p,Fe=!1;if(O){ve=A.get(ge),ve===void 0&&(ve=[],A.set(ge,ve));const Pe=O.textures;if(ve.length!==Pe.length||ve[0]!==r.COLOR_ATTACHMENT0){for(let vt=0,Lt=Pe.length;vt<Lt;vt++)ve[vt]=r.COLOR_ATTACHMENT0+vt;ve.length=Pe.length,Fe=!0}}else ve[0]!==r.BACK&&(ve[0]=r.BACK,Fe=!0);Fe&&r.drawBuffers(ve)}function st(O){return g!==O?(r.useProgram(O),g=O,!0):!1}const se={[no]:r.FUNC_ADD,[XB]:r.FUNC_SUBTRACT,[KB]:r.FUNC_REVERSE_SUBTRACT};se[JB]=r.MIN,se[ZB]=r.MAX;const et={[$B]:r.ZERO,[eb]:r.ONE,[tb]:r.SRC_COLOR,[pA]:r.SRC_ALPHA,[ob]:r.SRC_ALPHA_SATURATE,[sb]:r.DST_COLOR,[nb]:r.DST_ALPHA,[rb]:r.ONE_MINUS_SRC_COLOR,[AA]:r.ONE_MINUS_SRC_ALPHA,[ab]:r.ONE_MINUS_DST_COLOR,[ib]:r.ONE_MINUS_DST_ALPHA,[lb]:r.CONSTANT_COLOR,[cb]:r.ONE_MINUS_CONSTANT_COLOR,[ub]:r.CONSTANT_ALPHA,[hb]:r.ONE_MINUS_CONSTANT_ALPHA};function Qe(O,ge,ve,Fe,Pe,vt,Lt,Nt,Bt,_t){if(O===gs){_===!0&&(_e(r.BLEND),_=!1);return}if(_===!1&&(Ae(r.BLEND),_=!0),O!==qB){if(O!==E||_t!==D){if((m!==no||x!==no)&&(r.blendEquation(r.FUNC_ADD),m=no,x=no),_t)switch(O){case sl:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case fA:r.blendFunc(r.ONE,r.ONE);break;case Jy:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Zy:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",O);break}else switch(O){case sl:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case fA:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case Jy:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Zy:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",O);break}v=null,w=null,I=null,R=null,S.set(0,0,0),T=0,E=O,D=_t}return}Pe=Pe||ge,vt=vt||ve,Lt=Lt||Fe,(ge!==m||Pe!==x)&&(r.blendEquationSeparate(se[ge],se[Pe]),m=ge,x=Pe),(ve!==v||Fe!==w||vt!==I||Lt!==R)&&(r.blendFuncSeparate(et[ve],et[Fe],et[vt],et[Lt]),v=ve,w=Fe,I=vt,R=Lt),(Nt.equals(S)===!1||Bt!==T)&&(r.blendColor(Nt.r,Nt.g,Nt.b,Bt),S.copy(Nt),T=Bt),E=O,D=!1}function ct(O,ge){O.side===Ii?_e(r.CULL_FACE):Ae(r.CULL_FACE);let ve=O.side===Qr;ge&&(ve=!ve),Ke(ve),O.blending===sl&&O.transparent===!1?Qe(gs):Qe(O.blending,O.blendEquation,O.blendSrc,O.blendDst,O.blendEquationAlpha,O.blendSrcAlpha,O.blendDstAlpha,O.blendColor,O.blendAlpha,O.premultipliedAlpha),s.setFunc(O.depthFunc),s.setTest(O.depthTest),s.setMask(O.depthWrite),i.setMask(O.colorWrite);const Fe=O.stencilWrite;o.setTest(Fe),Fe&&(o.setMask(O.stencilWriteMask),o.setFunc(O.stencilFunc,O.stencilRef,O.stencilFuncMask),o.setOp(O.stencilFail,O.stencilZFail,O.stencilZPass)),k(O.polygonOffset,O.polygonOffsetFactor,O.polygonOffsetUnits),O.alphaToCoverage===!0?Ae(r.SAMPLE_ALPHA_TO_COVERAGE):_e(r.SAMPLE_ALPHA_TO_COVERAGE)}function Ke(O){b!==O&&(O?r.frontFace(r.CW):r.frontFace(r.CCW),b=O)}function pt(O){O!==jB?(Ae(r.CULL_FACE),O!==M&&(O===Xy?r.cullFace(r.BACK):O===WB?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):_e(r.CULL_FACE),M=O}function Y(O){O!==L&&(X&&r.lineWidth(O),L=O)}function k(O,ge,ve){O?(Ae(r.POLYGON_OFFSET_FILL),(P!==ge||N!==ve)&&(r.polygonOffset(ge,ve),P=ge,N=ve)):_e(r.POLYGON_OFFSET_FILL)}function le(O){O?Ae(r.SCISSOR_TEST):_e(r.SCISSOR_TEST)}function pe(O){O===void 0&&(O=r.TEXTURE0+W-1),V!==O&&(r.activeTexture(O),V=O)}function me(O,ge,ve){ve===void 0&&(V===null?ve=r.TEXTURE0+W-1:ve=V);let Fe=ee[ve];Fe===void 0&&(Fe={type:void 0,texture:void 0},ee[ve]=Fe),(Fe.type!==O||Fe.texture!==ge)&&(V!==ve&&(r.activeTexture(ve),V=ve),r.bindTexture(O,ge||de[O]),Fe.type=O,Fe.texture=ge)}function ye(){const O=ee[V];O!==void 0&&O.type!==void 0&&(r.bindTexture(O.type,null),O.type=void 0,O.texture=void 0)}function Ge(){try{r.compressedTexImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Ie(){try{r.compressedTexImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function je(){try{r.texSubImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Ve(){try{r.texSubImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Me(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function fe(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function De(){try{r.texStorage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Be(){try{r.texStorage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function be(){try{r.texImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function nt(){try{r.texImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function lt(O){Z.equals(O)===!1&&(r.scissor(O.x,O.y,O.z,O.w),Z.copy(O))}function dt(O){re.equals(O)===!1&&(r.viewport(O.x,O.y,O.z,O.w),re.copy(O))}function ut(O,ge){let ve=h.get(ge);ve===void 0&&(ve=new WeakMap,h.set(ge,ve));let Fe=ve.get(O);Fe===void 0&&(Fe=r.getUniformBlockIndex(ge,O.name),ve.set(O,Fe))}function ht(O,ge){const ve=h.get(ge).get(O);l.get(ge)!==ve&&(r.uniformBlockBinding(ge,ve,O.__bindingPointIndex),l.set(ge,ve))}function G(){r.disable(r.BLEND),r.disable(r.CULL_FACE),r.disable(r.DEPTH_TEST),r.disable(r.POLYGON_OFFSET_FILL),r.disable(r.SCISSOR_TEST),r.disable(r.STENCIL_TEST),r.disable(r.SAMPLE_ALPHA_TO_COVERAGE),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ZERO),r.blendFuncSeparate(r.ONE,r.ZERO,r.ONE,r.ZERO),r.blendColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(r.LESS),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(r.ALWAYS,0,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP),r.clearStencil(0),r.cullFace(r.BACK),r.frontFace(r.CCW),r.polygonOffset(0,0),r.activeTexture(r.TEXTURE0),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),r.bindFramebuffer(r.READ_FRAMEBUFFER,null),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),u={},V=null,ee={},d={},A=new WeakMap,p=[],g=null,_=!1,E=null,m=null,v=null,w=null,x=null,I=null,R=null,S=new He(0,0,0),T=0,D=!1,b=null,M=null,L=null,P=null,N=null,Z.set(0,0,r.canvas.width,r.canvas.height),re.set(0,0,r.canvas.width,r.canvas.height),i.reset(),s.reset(),o.reset()}return{buffers:{color:i,depth:s,stencil:o},enable:Ae,disable:_e,bindFramebuffer:Ee,drawBuffers:Le,useProgram:st,setBlending:Qe,setMaterial:ct,setFlipSided:Ke,setCullFace:pt,setLineWidth:Y,setPolygonOffset:k,setScissorTest:le,activeTexture:pe,bindTexture:me,unbindTexture:ye,compressedTexImage2D:Ge,compressedTexImage3D:Ie,texImage2D:be,texImage3D:nt,updateUBOMapping:ut,uniformBlockBinding:ht,texStorage2D:De,texStorage3D:Be,texSubImage2D:je,texSubImage3D:Ve,compressedTexSubImage2D:Me,compressedTexSubImage3D:fe,scissor:lt,viewport:dt,reset:G}}function t8(r,e,t,n,i,s,o){const l=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,h=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),u=new Ue,d=new WeakMap;let A;const p=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(Y,k){return g?new OffscreenCanvas(Y,k):du("canvas")}function E(Y,k,le){let pe=1;const me=pt(Y);if((me.width>le||me.height>le)&&(pe=le/Math.max(me.width,me.height)),pe<1)if(typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Y instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Y instanceof ImageBitmap||typeof VideoFrame<"u"&&Y instanceof VideoFrame){const ye=Math.floor(pe*me.width),Ge=Math.floor(pe*me.height);A===void 0&&(A=_(ye,Ge));const Ie=k?_(ye,Ge):A;return Ie.width=ye,Ie.height=Ge,Ie.getContext("2d").drawImage(Y,0,0,ye,Ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+me.width+"x"+me.height+") to ("+ye+"x"+Ge+")."),Ie}else return"data"in Y&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+me.width+"x"+me.height+")."),Y;return Y}function m(Y){return Y.generateMipmaps&&Y.minFilter!==Ar&&Y.minFilter!==gr}function v(Y){r.generateMipmap(Y)}function w(Y,k,le,pe,me=!1){if(Y!==null){if(r[Y]!==void 0)return r[Y];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Y+"'")}let ye=k;if(k===r.RED&&(le===r.FLOAT&&(ye=r.R32F),le===r.HALF_FLOAT&&(ye=r.R16F),le===r.UNSIGNED_BYTE&&(ye=r.R8)),k===r.RED_INTEGER&&(le===r.UNSIGNED_BYTE&&(ye=r.R8UI),le===r.UNSIGNED_SHORT&&(ye=r.R16UI),le===r.UNSIGNED_INT&&(ye=r.R32UI),le===r.BYTE&&(ye=r.R8I),le===r.SHORT&&(ye=r.R16I),le===r.INT&&(ye=r.R32I)),k===r.RG&&(le===r.FLOAT&&(ye=r.RG32F),le===r.HALF_FLOAT&&(ye=r.RG16F),le===r.UNSIGNED_BYTE&&(ye=r.RG8)),k===r.RG_INTEGER&&(le===r.UNSIGNED_BYTE&&(ye=r.RG8UI),le===r.UNSIGNED_SHORT&&(ye=r.RG16UI),le===r.UNSIGNED_INT&&(ye=r.RG32UI),le===r.BYTE&&(ye=r.RG8I),le===r.SHORT&&(ye=r.RG16I),le===r.INT&&(ye=r.RG32I)),k===r.RGB&&le===r.UNSIGNED_INT_5_9_9_9_REV&&(ye=r.RGB9_E5),k===r.RGBA){const Ge=me?ad:Tt.getTransfer(pe);le===r.FLOAT&&(ye=r.RGBA32F),le===r.HALF_FLOAT&&(ye=r.RGBA16F),le===r.UNSIGNED_BYTE&&(ye=Ge===Ht?r.SRGB8_ALPHA8:r.RGBA8),le===r.UNSIGNED_SHORT_4_4_4_4&&(ye=r.RGBA4),le===r.UNSIGNED_SHORT_5_5_5_1&&(ye=r.RGB5_A1)}return(ye===r.R16F||ye===r.R32F||ye===r.RG16F||ye===r.RG32F||ye===r.RGBA16F||ye===r.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function x(Y,k){return m(Y)===!0||Y.isFramebufferTexture&&Y.minFilter!==Ar&&Y.minFilter!==gr?Math.log2(Math.max(k.width,k.height))+1:Y.mipmaps!==void 0&&Y.mipmaps.length>0?Y.mipmaps.length:Y.isCompressedTexture&&Array.isArray(Y.image)?k.mipmaps.length:1}function I(Y){const k=Y.target;k.removeEventListener("dispose",I),S(k),k.isVideoTexture&&d.delete(k)}function R(Y){const k=Y.target;k.removeEventListener("dispose",R),D(k)}function S(Y){const k=n.get(Y);if(k.__webglInit===void 0)return;const le=Y.source,pe=p.get(le);if(pe){const me=pe[k.__cacheKey];me.usedTimes--,me.usedTimes===0&&T(Y),Object.keys(pe).length===0&&p.delete(le)}n.remove(Y)}function T(Y){const k=n.get(Y);r.deleteTexture(k.__webglTexture);const le=Y.source,pe=p.get(le);delete pe[k.__cacheKey],o.memory.textures--}function D(Y){const k=n.get(Y);if(Y.depthTexture&&Y.depthTexture.dispose(),Y.isWebGLCubeRenderTarget)for(let pe=0;pe<6;pe++){if(Array.isArray(k.__webglFramebuffer[pe]))for(let me=0;me<k.__webglFramebuffer[pe].length;me++)r.deleteFramebuffer(k.__webglFramebuffer[pe][me]);else r.deleteFramebuffer(k.__webglFramebuffer[pe]);k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer[pe])}else{if(Array.isArray(k.__webglFramebuffer))for(let pe=0;pe<k.__webglFramebuffer.length;pe++)r.deleteFramebuffer(k.__webglFramebuffer[pe]);else r.deleteFramebuffer(k.__webglFramebuffer);if(k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&r.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRenderbuffer)for(let pe=0;pe<k.__webglColorRenderbuffer.length;pe++)k.__webglColorRenderbuffer[pe]&&r.deleteRenderbuffer(k.__webglColorRenderbuffer[pe]);k.__webglDepthRenderbuffer&&r.deleteRenderbuffer(k.__webglDepthRenderbuffer)}const le=Y.textures;for(let pe=0,me=le.length;pe<me;pe++){const ye=n.get(le[pe]);ye.__webglTexture&&(r.deleteTexture(ye.__webglTexture),o.memory.textures--),n.remove(le[pe])}n.remove(Y)}let b=0;function M(){b=0}function L(){const Y=b;return Y>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Y+" texture units while this GPU supports only "+i.maxTextures),b+=1,Y}function P(Y){const k=[];return k.push(Y.wrapS),k.push(Y.wrapT),k.push(Y.wrapR||0),k.push(Y.magFilter),k.push(Y.minFilter),k.push(Y.anisotropy),k.push(Y.internalFormat),k.push(Y.format),k.push(Y.type),k.push(Y.generateMipmaps),k.push(Y.premultiplyAlpha),k.push(Y.flipY),k.push(Y.unpackAlignment),k.push(Y.colorSpace),k.join()}function N(Y,k){const le=n.get(Y);if(Y.isVideoTexture&&ct(Y),Y.isRenderTargetTexture===!1&&Y.version>0&&le.__version!==Y.version){const pe=Y.image;if(pe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(pe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Z(le,Y,k);return}}t.bindTexture(r.TEXTURE_2D,le.__webglTexture,r.TEXTURE0+k)}function W(Y,k){const le=n.get(Y);if(Y.version>0&&le.__version!==Y.version){Z(le,Y,k);return}t.bindTexture(r.TEXTURE_2D_ARRAY,le.__webglTexture,r.TEXTURE0+k)}function X(Y,k){const le=n.get(Y);if(Y.version>0&&le.__version!==Y.version){Z(le,Y,k);return}t.bindTexture(r.TEXTURE_3D,le.__webglTexture,r.TEXTURE0+k)}function K(Y,k){const le=n.get(Y);if(Y.version>0&&le.__version!==Y.version){re(le,Y,k);return}t.bindTexture(r.TEXTURE_CUBE_MAP,le.__webglTexture,r.TEXTURE0+k)}const te={[ea]:r.REPEAT,[Ci]:r.CLAMP_TO_EDGE,[Zh]:r.MIRRORED_REPEAT},V={[Ar]:r.NEAREST,[oE]:r.NEAREST_MIPMAP_NEAREST,[nu]:r.NEAREST_MIPMAP_LINEAR,[gr]:r.LINEAR,[$h]:r.LINEAR_MIPMAP_NEAREST,[Mi]:r.LINEAR_MIPMAP_LINEAR},ee={[Ub]:r.NEVER,[zb]:r.ALWAYS,[Pb]:r.LESS,[PE]:r.LEQUAL,[kb]:r.EQUAL,[Fb]:r.GEQUAL,[Qb]:r.GREATER,[Ob]:r.NOTEQUAL};function Q(Y,k){if(k.type===lr&&e.has("OES_texture_float_linear")===!1&&(k.magFilter===gr||k.magFilter===$h||k.magFilter===nu||k.magFilter===Mi||k.minFilter===gr||k.minFilter===$h||k.minFilter===nu||k.minFilter===Mi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(Y,r.TEXTURE_WRAP_S,te[k.wrapS]),r.texParameteri(Y,r.TEXTURE_WRAP_T,te[k.wrapT]),(Y===r.TEXTURE_3D||Y===r.TEXTURE_2D_ARRAY)&&r.texParameteri(Y,r.TEXTURE_WRAP_R,te[k.wrapR]),r.texParameteri(Y,r.TEXTURE_MAG_FILTER,V[k.magFilter]),r.texParameteri(Y,r.TEXTURE_MIN_FILTER,V[k.minFilter]),k.compareFunction&&(r.texParameteri(Y,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(Y,r.TEXTURE_COMPARE_FUNC,ee[k.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(k.magFilter===Ar||k.minFilter!==nu&&k.minFilter!==Mi||k.type===lr&&e.has("OES_texture_float_linear")===!1)return;if(k.anisotropy>1||n.get(k).__currentAnisotropy){const le=e.get("EXT_texture_filter_anisotropic");r.texParameterf(Y,le.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,i.getMaxAnisotropy())),n.get(k).__currentAnisotropy=k.anisotropy}}}function z(Y,k){let le=!1;Y.__webglInit===void 0&&(Y.__webglInit=!0,k.addEventListener("dispose",I));const pe=k.source;let me=p.get(pe);me===void 0&&(me={},p.set(pe,me));const ye=P(k);if(ye!==Y.__cacheKey){me[ye]===void 0&&(me[ye]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,le=!0),me[ye].usedTimes++;const Ge=me[Y.__cacheKey];Ge!==void 0&&(me[Y.__cacheKey].usedTimes--,Ge.usedTimes===0&&T(k)),Y.__cacheKey=ye,Y.__webglTexture=me[ye].texture}return le}function Z(Y,k,le){let pe=r.TEXTURE_2D;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(pe=r.TEXTURE_2D_ARRAY),k.isData3DTexture&&(pe=r.TEXTURE_3D);const me=z(Y,k),ye=k.source;t.bindTexture(pe,Y.__webglTexture,r.TEXTURE0+le);const Ge=n.get(ye);if(ye.version!==Ge.__version||me===!0){t.activeTexture(r.TEXTURE0+le);const Ie=Tt.getPrimaries(Tt.workingColorSpace),je=k.colorSpace===ms?null:Tt.getPrimaries(k.colorSpace),Ve=k.colorSpace===ms||Ie===je?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,k.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,k.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ve);let Me=E(k.image,!1,i.maxTextureSize);Me=Ke(k,Me);const fe=s.convert(k.format,k.colorSpace),De=s.convert(k.type);let Be=w(k.internalFormat,fe,De,k.colorSpace,k.isVideoTexture);Q(pe,k);let be;const nt=k.mipmaps,lt=k.isVideoTexture!==!0&&Be!==CA,dt=Ge.__version===void 0||me===!0,ut=ye.dataReady,ht=x(k,Me);if(k.isDepthTexture)Be=r.DEPTH_COMPONENT16,k.type===lr?Be=r.DEPTH_COMPONENT32F:k.type===Si?Be=r.DEPTH_COMPONENT24:k.type===su&&(Be=r.DEPTH24_STENCIL8),dt&&(lt?t.texStorage2D(r.TEXTURE_2D,1,Be,Me.width,Me.height):t.texImage2D(r.TEXTURE_2D,0,Be,Me.width,Me.height,0,fe,De,null));else if(k.isDataTexture)if(nt.length>0){lt&&dt&&t.texStorage2D(r.TEXTURE_2D,ht,Be,nt[0].width,nt[0].height);for(let G=0,O=nt.length;G<O;G++)be=nt[G],lt?ut&&t.texSubImage2D(r.TEXTURE_2D,G,0,0,be.width,be.height,fe,De,be.data):t.texImage2D(r.TEXTURE_2D,G,Be,be.width,be.height,0,fe,De,be.data);k.generateMipmaps=!1}else lt?(dt&&t.texStorage2D(r.TEXTURE_2D,ht,Be,Me.width,Me.height),ut&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,Me.width,Me.height,fe,De,Me.data)):t.texImage2D(r.TEXTURE_2D,0,Be,Me.width,Me.height,0,fe,De,Me.data);else if(k.isCompressedTexture)if(k.isCompressedArrayTexture){lt&&dt&&t.texStorage3D(r.TEXTURE_2D_ARRAY,ht,Be,nt[0].width,nt[0].height,Me.depth);for(let G=0,O=nt.length;G<O;G++)be=nt[G],k.format!==vr?fe!==null?lt?ut&&t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,G,0,0,0,be.width,be.height,Me.depth,fe,be.data,0,0):t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,G,Be,be.width,be.height,Me.depth,0,be.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):lt?ut&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,G,0,0,0,be.width,be.height,Me.depth,fe,De,be.data):t.texImage3D(r.TEXTURE_2D_ARRAY,G,Be,be.width,be.height,Me.depth,0,fe,De,be.data)}else{lt&&dt&&t.texStorage2D(r.TEXTURE_2D,ht,Be,nt[0].width,nt[0].height);for(let G=0,O=nt.length;G<O;G++)be=nt[G],k.format!==vr?fe!==null?lt?ut&&t.compressedTexSubImage2D(r.TEXTURE_2D,G,0,0,be.width,be.height,fe,be.data):t.compressedTexImage2D(r.TEXTURE_2D,G,Be,be.width,be.height,0,be.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):lt?ut&&t.texSubImage2D(r.TEXTURE_2D,G,0,0,be.width,be.height,fe,De,be.data):t.texImage2D(r.TEXTURE_2D,G,Be,be.width,be.height,0,fe,De,be.data)}else if(k.isDataArrayTexture)lt?(dt&&t.texStorage3D(r.TEXTURE_2D_ARRAY,ht,Be,Me.width,Me.height,Me.depth),ut&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,Me.width,Me.height,Me.depth,fe,De,Me.data)):t.texImage3D(r.TEXTURE_2D_ARRAY,0,Be,Me.width,Me.height,Me.depth,0,fe,De,Me.data);else if(k.isData3DTexture)lt?(dt&&t.texStorage3D(r.TEXTURE_3D,ht,Be,Me.width,Me.height,Me.depth),ut&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,Me.width,Me.height,Me.depth,fe,De,Me.data)):t.texImage3D(r.TEXTURE_3D,0,Be,Me.width,Me.height,Me.depth,0,fe,De,Me.data);else if(k.isFramebufferTexture){if(dt)if(lt)t.texStorage2D(r.TEXTURE_2D,ht,Be,Me.width,Me.height);else{let G=Me.width,O=Me.height;for(let ge=0;ge<ht;ge++)t.texImage2D(r.TEXTURE_2D,ge,Be,G,O,0,fe,De,null),G>>=1,O>>=1}}else if(nt.length>0){if(lt&&dt){const G=pt(nt[0]);t.texStorage2D(r.TEXTURE_2D,ht,Be,G.width,G.height)}for(let G=0,O=nt.length;G<O;G++)be=nt[G],lt?ut&&t.texSubImage2D(r.TEXTURE_2D,G,0,0,fe,De,be):t.texImage2D(r.TEXTURE_2D,G,Be,fe,De,be);k.generateMipmaps=!1}else if(lt){if(dt){const G=pt(Me);t.texStorage2D(r.TEXTURE_2D,ht,Be,G.width,G.height)}ut&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,fe,De,Me)}else t.texImage2D(r.TEXTURE_2D,0,Be,fe,De,Me);m(k)&&v(pe),Ge.__version=ye.version,k.onUpdate&&k.onUpdate(k)}Y.__version=k.version}function re(Y,k,le){if(k.image.length!==6)return;const pe=z(Y,k),me=k.source;t.bindTexture(r.TEXTURE_CUBE_MAP,Y.__webglTexture,r.TEXTURE0+le);const ye=n.get(me);if(me.version!==ye.__version||pe===!0){t.activeTexture(r.TEXTURE0+le);const Ge=Tt.getPrimaries(Tt.workingColorSpace),Ie=k.colorSpace===ms?null:Tt.getPrimaries(k.colorSpace),je=k.colorSpace===ms||Ge===Ie?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,k.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,k.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,je);const Ve=k.isCompressedTexture||k.image[0].isCompressedTexture,Me=k.image[0]&&k.image[0].isDataTexture,fe=[];for(let O=0;O<6;O++)!Ve&&!Me?fe[O]=E(k.image[O],!0,i.maxCubemapSize):fe[O]=Me?k.image[O].image:k.image[O],fe[O]=Ke(k,fe[O]);const De=fe[0],Be=s.convert(k.format,k.colorSpace),be=s.convert(k.type),nt=w(k.internalFormat,Be,be,k.colorSpace),lt=k.isVideoTexture!==!0,dt=ye.__version===void 0||pe===!0,ut=me.dataReady;let ht=x(k,De);Q(r.TEXTURE_CUBE_MAP,k);let G;if(Ve){lt&&dt&&t.texStorage2D(r.TEXTURE_CUBE_MAP,ht,nt,De.width,De.height);for(let O=0;O<6;O++){G=fe[O].mipmaps;for(let ge=0;ge<G.length;ge++){const ve=G[ge];k.format!==vr?Be!==null?lt?ut&&t.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,0,0,ve.width,ve.height,Be,ve.data):t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,nt,ve.width,ve.height,0,ve.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):lt?ut&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,0,0,ve.width,ve.height,Be,be,ve.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,nt,ve.width,ve.height,0,Be,be,ve.data)}}}else{if(G=k.mipmaps,lt&&dt){G.length>0&&ht++;const O=pt(fe[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,ht,nt,O.width,O.height)}for(let O=0;O<6;O++)if(Me){lt?ut&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,0,0,fe[O].width,fe[O].height,Be,be,fe[O].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,nt,fe[O].width,fe[O].height,0,Be,be,fe[O].data);for(let ge=0;ge<G.length;ge++){const ve=G[ge].image[O].image;lt?ut&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,0,0,ve.width,ve.height,Be,be,ve.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,nt,ve.width,ve.height,0,Be,be,ve.data)}}else{lt?ut&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,0,0,Be,be,fe[O]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,nt,Be,be,fe[O]);for(let ge=0;ge<G.length;ge++){const ve=G[ge];lt?ut&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,0,0,Be,be,ve.image[O]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,nt,Be,be,ve.image[O])}}}m(k)&&v(r.TEXTURE_CUBE_MAP),ye.__version=me.version,k.onUpdate&&k.onUpdate(k)}Y.__version=k.version}function j(Y,k,le,pe,me,ye){const Ge=s.convert(le.format,le.colorSpace),Ie=s.convert(le.type),je=w(le.internalFormat,Ge,Ie,le.colorSpace);if(!n.get(k).__hasExternalTextures){const Ve=Math.max(1,k.width>>ye),Me=Math.max(1,k.height>>ye);me===r.TEXTURE_3D||me===r.TEXTURE_2D_ARRAY?t.texImage3D(me,ye,je,Ve,Me,k.depth,0,Ge,Ie,null):t.texImage2D(me,ye,je,Ve,Me,0,Ge,Ie,null)}t.bindFramebuffer(r.FRAMEBUFFER,Y),Qe(k)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,pe,me,n.get(le).__webglTexture,0,et(k)):(me===r.TEXTURE_2D||me>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&me<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,pe,me,n.get(le).__webglTexture,ye),t.bindFramebuffer(r.FRAMEBUFFER,null)}function de(Y,k,le){if(r.bindRenderbuffer(r.RENDERBUFFER,Y),k.depthBuffer&&!k.stencilBuffer){let pe=r.DEPTH_COMPONENT24;if(le||Qe(k)){const me=k.depthTexture;me&&me.isDepthTexture&&(me.type===lr?pe=r.DEPTH_COMPONENT32F:me.type===Si&&(pe=r.DEPTH_COMPONENT24));const ye=et(k);Qe(k)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,ye,pe,k.width,k.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,ye,pe,k.width,k.height)}else r.renderbufferStorage(r.RENDERBUFFER,pe,k.width,k.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,Y)}else if(k.depthBuffer&&k.stencilBuffer){const pe=et(k);le&&Qe(k)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,pe,r.DEPTH24_STENCIL8,k.width,k.height):Qe(k)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,pe,r.DEPTH24_STENCIL8,k.width,k.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,k.width,k.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,Y)}else{const pe=k.textures;for(let me=0;me<pe.length;me++){const ye=pe[me],Ge=s.convert(ye.format,ye.colorSpace),Ie=s.convert(ye.type),je=w(ye.internalFormat,Ge,Ie,ye.colorSpace),Ve=et(k);le&&Qe(k)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Ve,je,k.width,k.height):Qe(k)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Ve,je,k.width,k.height):r.renderbufferStorage(r.RENDERBUFFER,je,k.width,k.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function Ae(Y,k){if(k&&k.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(r.FRAMEBUFFER,Y),!(k.depthTexture&&k.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(k.depthTexture).__webglTexture||k.depthTexture.image.width!==k.width||k.depthTexture.image.height!==k.height)&&(k.depthTexture.image.width=k.width,k.depthTexture.image.height=k.height,k.depthTexture.needsUpdate=!0),N(k.depthTexture,0);const le=n.get(k.depthTexture).__webglTexture,pe=et(k);if(k.depthTexture.format===ol)Qe(k)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,le,0,pe):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,le,0);else if(k.depthTexture.format===au)Qe(k)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,le,0,pe):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,le,0);else throw new Error("Unknown depthTexture format")}function _e(Y){const k=n.get(Y),le=Y.isWebGLCubeRenderTarget===!0;if(Y.depthTexture&&!k.__autoAllocateDepthBuffer){if(le)throw new Error("target.depthTexture not supported in Cube render targets");Ae(k.__webglFramebuffer,Y)}else if(le){k.__webglDepthbuffer=[];for(let pe=0;pe<6;pe++)t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer[pe]),k.__webglDepthbuffer[pe]=r.createRenderbuffer(),de(k.__webglDepthbuffer[pe],Y,!1)}else t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer),k.__webglDepthbuffer=r.createRenderbuffer(),de(k.__webglDepthbuffer,Y,!1);t.bindFramebuffer(r.FRAMEBUFFER,null)}function Ee(Y,k,le){const pe=n.get(Y);k!==void 0&&j(pe.__webglFramebuffer,Y,Y.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),le!==void 0&&_e(Y)}function Le(Y){const k=Y.texture,le=n.get(Y),pe=n.get(k);Y.addEventListener("dispose",R);const me=Y.textures,ye=Y.isWebGLCubeRenderTarget===!0,Ge=me.length>1;if(Ge||(pe.__webglTexture===void 0&&(pe.__webglTexture=r.createTexture()),pe.__version=k.version,o.memory.textures++),ye){le.__webglFramebuffer=[];for(let Ie=0;Ie<6;Ie++)if(k.mipmaps&&k.mipmaps.length>0){le.__webglFramebuffer[Ie]=[];for(let je=0;je<k.mipmaps.length;je++)le.__webglFramebuffer[Ie][je]=r.createFramebuffer()}else le.__webglFramebuffer[Ie]=r.createFramebuffer()}else{if(k.mipmaps&&k.mipmaps.length>0){le.__webglFramebuffer=[];for(let Ie=0;Ie<k.mipmaps.length;Ie++)le.__webglFramebuffer[Ie]=r.createFramebuffer()}else le.__webglFramebuffer=r.createFramebuffer();if(Ge)for(let Ie=0,je=me.length;Ie<je;Ie++){const Ve=n.get(me[Ie]);Ve.__webglTexture===void 0&&(Ve.__webglTexture=r.createTexture(),o.memory.textures++)}if(Y.samples>0&&Qe(Y)===!1){le.__webglMultisampledFramebuffer=r.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,le.__webglMultisampledFramebuffer);for(let Ie=0;Ie<me.length;Ie++){const je=me[Ie];le.__webglColorRenderbuffer[Ie]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,le.__webglColorRenderbuffer[Ie]);const Ve=s.convert(je.format,je.colorSpace),Me=s.convert(je.type),fe=w(je.internalFormat,Ve,Me,je.colorSpace,Y.isXRRenderTarget===!0),De=et(Y);r.renderbufferStorageMultisample(r.RENDERBUFFER,De,fe,Y.width,Y.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ie,r.RENDERBUFFER,le.__webglColorRenderbuffer[Ie])}r.bindRenderbuffer(r.RENDERBUFFER,null),Y.depthBuffer&&(le.__webglDepthRenderbuffer=r.createRenderbuffer(),de(le.__webglDepthRenderbuffer,Y,!0)),t.bindFramebuffer(r.FRAMEBUFFER,null)}}if(ye){t.bindTexture(r.TEXTURE_CUBE_MAP,pe.__webglTexture),Q(r.TEXTURE_CUBE_MAP,k);for(let Ie=0;Ie<6;Ie++)if(k.mipmaps&&k.mipmaps.length>0)for(let je=0;je<k.mipmaps.length;je++)j(le.__webglFramebuffer[Ie][je],Y,k,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je);else j(le.__webglFramebuffer[Ie],Y,k,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0);m(k)&&v(r.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ge){for(let Ie=0,je=me.length;Ie<je;Ie++){const Ve=me[Ie],Me=n.get(Ve);t.bindTexture(r.TEXTURE_2D,Me.__webglTexture),Q(r.TEXTURE_2D,Ve),j(le.__webglFramebuffer,Y,Ve,r.COLOR_ATTACHMENT0+Ie,r.TEXTURE_2D,0),m(Ve)&&v(r.TEXTURE_2D)}t.unbindTexture()}else{let Ie=r.TEXTURE_2D;if((Y.isWebGL3DRenderTarget||Y.isWebGLArrayRenderTarget)&&(Ie=Y.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),t.bindTexture(Ie,pe.__webglTexture),Q(Ie,k),k.mipmaps&&k.mipmaps.length>0)for(let je=0;je<k.mipmaps.length;je++)j(le.__webglFramebuffer[je],Y,k,r.COLOR_ATTACHMENT0,Ie,je);else j(le.__webglFramebuffer,Y,k,r.COLOR_ATTACHMENT0,Ie,0);m(k)&&v(Ie),t.unbindTexture()}Y.depthBuffer&&_e(Y)}function st(Y){const k=Y.textures;for(let le=0,pe=k.length;le<pe;le++){const me=k[le];if(m(me)){const ye=Y.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,Ge=n.get(me).__webglTexture;t.bindTexture(ye,Ge),v(ye),t.unbindTexture()}}}function se(Y){if(Y.samples>0&&Qe(Y)===!1){const k=Y.textures,le=Y.width,pe=Y.height;let me=r.COLOR_BUFFER_BIT;const ye=[],Ge=Y.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ie=n.get(Y),je=k.length>1;if(je)for(let Ve=0;Ve<k.length;Ve++)t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.RENDERBUFFER,null),t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.TEXTURE_2D,null,0);t.bindFramebuffer(r.READ_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ie.__webglFramebuffer);for(let Ve=0;Ve<k.length;Ve++){ye.push(r.COLOR_ATTACHMENT0+Ve),Y.depthBuffer&&ye.push(Ge);const Me=Ie.__ignoreDepthValues!==void 0?Ie.__ignoreDepthValues:!1;if(Me===!1&&(Y.depthBuffer&&(me|=r.DEPTH_BUFFER_BIT),Y.stencilBuffer&&Ie.__isTransmissionRenderTarget!==!0&&(me|=r.STENCIL_BUFFER_BIT)),je&&r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,Ie.__webglColorRenderbuffer[Ve]),Me===!0&&(r.invalidateFramebuffer(r.READ_FRAMEBUFFER,[Ge]),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[Ge])),je){const fe=n.get(k[Ve]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,fe,0)}r.blitFramebuffer(0,0,le,pe,0,0,le,pe,me,r.NEAREST),h&&r.invalidateFramebuffer(r.READ_FRAMEBUFFER,ye)}if(t.bindFramebuffer(r.READ_FRAMEBUFFER,null),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),je)for(let Ve=0;Ve<k.length;Ve++){t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.RENDERBUFFER,Ie.__webglColorRenderbuffer[Ve]);const Me=n.get(k[Ve]).__webglTexture;t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.TEXTURE_2D,Me,0)}t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer)}}function et(Y){return Math.min(i.maxSamples,Y.samples)}function Qe(Y){const k=n.get(Y);return Y.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function ct(Y){const k=o.render.frame;d.get(Y)!==k&&(d.set(Y,k),Y.update())}function Ke(Y,k){const le=Y.colorSpace,pe=Y.format,me=Y.type;return Y.isCompressedTexture===!0||Y.isVideoTexture===!0||le!==cr&&le!==ms&&(Tt.getTransfer(le)===Ht?(pe!==vr||me!==mr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",le)),k}function pt(Y){return typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement?(u.width=Y.naturalWidth||Y.width,u.height=Y.naturalHeight||Y.height):typeof VideoFrame<"u"&&Y instanceof VideoFrame?(u.width=Y.displayWidth,u.height=Y.displayHeight):(u.width=Y.width,u.height=Y.height),u}this.allocateTextureUnit=L,this.resetTextureUnits=M,this.setTexture2D=N,this.setTexture2DArray=W,this.setTexture3D=X,this.setTextureCube=K,this.rebindTextures=Ee,this.setupRenderTarget=Le,this.updateRenderTargetMipmap=st,this.updateMultisampleRenderTarget=se,this.setupDepthRenderbuffer=_e,this.setupFrameBufferTexture=j,this.useMultisampledRTT=Qe}function r8(r,e){function t(n,i=ms){let s;const o=Tt.getTransfer(i);if(n===mr)return r.UNSIGNED_BYTE;if(n===cE)return r.UNSIGNED_SHORT_4_4_4_4;if(n===uE)return r.UNSIGNED_SHORT_5_5_5_1;if(n===Ib)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===vA)return r.BYTE;if(n===lE)return r.SHORT;if(n===_A)return r.UNSIGNED_SHORT;if(n===iu)return r.INT;if(n===Si)return r.UNSIGNED_INT;if(n===lr)return r.FLOAT;if(n===Or)return r.HALF_FLOAT;if(n===Cb)return r.ALPHA;if(n===Mb)return r.RGB;if(n===vr)return r.RGBA;if(n===Sb)return r.LUMINANCE;if(n===Tb)return r.LUMINANCE_ALPHA;if(n===ol)return r.DEPTH_COMPONENT;if(n===au)return r.DEPTH_STENCIL;if(n===ta)return r.RED;if(n===yA)return r.RED_INTEGER;if(n===so)return r.RG;if(n===ed)return r.RG_INTEGER;if(n===ou)return r.RGBA_INTEGER;if(n===td||n===EA||n===xA||n===rd)if(o===Ht)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===td)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===EA)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===xA)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===rd)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===td)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===EA)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===xA)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===rd)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===wA||n===hE||n===IA||n===dE)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===wA)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===hE)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===IA)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===dE)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===CA)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===MA||n===SA)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===MA)return o===Ht?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===SA)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===TA||n===fE||n===pE||n===AE||n===nd||n===gE||n===mE||n===vE||n===_E||n===yE||n===EE||n===xE||n===wE||n===IE)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===TA)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===fE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===pE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===AE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===nd)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===gE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===mE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===vE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===_E)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===yE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===EE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===xE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===wE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===IE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===id||n===CE||n===ME)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===id)return o===Ht?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===CE)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===ME)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Bb||n===SE||n===TE||n===BE)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===id)return s.COMPRESSED_RED_RGTC1_EXT;if(n===SE)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===TE)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===BE)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===su?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}class n8 extends dn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class la extends Zt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const i8={type:"move"};class og{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new la,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new la,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new la,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&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}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,s=null,o=null;const l=this._targetRay,h=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const E of e.hand.values()){const m=t.getJointPose(E,n),v=this._getHandJoint(u,E);m!==null&&(v.matrix.fromArray(m.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=m.radius),v.visible=m!==null}const d=u.joints["index-finger-tip"],A=u.joints["thumb-tip"],p=d.position.distanceTo(A.position),g=.02,_=.005;u.inputState.pinching&&p>g+_?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=g-_&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else h!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),s!==null&&(h.matrix.fromArray(s.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,s.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(s.linearVelocity)):h.hasLinearVelocity=!1,s.angularVelocity?(h.hasAngularVelocity=!0,h.angularVelocity.copy(s.angularVelocity)):h.hasAngularVelocity=!1));l!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(l.matrix.fromArray(i.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,i.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(i.linearVelocity)):l.hasLinearVelocity=!1,i.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(i.angularVelocity)):l.hasAngularVelocity=!1,this.dispatchEvent(i8)))}return l!==null&&(l.visible=i!==null),h!==null&&(h.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new la;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const s8=`
3804
+ }`;function $L(r,e,t){let n=new ZA;const i=new Ue,s=new Ue,o=new Ft,l=new V2({depthPacking:Lb}),h=new KL,u={},d=t.maxTextureSize,A={[wi]:Qr,[Qr]:wi,[Ii]:Ii},p=new Cr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ue},radius:{value:4}},vertexShader:JL,fragmentShader:ZL}),g=p.clone();g.defines.HORIZONTAL_PASS=1;const _=new Vn;_.setAttribute("position",new zr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Xr(_,p),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ky;let v=this.type;this.render=function(S,T,D){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||S.length===0)return;const b=r.getRenderTarget(),M=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),P=r.state;P.setBlending(gs),P.buffers.color.setClear(1,1,1,1),P.buffers.depth.setTest(!0),P.setScissorTest(!1);const N=v!==As&&this.type===As,W=v===As&&this.type!==As;for(let X=0,K=S.length;X<K;X++){const te=S[X],V=te.shadow;if(V===void 0){console.warn("THREE.WebGLShadowMap:",te,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;i.copy(V.mapSize);const ee=V.getFrameExtents();if(i.multiply(ee),s.copy(V.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/ee.x),i.x=s.x*ee.x,V.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/ee.y),i.y=s.y*ee.y,V.mapSize.y=s.y)),V.map===null||N===!0||W===!0){const z=this.type!==As?{minFilter:Ar,magFilter:Ar}:{};V.map!==null&&V.map.dispose(),V.map=new cn(i.x,i.y,z),V.map.texture.name=te.name+".shadowMap",V.camera.updateProjectionMatrix()}r.setRenderTarget(V.map),r.clear();const Q=V.getViewportCount();for(let z=0;z<Q;z++){const Z=V.getViewport(z);o.set(s.x*Z.x,s.y*Z.y,s.x*Z.z,s.y*Z.w),P.viewport(o),V.updateMatrices(te,z),n=V.getFrustum(),I(T,D,V.camera,te,this.type)}V.isPointLightShadow!==!0&&this.type===As&&w(V,D),V.needsUpdate=!1}v=this.type,m.needsUpdate=!1,r.setRenderTarget(b,M,L)};function w(S,T){const D=e.update(E);p.defines.VSM_SAMPLES!==S.blurSamples&&(p.defines.VSM_SAMPLES=S.blurSamples,g.defines.VSM_SAMPLES=S.blurSamples,p.needsUpdate=!0,g.needsUpdate=!0),S.mapPass===null&&(S.mapPass=new cn(i.x,i.y)),p.uniforms.shadow_pass.value=S.map.texture,p.uniforms.resolution.value=S.mapSize,p.uniforms.radius.value=S.radius,r.setRenderTarget(S.mapPass),r.clear(),r.renderBufferDirect(T,null,D,p,E,null),g.uniforms.shadow_pass.value=S.mapPass.texture,g.uniforms.resolution.value=S.mapSize,g.uniforms.radius.value=S.radius,r.setRenderTarget(S.map),r.clear(),r.renderBufferDirect(T,null,D,g,E,null)}function x(S,T,D,b){let M=null;const L=D.isPointLight===!0?S.customDistanceMaterial:S.customDepthMaterial;if(L!==void 0)M=L;else if(M=D.isPointLight===!0?h:l,r.localClippingEnabled&&T.clipShadows===!0&&Array.isArray(T.clippingPlanes)&&T.clippingPlanes.length!==0||T.displacementMap&&T.displacementScale!==0||T.alphaMap&&T.alphaTest>0||T.map&&T.alphaTest>0){const P=M.uuid,N=T.uuid;let W=u[P];W===void 0&&(W={},u[P]=W);let X=W[N];X===void 0&&(X=M.clone(),W[N]=X,T.addEventListener("dispose",R)),M=X}if(M.visible=T.visible,M.wireframe=T.wireframe,b===As?M.side=T.shadowSide!==null?T.shadowSide:T.side:M.side=T.shadowSide!==null?T.shadowSide:A[T.side],M.alphaMap=T.alphaMap,M.alphaTest=T.alphaTest,M.map=T.map,M.clipShadows=T.clipShadows,M.clippingPlanes=T.clippingPlanes,M.clipIntersection=T.clipIntersection,M.displacementMap=T.displacementMap,M.displacementScale=T.displacementScale,M.displacementBias=T.displacementBias,M.wireframeLinewidth=T.wireframeLinewidth,M.linewidth=T.linewidth,D.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const P=r.properties.get(M);P.light=D}return M}function I(S,T,D,b,M){if(S.visible===!1)return;if(S.layers.test(T.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&M===As)&&(!S.frustumCulled||n.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,S.matrixWorld);const P=e.update(S),N=S.material;if(Array.isArray(N)){const W=P.groups;for(let X=0,K=W.length;X<K;X++){const te=W[X],V=N[te.materialIndex];if(V&&V.visible){const ee=x(S,V,b,M);S.onBeforeShadow(r,S,T,D,P,ee,te),r.renderBufferDirect(D,null,P,ee,S,te),S.onAfterShadow(r,S,T,D,P,ee,te)}}}else if(N.visible){const W=x(S,N,b,M);S.onBeforeShadow(r,S,T,D,P,W,null),r.renderBufferDirect(D,null,P,W,S,null),S.onAfterShadow(r,S,T,D,P,W,null)}}const L=S.children;for(let P=0,N=L.length;P<N;P++)I(L[P],T,D,b,M)}function R(S){S.target.removeEventListener("dispose",R);for(const T in u){const D=u[T],b=S.target.uuid;b in D&&(D[b].dispose(),delete D[b])}}}function e8(r){function e(){let O=!1;const ge=new Ft;let ve=null;const Fe=new Ft(0,0,0,0);return{setMask:function(Pe){ve!==Pe&&!O&&(r.colorMask(Pe,Pe,Pe,Pe),ve=Pe)},setLocked:function(Pe){O=Pe},setClear:function(Pe,vt,Lt,Nt,Bt){Bt===!0&&(Pe*=Nt,vt*=Nt,Lt*=Nt),ge.set(Pe,vt,Lt,Nt),Fe.equals(ge)===!1&&(r.clearColor(Pe,vt,Lt,Nt),Fe.copy(ge))},reset:function(){O=!1,ve=null,Fe.set(-1,0,0,0)}}}function t(){let O=!1,ge=null,ve=null,Fe=null;return{setTest:function(Pe){Pe?Ae(r.DEPTH_TEST):_e(r.DEPTH_TEST)},setMask:function(Pe){ge!==Pe&&!O&&(r.depthMask(Pe),ge=Pe)},setFunc:function(Pe){if(ve!==Pe){switch(Pe){case db:r.depthFunc(r.NEVER);break;case fb:r.depthFunc(r.ALWAYS);break;case pb:r.depthFunc(r.LESS);break;case Kh:r.depthFunc(r.LEQUAL);break;case Ab:r.depthFunc(r.EQUAL);break;case gb:r.depthFunc(r.GEQUAL);break;case mb:r.depthFunc(r.GREATER);break;case vb:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}ve=Pe}},setLocked:function(Pe){O=Pe},setClear:function(Pe){Fe!==Pe&&(r.clearDepth(Pe),Fe=Pe)},reset:function(){O=!1,ge=null,ve=null,Fe=null}}}function n(){let O=!1,ge=null,ve=null,Fe=null,Pe=null,vt=null,Lt=null,Nt=null,Bt=null;return{setTest:function(_t){O||(_t?Ae(r.STENCIL_TEST):_e(r.STENCIL_TEST))},setMask:function(_t){ge!==_t&&!O&&(r.stencilMask(_t),ge=_t)},setFunc:function(_t,fr,Vt){(ve!==_t||Fe!==fr||Pe!==Vt)&&(r.stencilFunc(_t,fr,Vt),ve=_t,Fe=fr,Pe=Vt)},setOp:function(_t,fr,Vt){(vt!==_t||Lt!==fr||Nt!==Vt)&&(r.stencilOp(_t,fr,Vt),vt=_t,Lt=fr,Nt=Vt)},setLocked:function(_t){O=_t},setClear:function(_t){Bt!==_t&&(r.clearStencil(_t),Bt=_t)},reset:function(){O=!1,ge=null,ve=null,Fe=null,Pe=null,vt=null,Lt=null,Nt=null,Bt=null}}}const i=new e,s=new t,o=new n,l=new WeakMap,h=new WeakMap;let u={},d={},A=new WeakMap,p=[],g=null,_=!1,E=null,m=null,v=null,w=null,x=null,I=null,R=null,S=new He(0,0,0),T=0,D=!1,b=null,M=null,L=null,P=null,N=null;const W=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let X=!1,K=0;const te=r.getParameter(r.VERSION);te.indexOf("WebGL")!==-1?(K=parseFloat(/^WebGL (\d)/.exec(te)[1]),X=K>=1):te.indexOf("OpenGL ES")!==-1&&(K=parseFloat(/^OpenGL ES (\d)/.exec(te)[1]),X=K>=2);let V=null,ee={};const Q=r.getParameter(r.SCISSOR_BOX),z=r.getParameter(r.VIEWPORT),Z=new Ft().fromArray(Q),re=new Ft().fromArray(z);function j(O,ge,ve,Fe){const Pe=new Uint8Array(4),vt=r.createTexture();r.bindTexture(O,vt),r.texParameteri(O,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(O,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let Lt=0;Lt<ve;Lt++)O===r.TEXTURE_3D||O===r.TEXTURE_2D_ARRAY?r.texImage3D(ge,0,r.RGBA,1,1,Fe,0,r.RGBA,r.UNSIGNED_BYTE,Pe):r.texImage2D(ge+Lt,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,Pe);return vt}const de={};de[r.TEXTURE_2D]=j(r.TEXTURE_2D,r.TEXTURE_2D,1),de[r.TEXTURE_CUBE_MAP]=j(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),de[r.TEXTURE_2D_ARRAY]=j(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),de[r.TEXTURE_3D]=j(r.TEXTURE_3D,r.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),Ae(r.DEPTH_TEST),s.setFunc(Kh),Ke(!1),pt(Xy),Ae(r.CULL_FACE),Qe(gs);function Ae(O){u[O]!==!0&&(r.enable(O),u[O]=!0)}function _e(O){u[O]!==!1&&(r.disable(O),u[O]=!1)}function Ee(O,ge){return d[O]!==ge?(r.bindFramebuffer(O,ge),d[O]=ge,O===r.DRAW_FRAMEBUFFER&&(d[r.FRAMEBUFFER]=ge),O===r.FRAMEBUFFER&&(d[r.DRAW_FRAMEBUFFER]=ge),!0):!1}function Le(O,ge){let ve=p,Fe=!1;if(O){ve=A.get(ge),ve===void 0&&(ve=[],A.set(ge,ve));const Pe=O.textures;if(ve.length!==Pe.length||ve[0]!==r.COLOR_ATTACHMENT0){for(let vt=0,Lt=Pe.length;vt<Lt;vt++)ve[vt]=r.COLOR_ATTACHMENT0+vt;ve.length=Pe.length,Fe=!0}}else ve[0]!==r.BACK&&(ve[0]=r.BACK,Fe=!0);Fe&&r.drawBuffers(ve)}function st(O){return g!==O?(r.useProgram(O),g=O,!0):!1}const se={[no]:r.FUNC_ADD,[XB]:r.FUNC_SUBTRACT,[KB]:r.FUNC_REVERSE_SUBTRACT};se[JB]=r.MIN,se[ZB]=r.MAX;const et={[$B]:r.ZERO,[eb]:r.ONE,[tb]:r.SRC_COLOR,[pA]:r.SRC_ALPHA,[ob]:r.SRC_ALPHA_SATURATE,[sb]:r.DST_COLOR,[nb]:r.DST_ALPHA,[rb]:r.ONE_MINUS_SRC_COLOR,[AA]:r.ONE_MINUS_SRC_ALPHA,[ab]:r.ONE_MINUS_DST_COLOR,[ib]:r.ONE_MINUS_DST_ALPHA,[lb]:r.CONSTANT_COLOR,[cb]:r.ONE_MINUS_CONSTANT_COLOR,[ub]:r.CONSTANT_ALPHA,[hb]:r.ONE_MINUS_CONSTANT_ALPHA};function Qe(O,ge,ve,Fe,Pe,vt,Lt,Nt,Bt,_t){if(O===gs){_===!0&&(_e(r.BLEND),_=!1);return}if(_===!1&&(Ae(r.BLEND),_=!0),O!==qB){if(O!==E||_t!==D){if((m!==no||x!==no)&&(r.blendEquation(r.FUNC_ADD),m=no,x=no),_t)switch(O){case sl:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case fA:r.blendFunc(r.ONE,r.ONE);break;case Jy:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Zy:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",O);break}else switch(O){case sl:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case fA:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case Jy:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Zy:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",O);break}v=null,w=null,I=null,R=null,S.set(0,0,0),T=0,E=O,D=_t}return}Pe=Pe||ge,vt=vt||ve,Lt=Lt||Fe,(ge!==m||Pe!==x)&&(r.blendEquationSeparate(se[ge],se[Pe]),m=ge,x=Pe),(ve!==v||Fe!==w||vt!==I||Lt!==R)&&(r.blendFuncSeparate(et[ve],et[Fe],et[vt],et[Lt]),v=ve,w=Fe,I=vt,R=Lt),(Nt.equals(S)===!1||Bt!==T)&&(r.blendColor(Nt.r,Nt.g,Nt.b,Bt),S.copy(Nt),T=Bt),E=O,D=!1}function ht(O,ge){O.side===Ii?_e(r.CULL_FACE):Ae(r.CULL_FACE);let ve=O.side===Qr;ge&&(ve=!ve),Ke(ve),O.blending===sl&&O.transparent===!1?Qe(gs):Qe(O.blending,O.blendEquation,O.blendSrc,O.blendDst,O.blendEquationAlpha,O.blendSrcAlpha,O.blendDstAlpha,O.blendColor,O.blendAlpha,O.premultipliedAlpha),s.setFunc(O.depthFunc),s.setTest(O.depthTest),s.setMask(O.depthWrite),i.setMask(O.colorWrite);const Fe=O.stencilWrite;o.setTest(Fe),Fe&&(o.setMask(O.stencilWriteMask),o.setFunc(O.stencilFunc,O.stencilRef,O.stencilFuncMask),o.setOp(O.stencilFail,O.stencilZFail,O.stencilZPass)),k(O.polygonOffset,O.polygonOffsetFactor,O.polygonOffsetUnits),O.alphaToCoverage===!0?Ae(r.SAMPLE_ALPHA_TO_COVERAGE):_e(r.SAMPLE_ALPHA_TO_COVERAGE)}function Ke(O){b!==O&&(O?r.frontFace(r.CW):r.frontFace(r.CCW),b=O)}function pt(O){O!==jB?(Ae(r.CULL_FACE),O!==M&&(O===Xy?r.cullFace(r.BACK):O===WB?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):_e(r.CULL_FACE),M=O}function Y(O){O!==L&&(X&&r.lineWidth(O),L=O)}function k(O,ge,ve){O?(Ae(r.POLYGON_OFFSET_FILL),(P!==ge||N!==ve)&&(r.polygonOffset(ge,ve),P=ge,N=ve)):_e(r.POLYGON_OFFSET_FILL)}function le(O){O?Ae(r.SCISSOR_TEST):_e(r.SCISSOR_TEST)}function pe(O){O===void 0&&(O=r.TEXTURE0+W-1),V!==O&&(r.activeTexture(O),V=O)}function me(O,ge,ve){ve===void 0&&(V===null?ve=r.TEXTURE0+W-1:ve=V);let Fe=ee[ve];Fe===void 0&&(Fe={type:void 0,texture:void 0},ee[ve]=Fe),(Fe.type!==O||Fe.texture!==ge)&&(V!==ve&&(r.activeTexture(ve),V=ve),r.bindTexture(O,ge||de[O]),Fe.type=O,Fe.texture=ge)}function ye(){const O=ee[V];O!==void 0&&O.type!==void 0&&(r.bindTexture(O.type,null),O.type=void 0,O.texture=void 0)}function Ge(){try{r.compressedTexImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Ie(){try{r.compressedTexImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function je(){try{r.texSubImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Ve(){try{r.texSubImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Me(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function fe(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function De(){try{r.texStorage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function Be(){try{r.texStorage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function be(){try{r.texImage2D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function nt(){try{r.texImage3D.apply(r,arguments)}catch(O){console.error("THREE.WebGLState:",O)}}function lt(O){Z.equals(O)===!1&&(r.scissor(O.x,O.y,O.z,O.w),Z.copy(O))}function dt(O){re.equals(O)===!1&&(r.viewport(O.x,O.y,O.z,O.w),re.copy(O))}function ct(O,ge){let ve=h.get(ge);ve===void 0&&(ve=new WeakMap,h.set(ge,ve));let Fe=ve.get(O);Fe===void 0&&(Fe=r.getUniformBlockIndex(ge,O.name),ve.set(O,Fe))}function ut(O,ge){const ve=h.get(ge).get(O);l.get(ge)!==ve&&(r.uniformBlockBinding(ge,ve,O.__bindingPointIndex),l.set(ge,ve))}function G(){r.disable(r.BLEND),r.disable(r.CULL_FACE),r.disable(r.DEPTH_TEST),r.disable(r.POLYGON_OFFSET_FILL),r.disable(r.SCISSOR_TEST),r.disable(r.STENCIL_TEST),r.disable(r.SAMPLE_ALPHA_TO_COVERAGE),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ZERO),r.blendFuncSeparate(r.ONE,r.ZERO,r.ONE,r.ZERO),r.blendColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(r.LESS),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(r.ALWAYS,0,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP),r.clearStencil(0),r.cullFace(r.BACK),r.frontFace(r.CCW),r.polygonOffset(0,0),r.activeTexture(r.TEXTURE0),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),r.bindFramebuffer(r.READ_FRAMEBUFFER,null),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),u={},V=null,ee={},d={},A=new WeakMap,p=[],g=null,_=!1,E=null,m=null,v=null,w=null,x=null,I=null,R=null,S=new He(0,0,0),T=0,D=!1,b=null,M=null,L=null,P=null,N=null,Z.set(0,0,r.canvas.width,r.canvas.height),re.set(0,0,r.canvas.width,r.canvas.height),i.reset(),s.reset(),o.reset()}return{buffers:{color:i,depth:s,stencil:o},enable:Ae,disable:_e,bindFramebuffer:Ee,drawBuffers:Le,useProgram:st,setBlending:Qe,setMaterial:ht,setFlipSided:Ke,setCullFace:pt,setLineWidth:Y,setPolygonOffset:k,setScissorTest:le,activeTexture:pe,bindTexture:me,unbindTexture:ye,compressedTexImage2D:Ge,compressedTexImage3D:Ie,texImage2D:be,texImage3D:nt,updateUBOMapping:ct,uniformBlockBinding:ut,texStorage2D:De,texStorage3D:Be,texSubImage2D:je,texSubImage3D:Ve,compressedTexSubImage2D:Me,compressedTexSubImage3D:fe,scissor:lt,viewport:dt,reset:G}}function t8(r,e,t,n,i,s,o){const l=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,h=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),u=new Ue,d=new WeakMap;let A;const p=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(Y,k){return g?new OffscreenCanvas(Y,k):du("canvas")}function E(Y,k,le){let pe=1;const me=pt(Y);if((me.width>le||me.height>le)&&(pe=le/Math.max(me.width,me.height)),pe<1)if(typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Y instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Y instanceof ImageBitmap||typeof VideoFrame<"u"&&Y instanceof VideoFrame){const ye=Math.floor(pe*me.width),Ge=Math.floor(pe*me.height);A===void 0&&(A=_(ye,Ge));const Ie=k?_(ye,Ge):A;return Ie.width=ye,Ie.height=Ge,Ie.getContext("2d").drawImage(Y,0,0,ye,Ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+me.width+"x"+me.height+") to ("+ye+"x"+Ge+")."),Ie}else return"data"in Y&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+me.width+"x"+me.height+")."),Y;return Y}function m(Y){return Y.generateMipmaps&&Y.minFilter!==Ar&&Y.minFilter!==gr}function v(Y){r.generateMipmap(Y)}function w(Y,k,le,pe,me=!1){if(Y!==null){if(r[Y]!==void 0)return r[Y];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Y+"'")}let ye=k;if(k===r.RED&&(le===r.FLOAT&&(ye=r.R32F),le===r.HALF_FLOAT&&(ye=r.R16F),le===r.UNSIGNED_BYTE&&(ye=r.R8)),k===r.RED_INTEGER&&(le===r.UNSIGNED_BYTE&&(ye=r.R8UI),le===r.UNSIGNED_SHORT&&(ye=r.R16UI),le===r.UNSIGNED_INT&&(ye=r.R32UI),le===r.BYTE&&(ye=r.R8I),le===r.SHORT&&(ye=r.R16I),le===r.INT&&(ye=r.R32I)),k===r.RG&&(le===r.FLOAT&&(ye=r.RG32F),le===r.HALF_FLOAT&&(ye=r.RG16F),le===r.UNSIGNED_BYTE&&(ye=r.RG8)),k===r.RG_INTEGER&&(le===r.UNSIGNED_BYTE&&(ye=r.RG8UI),le===r.UNSIGNED_SHORT&&(ye=r.RG16UI),le===r.UNSIGNED_INT&&(ye=r.RG32UI),le===r.BYTE&&(ye=r.RG8I),le===r.SHORT&&(ye=r.RG16I),le===r.INT&&(ye=r.RG32I)),k===r.RGB&&le===r.UNSIGNED_INT_5_9_9_9_REV&&(ye=r.RGB9_E5),k===r.RGBA){const Ge=me?ad:Tt.getTransfer(pe);le===r.FLOAT&&(ye=r.RGBA32F),le===r.HALF_FLOAT&&(ye=r.RGBA16F),le===r.UNSIGNED_BYTE&&(ye=Ge===Ht?r.SRGB8_ALPHA8:r.RGBA8),le===r.UNSIGNED_SHORT_4_4_4_4&&(ye=r.RGBA4),le===r.UNSIGNED_SHORT_5_5_5_1&&(ye=r.RGB5_A1)}return(ye===r.R16F||ye===r.R32F||ye===r.RG16F||ye===r.RG32F||ye===r.RGBA16F||ye===r.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function x(Y,k){return m(Y)===!0||Y.isFramebufferTexture&&Y.minFilter!==Ar&&Y.minFilter!==gr?Math.log2(Math.max(k.width,k.height))+1:Y.mipmaps!==void 0&&Y.mipmaps.length>0?Y.mipmaps.length:Y.isCompressedTexture&&Array.isArray(Y.image)?k.mipmaps.length:1}function I(Y){const k=Y.target;k.removeEventListener("dispose",I),S(k),k.isVideoTexture&&d.delete(k)}function R(Y){const k=Y.target;k.removeEventListener("dispose",R),D(k)}function S(Y){const k=n.get(Y);if(k.__webglInit===void 0)return;const le=Y.source,pe=p.get(le);if(pe){const me=pe[k.__cacheKey];me.usedTimes--,me.usedTimes===0&&T(Y),Object.keys(pe).length===0&&p.delete(le)}n.remove(Y)}function T(Y){const k=n.get(Y);r.deleteTexture(k.__webglTexture);const le=Y.source,pe=p.get(le);delete pe[k.__cacheKey],o.memory.textures--}function D(Y){const k=n.get(Y);if(Y.depthTexture&&Y.depthTexture.dispose(),Y.isWebGLCubeRenderTarget)for(let pe=0;pe<6;pe++){if(Array.isArray(k.__webglFramebuffer[pe]))for(let me=0;me<k.__webglFramebuffer[pe].length;me++)r.deleteFramebuffer(k.__webglFramebuffer[pe][me]);else r.deleteFramebuffer(k.__webglFramebuffer[pe]);k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer[pe])}else{if(Array.isArray(k.__webglFramebuffer))for(let pe=0;pe<k.__webglFramebuffer.length;pe++)r.deleteFramebuffer(k.__webglFramebuffer[pe]);else r.deleteFramebuffer(k.__webglFramebuffer);if(k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&r.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRenderbuffer)for(let pe=0;pe<k.__webglColorRenderbuffer.length;pe++)k.__webglColorRenderbuffer[pe]&&r.deleteRenderbuffer(k.__webglColorRenderbuffer[pe]);k.__webglDepthRenderbuffer&&r.deleteRenderbuffer(k.__webglDepthRenderbuffer)}const le=Y.textures;for(let pe=0,me=le.length;pe<me;pe++){const ye=n.get(le[pe]);ye.__webglTexture&&(r.deleteTexture(ye.__webglTexture),o.memory.textures--),n.remove(le[pe])}n.remove(Y)}let b=0;function M(){b=0}function L(){const Y=b;return Y>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Y+" texture units while this GPU supports only "+i.maxTextures),b+=1,Y}function P(Y){const k=[];return k.push(Y.wrapS),k.push(Y.wrapT),k.push(Y.wrapR||0),k.push(Y.magFilter),k.push(Y.minFilter),k.push(Y.anisotropy),k.push(Y.internalFormat),k.push(Y.format),k.push(Y.type),k.push(Y.generateMipmaps),k.push(Y.premultiplyAlpha),k.push(Y.flipY),k.push(Y.unpackAlignment),k.push(Y.colorSpace),k.join()}function N(Y,k){const le=n.get(Y);if(Y.isVideoTexture&&ht(Y),Y.isRenderTargetTexture===!1&&Y.version>0&&le.__version!==Y.version){const pe=Y.image;if(pe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(pe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Z(le,Y,k);return}}t.bindTexture(r.TEXTURE_2D,le.__webglTexture,r.TEXTURE0+k)}function W(Y,k){const le=n.get(Y);if(Y.version>0&&le.__version!==Y.version){Z(le,Y,k);return}t.bindTexture(r.TEXTURE_2D_ARRAY,le.__webglTexture,r.TEXTURE0+k)}function X(Y,k){const le=n.get(Y);if(Y.version>0&&le.__version!==Y.version){Z(le,Y,k);return}t.bindTexture(r.TEXTURE_3D,le.__webglTexture,r.TEXTURE0+k)}function K(Y,k){const le=n.get(Y);if(Y.version>0&&le.__version!==Y.version){re(le,Y,k);return}t.bindTexture(r.TEXTURE_CUBE_MAP,le.__webglTexture,r.TEXTURE0+k)}const te={[ea]:r.REPEAT,[Ci]:r.CLAMP_TO_EDGE,[Zh]:r.MIRRORED_REPEAT},V={[Ar]:r.NEAREST,[oE]:r.NEAREST_MIPMAP_NEAREST,[nu]:r.NEAREST_MIPMAP_LINEAR,[gr]:r.LINEAR,[$h]:r.LINEAR_MIPMAP_NEAREST,[Mi]:r.LINEAR_MIPMAP_LINEAR},ee={[Ub]:r.NEVER,[zb]:r.ALWAYS,[Pb]:r.LESS,[PE]:r.LEQUAL,[kb]:r.EQUAL,[Fb]:r.GEQUAL,[Qb]:r.GREATER,[Ob]:r.NOTEQUAL};function Q(Y,k){if(k.type===lr&&e.has("OES_texture_float_linear")===!1&&(k.magFilter===gr||k.magFilter===$h||k.magFilter===nu||k.magFilter===Mi||k.minFilter===gr||k.minFilter===$h||k.minFilter===nu||k.minFilter===Mi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(Y,r.TEXTURE_WRAP_S,te[k.wrapS]),r.texParameteri(Y,r.TEXTURE_WRAP_T,te[k.wrapT]),(Y===r.TEXTURE_3D||Y===r.TEXTURE_2D_ARRAY)&&r.texParameteri(Y,r.TEXTURE_WRAP_R,te[k.wrapR]),r.texParameteri(Y,r.TEXTURE_MAG_FILTER,V[k.magFilter]),r.texParameteri(Y,r.TEXTURE_MIN_FILTER,V[k.minFilter]),k.compareFunction&&(r.texParameteri(Y,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(Y,r.TEXTURE_COMPARE_FUNC,ee[k.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(k.magFilter===Ar||k.minFilter!==nu&&k.minFilter!==Mi||k.type===lr&&e.has("OES_texture_float_linear")===!1)return;if(k.anisotropy>1||n.get(k).__currentAnisotropy){const le=e.get("EXT_texture_filter_anisotropic");r.texParameterf(Y,le.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,i.getMaxAnisotropy())),n.get(k).__currentAnisotropy=k.anisotropy}}}function z(Y,k){let le=!1;Y.__webglInit===void 0&&(Y.__webglInit=!0,k.addEventListener("dispose",I));const pe=k.source;let me=p.get(pe);me===void 0&&(me={},p.set(pe,me));const ye=P(k);if(ye!==Y.__cacheKey){me[ye]===void 0&&(me[ye]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,le=!0),me[ye].usedTimes++;const Ge=me[Y.__cacheKey];Ge!==void 0&&(me[Y.__cacheKey].usedTimes--,Ge.usedTimes===0&&T(k)),Y.__cacheKey=ye,Y.__webglTexture=me[ye].texture}return le}function Z(Y,k,le){let pe=r.TEXTURE_2D;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(pe=r.TEXTURE_2D_ARRAY),k.isData3DTexture&&(pe=r.TEXTURE_3D);const me=z(Y,k),ye=k.source;t.bindTexture(pe,Y.__webglTexture,r.TEXTURE0+le);const Ge=n.get(ye);if(ye.version!==Ge.__version||me===!0){t.activeTexture(r.TEXTURE0+le);const Ie=Tt.getPrimaries(Tt.workingColorSpace),je=k.colorSpace===ms?null:Tt.getPrimaries(k.colorSpace),Ve=k.colorSpace===ms||Ie===je?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,k.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,k.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ve);let Me=E(k.image,!1,i.maxTextureSize);Me=Ke(k,Me);const fe=s.convert(k.format,k.colorSpace),De=s.convert(k.type);let Be=w(k.internalFormat,fe,De,k.colorSpace,k.isVideoTexture);Q(pe,k);let be;const nt=k.mipmaps,lt=k.isVideoTexture!==!0&&Be!==CA,dt=Ge.__version===void 0||me===!0,ct=ye.dataReady,ut=x(k,Me);if(k.isDepthTexture)Be=r.DEPTH_COMPONENT16,k.type===lr?Be=r.DEPTH_COMPONENT32F:k.type===Si?Be=r.DEPTH_COMPONENT24:k.type===su&&(Be=r.DEPTH24_STENCIL8),dt&&(lt?t.texStorage2D(r.TEXTURE_2D,1,Be,Me.width,Me.height):t.texImage2D(r.TEXTURE_2D,0,Be,Me.width,Me.height,0,fe,De,null));else if(k.isDataTexture)if(nt.length>0){lt&&dt&&t.texStorage2D(r.TEXTURE_2D,ut,Be,nt[0].width,nt[0].height);for(let G=0,O=nt.length;G<O;G++)be=nt[G],lt?ct&&t.texSubImage2D(r.TEXTURE_2D,G,0,0,be.width,be.height,fe,De,be.data):t.texImage2D(r.TEXTURE_2D,G,Be,be.width,be.height,0,fe,De,be.data);k.generateMipmaps=!1}else lt?(dt&&t.texStorage2D(r.TEXTURE_2D,ut,Be,Me.width,Me.height),ct&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,Me.width,Me.height,fe,De,Me.data)):t.texImage2D(r.TEXTURE_2D,0,Be,Me.width,Me.height,0,fe,De,Me.data);else if(k.isCompressedTexture)if(k.isCompressedArrayTexture){lt&&dt&&t.texStorage3D(r.TEXTURE_2D_ARRAY,ut,Be,nt[0].width,nt[0].height,Me.depth);for(let G=0,O=nt.length;G<O;G++)be=nt[G],k.format!==vr?fe!==null?lt?ct&&t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,G,0,0,0,be.width,be.height,Me.depth,fe,be.data,0,0):t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,G,Be,be.width,be.height,Me.depth,0,be.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):lt?ct&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,G,0,0,0,be.width,be.height,Me.depth,fe,De,be.data):t.texImage3D(r.TEXTURE_2D_ARRAY,G,Be,be.width,be.height,Me.depth,0,fe,De,be.data)}else{lt&&dt&&t.texStorage2D(r.TEXTURE_2D,ut,Be,nt[0].width,nt[0].height);for(let G=0,O=nt.length;G<O;G++)be=nt[G],k.format!==vr?fe!==null?lt?ct&&t.compressedTexSubImage2D(r.TEXTURE_2D,G,0,0,be.width,be.height,fe,be.data):t.compressedTexImage2D(r.TEXTURE_2D,G,Be,be.width,be.height,0,be.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):lt?ct&&t.texSubImage2D(r.TEXTURE_2D,G,0,0,be.width,be.height,fe,De,be.data):t.texImage2D(r.TEXTURE_2D,G,Be,be.width,be.height,0,fe,De,be.data)}else if(k.isDataArrayTexture)lt?(dt&&t.texStorage3D(r.TEXTURE_2D_ARRAY,ut,Be,Me.width,Me.height,Me.depth),ct&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,Me.width,Me.height,Me.depth,fe,De,Me.data)):t.texImage3D(r.TEXTURE_2D_ARRAY,0,Be,Me.width,Me.height,Me.depth,0,fe,De,Me.data);else if(k.isData3DTexture)lt?(dt&&t.texStorage3D(r.TEXTURE_3D,ut,Be,Me.width,Me.height,Me.depth),ct&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,Me.width,Me.height,Me.depth,fe,De,Me.data)):t.texImage3D(r.TEXTURE_3D,0,Be,Me.width,Me.height,Me.depth,0,fe,De,Me.data);else if(k.isFramebufferTexture){if(dt)if(lt)t.texStorage2D(r.TEXTURE_2D,ut,Be,Me.width,Me.height);else{let G=Me.width,O=Me.height;for(let ge=0;ge<ut;ge++)t.texImage2D(r.TEXTURE_2D,ge,Be,G,O,0,fe,De,null),G>>=1,O>>=1}}else if(nt.length>0){if(lt&&dt){const G=pt(nt[0]);t.texStorage2D(r.TEXTURE_2D,ut,Be,G.width,G.height)}for(let G=0,O=nt.length;G<O;G++)be=nt[G],lt?ct&&t.texSubImage2D(r.TEXTURE_2D,G,0,0,fe,De,be):t.texImage2D(r.TEXTURE_2D,G,Be,fe,De,be);k.generateMipmaps=!1}else if(lt){if(dt){const G=pt(Me);t.texStorage2D(r.TEXTURE_2D,ut,Be,G.width,G.height)}ct&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,fe,De,Me)}else t.texImage2D(r.TEXTURE_2D,0,Be,fe,De,Me);m(k)&&v(pe),Ge.__version=ye.version,k.onUpdate&&k.onUpdate(k)}Y.__version=k.version}function re(Y,k,le){if(k.image.length!==6)return;const pe=z(Y,k),me=k.source;t.bindTexture(r.TEXTURE_CUBE_MAP,Y.__webglTexture,r.TEXTURE0+le);const ye=n.get(me);if(me.version!==ye.__version||pe===!0){t.activeTexture(r.TEXTURE0+le);const Ge=Tt.getPrimaries(Tt.workingColorSpace),Ie=k.colorSpace===ms?null:Tt.getPrimaries(k.colorSpace),je=k.colorSpace===ms||Ge===Ie?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,k.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,k.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,je);const Ve=k.isCompressedTexture||k.image[0].isCompressedTexture,Me=k.image[0]&&k.image[0].isDataTexture,fe=[];for(let O=0;O<6;O++)!Ve&&!Me?fe[O]=E(k.image[O],!0,i.maxCubemapSize):fe[O]=Me?k.image[O].image:k.image[O],fe[O]=Ke(k,fe[O]);const De=fe[0],Be=s.convert(k.format,k.colorSpace),be=s.convert(k.type),nt=w(k.internalFormat,Be,be,k.colorSpace),lt=k.isVideoTexture!==!0,dt=ye.__version===void 0||pe===!0,ct=me.dataReady;let ut=x(k,De);Q(r.TEXTURE_CUBE_MAP,k);let G;if(Ve){lt&&dt&&t.texStorage2D(r.TEXTURE_CUBE_MAP,ut,nt,De.width,De.height);for(let O=0;O<6;O++){G=fe[O].mipmaps;for(let ge=0;ge<G.length;ge++){const ve=G[ge];k.format!==vr?Be!==null?lt?ct&&t.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,0,0,ve.width,ve.height,Be,ve.data):t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,nt,ve.width,ve.height,0,ve.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):lt?ct&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,0,0,ve.width,ve.height,Be,be,ve.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge,nt,ve.width,ve.height,0,Be,be,ve.data)}}}else{if(G=k.mipmaps,lt&&dt){G.length>0&&ut++;const O=pt(fe[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,ut,nt,O.width,O.height)}for(let O=0;O<6;O++)if(Me){lt?ct&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,0,0,fe[O].width,fe[O].height,Be,be,fe[O].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,nt,fe[O].width,fe[O].height,0,Be,be,fe[O].data);for(let ge=0;ge<G.length;ge++){const ve=G[ge].image[O].image;lt?ct&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,0,0,ve.width,ve.height,Be,be,ve.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,nt,ve.width,ve.height,0,Be,be,ve.data)}}else{lt?ct&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,0,0,Be,be,fe[O]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,0,nt,Be,be,fe[O]);for(let ge=0;ge<G.length;ge++){const ve=G[ge];lt?ct&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,0,0,Be,be,ve.image[O]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+O,ge+1,nt,Be,be,ve.image[O])}}}m(k)&&v(r.TEXTURE_CUBE_MAP),ye.__version=me.version,k.onUpdate&&k.onUpdate(k)}Y.__version=k.version}function j(Y,k,le,pe,me,ye){const Ge=s.convert(le.format,le.colorSpace),Ie=s.convert(le.type),je=w(le.internalFormat,Ge,Ie,le.colorSpace);if(!n.get(k).__hasExternalTextures){const Ve=Math.max(1,k.width>>ye),Me=Math.max(1,k.height>>ye);me===r.TEXTURE_3D||me===r.TEXTURE_2D_ARRAY?t.texImage3D(me,ye,je,Ve,Me,k.depth,0,Ge,Ie,null):t.texImage2D(me,ye,je,Ve,Me,0,Ge,Ie,null)}t.bindFramebuffer(r.FRAMEBUFFER,Y),Qe(k)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,pe,me,n.get(le).__webglTexture,0,et(k)):(me===r.TEXTURE_2D||me>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&me<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,pe,me,n.get(le).__webglTexture,ye),t.bindFramebuffer(r.FRAMEBUFFER,null)}function de(Y,k,le){if(r.bindRenderbuffer(r.RENDERBUFFER,Y),k.depthBuffer&&!k.stencilBuffer){let pe=r.DEPTH_COMPONENT24;if(le||Qe(k)){const me=k.depthTexture;me&&me.isDepthTexture&&(me.type===lr?pe=r.DEPTH_COMPONENT32F:me.type===Si&&(pe=r.DEPTH_COMPONENT24));const ye=et(k);Qe(k)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,ye,pe,k.width,k.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,ye,pe,k.width,k.height)}else r.renderbufferStorage(r.RENDERBUFFER,pe,k.width,k.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,Y)}else if(k.depthBuffer&&k.stencilBuffer){const pe=et(k);le&&Qe(k)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,pe,r.DEPTH24_STENCIL8,k.width,k.height):Qe(k)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,pe,r.DEPTH24_STENCIL8,k.width,k.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,k.width,k.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,Y)}else{const pe=k.textures;for(let me=0;me<pe.length;me++){const ye=pe[me],Ge=s.convert(ye.format,ye.colorSpace),Ie=s.convert(ye.type),je=w(ye.internalFormat,Ge,Ie,ye.colorSpace),Ve=et(k);le&&Qe(k)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Ve,je,k.width,k.height):Qe(k)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Ve,je,k.width,k.height):r.renderbufferStorage(r.RENDERBUFFER,je,k.width,k.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function Ae(Y,k){if(k&&k.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(r.FRAMEBUFFER,Y),!(k.depthTexture&&k.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(k.depthTexture).__webglTexture||k.depthTexture.image.width!==k.width||k.depthTexture.image.height!==k.height)&&(k.depthTexture.image.width=k.width,k.depthTexture.image.height=k.height,k.depthTexture.needsUpdate=!0),N(k.depthTexture,0);const le=n.get(k.depthTexture).__webglTexture,pe=et(k);if(k.depthTexture.format===ol)Qe(k)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,le,0,pe):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,le,0);else if(k.depthTexture.format===au)Qe(k)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,le,0,pe):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,le,0);else throw new Error("Unknown depthTexture format")}function _e(Y){const k=n.get(Y),le=Y.isWebGLCubeRenderTarget===!0;if(Y.depthTexture&&!k.__autoAllocateDepthBuffer){if(le)throw new Error("target.depthTexture not supported in Cube render targets");Ae(k.__webglFramebuffer,Y)}else if(le){k.__webglDepthbuffer=[];for(let pe=0;pe<6;pe++)t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer[pe]),k.__webglDepthbuffer[pe]=r.createRenderbuffer(),de(k.__webglDepthbuffer[pe],Y,!1)}else t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer),k.__webglDepthbuffer=r.createRenderbuffer(),de(k.__webglDepthbuffer,Y,!1);t.bindFramebuffer(r.FRAMEBUFFER,null)}function Ee(Y,k,le){const pe=n.get(Y);k!==void 0&&j(pe.__webglFramebuffer,Y,Y.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),le!==void 0&&_e(Y)}function Le(Y){const k=Y.texture,le=n.get(Y),pe=n.get(k);Y.addEventListener("dispose",R);const me=Y.textures,ye=Y.isWebGLCubeRenderTarget===!0,Ge=me.length>1;if(Ge||(pe.__webglTexture===void 0&&(pe.__webglTexture=r.createTexture()),pe.__version=k.version,o.memory.textures++),ye){le.__webglFramebuffer=[];for(let Ie=0;Ie<6;Ie++)if(k.mipmaps&&k.mipmaps.length>0){le.__webglFramebuffer[Ie]=[];for(let je=0;je<k.mipmaps.length;je++)le.__webglFramebuffer[Ie][je]=r.createFramebuffer()}else le.__webglFramebuffer[Ie]=r.createFramebuffer()}else{if(k.mipmaps&&k.mipmaps.length>0){le.__webglFramebuffer=[];for(let Ie=0;Ie<k.mipmaps.length;Ie++)le.__webglFramebuffer[Ie]=r.createFramebuffer()}else le.__webglFramebuffer=r.createFramebuffer();if(Ge)for(let Ie=0,je=me.length;Ie<je;Ie++){const Ve=n.get(me[Ie]);Ve.__webglTexture===void 0&&(Ve.__webglTexture=r.createTexture(),o.memory.textures++)}if(Y.samples>0&&Qe(Y)===!1){le.__webglMultisampledFramebuffer=r.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,le.__webglMultisampledFramebuffer);for(let Ie=0;Ie<me.length;Ie++){const je=me[Ie];le.__webglColorRenderbuffer[Ie]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,le.__webglColorRenderbuffer[Ie]);const Ve=s.convert(je.format,je.colorSpace),Me=s.convert(je.type),fe=w(je.internalFormat,Ve,Me,je.colorSpace,Y.isXRRenderTarget===!0),De=et(Y);r.renderbufferStorageMultisample(r.RENDERBUFFER,De,fe,Y.width,Y.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ie,r.RENDERBUFFER,le.__webglColorRenderbuffer[Ie])}r.bindRenderbuffer(r.RENDERBUFFER,null),Y.depthBuffer&&(le.__webglDepthRenderbuffer=r.createRenderbuffer(),de(le.__webglDepthRenderbuffer,Y,!0)),t.bindFramebuffer(r.FRAMEBUFFER,null)}}if(ye){t.bindTexture(r.TEXTURE_CUBE_MAP,pe.__webglTexture),Q(r.TEXTURE_CUBE_MAP,k);for(let Ie=0;Ie<6;Ie++)if(k.mipmaps&&k.mipmaps.length>0)for(let je=0;je<k.mipmaps.length;je++)j(le.__webglFramebuffer[Ie][je],Y,k,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je);else j(le.__webglFramebuffer[Ie],Y,k,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0);m(k)&&v(r.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ge){for(let Ie=0,je=me.length;Ie<je;Ie++){const Ve=me[Ie],Me=n.get(Ve);t.bindTexture(r.TEXTURE_2D,Me.__webglTexture),Q(r.TEXTURE_2D,Ve),j(le.__webglFramebuffer,Y,Ve,r.COLOR_ATTACHMENT0+Ie,r.TEXTURE_2D,0),m(Ve)&&v(r.TEXTURE_2D)}t.unbindTexture()}else{let Ie=r.TEXTURE_2D;if((Y.isWebGL3DRenderTarget||Y.isWebGLArrayRenderTarget)&&(Ie=Y.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),t.bindTexture(Ie,pe.__webglTexture),Q(Ie,k),k.mipmaps&&k.mipmaps.length>0)for(let je=0;je<k.mipmaps.length;je++)j(le.__webglFramebuffer[je],Y,k,r.COLOR_ATTACHMENT0,Ie,je);else j(le.__webglFramebuffer,Y,k,r.COLOR_ATTACHMENT0,Ie,0);m(k)&&v(Ie),t.unbindTexture()}Y.depthBuffer&&_e(Y)}function st(Y){const k=Y.textures;for(let le=0,pe=k.length;le<pe;le++){const me=k[le];if(m(me)){const ye=Y.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,Ge=n.get(me).__webglTexture;t.bindTexture(ye,Ge),v(ye),t.unbindTexture()}}}function se(Y){if(Y.samples>0&&Qe(Y)===!1){const k=Y.textures,le=Y.width,pe=Y.height;let me=r.COLOR_BUFFER_BIT;const ye=[],Ge=Y.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ie=n.get(Y),je=k.length>1;if(je)for(let Ve=0;Ve<k.length;Ve++)t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.RENDERBUFFER,null),t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.TEXTURE_2D,null,0);t.bindFramebuffer(r.READ_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ie.__webglFramebuffer);for(let Ve=0;Ve<k.length;Ve++){ye.push(r.COLOR_ATTACHMENT0+Ve),Y.depthBuffer&&ye.push(Ge);const Me=Ie.__ignoreDepthValues!==void 0?Ie.__ignoreDepthValues:!1;if(Me===!1&&(Y.depthBuffer&&(me|=r.DEPTH_BUFFER_BIT),Y.stencilBuffer&&Ie.__isTransmissionRenderTarget!==!0&&(me|=r.STENCIL_BUFFER_BIT)),je&&r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,Ie.__webglColorRenderbuffer[Ve]),Me===!0&&(r.invalidateFramebuffer(r.READ_FRAMEBUFFER,[Ge]),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[Ge])),je){const fe=n.get(k[Ve]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,fe,0)}r.blitFramebuffer(0,0,le,pe,0,0,le,pe,me,r.NEAREST),h&&r.invalidateFramebuffer(r.READ_FRAMEBUFFER,ye)}if(t.bindFramebuffer(r.READ_FRAMEBUFFER,null),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),je)for(let Ve=0;Ve<k.length;Ve++){t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.RENDERBUFFER,Ie.__webglColorRenderbuffer[Ve]);const Me=n.get(k[Ve]).__webglTexture;t.bindFramebuffer(r.FRAMEBUFFER,Ie.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ve,r.TEXTURE_2D,Me,0)}t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer)}}function et(Y){return Math.min(i.maxSamples,Y.samples)}function Qe(Y){const k=n.get(Y);return Y.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function ht(Y){const k=o.render.frame;d.get(Y)!==k&&(d.set(Y,k),Y.update())}function Ke(Y,k){const le=Y.colorSpace,pe=Y.format,me=Y.type;return Y.isCompressedTexture===!0||Y.isVideoTexture===!0||le!==cr&&le!==ms&&(Tt.getTransfer(le)===Ht?(pe!==vr||me!==mr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",le)),k}function pt(Y){return typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement?(u.width=Y.naturalWidth||Y.width,u.height=Y.naturalHeight||Y.height):typeof VideoFrame<"u"&&Y instanceof VideoFrame?(u.width=Y.displayWidth,u.height=Y.displayHeight):(u.width=Y.width,u.height=Y.height),u}this.allocateTextureUnit=L,this.resetTextureUnits=M,this.setTexture2D=N,this.setTexture2DArray=W,this.setTexture3D=X,this.setTextureCube=K,this.rebindTextures=Ee,this.setupRenderTarget=Le,this.updateRenderTargetMipmap=st,this.updateMultisampleRenderTarget=se,this.setupDepthRenderbuffer=_e,this.setupFrameBufferTexture=j,this.useMultisampledRTT=Qe}function r8(r,e){function t(n,i=ms){let s;const o=Tt.getTransfer(i);if(n===mr)return r.UNSIGNED_BYTE;if(n===cE)return r.UNSIGNED_SHORT_4_4_4_4;if(n===uE)return r.UNSIGNED_SHORT_5_5_5_1;if(n===Ib)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===vA)return r.BYTE;if(n===lE)return r.SHORT;if(n===_A)return r.UNSIGNED_SHORT;if(n===iu)return r.INT;if(n===Si)return r.UNSIGNED_INT;if(n===lr)return r.FLOAT;if(n===Or)return r.HALF_FLOAT;if(n===Cb)return r.ALPHA;if(n===Mb)return r.RGB;if(n===vr)return r.RGBA;if(n===Sb)return r.LUMINANCE;if(n===Tb)return r.LUMINANCE_ALPHA;if(n===ol)return r.DEPTH_COMPONENT;if(n===au)return r.DEPTH_STENCIL;if(n===ta)return r.RED;if(n===yA)return r.RED_INTEGER;if(n===so)return r.RG;if(n===ed)return r.RG_INTEGER;if(n===ou)return r.RGBA_INTEGER;if(n===td||n===EA||n===xA||n===rd)if(o===Ht)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===td)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===EA)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===xA)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===rd)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===td)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===EA)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===xA)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===rd)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===wA||n===hE||n===IA||n===dE)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===wA)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===hE)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===IA)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===dE)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===CA)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===MA||n===SA)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===MA)return o===Ht?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===SA)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===TA||n===fE||n===pE||n===AE||n===nd||n===gE||n===mE||n===vE||n===_E||n===yE||n===EE||n===xE||n===wE||n===IE)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===TA)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===fE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===pE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===AE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===nd)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===gE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===mE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===vE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===_E)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===yE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===EE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===xE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===wE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===IE)return o===Ht?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===id||n===CE||n===ME)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===id)return o===Ht?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===CE)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===ME)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Bb||n===SE||n===TE||n===BE)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===id)return s.COMPRESSED_RED_RGTC1_EXT;if(n===SE)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===TE)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===BE)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===su?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}class n8 extends dn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class la extends Zt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const i8={type:"move"};class og{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new la,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new la,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new la,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&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}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,s=null,o=null;const l=this._targetRay,h=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const E of e.hand.values()){const m=t.getJointPose(E,n),v=this._getHandJoint(u,E);m!==null&&(v.matrix.fromArray(m.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=m.radius),v.visible=m!==null}const d=u.joints["index-finger-tip"],A=u.joints["thumb-tip"],p=d.position.distanceTo(A.position),g=.02,_=.005;u.inputState.pinching&&p>g+_?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=g-_&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else h!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),s!==null&&(h.matrix.fromArray(s.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,s.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(s.linearVelocity)):h.hasLinearVelocity=!1,s.angularVelocity?(h.hasAngularVelocity=!0,h.angularVelocity.copy(s.angularVelocity)):h.hasAngularVelocity=!1));l!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(l.matrix.fromArray(i.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,i.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(i.linearVelocity)):l.hasLinearVelocity=!1,i.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(i.angularVelocity)):l.hasAngularVelocity=!1,this.dispatchEvent(i8)))}return l!==null&&(l.visible=i!==null),h!==null&&(h.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new la;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const s8=`
3805
3805
  void main() {
3806
3806
 
3807
3807
  gl_Position = vec4( position, 1.0 );
@@ -3825,7 +3825,7 @@ void main() {
3825
3825
 
3826
3826
  }
3827
3827
 
3828
- }`;class o8{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new br,s=e.properties.get(i);s.__webglTexture=t.texture,(t.depthNear!=n.depthNear||t.depthFar!=n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}render(e,t){if(this.texture!==null){if(this.mesh===null){const n=t.cameras[0].viewport,i=new Cr({vertexShader:s8,fragmentShader:a8,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Xr(new vu(20,20),i)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class l8 extends ao{constructor(e,t){super();const n=this;let i=null,s=1,o=null,l="local-floor",h=1,u=null,d=null,A=null,p=null,g=null,_=null;const E=new o8,m=t.getContextAttributes();let v=null,w=null;const x=[],I=[],R=new Ue;let S=null;const T=new dn;T.layers.enable(1),T.viewport=new Ft;const D=new dn;D.layers.enable(2),D.viewport=new Ft;const b=[T,D],M=new n8;M.layers.enable(1),M.layers.enable(2);let L=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let de=x[j];return de===void 0&&(de=new og,x[j]=de),de.getTargetRaySpace()},this.getControllerGrip=function(j){let de=x[j];return de===void 0&&(de=new og,x[j]=de),de.getGripSpace()},this.getHand=function(j){let de=x[j];return de===void 0&&(de=new og,x[j]=de),de.getHandSpace()};function N(j){const de=I.indexOf(j.inputSource);if(de===-1)return;const Ae=x[de];Ae!==void 0&&(Ae.update(j.inputSource,j.frame,u||o),Ae.dispatchEvent({type:j.type,data:j.inputSource}))}function W(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",W),i.removeEventListener("inputsourceschange",X);for(let j=0;j<x.length;j++){const de=I[j];de!==null&&(I[j]=null,x[j].disconnect(de))}L=null,P=null,E.reset(),e.setRenderTarget(v),g=null,p=null,A=null,i=null,w=null,re.stop(),n.isPresenting=!1,e.setPixelRatio(S),e.setSize(R.width,R.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(j){s=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(j){l=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(j){u=j},this.getBaseLayer=function(){return p!==null?p:g},this.getBinding=function(){return A},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(j){if(i=j,i!==null){if(v=e.getRenderTarget(),i.addEventListener("select",N),i.addEventListener("selectstart",N),i.addEventListener("selectend",N),i.addEventListener("squeeze",N),i.addEventListener("squeezestart",N),i.addEventListener("squeezeend",N),i.addEventListener("end",W),i.addEventListener("inputsourceschange",X),m.xrCompatible!==!0&&await t.makeXRCompatible(),S=e.getPixelRatio(),e.getSize(R),i.renderState.layers===void 0){const de={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(i,t,de),i.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),w=new cn(g.framebufferWidth,g.framebufferHeight,{format:vr,type:mr,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let de=null,Ae=null,_e=null;m.depth&&(_e=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,de=m.stencil?au:ol,Ae=m.stencil?su:Si);const Ee={colorFormat:t.RGBA8,depthFormat:_e,scaleFactor:s};A=new XRWebGLBinding(i,t),p=A.createProjectionLayer(Ee),i.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),w=new cn(p.textureWidth,p.textureHeight,{format:vr,type:mr,depthTexture:new w2(p.textureWidth,p.textureHeight,Ae,void 0,void 0,void 0,void 0,void 0,void 0,de),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0});const Le=e.properties.get(w);Le.__ignoreDepthValues=p.ignoreDepthValues}w.isXRRenderTarget=!0,this.setFoveation(h),u=null,o=await i.requestReferenceSpace(l),re.setContext(i),re.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function X(j){for(let de=0;de<j.removed.length;de++){const Ae=j.removed[de],_e=I.indexOf(Ae);_e>=0&&(I[_e]=null,x[_e].disconnect(Ae))}for(let de=0;de<j.added.length;de++){const Ae=j.added[de];let _e=I.indexOf(Ae);if(_e===-1){for(let Le=0;Le<x.length;Le++)if(Le>=I.length){I.push(Ae),_e=Le;break}else if(I[Le]===null){I[Le]=Ae,_e=Le;break}if(_e===-1)break}const Ee=x[_e];Ee&&Ee.connect(Ae)}}const K=new H,te=new H;function V(j,de,Ae){K.setFromMatrixPosition(de.matrixWorld),te.setFromMatrixPosition(Ae.matrixWorld);const _e=K.distanceTo(te),Ee=de.projectionMatrix.elements,Le=Ae.projectionMatrix.elements,st=Ee[14]/(Ee[10]-1),se=Ee[14]/(Ee[10]+1),et=(Ee[9]+1)/Ee[5],Qe=(Ee[9]-1)/Ee[5],ct=(Ee[8]-1)/Ee[0],Ke=(Le[8]+1)/Le[0],pt=st*ct,Y=st*Ke,k=_e/(-ct+Ke),le=k*-ct;de.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(le),j.translateZ(k),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert();const pe=st+k,me=se+k,ye=pt-le,Ge=Y+(_e-le),Ie=et*se/me*pe,je=Qe*se/me*pe;j.projectionMatrix.makePerspective(ye,Ge,Ie,je,pe,me),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}function ee(j,de){de===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(de.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(i===null)return;E.texture!==null&&(j.near=E.depthNear,j.far=E.depthFar),M.near=D.near=T.near=j.near,M.far=D.far=T.far=j.far,(L!==M.near||P!==M.far)&&(i.updateRenderState({depthNear:M.near,depthFar:M.far}),L=M.near,P=M.far,T.near=L,T.far=P,D.near=L,D.far=P,T.updateProjectionMatrix(),D.updateProjectionMatrix(),j.updateProjectionMatrix());const de=j.parent,Ae=M.cameras;ee(M,de);for(let _e=0;_e<Ae.length;_e++)ee(Ae[_e],de);Ae.length===2?V(M,T,D):M.projectionMatrix.copy(T.projectionMatrix),Q(j,M,de)};function Q(j,de,Ae){Ae===null?j.matrix.copy(de.matrixWorld):(j.matrix.copy(Ae.matrixWorld),j.matrix.invert(),j.matrix.multiply(de.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(de.projectionMatrix),j.projectionMatrixInverse.copy(de.projectionMatrixInverse),j.isPerspectiveCamera&&(j.fov=ul*2*Math.atan(1/j.projectionMatrix.elements[5]),j.zoom=1)}this.getCamera=function(){return M},this.getFoveation=function(){if(!(p===null&&g===null))return h},this.setFoveation=function(j){h=j,p!==null&&(p.fixedFoveation=j),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=j)},this.hasDepthSensing=function(){return E.texture!==null};let z=null;function Z(j,de){if(d=de.getViewerPose(u||o),_=de,d!==null){const Ae=d.views;g!==null&&(e.setRenderTargetFramebuffer(w,g.framebuffer),e.setRenderTarget(w));let _e=!1;Ae.length!==M.cameras.length&&(M.cameras.length=0,_e=!0);for(let Le=0;Le<Ae.length;Le++){const st=Ae[Le];let se=null;if(g!==null)se=g.getViewport(st);else{const Qe=A.getViewSubImage(p,st);se=Qe.viewport,Le===0&&(e.setRenderTargetTextures(w,Qe.colorTexture,p.ignoreDepthValues?void 0:Qe.depthStencilTexture),e.setRenderTarget(w))}let et=b[Le];et===void 0&&(et=new dn,et.layers.enable(Le),et.viewport=new Ft,b[Le]=et),et.matrix.fromArray(st.transform.matrix),et.matrix.decompose(et.position,et.quaternion,et.scale),et.projectionMatrix.fromArray(st.projectionMatrix),et.projectionMatrixInverse.copy(et.projectionMatrix).invert(),et.viewport.set(se.x,se.y,se.width,se.height),Le===0&&(M.matrix.copy(et.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),_e===!0&&M.cameras.push(et)}const Ee=i.enabledFeatures;if(Ee&&Ee.includes("depth-sensing")){const Le=A.getDepthInformation(Ae[0]);Le&&Le.isValid&&Le.texture&&E.init(e,Le,i.renderState)}}for(let Ae=0;Ae<x.length;Ae++){const _e=I[Ae],Ee=x[Ae];_e!==null&&Ee!==void 0&&Ee.update(_e,de,u||o)}E.render(e,M),z&&z(j,de),de.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:de}),_=null}const re=new A2;re.setAnimationLoop(Z),this.setAnimationLoop=function(j){z=j},this.dispose=function(){}}}const go=new qi,c8=new rt;function u8(r,e){function t(m,v){m.matrixAutoUpdate===!0&&m.updateMatrix(),v.value.copy(m.matrix)}function n(m,v){v.color.getRGB(m.fogColor.value,u2(r)),v.isFog?(m.fogNear.value=v.near,m.fogFar.value=v.far):v.isFogExp2&&(m.fogDensity.value=v.density)}function i(m,v,w,x,I){v.isMeshBasicMaterial||v.isMeshLambertMaterial?s(m,v):v.isMeshToonMaterial?(s(m,v),A(m,v)):v.isMeshPhongMaterial?(s(m,v),d(m,v)):v.isMeshStandardMaterial?(s(m,v),p(m,v),v.isMeshPhysicalMaterial&&g(m,v,I)):v.isMeshMatcapMaterial?(s(m,v),_(m,v)):v.isMeshDepthMaterial?s(m,v):v.isMeshDistanceMaterial?(s(m,v),E(m,v)):v.isMeshNormalMaterial?s(m,v):v.isLineBasicMaterial?(o(m,v),v.isLineDashedMaterial&&l(m,v)):v.isPointsMaterial?h(m,v,w,x):v.isSpriteMaterial?u(m,v):v.isShadowMaterial?(m.color.value.copy(v.color),m.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function s(m,v){m.opacity.value=v.opacity,v.color&&m.diffuse.value.copy(v.color),v.emissive&&m.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(m.map.value=v.map,t(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.bumpMap&&(m.bumpMap.value=v.bumpMap,t(v.bumpMap,m.bumpMapTransform),m.bumpScale.value=v.bumpScale,v.side===Qr&&(m.bumpScale.value*=-1)),v.normalMap&&(m.normalMap.value=v.normalMap,t(v.normalMap,m.normalMapTransform),m.normalScale.value.copy(v.normalScale),v.side===Qr&&m.normalScale.value.negate()),v.displacementMap&&(m.displacementMap.value=v.displacementMap,t(v.displacementMap,m.displacementMapTransform),m.displacementScale.value=v.displacementScale,m.displacementBias.value=v.displacementBias),v.emissiveMap&&(m.emissiveMap.value=v.emissiveMap,t(v.emissiveMap,m.emissiveMapTransform)),v.specularMap&&(m.specularMap.value=v.specularMap,t(v.specularMap,m.specularMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest);const w=e.get(v),x=w.envMap,I=w.envMapRotation;if(x&&(m.envMap.value=x,go.copy(I),go.x*=-1,go.y*=-1,go.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(go.y*=-1,go.z*=-1),m.envMapRotation.value.setFromMatrix4(c8.makeRotationFromEuler(go)),m.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=v.reflectivity,m.ior.value=v.ior,m.refractionRatio.value=v.refractionRatio),v.lightMap){m.lightMap.value=v.lightMap;const R=r._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=v.lightMapIntensity*R,t(v.lightMap,m.lightMapTransform)}v.aoMap&&(m.aoMap.value=v.aoMap,m.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,m.aoMapTransform))}function o(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform))}function l(m,v){m.dashSize.value=v.dashSize,m.totalSize.value=v.dashSize+v.gapSize,m.scale.value=v.scale}function h(m,v,w,x){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.size.value=v.size*w,m.scale.value=x*.5,v.map&&(m.map.value=v.map,t(v.map,m.uvTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function u(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.rotation.value=v.rotation,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function d(m,v){m.specular.value.copy(v.specular),m.shininess.value=Math.max(v.shininess,1e-4)}function A(m,v){v.gradientMap&&(m.gradientMap.value=v.gradientMap)}function p(m,v){m.metalness.value=v.metalness,v.metalnessMap&&(m.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,m.metalnessMapTransform)),m.roughness.value=v.roughness,v.roughnessMap&&(m.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,m.roughnessMapTransform)),v.envMap&&(m.envMapIntensity.value=v.envMapIntensity)}function g(m,v,w){m.ior.value=v.ior,v.sheen>0&&(m.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),m.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(m.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,m.sheenColorMapTransform)),v.sheenRoughnessMap&&(m.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,m.sheenRoughnessMapTransform))),v.clearcoat>0&&(m.clearcoat.value=v.clearcoat,m.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(m.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,m.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(m.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Qr&&m.clearcoatNormalScale.value.negate())),v.iridescence>0&&(m.iridescence.value=v.iridescence,m.iridescenceIOR.value=v.iridescenceIOR,m.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(m.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,m.iridescenceMapTransform)),v.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),v.transmission>0&&(m.transmission.value=v.transmission,m.transmissionSamplerMap.value=w.texture,m.transmissionSamplerSize.value.set(w.width,w.height),v.transmissionMap&&(m.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,m.transmissionMapTransform)),m.thickness.value=v.thickness,v.thicknessMap&&(m.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=v.attenuationDistance,m.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(m.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(m.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=v.specularIntensity,m.specularColor.value.copy(v.specularColor),v.specularColorMap&&(m.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,m.specularColorMapTransform)),v.specularIntensityMap&&(m.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,m.specularIntensityMapTransform))}function _(m,v){v.matcap&&(m.matcap.value=v.matcap)}function E(m,v){const w=e.get(v).light;m.referencePosition.value.setFromMatrixPosition(w.matrixWorld),m.nearDistance.value=w.shadow.camera.near,m.farDistance.value=w.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function h8(r,e,t,n){let i={},s={},o=[];const l=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function h(w,x){const I=x.program;n.uniformBlockBinding(w,I)}function u(w,x){let I=i[w.id];I===void 0&&(_(w),I=d(w),i[w.id]=I,w.addEventListener("dispose",m));const R=x.program;n.updateUBOMapping(w,R);const S=e.render.frame;s[w.id]!==S&&(p(w),s[w.id]=S)}function d(w){const x=A();w.__bindingPointIndex=x;const I=r.createBuffer(),R=w.__size,S=w.usage;return r.bindBuffer(r.UNIFORM_BUFFER,I),r.bufferData(r.UNIFORM_BUFFER,R,S),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,x,I),I}function A(){for(let w=0;w<l;w++)if(o.indexOf(w)===-1)return o.push(w),w;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(w){const x=i[w.id],I=w.uniforms,R=w.__cache;r.bindBuffer(r.UNIFORM_BUFFER,x);for(let S=0,T=I.length;S<T;S++){const D=Array.isArray(I[S])?I[S]:[I[S]];for(let b=0,M=D.length;b<M;b++){const L=D[b];if(g(L,S,b,R)===!0){const P=L.__offset,N=Array.isArray(L.value)?L.value:[L.value];let W=0;for(let X=0;X<N.length;X++){const K=N[X],te=E(K);typeof K=="number"||typeof K=="boolean"?(L.__data[0]=K,r.bufferSubData(r.UNIFORM_BUFFER,P+W,L.__data)):K.isMatrix3?(L.__data[0]=K.elements[0],L.__data[1]=K.elements[1],L.__data[2]=K.elements[2],L.__data[3]=0,L.__data[4]=K.elements[3],L.__data[5]=K.elements[4],L.__data[6]=K.elements[5],L.__data[7]=0,L.__data[8]=K.elements[6],L.__data[9]=K.elements[7],L.__data[10]=K.elements[8],L.__data[11]=0):(K.toArray(L.__data,W),W+=te.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,P,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function g(w,x,I,R){const S=w.value,T=x+"_"+I;if(R[T]===void 0)return typeof S=="number"||typeof S=="boolean"?R[T]=S:R[T]=S.clone(),!0;{const D=R[T];if(typeof S=="number"||typeof S=="boolean"){if(D!==S)return R[T]=S,!0}else if(D.equals(S)===!1)return D.copy(S),!0}return!1}function _(w){const x=w.uniforms;let I=0;const R=16;for(let T=0,D=x.length;T<D;T++){const b=Array.isArray(x[T])?x[T]:[x[T]];for(let M=0,L=b.length;M<L;M++){const P=b[M],N=Array.isArray(P.value)?P.value:[P.value];for(let W=0,X=N.length;W<X;W++){const K=N[W],te=E(K),V=I%R;V!==0&&R-V<te.boundary&&(I+=R-V),P.__data=new Float32Array(te.storage/Float32Array.BYTES_PER_ELEMENT),P.__offset=I,I+=te.storage}}}const S=I%R;return S>0&&(I+=R-S),w.__size=I,w.__cache={},this}function E(w){const x={boundary:0,storage:0};return typeof w=="number"||typeof w=="boolean"?(x.boundary=4,x.storage=4):w.isVector2?(x.boundary=8,x.storage=8):w.isVector3||w.isColor?(x.boundary=16,x.storage=12):w.isVector4?(x.boundary=16,x.storage=16):w.isMatrix3?(x.boundary=48,x.storage=48):w.isMatrix4?(x.boundary=64,x.storage=64):w.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",w),x}function m(w){const x=w.target;x.removeEventListener("dispose",m);const I=o.indexOf(x.__bindingPointIndex);o.splice(I,1),r.deleteBuffer(i[x.id]),delete i[x.id],delete s[x.id]}function v(){for(const w in i)r.deleteBuffer(i[w]);o=[],i={},s={}}return{bind:h,update:u,dispose:v}}class d8{constructor(e={}){const{canvas:t=i5(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:l=!1,premultipliedAlpha:h=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:A=!1}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=n.getContextAttributes().alpha}else p=o;const g=new Uint32Array(4),_=new Int32Array(4);let E=null,m=null;const v=[],w=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Fr,this._useLegacyLights=!1,this.toneMapping=$s,this.toneMappingExposure=1;const x=this;let I=!1,R=0,S=0,T=null,D=-1,b=null;const M=new Ft,L=new Ft;let P=null;const N=new He(0);let W=0,X=t.width,K=t.height,te=1,V=null,ee=null;const Q=new Ft(0,0,X,K),z=new Ft(0,0,X,K);let Z=!1;const re=new ZA;let j=!1,de=!1;const Ae=new rt,_e=new Ue,Ee=new H,Le={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function st(){return T===null?te:1}let se=n;function et(F,ne){const ue=t.getContext(F,ne);return ue!==null?ue:null}try{const F={alpha:!0,depth:i,stencil:s,antialias:l,premultipliedAlpha:h,preserveDrawingBuffer:u,powerPreference:d,failIfMajorPerformanceCaveat:A};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Xh}`),t.addEventListener("webglcontextlost",ge,!1),t.addEventListener("webglcontextrestored",ve,!1),t.addEventListener("webglcontextcreationerror",Fe,!1),se===null){const ne="webgl2";if(se=et(ne,F),se===null)throw et(ne)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(F){throw console.error("THREE.WebGLRenderer: "+F.message),F}let Qe,ct,Ke,pt,Y,k,le,pe,me,ye,Ge,Ie,je,Ve,Me,fe,De,Be,be,nt,lt,dt,ut,ht;function G(){Qe=new ED(se),Qe.init(),ct=new AD(se,Qe,e),dt=new r8(se,Qe),Ke=new e8(se),pt=new ID(se),Y=new zL,k=new t8(se,Qe,Ke,Y,ct,dt,pt),le=new mD(x),pe=new yD(x),me=new b5(se),ut=new fD(se,me),ye=new xD(se,me,pt,ut),Ge=new MD(se,ye,me,pt),be=new CD(se,ct,k),fe=new gD(Y),Ie=new FL(x,le,pe,Qe,ct,ut,fe),je=new u8(x,Y),Ve=new GL,Me=new XL(Qe),Be=new dD(x,le,pe,Ke,Ge,p,h),De=new $L(x,Ge,ct),ht=new h8(se,pt,ct,Ke),nt=new pD(se,Qe,pt),lt=new wD(se,Qe,pt),pt.programs=Ie.programs,x.capabilities=ct,x.extensions=Qe,x.properties=Y,x.renderLists=Ve,x.shadowMap=De,x.state=Ke,x.info=pt}G();const O=new l8(x,se);this.xr=O,this.getContext=function(){return se},this.getContextAttributes=function(){return se.getContextAttributes()},this.forceContextLoss=function(){const F=Qe.get("WEBGL_lose_context");F&&F.loseContext()},this.forceContextRestore=function(){const F=Qe.get("WEBGL_lose_context");F&&F.restoreContext()},this.getPixelRatio=function(){return te},this.setPixelRatio=function(F){F!==void 0&&(te=F,this.setSize(X,K,!1))},this.getSize=function(F){return F.set(X,K)},this.setSize=function(F,ne,ue=!0){if(O.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=F,K=ne,t.width=Math.floor(F*te),t.height=Math.floor(ne*te),ue===!0&&(t.style.width=F+"px",t.style.height=ne+"px"),this.setViewport(0,0,F,ne)},this.getDrawingBufferSize=function(F){return F.set(X*te,K*te).floor()},this.setDrawingBufferSize=function(F,ne,ue){X=F,K=ne,te=ue,t.width=Math.floor(F*ue),t.height=Math.floor(ne*ue),this.setViewport(0,0,F,ne)},this.getCurrentViewport=function(F){return F.copy(M)},this.getViewport=function(F){return F.copy(Q)},this.setViewport=function(F,ne,ue,he){F.isVector4?Q.set(F.x,F.y,F.z,F.w):Q.set(F,ne,ue,he),Ke.viewport(M.copy(Q).multiplyScalar(te).round())},this.getScissor=function(F){return F.copy(z)},this.setScissor=function(F,ne,ue,he){F.isVector4?z.set(F.x,F.y,F.z,F.w):z.set(F,ne,ue,he),Ke.scissor(L.copy(z).multiplyScalar(te).round())},this.getScissorTest=function(){return Z},this.setScissorTest=function(F){Ke.setScissorTest(Z=F)},this.setOpaqueSort=function(F){V=F},this.setTransparentSort=function(F){ee=F},this.getClearColor=function(F){return F.copy(Be.getClearColor())},this.setClearColor=function(){Be.setClearColor.apply(Be,arguments)},this.getClearAlpha=function(){return Be.getClearAlpha()},this.setClearAlpha=function(){Be.setClearAlpha.apply(Be,arguments)},this.clear=function(F=!0,ne=!0,ue=!0){let he=0;if(F){let oe=!1;if(T!==null){const Re=T.texture.format;oe=Re===ou||Re===ed||Re===yA}if(oe){const Re=T.texture.type,Je=Re===mr||Re===Si||Re===_A||Re===su||Re===cE||Re===uE,it=Be.getClearColor(),at=Be.getClearAlpha(),Xe=it.r,At=it.g,ft=it.b;Je?(g[0]=Xe,g[1]=At,g[2]=ft,g[3]=at,se.clearBufferuiv(se.COLOR,0,g)):(_[0]=Xe,_[1]=At,_[2]=ft,_[3]=at,se.clearBufferiv(se.COLOR,0,_))}else he|=se.COLOR_BUFFER_BIT}ne&&(he|=se.DEPTH_BUFFER_BIT),ue&&(he|=se.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),se.clear(he)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ge,!1),t.removeEventListener("webglcontextrestored",ve,!1),t.removeEventListener("webglcontextcreationerror",Fe,!1),Ve.dispose(),Me.dispose(),Y.dispose(),le.dispose(),pe.dispose(),Ge.dispose(),ut.dispose(),ht.dispose(),Ie.dispose(),O.dispose(),O.removeEventListener("sessionstart",fr),O.removeEventListener("sessionend",Vt),Er.stop()};function ge(F){F.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),I=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),I=!1;const F=pt.autoReset,ne=De.enabled,ue=De.autoUpdate,he=De.needsUpdate,oe=De.type;G(),pt.autoReset=F,De.enabled=ne,De.autoUpdate=ue,De.needsUpdate=he,De.type=oe}function Fe(F){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",F.statusMessage)}function Pe(F){const ne=F.target;ne.removeEventListener("dispose",Pe),vt(ne)}function vt(F){Lt(F),Y.remove(F)}function Lt(F){const ne=Y.get(F).programs;ne!==void 0&&(ne.forEach(function(ue){Ie.releaseProgram(ue)}),F.isShaderMaterial&&Ie.releaseShaderCache(F))}this.renderBufferDirect=function(F,ne,ue,he,oe,Re){ne===null&&(ne=Le);const Je=oe.isMesh&&oe.matrixWorld.determinant()<0,it=d0(F,ne,ue,he,oe);Ke.setMaterial(he,Je);let at=ue.index,Xe=1;if(he.wireframe===!0){if(at=ye.getWireframeAttribute(ue),at===void 0)return;Xe=2}const At=ue.drawRange,ft=ue.attributes.position;let Lr=At.start*Xe,er=(At.start+At.count)*Xe;Re!==null&&(Lr=Math.max(Lr,Re.start*Xe),er=Math.min(er,(Re.start+Re.count)*Xe)),at!==null?(Lr=Math.max(Lr,0),er=Math.min(er,at.count)):ft!=null&&(Lr=Math.max(Lr,0),er=Math.min(er,ft.count));const Dn=er-Lr;if(Dn<0||Dn===1/0)return;ut.setup(oe,he,it,ue,at);let Ai,jt=nt;if(at!==null&&(Ai=me.get(at),jt=lt,jt.setIndex(Ai)),oe.isMesh)he.wireframe===!0?(Ke.setLineWidth(he.wireframeLinewidth*st()),jt.setMode(se.LINES)):jt.setMode(se.TRIANGLES);else if(oe.isLine){let tt=he.linewidth;tt===void 0&&(tt=1),Ke.setLineWidth(tt*st()),oe.isLineSegments?jt.setMode(se.LINES):oe.isLineLoop?jt.setMode(se.LINE_LOOP):jt.setMode(se.LINE_STRIP)}else oe.isPoints?jt.setMode(se.POINTS):oe.isSprite&&jt.setMode(se.TRIANGLES);if(oe.isBatchedMesh)jt.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else if(oe.isInstancedMesh)jt.renderInstances(Lr,Dn,oe.count);else if(ue.isInstancedBufferGeometry){const tt=ue._maxInstanceCount!==void 0?ue._maxInstanceCount:1/0,Ju=Math.min(ue.instanceCount,tt);jt.renderInstances(Lr,Dn,Ju)}else jt.render(Lr,Dn)};function Nt(F,ne,ue){F.transparent===!0&&F.side===Ii&&F.forceSinglePass===!1?(F.side=Qr,F.needsUpdate=!0,Ps(F,ne,ue),F.side=wi,F.needsUpdate=!0,Ps(F,ne,ue),F.side=Ii):Ps(F,ne,ue)}this.compile=function(F,ne,ue=null){ue===null&&(ue=F),m=Me.get(ue),m.init(),w.push(m),ue.traverseVisible(function(oe){oe.isLight&&oe.layers.test(ne.layers)&&(m.pushLight(oe),oe.castShadow&&m.pushShadow(oe))}),F!==ue&&F.traverseVisible(function(oe){oe.isLight&&oe.layers.test(ne.layers)&&(m.pushLight(oe),oe.castShadow&&m.pushShadow(oe))}),m.setupLights(x._useLegacyLights);const he=new Set;return F.traverse(function(oe){const Re=oe.material;if(Re)if(Array.isArray(Re))for(let Je=0;Je<Re.length;Je++){const it=Re[Je];Nt(it,ue,oe),he.add(it)}else Nt(Re,ue,oe),he.add(Re)}),w.pop(),m=null,he},this.compileAsync=function(F,ne,ue=null){const he=this.compile(F,ne,ue);return new Promise(oe=>{function Re(){if(he.forEach(function(Je){Y.get(Je).currentProgram.isReady()&&he.delete(Je)}),he.size===0){oe(F);return}setTimeout(Re,10)}Qe.get("KHR_parallel_shader_compile")!==null?Re():setTimeout(Re,10)})};let Bt=null;function _t(F){Bt&&Bt(F)}function fr(){Er.stop()}function Vt(){Er.start()}const Er=new A2;Er.setAnimationLoop(_t),typeof self<"u"&&Er.setContext(self),this.setAnimationLoop=function(F){Bt=F,O.setAnimationLoop(F),F===null?Er.stop():Er.start()},O.addEventListener("sessionstart",fr),O.addEventListener("sessionend",Vt),this.render=function(F,ne){if(ne!==void 0&&ne.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(I===!0)return;F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),ne.parent===null&&ne.matrixWorldAutoUpdate===!0&&ne.updateMatrixWorld(),O.enabled===!0&&O.isPresenting===!0&&(O.cameraAutoUpdate===!0&&O.updateCamera(ne),ne=O.getCamera()),F.isScene===!0&&F.onBeforeRender(x,F,ne,T),m=Me.get(F,w.length),m.init(),w.push(m),Ae.multiplyMatrices(ne.projectionMatrix,ne.matrixWorldInverse),re.setFromProjectionMatrix(Ae),de=this.localClippingEnabled,j=fe.init(this.clippingPlanes,de),E=Ve.get(F,v.length),E.init(),v.push(E),Rn(F,ne,0,x.sortObjects),E.finish(),x.sortObjects===!0&&E.sort(V,ee),this.info.render.frame++,j===!0&&fe.beginShadows();const ue=m.state.shadowsArray;if(De.render(ue,F,ne),j===!0&&fe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(O.enabled===!1||O.isPresenting===!1||O.hasDepthSensing()===!1)&&Be.render(E,F),m.setupLights(x._useLegacyLights),ne.isArrayCamera){const he=ne.cameras;for(let oe=0,Re=he.length;oe<Re;oe++){const Je=he[oe];qt(E,F,Je,Je.viewport)}}else qt(E,F,ne);T!==null&&(k.updateMultisampleRenderTarget(T),k.updateRenderTargetMipmap(T)),F.isScene===!0&&F.onAfterRender(x,F,ne),ut.resetDefaultState(),D=-1,b=null,w.pop(),w.length>0?m=w[w.length-1]:m=null,v.pop(),v.length>0?E=v[v.length-1]:E=null};function Rn(F,ne,ue,he){if(F.visible===!1)return;if(F.layers.test(ne.layers)){if(F.isGroup)ue=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(ne);else if(F.isLight)m.pushLight(F),F.castShadow&&m.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||re.intersectsSprite(F)){he&&Ee.setFromMatrixPosition(F.matrixWorld).applyMatrix4(Ae);const Re=Ge.update(F),Je=F.material;Je.visible&&E.push(F,Re,Je,ue,Ee.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||re.intersectsObject(F))){const Re=Ge.update(F),Je=F.material;if(he&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),Ee.copy(F.boundingSphere.center)):(Re.boundingSphere===null&&Re.computeBoundingSphere(),Ee.copy(Re.boundingSphere.center)),Ee.applyMatrix4(F.matrixWorld).applyMatrix4(Ae)),Array.isArray(Je)){const it=Re.groups;for(let at=0,Xe=it.length;at<Xe;at++){const At=it[at],ft=Je[At.materialIndex];ft&&ft.visible&&E.push(F,Re,ft,ue,Ee.z,At)}}else Je.visible&&E.push(F,Re,Je,ue,Ee.z,null)}}const oe=F.children;for(let Re=0,Je=oe.length;Re<Je;Re++)Rn(oe[Re],ne,ue,he)}function qt(F,ne,ue,he){const oe=F.opaque,Re=F.transmissive,Je=F.transparent;m.setupLightsView(ue),j===!0&&fe.setGlobalState(x.clippingPlanes,ue),Re.length>0&&pi(oe,Re,ne,ue),he&&Ke.viewport(M.copy(he)),oe.length>0&&$n(oe,ne,ue),Re.length>0&&$n(Re,ne,ue),Je.length>0&&$n(Je,ne,ue),Ke.buffers.depth.setTest(!0),Ke.buffers.depth.setMask(!0),Ke.buffers.color.setMask(!0),Ke.setPolygonOffset(!1)}function pi(F,ne,ue,he){if((ue.isScene===!0?ue.overrideMaterial:null)!==null)return;if(m.state.transmissionRenderTarget===null){m.state.transmissionRenderTarget=new cn(1,1,{generateMipmaps:!0,type:Qe.has("EXT_color_buffer_half_float")||Qe.has("EXT_color_buffer_float")?Or:mr,minFilter:Mi,samples:4,stencilBuffer:s});const at=Y.get(m.state.transmissionRenderTarget);at.__isTransmissionRenderTarget=!0}const oe=m.state.transmissionRenderTarget;x.getDrawingBufferSize(_e),oe.setSize(_e.x,_e.y);const Re=x.getRenderTarget();x.setRenderTarget(oe),x.getClearColor(N),W=x.getClearAlpha(),W<1&&x.setClearColor(16777215,.5),x.clear();const Je=x.toneMapping;x.toneMapping=$s,$n(F,ue,he),k.updateMultisampleRenderTarget(oe),k.updateRenderTargetMipmap(oe);let it=!1;for(let at=0,Xe=ne.length;at<Xe;at++){const At=ne[at],ft=At.object,Lr=At.geometry,er=At.material,Dn=At.group;if(er.side===Ii&&ft.layers.test(he.layers)){const Ai=er.side;er.side=Qr,er.needsUpdate=!0,Us(ft,ue,he,Lr,er,Dn),er.side=Ai,er.needsUpdate=!0,it=!0}}it===!0&&(k.updateMultisampleRenderTarget(oe),k.updateRenderTargetMipmap(oe)),x.setRenderTarget(Re),x.setClearColor(N,W),x.toneMapping=Je}function $n(F,ne,ue){const he=ne.isScene===!0?ne.overrideMaterial:null;for(let oe=0,Re=F.length;oe<Re;oe++){const Je=F[oe],it=Je.object,at=Je.geometry,Xe=he===null?Je.material:he,At=Je.group;it.layers.test(ue.layers)&&Us(it,ne,ue,at,Xe,At)}}function Us(F,ne,ue,he,oe,Re){F.onBeforeRender(x,ne,ue,he,oe,Re),F.modelViewMatrix.multiplyMatrices(ue.matrixWorldInverse,F.matrixWorld),F.normalMatrix.getNormalMatrix(F.modelViewMatrix),oe.onBeforeRender(x,ne,ue,he,F,Re),oe.transparent===!0&&oe.side===Ii&&oe.forceSinglePass===!1?(oe.side=Qr,oe.needsUpdate=!0,x.renderBufferDirect(ue,ne,he,oe,F,Re),oe.side=wi,oe.needsUpdate=!0,x.renderBufferDirect(ue,ne,he,oe,F,Re),oe.side=Ii):x.renderBufferDirect(ue,ne,he,oe,F,Re),F.onAfterRender(x,ne,ue,he,oe,Re)}function Ps(F,ne,ue){ne.isScene!==!0&&(ne=Le);const he=Y.get(F),oe=m.state.lights,Re=m.state.shadowsArray,Je=oe.state.version,it=Ie.getParameters(F,oe.state,Re,ne,ue),at=Ie.getProgramCacheKey(it);let Xe=he.programs;he.environment=F.isMeshStandardMaterial?ne.environment:null,he.fog=ne.fog,he.envMap=(F.isMeshStandardMaterial?pe:le).get(F.envMap||he.environment),he.envMapRotation=he.environment!==null&&F.envMap===null?ne.environmentRotation:F.envMapRotation,Xe===void 0&&(F.addEventListener("dispose",Pe),Xe=new Map,he.programs=Xe);let At=Xe.get(at);if(At!==void 0){if(he.currentProgram===At&&he.lightsStateVersion===Je)return Bf(F,it),At}else it.uniforms=Ie.getUniforms(F),F.onBuild(ue,it,x),F.onBeforeCompile(it,x),At=Ie.acquireProgram(it,at),Xe.set(at,At),he.uniforms=it.uniforms;const ft=he.uniforms;return(!F.isShaderMaterial&&!F.isRawShaderMaterial||F.clipping===!0)&&(ft.clippingPlanes=fe.uniform),Bf(F,it),he.needsLights=ks(F),he.lightsStateVersion=Je,he.needsLights&&(ft.ambientLightColor.value=oe.state.ambient,ft.lightProbe.value=oe.state.probe,ft.directionalLights.value=oe.state.directional,ft.directionalLightShadows.value=oe.state.directionalShadow,ft.spotLights.value=oe.state.spot,ft.spotLightShadows.value=oe.state.spotShadow,ft.rectAreaLights.value=oe.state.rectArea,ft.ltc_1.value=oe.state.rectAreaLTC1,ft.ltc_2.value=oe.state.rectAreaLTC2,ft.pointLights.value=oe.state.point,ft.pointLightShadows.value=oe.state.pointShadow,ft.hemisphereLights.value=oe.state.hemi,ft.directionalShadowMap.value=oe.state.directionalShadowMap,ft.directionalShadowMatrix.value=oe.state.directionalShadowMatrix,ft.spotShadowMap.value=oe.state.spotShadowMap,ft.spotLightMatrix.value=oe.state.spotLightMatrix,ft.spotLightMap.value=oe.state.spotLightMap,ft.pointShadowMap.value=oe.state.pointShadowMap,ft.pointShadowMatrix.value=oe.state.pointShadowMatrix),he.currentProgram=At,he.uniformsList=null,At}function dc(F){if(F.uniformsList===null){const ne=F.currentProgram.getUniforms();F.uniformsList=Nd.seqWithValue(ne.seq,F.uniforms)}return F.uniformsList}function Bf(F,ne){const ue=Y.get(F);ue.outputColorSpace=ne.outputColorSpace,ue.batching=ne.batching,ue.instancing=ne.instancing,ue.instancingColor=ne.instancingColor,ue.instancingMorph=ne.instancingMorph,ue.skinning=ne.skinning,ue.morphTargets=ne.morphTargets,ue.morphNormals=ne.morphNormals,ue.morphColors=ne.morphColors,ue.morphTargetsCount=ne.morphTargetsCount,ue.numClippingPlanes=ne.numClippingPlanes,ue.numIntersection=ne.numClipIntersection,ue.vertexAlphas=ne.vertexAlphas,ue.vertexTangents=ne.vertexTangents,ue.toneMapping=ne.toneMapping}function d0(F,ne,ue,he,oe){ne.isScene!==!0&&(ne=Le),k.resetTextureUnits();const Re=ne.fog,Je=he.isMeshStandardMaterial?ne.environment:null,it=T===null?x.outputColorSpace:T.isXRRenderTarget===!0?T.texture.colorSpace:cr,at=(he.isMeshStandardMaterial?pe:le).get(he.envMap||Je),Xe=he.vertexColors===!0&&!!ue.attributes.color&&ue.attributes.color.itemSize===4,At=!!ue.attributes.tangent&&(!!he.normalMap||he.anisotropy>0),ft=!!ue.morphAttributes.position,Lr=!!ue.morphAttributes.normal,er=!!ue.morphAttributes.color;let Dn=$s;he.toneMapped&&(T===null||T.isXRRenderTarget===!0)&&(Dn=x.toneMapping);const Ai=ue.morphAttributes.position||ue.morphAttributes.normal||ue.morphAttributes.color,jt=Ai!==void 0?Ai.length:0,tt=Y.get(he),Ju=m.state.lights;if(j===!0&&(de===!0||F!==b)){const Nn=F===b&&he.id===D;fe.setState(he,F,Nn)}let vn=!1;he.version===tt.__version?(tt.needsLights&&tt.lightsStateVersion!==Ju.state.version||tt.outputColorSpace!==it||oe.isBatchedMesh&&tt.batching===!1||!oe.isBatchedMesh&&tt.batching===!0||oe.isInstancedMesh&&tt.instancing===!1||!oe.isInstancedMesh&&tt.instancing===!0||oe.isSkinnedMesh&&tt.skinning===!1||!oe.isSkinnedMesh&&tt.skinning===!0||oe.isInstancedMesh&&tt.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&tt.instancingColor===!1&&oe.instanceColor!==null||oe.isInstancedMesh&&tt.instancingMorph===!0&&oe.morphTexture===null||oe.isInstancedMesh&&tt.instancingMorph===!1&&oe.morphTexture!==null||tt.envMap!==at||he.fog===!0&&tt.fog!==Re||tt.numClippingPlanes!==void 0&&(tt.numClippingPlanes!==fe.numPlanes||tt.numIntersection!==fe.numIntersection)||tt.vertexAlphas!==Xe||tt.vertexTangents!==At||tt.morphTargets!==ft||tt.morphNormals!==Lr||tt.morphColors!==er||tt.toneMapping!==Dn||tt.morphTargetsCount!==jt)&&(vn=!0):(vn=!0,tt.__version=he.version);let Qs=tt.currentProgram;vn===!0&&(Qs=Ps(he,ne,oe));let bf=!1,Uo=!1,Ca=!1;const xr=Qs.getUniforms(),Ln=tt.uniforms;if(Ke.useProgram(Qs.program)&&(bf=!0,Uo=!0,Ca=!0),he.id!==D&&(D=he.id,Uo=!0),bf||b!==F){xr.setValue(se,"projectionMatrix",F.projectionMatrix),xr.setValue(se,"viewMatrix",F.matrixWorldInverse);const Nn=xr.map.cameraPosition;Nn!==void 0&&Nn.setValue(se,Ee.setFromMatrixPosition(F.matrixWorld)),ct.logarithmicDepthBuffer&&xr.setValue(se,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(he.isMeshPhongMaterial||he.isMeshToonMaterial||he.isMeshLambertMaterial||he.isMeshBasicMaterial||he.isMeshStandardMaterial||he.isShaderMaterial)&&xr.setValue(se,"isOrthographic",F.isOrthographicCamera===!0),b!==F&&(b=F,Uo=!0,Ca=!0)}if(oe.isSkinnedMesh){xr.setOptional(se,oe,"bindMatrix"),xr.setOptional(se,oe,"bindMatrixInverse");const Nn=oe.skeleton;Nn&&(Nn.boneTexture===null&&Nn.computeBoneTexture(),xr.setValue(se,"boneTexture",Nn.boneTexture,k))}oe.isBatchedMesh&&(xr.setOptional(se,oe,"batchingTexture"),xr.setValue(se,"batchingTexture",oe._matricesTexture,k));const Ma=ue.morphAttributes;if((Ma.position!==void 0||Ma.normal!==void 0||Ma.color!==void 0)&&be.update(oe,ue,Qs),(Uo||tt.receiveShadow!==oe.receiveShadow)&&(tt.receiveShadow=oe.receiveShadow,xr.setValue(se,"receiveShadow",oe.receiveShadow)),he.isMeshGouraudMaterial&&he.envMap!==null&&(Ln.envMap.value=at,Ln.flipEnvMap.value=at.isCubeTexture&&at.isRenderTargetTexture===!1?-1:1),he.isMeshStandardMaterial&&he.envMap===null&&ne.environment!==null&&(Ln.envMapIntensity.value=ne.environmentIntensity),Uo&&(xr.setValue(se,"toneMappingExposure",x.toneMappingExposure),tt.needsLights&&f0(Ln,Ca),Re&&he.fog===!0&&je.refreshFogUniforms(Ln,Re),je.refreshMaterialUniforms(Ln,he,te,K,m.state.transmissionRenderTarget),Nd.upload(se,dc(tt),Ln,k)),he.isShaderMaterial&&he.uniformsNeedUpdate===!0&&(Nd.upload(se,dc(tt),Ln,k),he.uniformsNeedUpdate=!1),he.isSpriteMaterial&&xr.setValue(se,"center",oe.center),xr.setValue(se,"modelViewMatrix",oe.modelViewMatrix),xr.setValue(se,"normalMatrix",oe.normalMatrix),xr.setValue(se,"modelMatrix",oe.matrixWorld),he.isShaderMaterial||he.isRawShaderMaterial){const Nn=he.uniformsGroups;for(let Zu=0,$u=Nn.length;Zu<$u;Zu++){const eh=Nn[Zu];ht.update(eh,Qs),ht.bind(eh,Qs)}}return Qs}function f0(F,ne){F.ambientLightColor.needsUpdate=ne,F.lightProbe.needsUpdate=ne,F.directionalLights.needsUpdate=ne,F.directionalLightShadows.needsUpdate=ne,F.pointLights.needsUpdate=ne,F.pointLightShadows.needsUpdate=ne,F.spotLights.needsUpdate=ne,F.spotLightShadows.needsUpdate=ne,F.rectAreaLights.needsUpdate=ne,F.hemisphereLights.needsUpdate=ne}function ks(F){return F.isMeshLambertMaterial||F.isMeshToonMaterial||F.isMeshPhongMaterial||F.isMeshStandardMaterial||F.isShadowMaterial||F.isShaderMaterial&&F.lights===!0}this.getActiveCubeFace=function(){return R},this.getActiveMipmapLevel=function(){return S},this.getRenderTarget=function(){return T},this.setRenderTargetTextures=function(F,ne,ue){Y.get(F.texture).__webglTexture=ne,Y.get(F.depthTexture).__webglTexture=ue;const he=Y.get(F);he.__hasExternalTextures=!0,he.__autoAllocateDepthBuffer=ue===void 0,he.__autoAllocateDepthBuffer||Qe.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),he.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,ne){const ue=Y.get(F);ue.__webglFramebuffer=ne,ue.__useDefaultFramebuffer=ne===void 0},this.setRenderTarget=function(F,ne=0,ue=0){T=F,R=ne,S=ue;let he=!0,oe=null,Re=!1,Je=!1;if(F){const it=Y.get(F);it.__useDefaultFramebuffer!==void 0?(Ke.bindFramebuffer(se.FRAMEBUFFER,null),he=!1):it.__webglFramebuffer===void 0?k.setupRenderTarget(F):it.__hasExternalTextures&&k.rebindTextures(F,Y.get(F.texture).__webglTexture,Y.get(F.depthTexture).__webglTexture);const at=F.texture;(at.isData3DTexture||at.isDataArrayTexture||at.isCompressedArrayTexture)&&(Je=!0);const Xe=Y.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(Array.isArray(Xe[ne])?oe=Xe[ne][ue]:oe=Xe[ne],Re=!0):F.samples>0&&k.useMultisampledRTT(F)===!1?oe=Y.get(F).__webglMultisampledFramebuffer:Array.isArray(Xe)?oe=Xe[ue]:oe=Xe,M.copy(F.viewport),L.copy(F.scissor),P=F.scissorTest}else M.copy(Q).multiplyScalar(te).floor(),L.copy(z).multiplyScalar(te).floor(),P=Z;if(Ke.bindFramebuffer(se.FRAMEBUFFER,oe)&&he&&Ke.drawBuffers(F,oe),Ke.viewport(M),Ke.scissor(L),Ke.setScissorTest(P),Re){const it=Y.get(F.texture);se.framebufferTexture2D(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,se.TEXTURE_CUBE_MAP_POSITIVE_X+ne,it.__webglTexture,ue)}else if(Je){const it=Y.get(F.texture),at=ne||0;se.framebufferTextureLayer(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,it.__webglTexture,ue||0,at)}D=-1},this.readRenderTargetPixels=function(F,ne,ue,he,oe,Re,Je){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let it=Y.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&Je!==void 0&&(it=it[Je]),it){Ke.bindFramebuffer(se.FRAMEBUFFER,it);try{const at=F.texture,Xe=at.format,At=at.type;if(Xe!==vr&&dt.convert(Xe)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ft=At===Or&&(Qe.has("EXT_color_buffer_half_float")||Qe.has("EXT_color_buffer_float"));if(At!==mr&&dt.convert(At)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_TYPE)&&At!==lr&&!ft){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ne>=0&&ne<=F.width-he&&ue>=0&&ue<=F.height-oe&&se.readPixels(ne,ue,he,oe,dt.convert(Xe),dt.convert(At),Re)}finally{const at=T!==null?Y.get(T).__webglFramebuffer:null;Ke.bindFramebuffer(se.FRAMEBUFFER,at)}}},this.copyFramebufferToTexture=function(F,ne,ue=0){const he=Math.pow(2,-ue),oe=Math.floor(ne.image.width*he),Re=Math.floor(ne.image.height*he);k.setTexture2D(ne,0),se.copyTexSubImage2D(se.TEXTURE_2D,ue,0,0,F.x,F.y,oe,Re),Ke.unbindTexture()},this.copyTextureToTexture=function(F,ne,ue,he=0){const oe=ne.image.width,Re=ne.image.height,Je=dt.convert(ue.format),it=dt.convert(ue.type);k.setTexture2D(ue,0),se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,ue.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ue.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,ue.unpackAlignment),ne.isDataTexture?se.texSubImage2D(se.TEXTURE_2D,he,F.x,F.y,oe,Re,Je,it,ne.image.data):ne.isCompressedTexture?se.compressedTexSubImage2D(se.TEXTURE_2D,he,F.x,F.y,ne.mipmaps[0].width,ne.mipmaps[0].height,Je,ne.mipmaps[0].data):se.texSubImage2D(se.TEXTURE_2D,he,F.x,F.y,Je,it,ne.image),he===0&&ue.generateMipmaps&&se.generateMipmap(se.TEXTURE_2D),Ke.unbindTexture()},this.copyTextureToTexture3D=function(F,ne,ue,he,oe=0){const Re=Math.round(F.max.x-F.min.x),Je=Math.round(F.max.y-F.min.y),it=F.max.z-F.min.z+1,at=dt.convert(he.format),Xe=dt.convert(he.type);let At;if(he.isData3DTexture)k.setTexture3D(he,0),At=se.TEXTURE_3D;else if(he.isDataArrayTexture||he.isCompressedArrayTexture)k.setTexture2DArray(he,0),At=se.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,he.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,he.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,he.unpackAlignment);const ft=se.getParameter(se.UNPACK_ROW_LENGTH),Lr=se.getParameter(se.UNPACK_IMAGE_HEIGHT),er=se.getParameter(se.UNPACK_SKIP_PIXELS),Dn=se.getParameter(se.UNPACK_SKIP_ROWS),Ai=se.getParameter(se.UNPACK_SKIP_IMAGES),jt=ue.isCompressedTexture?ue.mipmaps[oe]:ue.image;se.pixelStorei(se.UNPACK_ROW_LENGTH,jt.width),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,jt.height),se.pixelStorei(se.UNPACK_SKIP_PIXELS,F.min.x),se.pixelStorei(se.UNPACK_SKIP_ROWS,F.min.y),se.pixelStorei(se.UNPACK_SKIP_IMAGES,F.min.z),ue.isDataTexture||ue.isData3DTexture?se.texSubImage3D(At,oe,ne.x,ne.y,ne.z,Re,Je,it,at,Xe,jt.data):he.isCompressedArrayTexture?se.compressedTexSubImage3D(At,oe,ne.x,ne.y,ne.z,Re,Je,it,at,jt.data):se.texSubImage3D(At,oe,ne.x,ne.y,ne.z,Re,Je,it,at,Xe,jt),se.pixelStorei(se.UNPACK_ROW_LENGTH,ft),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,Lr),se.pixelStorei(se.UNPACK_SKIP_PIXELS,er),se.pixelStorei(se.UNPACK_SKIP_ROWS,Dn),se.pixelStorei(se.UNPACK_SKIP_IMAGES,Ai),oe===0&&he.generateMipmaps&&se.generateMipmap(At),Ke.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?k.setTextureCube(F,0):F.isData3DTexture?k.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?k.setTexture2DArray(F,0):k.setTexture2D(F,0),Ke.unbindTexture()},this.resetState=function(){R=0,S=0,T=null,Ke.reset(),ut.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return vs}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===sd?"display-p3":"srgb",t.unpackColorSpace=Tt.workingColorSpace===cu?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class f8 extends Zt{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 qi,this.environmentIntensity=1,this.environmentRotation=new qi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(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),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class p8{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=RA,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Ti()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return zE("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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 i=0,s=this.stride;i<s;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ti()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(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 e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ti()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(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 fn=new H;class lg{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}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++)fn.fromBufferAttribute(this,t),fn.applyMatrix4(e),this.setXYZ(t,fn.x,fn.y,fn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)fn.fromBufferAttribute(this,t),fn.applyNormalMatrix(e),this.setXYZ(t,fn.x,fn.y,fn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)fn.fromBufferAttribute(this,t),fn.transformDirection(e),this.setXYZ(t,fn.x,fn.y,fn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Bi(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ut(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Ut(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ut(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ut(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ut(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=Bi(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Bi(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Bi(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Bi(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ut(t,this.array),n=Ut(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ut(t,this.array),n=Ut(n,this.array),i=Ut(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ut(t,this.array),n=Ut(n,this.array),i=Ut(i,this.array),s=Ut(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[i+s])}return new zr(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new lg(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[i+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const j2=new H,W2=new Ft,Y2=new Ft,A8=new H,q2=new rt,Ud=new H,cg=new Ri,X2=new rt,ug=new co;class g8 extends Xr{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=sE,this.bindMatrix=new rt,this.bindMatrixInverse=new rt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new _r),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ud),this.boundingBox.expandByPoint(Ud)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ri),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ud),this.boundingSphere.expandByPoint(Ud)}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,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),cg.copy(this.boundingSphere),cg.applyMatrix4(i),e.ray.intersectsSphere(cg)!==!1&&(X2.copy(i).invert(),ug.copy(e.ray).applyMatrix4(X2),!(this.boundingBox!==null&&ug.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,ug)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(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 Ft,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===sE?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===xb?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;W2.fromBufferAttribute(i.attributes.skinIndex,e),Y2.fromBufferAttribute(i.attributes.skinWeight,e),j2.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=Y2.getComponent(s);if(o!==0){const l=W2.getComponent(s);q2.multiplyMatrices(n.bones[l].matrixWorld,n.boneInverses[l]),t.addScaledVector(A8.copy(j2).applyMatrix4(q2),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class K2 extends Zt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class mo extends br{constructor(e=null,t=1,n=1,i,s,o,l,h,u=Ar,d=Ar,A,p){super(null,o,l,h,u,d,i,s,A,p),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const J2=new rt,m8=new rt;class hg{constructor(e=[],t=[]){this.uuid=Ti(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new rt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new rt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const l=e[s]?e[s].matrixWorld:m8;J2.multiplyMatrices(l,t[s]),J2.toArray(n,s*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new hg(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new mo(t,e,e,vr,lr);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 i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const s=e.bones[n];let o=t[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new K2),this.bones.push(o),this.boneInverses.push(new rt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,s=t.length;i<s;i++){const o=t[i];e.bones.push(o.uuid);const l=n[i];e.boneInverses.push(l.toArray())}return e}}class dg extends zr{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}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 Dl=new rt,Z2=new rt,Pd=[],$2=new _r,v8=new rt,Eu=new Xr,xu=new Ri;class _8 extends Xr{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new dg(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,v8)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new _r),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Dl),$2.copy(e.boundingBox).applyMatrix4(Dl),this.boundingBox.union($2)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ri),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Dl),xu.copy(e.boundingSphere).applyMatrix4(Dl),this.boundingSphere.union(xu)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,s=n.length+1,o=e*s+1;for(let l=0;l<n.length;l++)n[l]=i[o+l]}raycast(e,t){const n=this.matrixWorld,i=this.count;if(Eu.geometry=this.geometry,Eu.material=this.material,Eu.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),xu.copy(this.boundingSphere),xu.applyMatrix4(n),e.ray.intersectsSphere(xu)!==!1))for(let s=0;s<i;s++){this.getMatrixAt(s,Dl),Z2.multiplyMatrices(n,Dl),Eu.matrixWorld=Z2,Eu.raycast(e,Pd);for(let o=0,l=Pd.length;o<l;o++){const h=Pd[o];h.instanceId=s,h.object=this,t.push(h)}Pd.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new dg(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const n=t.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new mo(new Float32Array(i*this.count),i,this.count,ta,lr));const s=this.morphTexture.source.data.data;let o=0;for(let u=0;u<n.length;u++)o+=n[u];const l=this.geometry.morphTargetsRelative?1:1-o,h=i*e;s[h]=l,s.set(n,h+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}class ex extends Xi{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new He(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 tx=new H,rx=new H,nx=new rt,fg=new co,kd=new Ri;class pg extends Zt{constructor(e=new Vn,t=new ex){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,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(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,s=t.count;i<s;i++)tx.fromBufferAttribute(t,i-1),rx.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=tx.distanceTo(rx);e.setAttribute("lineDistance",new Ni(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,s=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),kd.copy(n.boundingSphere),kd.applyMatrix4(i),kd.radius+=s,e.ray.intersectsSphere(kd)===!1)return;nx.copy(i).invert(),fg.copy(e.ray).applyMatrix4(nx);const l=s/((this.scale.x+this.scale.y+this.scale.z)/3),h=l*l,u=new H,d=new H,A=new H,p=new H,g=this.isLineSegments?2:1,_=n.index,E=n.attributes.position;if(_!==null){const m=Math.max(0,o.start),v=Math.min(_.count,o.start+o.count);for(let w=m,x=v-1;w<x;w+=g){const I=_.getX(w),R=_.getX(w+1);if(u.fromBufferAttribute(E,I),d.fromBufferAttribute(E,R),fg.distanceSqToSegment(u,d,p,A)>h)continue;p.applyMatrix4(this.matrixWorld);const S=e.ray.origin.distanceTo(p);S<e.near||S>e.far||t.push({distance:S,point:A.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),v=Math.min(E.count,o.start+o.count);for(let w=m,x=v-1;w<x;w+=g){if(u.fromBufferAttribute(E,w),d.fromBufferAttribute(E,w+1),fg.distanceSqToSegment(u,d,p,A)>h)continue;p.applyMatrix4(this.matrixWorld);const I=e.ray.origin.distanceTo(p);I<e.near||I>e.far||t.push({distance:I,point:A.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,s=n.length;i<s;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}}const ix=new H,sx=new H;class y8 extends pg{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,s=t.count;i<s;i+=2)ix.fromBufferAttribute(t,i),sx.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ix.distanceTo(sx);e.setAttribute("lineDistance",new Ni(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class E8 extends pg{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class ax extends Xi{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new He(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 ox=new rt,Ag=new co,Qd=new Ri,Od=new H;class x8 extends Zt{constructor(e=new Vn,t=new ax){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,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,i=this.matrixWorld,s=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Qd.copy(n.boundingSphere),Qd.applyMatrix4(i),Qd.radius+=s,e.ray.intersectsSphere(Qd)===!1)return;ox.copy(i).invert(),Ag.copy(e.ray).applyMatrix4(ox);const l=s/((this.scale.x+this.scale.y+this.scale.z)/3),h=l*l,u=n.index,d=n.attributes.position;if(u!==null){const A=Math.max(0,o.start),p=Math.min(u.count,o.start+o.count);for(let g=A,_=p;g<_;g++){const E=u.getX(g);Od.fromBufferAttribute(d,E),lx(Od,E,h,i,e,t,this)}}else{const A=Math.max(0,o.start),p=Math.min(d.count,o.start+o.count);for(let g=A,_=p;g<_;g++)Od.fromBufferAttribute(d,g),lx(Od,g,h,i,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,s=n.length;i<s;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}}function lx(r,e,t,n,i,s,o){const l=Ag.distanceSqToPoint(r);if(l<t){const h=new H;Ag.closestPointToPoint(r,h),h.applyMatrix4(n);const u=i.ray.origin.distanceTo(h);if(u<i.near||u>i.far)return;s.push({distance:u,distanceToRay:Math.sqrt(l),point:h,index:e,face:null,object:o})}}class Fd extends br{constructor(e,t,n,i,s,o,l,h,u,d,A,p){super(null,o,l,h,u,d,i,s,A,p),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class w8 extends Fd{constructor(e,t,n,i,s,o){super(e,t,n,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ci}}class I8 extends Fd{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,io),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class C8 extends Cr{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class gg extends Xi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new He(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 He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=NE,this.normalScale=new Ue(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 qi,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 ai extends gg{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 Ue(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Br(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new He(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 He(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new He(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=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 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.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}}function zd(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function M8(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function S8(r){function e(i,s){return r[i]-r[s]}const t=r.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function cx(r,e,t){const n=r.length,i=new r.constructor(n);for(let s=0,o=0;o!==n;++s){const l=t[s]*e;for(let h=0;h!==e;++h)i[o++]=r[l+h]}return i}function ux(r,e,t,n){let i=1,s=r[0];for(;s!==void 0&&s[n]===void 0;)s=r[i++];if(s===void 0)return;let o=s[n];if(o!==void 0)if(Array.isArray(o))do o=s[n],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=r[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[n],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=r[i++];while(s!==void 0);else do o=s[n],o!==void 0&&(e.push(s.time),t.push(o)),s=r[i++];while(s!==void 0)}class wu{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i: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,i=t[n],s=t[n-1];e:{t:{let o;r:{n:if(!(e<i)){for(let l=n+2;;){if(i===void 0){if(e<s)break n;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===l)break;if(s=i,i=t[++n],e<i)break t}o=t.length;break r}if(!(e>=s)){const l=t[1];e<l&&(n=2,s=l);for(let h=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===h)break;if(i=s,s=t[--n-1],e>=s)break t}o=n,n=0;break r}break e}for(;n<o;){const l=n+o>>>1;e<t[l]?o=l:n=l+1}if(i=t[n],s=t[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,i)}return this.interpolate_(n,s,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=e*i;for(let o=0;o!==i;++o)t[o]=n[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class T8 extends wu{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:bE,endingEnd:bE}}intervalChanged_(e,t,n){const i=this.parameterPositions;let s=e-2,o=e+1,l=i[s],h=i[o];if(l===void 0)switch(this.getSettings_().endingStart){case RE:s=e,l=2*t-n;break;case DE:s=i.length-2,l=t+i[s]-i[s+1];break;default:s=e,l=n}if(h===void 0)switch(this.getSettings_().endingEnd){case RE:o=e,h=2*n-t;break;case DE:o=1,h=n+i[1]-i[0];break;default:o=e-1,h=t}const u=(n-t)*.5,d=this.valueSize;this._weightPrev=u/(t-l),this._weightNext=u/(h-n),this._offsetPrev=s*d,this._offsetNext=o*d}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=e*l,u=h-l,d=this._offsetPrev,A=this._offsetNext,p=this._weightPrev,g=this._weightNext,_=(n-t)/(i-t),E=_*_,m=E*_,v=-p*m+2*p*E-p*_,w=(1+p)*m+(-1.5-2*p)*E+(-.5+p)*_+1,x=(-1-g)*m+(1.5+g)*E+.5*_,I=g*m-g*E;for(let R=0;R!==l;++R)s[R]=v*o[d+R]+w*o[u+R]+x*o[h+R]+I*o[A+R];return s}}class B8 extends wu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=e*l,u=h-l,d=(n-t)/(i-t),A=1-d;for(let p=0;p!==l;++p)s[p]=o[u+p]*A+o[h+p]*d;return s}}class b8 extends wu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class $i{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=zd(t,this.TimeBufferType),this.values=zd(n,this.ValueBufferType),this.setInterpolation(i||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:zd(e.times,Array),values:zd(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new b8(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new B8(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new T8(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case lu:t=this.InterpolantFactoryMethodDiscrete;break;case ll:t=this.InterpolantFactoryMethodLinear;break;case BA:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return lu;case this.InterpolantFactoryMethodLinear:return ll;case this.InterpolantFactoryMethodSmooth:return BA}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let s=0,o=i-1;for(;s!==i&&n[s]<e;)++s;for(;o!==-1&&n[o]>t;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const l=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*l,o*l)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let l=0;l!==s;l++){const h=n[l];if(typeof h=="number"&&isNaN(h)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,l,h),e=!1;break}if(o!==null&&o>h){console.error("THREE.KeyframeTrack: Out of order keys.",this,l,h,o),e=!1;break}o=h}if(i!==void 0&&M8(i))for(let l=0,h=i.length;l!==h;++l){const u=i[l];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===BA,s=e.length-1;let o=1;for(let l=1;l<s;++l){let h=!1;const u=e[l],d=e[l+1];if(u!==d&&(l!==1||u!==e[0]))if(i)h=!0;else{const A=l*n,p=A-n,g=A+n;for(let _=0;_!==n;++_){const E=t[A+_];if(E!==t[p+_]||E!==t[g+_]){h=!0;break}}}if(h){if(l!==o){e[o]=e[l];const A=l*n,p=o*n;for(let g=0;g!==n;++g)t[p+g]=t[A+g]}++o}}if(s>0){e[o]=e[s];for(let l=s*n,h=o*n,u=0;u!==n;++u)t[h+u]=t[l+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}$i.prototype.TimeBufferType=Float32Array,$i.prototype.ValueBufferType=Float32Array,$i.prototype.DefaultInterpolation=ll;class Ll extends $i{}Ll.prototype.ValueTypeName="bool",Ll.prototype.ValueBufferType=Array,Ll.prototype.DefaultInterpolation=lu,Ll.prototype.InterpolantFactoryMethodLinear=void 0,Ll.prototype.InterpolantFactoryMethodSmooth=void 0;class hx extends $i{}hx.prototype.ValueTypeName="color";class Nl extends $i{}Nl.prototype.ValueTypeName="number";class R8 extends wu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=(n-t)/(i-t);let u=e*l;for(let d=u+l;u!==d;u+=4)Yi.slerpFlat(s,0,o,u-l,o,u,h);return s}}class vo extends $i{InterpolantFactoryMethodLinear(e){return new R8(this.times,this.values,this.getValueSize(),e)}}vo.prototype.ValueTypeName="quaternion",vo.prototype.DefaultInterpolation=ll,vo.prototype.InterpolantFactoryMethodSmooth=void 0;class Ul extends $i{}Ul.prototype.ValueTypeName="string",Ul.prototype.ValueBufferType=Array,Ul.prototype.DefaultInterpolation=lu,Ul.prototype.InterpolantFactoryMethodLinear=void 0,Ul.prototype.InterpolantFactoryMethodSmooth=void 0;class Pl extends $i{}Pl.prototype.ValueTypeName="vector";class D8{constructor(e="",t=-1,n=[],i=bb){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=Ti(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,l=n.length;o!==l;++o)t.push(N8(n[o]).scale(i));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=n.length;s!==o;++s)t.push($i.toJSON(n[s]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const s=t.length,o=[];for(let l=0;l<s;l++){let h=[],u=[];h.push((l+s-1)%s,l,(l+1)%s),u.push(0,1,0);const d=S8(h);h=cx(h,1,d),u=cx(u,1,d),!i&&h[0]===0&&(h.push(s),u.push(u[0])),o.push(new Nl(".morphTargetInfluences["+t[l].name+"]",h,u).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},s=/^([\w-]*?)([\d]+)$/;for(let l=0,h=e.length;l<h;l++){const u=e[l],d=u.name.match(s);if(d&&d.length>1){const A=d[1];let p=i[A];p||(i[A]=p=[]),p.push(u)}}const o=[];for(const l in i)o.push(this.CreateFromMorphTargetSequence(l,i[l],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(d,A,p,g,_){if(p.length!==0){const E=[],m=[];ux(p,E,m,g),E.length!==0&&_.push(new d(A,E,m))}},i=[],s=e.name||"default",o=e.fps||30,l=e.blendMode;let h=e.length||-1;const u=e.hierarchy||[];for(let d=0;d<u.length;d++){const A=u[d].keys;if(!(!A||A.length===0))if(A[0].morphTargets){const p={};let g;for(g=0;g<A.length;g++)if(A[g].morphTargets)for(let _=0;_<A[g].morphTargets.length;_++)p[A[g].morphTargets[_]]=-1;for(const _ in p){const E=[],m=[];for(let v=0;v!==A[g].morphTargets.length;++v){const w=A[g];E.push(w.time),m.push(w.morphTarget===_?1:0)}i.push(new Nl(".morphTargetInfluence["+_+"]",E,m))}h=p.length*o}else{const p=".bones["+t[d].name+"]";n(Pl,p+".position",A,"pos",i),n(vo,p+".quaternion",A,"rot",i),n(Pl,p+".scale",A,"scl",i)}}return i.length===0?null:new this(s,h,i,l)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const s=this.tracks[n];t=Math.max(t,s.times[s.times.length-1])}return this.duration=t,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 t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function L8(r){switch(r.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Nl;case"vector":case"vector2":case"vector3":case"vector4":return Pl;case"color":return hx;case"quaternion":return vo;case"bool":case"boolean":return Ll;case"string":return Ul}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+r)}function N8(r){if(r.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=L8(r.type);if(r.times===void 0){const t=[],n=[];ux(r.keys,t,n,"value"),r.times=t,r.values=n}return e.parse!==void 0?e.parse(r):new e(r.name,r.times,r.values,r.interpolation)}const ca={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class dx{constructor(e,t,n){const i=this;let s=!1,o=0,l=0,h;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){l++,s===!1&&i.onStart!==void 0&&i.onStart(d,o,l),s=!0},this.itemEnd=function(d){o++,i.onProgress!==void 0&&i.onProgress(d,o,l),o===l&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(d){i.onError!==void 0&&i.onError(d)},this.resolveURL=function(d){return h?h(d):d},this.setURLModifier=function(d){return h=d,this},this.addHandler=function(d,A){return u.push(d,A),this},this.removeHandler=function(d){const A=u.indexOf(d);return A!==-1&&u.splice(A,2),this},this.getHandler=function(d){for(let A=0,p=u.length;A<p;A+=2){const g=u[A],_=u[A+1];if(g.global&&(g.lastIndex=0),g.test(d))return _}return null}}}const U8=new dx;class ua{constructor(e){this.manager=e!==void 0?e:U8,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,s){n.load(e,i,t,s)})}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}}ua.DEFAULT_MATERIAL_NAME="__DEFAULT";const Cs={};class P8 extends Error{constructor(e,t){super(e),this.response=t}}class kl extends ua{constructor(e){super(e)}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=ca.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(Cs[e]!==void 0){Cs[e].push({onLoad:t,onProgress:n,onError:i});return}Cs[e]=[],Cs[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),l=this.mimeType,h=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=Cs[e],A=u.body.getReader(),p=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),g=p?parseInt(p):0,_=g!==0;let E=0;const m=new ReadableStream({start(v){w();function w(){A.read().then(({done:x,value:I})=>{if(x)v.close();else{E+=I.byteLength;const R=new ProgressEvent("progress",{lengthComputable:_,loaded:E,total:g});for(let S=0,T=d.length;S<T;S++){const D=d[S];D.onProgress&&D.onProgress(R)}v.enqueue(I),w()}})}}});return new Response(m)}else throw new P8(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(h){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,l));case"json":return u.json();default:if(l===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(l),A=d&&d[1]?d[1].toLowerCase():void 0,p=new TextDecoder(A);return u.arrayBuffer().then(g=>p.decode(g))}}}).then(u=>{ca.add(e,u);const d=Cs[e];delete Cs[e];for(let A=0,p=d.length;A<p;A++){const g=d[A];g.onLoad&&g.onLoad(u)}}).catch(u=>{const d=Cs[e];if(d===void 0)throw this.manager.itemError(e),u;delete Cs[e];for(let A=0,p=d.length;A<p;A++){const g=d[A];g.onError&&g.onError(u)}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}}class k8 extends ua{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ca.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const l=du("img");function h(){d(),ca.add(e,this),t&&t(this),s.manager.itemEnd(e)}function u(A){d(),i&&i(A),s.manager.itemError(e),s.manager.itemEnd(e)}function d(){l.removeEventListener("load",h,!1),l.removeEventListener("error",u,!1)}return l.addEventListener("load",h,!1),l.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(l.crossOrigin=this.crossOrigin),s.manager.itemStart(e),l.src=e,l}}class Q8 extends ua{constructor(e){super(e)}load(e,t,n,i){const s=this,o=new mo,l=new kl(this.manager);return l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setPath(this.path),l.setWithCredentials(s.withCredentials),l.load(e,function(h){let u;try{u=s.parse(h)}catch(d){if(i!==void 0)i(d);else{console.error(d);return}}u.image!==void 0?o.image=u.image:u.data!==void 0&&(o.image.width=u.width,o.image.height=u.height,o.image.data=u.data),o.wrapS=u.wrapS!==void 0?u.wrapS:Ci,o.wrapT=u.wrapT!==void 0?u.wrapT:Ci,o.magFilter=u.magFilter!==void 0?u.magFilter:gr,o.minFilter=u.minFilter!==void 0?u.minFilter:gr,o.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.colorSpace!==void 0&&(o.colorSpace=u.colorSpace),u.flipY!==void 0&&(o.flipY=u.flipY),u.format!==void 0&&(o.format=u.format),u.type!==void 0&&(o.type=u.type),u.mipmaps!==void 0&&(o.mipmaps=u.mipmaps,o.minFilter=Mi),u.mipmapCount===1&&(o.minFilter=gr),u.generateMipmaps!==void 0&&(o.generateMipmaps=u.generateMipmaps),o.needsUpdate=!0,t&&t(o,u)},n,i),o}}class fx extends ua{constructor(e){super(e)}load(e,t,n,i){const s=new br,o=new k8(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(l){s.image=l,s.needsUpdate=!0,t!==void 0&&t(s)},n,i),s}}class Hd extends Zt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new He(e),this.intensity=t}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,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}class O8 extends Hd{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new He(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const mg=new rt,px=new H,Ax=new H;class vg{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ue(512,512),this.map=null,this.mapPass=null,this.matrix=new rt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ZA,this._frameExtents=new Ue(1,1),this._viewportCount=1,this._viewports=[new Ft(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;px.setFromMatrixPosition(e.matrixWorld),t.position.copy(px),Ax.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Ax),t.updateMatrixWorld(),mg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(mg),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(mg)}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.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class F8 extends vg{constructor(){super(new dn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=ul*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(n!==t.fov||i!==t.aspect||s!==t.far)&&(t.fov=n,t.aspect=i,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class z8 extends Hd{constructor(e,t,n=0,i=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.target=new Zt,this.distance=n,this.angle=i,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new F8}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}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.shadow=e.shadow.clone(),this}}const gx=new rt,Iu=new H,_g=new H;class H8 extends vg{constructor(){super(new dn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ue(4,2),this._viewportCount=6,this._viewports=[new Ft(2,1,1,1),new Ft(0,1,1,1),new Ft(3,1,1,1),new Ft(1,1,1,1),new Ft(3,0,1,1),new Ft(1,0,1,1)],this._cubeDirections=[new H(1,0,0),new H(-1,0,0),new H(0,0,1),new H(0,0,-1),new H(0,1,0),new H(0,-1,0)],this._cubeUps=[new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,0,1),new H(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,s=e.distance||n.far;s!==n.far&&(n.far=s,n.updateProjectionMatrix()),Iu.setFromMatrixPosition(e.matrixWorld),n.position.copy(Iu),_g.copy(n.position),_g.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(_g),n.updateMatrixWorld(),i.makeTranslation(-Iu.x,-Iu.y,-Iu.z),gx.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gx)}}class G8 extends Hd{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new H8}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}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}}class V8 extends vg{constructor(){super(new _u(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class mx extends Hd{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.target=new Zt,this.shadow=new V8}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Cu{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||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 j8 extends ua{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ca.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(u=>{t&&t(u),s.manager.itemEnd(e)}).catch(u=>{i&&i(u)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const l={};l.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",l.headers=this.requestHeader;const h=fetch(e,l).then(function(u){return u.blob()}).then(function(u){return createImageBitmap(u,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(u){return ca.add(e,u),t&&t(u),s.manager.itemEnd(e),u}).catch(function(u){i&&i(u),ca.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});ca.add(e,h),s.manager.itemStart(e)}}class W8{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=vx(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=vx();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function vx(){return(typeof performance>"u"?Date:performance).now()}const yg="\\[\\]\\.:\\/",Y8=new RegExp("["+yg+"]","g"),Eg="[^"+yg+"]",q8="[^"+yg.replace("\\.","")+"]",X8=/((?:WC+[\/:])*)/.source.replace("WC",Eg),K8=/(WCOD+)?/.source.replace("WCOD",q8),J8=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Eg),Z8=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Eg),$8=new RegExp("^"+X8+K8+J8+Z8+"$"),eN=["material","materials","bones","map"];class tN{constructor(e,t,n){const i=n||Pt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].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()}}class Pt{constructor(e,t,n){this.path=t,this.parsedPath=n||Pt.parseTrackName(t),this.node=Pt.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 Pt.Composite(e,t,n):new Pt(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Y8,"")}static parseTrackName(e){const t=$8.exec(e);if(t===null)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]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=n.nodeName.substring(i+1);eN.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(s){for(let o=0;o<s.length;o++){const l=s[o];if(l.name===t||l.uuid===t)return l;const h=n(l.children);if(h)return h}return null},i=n(e.children);if(i)return i}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 i=0,s=n.length;i!==s;++i)e[t++]=n[i]}_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 i=0,s=n.length;i!==s;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=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,i=t.propertyName;let s=t.propertyIndex;if(e||(e=Pt.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let d=0;d<e.length;d++)if(e[d].name===u){u=d;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const o=e[i];if(o===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+i+" but it wasn't found.",e);return}let l=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?l=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(l=this.Versioning.MatrixWorldNeedsUpdate);let h=this.BindingType.Direct;if(s!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}h=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(h=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(h=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][l]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Pt.Composite=tN,Pt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Pt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Pt.prototype.GetterByBindingType=[Pt.prototype._getValue_direct,Pt.prototype._getValue_array,Pt.prototype._getValue_arrayElement,Pt.prototype._getValue_toArray],Pt.prototype.SetterByBindingTypeAndVersioning=[[Pt.prototype._setValue_direct,Pt.prototype._setValue_direct_setNeedsUpdate,Pt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Pt.prototype._setValue_array,Pt.prototype._setValue_array_setNeedsUpdate,Pt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Pt.prototype._setValue_arrayElement,Pt.prototype._setValue_arrayElement_setNeedsUpdate,Pt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Pt.prototype._setValue_fromArray,Pt.prototype._setValue_fromArray_setNeedsUpdate,Pt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];const _x=new rt;class rN{constructor(e,t,n=0,i=1/0){this.ray=new co(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new md,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return _x.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(_x),this}intersectObject(e,t=!0,n=[]){return xg(e,this,n,t),n.sort(yx),n}intersectObjects(e,t=!0,n=[]){for(let i=0,s=e.length;i<s;i++)xg(e[i],this,n,t);return n.sort(yx),n}}function yx(r,e){return r.distance-e.distance}function xg(r,e,t,n){if(r.layers.test(e.layers)&&r.raycast(e,t),n===!0){const i=r.children;for(let s=0,o=i.length;s<o;s++)xg(i[s],e,t,!0)}}class Ex{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Br(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const xx=new H,Gd=new H;class Ms{constructor(e=new H,t=new H){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){xx.subVectors(e,this.start),Gd.subVectors(this.end,this.start);const n=Gd.dot(Gd);let i=Gd.dot(xx)/n;return t&&(i=Br(i,0,1)),i}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Xh}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Xh);const wx={type:"change"},wg={type:"start"},Ix={type:"end"},Vd=new co,Cx=new Ji,nN=Math.cos(70*LA.DEG2RAD);class iN extends ao{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new H,this.cursor=new H,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:nl.ROTATE,MIDDLE:nl.DOLLY,RIGHT:nl.PAN},this.touches={ONE:il.ROTATE,TWO:il.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(G){G.addEventListener("keydown",fe),this._domElementKeyEvents=G},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",fe),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(wx),n.update(),s=i.NONE},this.update=function(){const G=new H,O=new Yi().setFromUnitVectors(e.up,new H(0,1,0)),ge=O.clone().invert(),ve=new H,Fe=new Yi,Pe=new H,vt=2*Math.PI;return function(Lt=null){const Nt=n.object.position;G.copy(Nt).sub(n.target),G.applyQuaternion(O),l.setFromVector3(G),n.autoRotate&&s===i.NONE&&P(M(Lt)),n.enableDamping?(l.theta+=h.theta*n.dampingFactor,l.phi+=h.phi*n.dampingFactor):(l.theta+=h.theta,l.phi+=h.phi);let Bt=n.minAzimuthAngle,_t=n.maxAzimuthAngle;isFinite(Bt)&&isFinite(_t)&&(Bt<-Math.PI?Bt+=vt:Bt>Math.PI&&(Bt-=vt),_t<-Math.PI?_t+=vt:_t>Math.PI&&(_t-=vt),Bt<=_t?l.theta=Math.max(Bt,Math.min(_t,l.theta)):l.theta=l.theta>(Bt+_t)/2?Math.max(Bt,l.theta):Math.min(_t,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(d,n.dampingFactor):n.target.add(d),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor);let fr=!1;if(n.zoomToCursor&&S||n.object.isOrthographicCamera)l.radius=Q(l.radius);else{const Vt=l.radius;l.radius=Q(l.radius*u),fr=Vt!=l.radius}if(G.setFromSpherical(l),G.applyQuaternion(ge),Nt.copy(n.target).add(G),n.object.lookAt(n.target),n.enableDamping===!0?(h.theta*=1-n.dampingFactor,h.phi*=1-n.dampingFactor,d.multiplyScalar(1-n.dampingFactor)):(h.set(0,0,0),d.set(0,0,0)),n.zoomToCursor&&S){let Vt=null;if(n.object.isPerspectiveCamera){const Er=G.length();Vt=Q(Er*u);const Rn=Er-Vt;n.object.position.addScaledVector(I,Rn),n.object.updateMatrixWorld(),fr=!!Rn}else if(n.object.isOrthographicCamera){const Er=new H(R.x,R.y,0);Er.unproject(n.object);const Rn=n.object.zoom;n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),fr=Rn!==n.object.zoom;const qt=new H(R.x,R.y,0);qt.unproject(n.object),n.object.position.sub(qt).add(Er),n.object.updateMatrixWorld(),Vt=G.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Vt!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Vt).add(n.object.position):(Vd.origin.copy(n.object.position),Vd.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(Vd.direction))<nN?e.lookAt(n.target):(Cx.setFromNormalAndCoplanarPoint(n.object.up,n.target),Vd.intersectPlane(Cx,n.target))))}else if(n.object.isOrthographicCamera){const Vt=n.object.zoom;n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),Vt!==n.object.zoom&&(n.object.updateProjectionMatrix(),fr=!0)}return u=1,S=!1,fr||ve.distanceToSquared(n.object.position)>o||8*(1-Fe.dot(n.object.quaternion))>o||Pe.distanceToSquared(n.target)>o?(n.dispatchEvent(wx),ve.copy(n.object.position),Fe.copy(n.object.quaternion),Pe.copy(n.target),!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",be),n.domElement.removeEventListener("pointerdown",le),n.domElement.removeEventListener("pointercancel",me),n.domElement.removeEventListener("wheel",Ie),n.domElement.removeEventListener("pointermove",pe),n.domElement.removeEventListener("pointerup",me),n.domElement.getRootNode().removeEventListener("keydown",Ve,{capture:!0}),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",fe),n._domElementKeyEvents=null)};const n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let s=i.NONE;const o=1e-6,l=new Ex,h=new Ex;let u=1;const d=new H,A=new Ue,p=new Ue,g=new Ue,_=new Ue,E=new Ue,m=new Ue,v=new Ue,w=new Ue,x=new Ue,I=new H,R=new Ue;let S=!1;const T=[],D={};let b=!1;function M(G){return G!==null?2*Math.PI/60*n.autoRotateSpeed*G:2*Math.PI/60/60*n.autoRotateSpeed}function L(G){const O=Math.abs(G*.01);return Math.pow(.95,n.zoomSpeed*O)}function P(G){h.theta-=G}function N(G){h.phi-=G}const W=function(){const G=new H;return function(O,ge){G.setFromMatrixColumn(ge,0),G.multiplyScalar(-O),d.add(G)}}(),X=function(){const G=new H;return function(O,ge){n.screenSpacePanning===!0?G.setFromMatrixColumn(ge,1):(G.setFromMatrixColumn(ge,0),G.crossVectors(n.object.up,G)),G.multiplyScalar(O),d.add(G)}}(),K=function(){const G=new H;return function(O,ge){const ve=n.domElement;if(n.object.isPerspectiveCamera){const Fe=n.object.position;G.copy(Fe).sub(n.target);let Pe=G.length();Pe*=Math.tan(n.object.fov/2*Math.PI/180),W(2*O*Pe/ve.clientHeight,n.object.matrix),X(2*ge*Pe/ve.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(W(O*(n.object.right-n.object.left)/n.object.zoom/ve.clientWidth,n.object.matrix),X(ge*(n.object.top-n.object.bottom)/n.object.zoom/ve.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function te(G){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u/=G:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function V(G){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u*=G:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function ee(G,O){if(!n.zoomToCursor)return;S=!0;const ge=n.domElement.getBoundingClientRect(),ve=G-ge.left,Fe=O-ge.top,Pe=ge.width,vt=ge.height;R.x=ve/Pe*2-1,R.y=-(Fe/vt)*2+1,I.set(R.x,R.y,1).unproject(n.object).sub(n.object.position).normalize()}function Q(G){return Math.max(n.minDistance,Math.min(n.maxDistance,G))}function z(G){A.set(G.clientX,G.clientY)}function Z(G){ee(G.clientX,G.clientX),v.set(G.clientX,G.clientY)}function re(G){_.set(G.clientX,G.clientY)}function j(G){p.set(G.clientX,G.clientY),g.subVectors(p,A).multiplyScalar(n.rotateSpeed);const O=n.domElement;P(2*Math.PI*g.x/O.clientHeight),N(2*Math.PI*g.y/O.clientHeight),A.copy(p),n.update()}function de(G){w.set(G.clientX,G.clientY),x.subVectors(w,v),x.y>0?te(L(x.y)):x.y<0&&V(L(x.y)),v.copy(w),n.update()}function Ae(G){E.set(G.clientX,G.clientY),m.subVectors(E,_).multiplyScalar(n.panSpeed),K(m.x,m.y),_.copy(E),n.update()}function _e(G){ee(G.clientX,G.clientY),G.deltaY<0?V(L(G.deltaY)):G.deltaY>0&&te(L(G.deltaY)),n.update()}function Ee(G){let O=!1;switch(G.code){case n.keys.UP:G.ctrlKey||G.metaKey||G.shiftKey?N(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(0,n.keyPanSpeed),O=!0;break;case n.keys.BOTTOM:G.ctrlKey||G.metaKey||G.shiftKey?N(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(0,-n.keyPanSpeed),O=!0;break;case n.keys.LEFT:G.ctrlKey||G.metaKey||G.shiftKey?P(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(n.keyPanSpeed,0),O=!0;break;case n.keys.RIGHT:G.ctrlKey||G.metaKey||G.shiftKey?P(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(-n.keyPanSpeed,0),O=!0;break}O&&(G.preventDefault(),n.update())}function Le(G){if(T.length===1)A.set(G.pageX,G.pageY);else{const O=ht(G),ge=.5*(G.pageX+O.x),ve=.5*(G.pageY+O.y);A.set(ge,ve)}}function st(G){if(T.length===1)_.set(G.pageX,G.pageY);else{const O=ht(G),ge=.5*(G.pageX+O.x),ve=.5*(G.pageY+O.y);_.set(ge,ve)}}function se(G){const O=ht(G),ge=G.pageX-O.x,ve=G.pageY-O.y,Fe=Math.sqrt(ge*ge+ve*ve);v.set(0,Fe)}function et(G){n.enableZoom&&se(G),n.enablePan&&st(G)}function Qe(G){n.enableZoom&&se(G),n.enableRotate&&Le(G)}function ct(G){if(T.length==1)p.set(G.pageX,G.pageY);else{const ge=ht(G),ve=.5*(G.pageX+ge.x),Fe=.5*(G.pageY+ge.y);p.set(ve,Fe)}g.subVectors(p,A).multiplyScalar(n.rotateSpeed);const O=n.domElement;P(2*Math.PI*g.x/O.clientHeight),N(2*Math.PI*g.y/O.clientHeight),A.copy(p)}function Ke(G){if(T.length===1)E.set(G.pageX,G.pageY);else{const O=ht(G),ge=.5*(G.pageX+O.x),ve=.5*(G.pageY+O.y);E.set(ge,ve)}m.subVectors(E,_).multiplyScalar(n.panSpeed),K(m.x,m.y),_.copy(E)}function pt(G){const O=ht(G),ge=G.pageX-O.x,ve=G.pageY-O.y,Fe=Math.sqrt(ge*ge+ve*ve);w.set(0,Fe),x.set(0,Math.pow(w.y/v.y,n.zoomSpeed)),te(x.y),v.copy(w);const Pe=(G.pageX+O.x)*.5,vt=(G.pageY+O.y)*.5;ee(Pe,vt)}function Y(G){n.enableZoom&&pt(G),n.enablePan&&Ke(G)}function k(G){n.enableZoom&&pt(G),n.enableRotate&&ct(G)}function le(G){n.enabled!==!1&&(T.length===0&&(n.domElement.setPointerCapture(G.pointerId),n.domElement.addEventListener("pointermove",pe),n.domElement.addEventListener("pointerup",me)),!dt(G)&&(nt(G),G.pointerType==="touch"?De(G):ye(G)))}function pe(G){n.enabled!==!1&&(G.pointerType==="touch"?Be(G):Ge(G))}function me(G){switch(lt(G),T.length){case 0:n.domElement.releasePointerCapture(G.pointerId),n.domElement.removeEventListener("pointermove",pe),n.domElement.removeEventListener("pointerup",me),n.dispatchEvent(Ix),s=i.NONE;break;case 1:const O=T[0],ge=D[O];De({pointerId:O,pageX:ge.x,pageY:ge.y});break}}function ye(G){let O;switch(G.button){case 0:O=n.mouseButtons.LEFT;break;case 1:O=n.mouseButtons.MIDDLE;break;case 2:O=n.mouseButtons.RIGHT;break;default:O=-1}switch(O){case nl.DOLLY:if(n.enableZoom===!1)return;Z(G),s=i.DOLLY;break;case nl.ROTATE:if(G.ctrlKey||G.metaKey||G.shiftKey){if(n.enablePan===!1)return;re(G),s=i.PAN}else{if(n.enableRotate===!1)return;z(G),s=i.ROTATE}break;case nl.PAN:if(G.ctrlKey||G.metaKey||G.shiftKey){if(n.enableRotate===!1)return;z(G),s=i.ROTATE}else{if(n.enablePan===!1)return;re(G),s=i.PAN}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(wg)}function Ge(G){switch(s){case i.ROTATE:if(n.enableRotate===!1)return;j(G);break;case i.DOLLY:if(n.enableZoom===!1)return;de(G);break;case i.PAN:if(n.enablePan===!1)return;Ae(G);break}}function Ie(G){n.enabled===!1||n.enableZoom===!1||s!==i.NONE||(G.preventDefault(),n.dispatchEvent(wg),_e(je(G)),n.dispatchEvent(Ix))}function je(G){const O=G.deltaMode,ge={clientX:G.clientX,clientY:G.clientY,deltaY:G.deltaY};switch(O){case 1:ge.deltaY*=16;break;case 2:ge.deltaY*=100;break}return G.ctrlKey&&!b&&(ge.deltaY*=10),ge}function Ve(G){G.key==="Control"&&(b=!0,n.domElement.getRootNode().addEventListener("keyup",Me,{passive:!0,capture:!0}))}function Me(G){G.key==="Control"&&(b=!1,n.domElement.getRootNode().removeEventListener("keyup",Me,{passive:!0,capture:!0}))}function fe(G){n.enabled===!1||n.enablePan===!1||Ee(G)}function De(G){switch(ut(G),T.length){case 1:switch(n.touches.ONE){case il.ROTATE:if(n.enableRotate===!1)return;Le(G),s=i.TOUCH_ROTATE;break;case il.PAN:if(n.enablePan===!1)return;st(G),s=i.TOUCH_PAN;break;default:s=i.NONE}break;case 2:switch(n.touches.TWO){case il.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;et(G),s=i.TOUCH_DOLLY_PAN;break;case il.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Qe(G),s=i.TOUCH_DOLLY_ROTATE;break;default:s=i.NONE}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(wg)}function Be(G){switch(ut(G),s){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;ct(G),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;Ke(G),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Y(G),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;k(G),n.update();break;default:s=i.NONE}}function be(G){n.enabled!==!1&&G.preventDefault()}function nt(G){T.push(G.pointerId)}function lt(G){delete D[G.pointerId];for(let O=0;O<T.length;O++)if(T[O]==G.pointerId){T.splice(O,1);return}}function dt(G){for(let O=0;O<T.length;O++)if(T[O]==G.pointerId)return!0;return!1}function ut(G){let O=D[G.pointerId];O===void 0&&(O=new Ue,D[G.pointerId]=O),O.set(G.pageX,G.pageY)}function ht(G){const O=G.pointerId===T[0]?T[1]:T[0];return D[O]}n.domElement.addEventListener("contextmenu",be),n.domElement.addEventListener("pointerdown",le),n.domElement.addEventListener("pointercancel",me),n.domElement.addEventListener("wheel",Ie,{passive:!1}),n.domElement.getRootNode().addEventListener("keydown",Ve,{passive:!0,capture:!0}),this.update()}}function Mx(r,e){if(e===Rb)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),r;if(e===bA||e===LE){let t=r.getIndex();if(t===null){const o=[],l=r.getAttribute("position");if(l!==void 0){for(let h=0;h<l.count;h++)o.push(h);r.setIndex(o),t=r.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),r}const n=t.count-2,i=[];if(e===bA)for(let o=1;o<=n;o++)i.push(t.getX(0)),i.push(t.getX(o)),i.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(i.push(t.getX(o)),i.push(t.getX(o+1)),i.push(t.getX(o+2))):(i.push(t.getX(o+2)),i.push(t.getX(o+1)),i.push(t.getX(o)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=r.clone();return s.setIndex(i),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),r}class sN extends ua{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new uN(t)}),this.register(function(t){return new _N(t)}),this.register(function(t){return new yN(t)}),this.register(function(t){return new EN(t)}),this.register(function(t){return new dN(t)}),this.register(function(t){return new fN(t)}),this.register(function(t){return new pN(t)}),this.register(function(t){return new AN(t)}),this.register(function(t){return new cN(t)}),this.register(function(t){return new gN(t)}),this.register(function(t){return new hN(t)}),this.register(function(t){return new vN(t)}),this.register(function(t){return new mN(t)}),this.register(function(t){return new oN(t)}),this.register(function(t){return new xN(t)}),this.register(function(t){return new wN(t)})}load(e,t,n,i){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const u=Cu.extractUrlBase(e);o=Cu.resolveURL(u,this.path)}else o=Cu.extractUrlBase(e);this.manager.itemStart(e);const l=function(u){i?i(u):console.error(u),s.manager.itemError(e),s.manager.itemEnd(e)},h=new kl(this.manager);h.setPath(this.path),h.setResponseType("arraybuffer"),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(e,function(u){try{s.parse(u,o,function(d){t(d),s.manager.itemEnd(e)},l)}catch(d){l(d)}},n,l)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let s;const o={},l={},h=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(h.decode(new Uint8Array(e,0,4))===Sx){try{o[wt.KHR_BINARY_GLTF]=new IN(e)}catch(d){i&&i(d);return}s=JSON.parse(o[wt.KHR_BINARY_GLTF].content)}else s=JSON.parse(h.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const u=new kN(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const A=this.pluginCallbacks[d](u);A.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),l[A.name]=A,o[A.name]=!0}if(s.extensionsUsed)for(let d=0;d<s.extensionsUsed.length;++d){const A=s.extensionsUsed[d],p=s.extensionsRequired||[];switch(A){case wt.KHR_MATERIALS_UNLIT:o[A]=new lN;break;case wt.KHR_DRACO_MESH_COMPRESSION:o[A]=new CN(s,this.dracoLoader);break;case wt.KHR_TEXTURE_TRANSFORM:o[A]=new MN;break;case wt.KHR_MESH_QUANTIZATION:o[A]=new SN;break;default:p.indexOf(A)>=0&&l[A]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+A+'".')}}u.setExtensions(o),u.setPlugins(l),u.parse(n,i)}parseAsync(e,t){const n=this;return new Promise(function(i,s){n.parse(e,t,i,s)})}}function aN(){let r={};return{get:function(e){return r[e]},add:function(e,t){r[e]=t},remove:function(e){delete r[e]},removeAll:function(){r={}}}}const wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class oN{constructor(e){this.parser=e,this.name=wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){const s=t[n];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let i=t.cache.get(n);if(i)return i;const s=t.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let l;const h=new He(16777215);o.color!==void 0&&h.setRGB(o.color[0],o.color[1],o.color[2],cr);const u=o.range!==void 0?o.range:0;switch(o.type){case"directional":l=new mx(h),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new G8(h),l.distance=u;break;case"spot":l=new z8(h),l.distance=u,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,l.angle=o.spot.outerConeAngle,l.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return l.position.set(0,0,0),l.decay=2,da(l,o),o.intensity!==void 0&&(l.intensity=o.intensity),l.name=t.createUniqueName(o.name||"light_"+e),i=Promise.resolve(l),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,i=n.json.nodes[e],s=(i.extensions&&i.extensions[this.name]||{}).light;return s===void 0?null:this._loadLight(s).then(function(o){return n._getNodeRef(t.cache,s,o)})}}class lN{constructor(){this.name=wt.KHR_MATERIALS_UNLIT}getMaterialType(){return Ki}extendParams(e,t,n){const i=[];e.color=new He(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],cr),e.opacity=o[3]}s.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",s.baseColorTexture,Fr))}return Promise.all(i)}}class cN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name].emissiveStrength;return i!==void 0&&(t.emissiveIntensity=i),Promise.resolve()}}class uN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const l=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Ue(l,l)}return Promise.all(s)}}class hN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class dN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new He(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=i.extensions[this.name];if(o.sheenColorFactor!==void 0){const l=o.sheenColorFactor;t.sheenColor.setRGB(l[0],l[1],l[2],cr)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,Fr)),o.sheenRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class fN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class pN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const l=o.attenuationColor||[1,1,1];return t.attenuationColor=new He().setRGB(l[0],l[1],l[2],cr),Promise.all(s)}}class AN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name];return t.ior=i.ior!==void 0?i.ior:1.5,Promise.resolve()}}class gN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const l=o.specularColorFactor||[1,1,1];return t.specularColor=new He().setRGB(l[0],l[1],l[2],cr),o.specularColorTexture!==void 0&&s.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,Fr)),Promise.all(s)}}class mN{constructor(e){this.parser=e,this.name=wt.EXT_MATERIALS_BUMP}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class vN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class _N{constructor(e){this.parser=e,this.name=wt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const s=i.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class yN{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,s=i.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],l=i.images[o.source];let h=n.textureLoader;if(l.uri){const u=n.options.manager.getHandler(l.uri);u!==null&&(h=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,o.source,h);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class EN{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,s=i.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],l=i.images[o.source];let h=n.textureLoader;if(l.uri){const u=n.options.manager.getHandler(l.uri);u!==null&&(h=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,o.source,h);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class xN{constructor(e){this.name=wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const i=n.extensions[this.name],s=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(l){const h=i.byteOffset||0,u=i.byteLength||0,d=i.count,A=i.byteStride,p=new Uint8Array(l,h,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,A,p,i.mode,i.filter).then(function(g){return g.buffer}):o.ready.then(function(){const g=new ArrayBuffer(d*A);return o.decodeGltfBuffer(new Uint8Array(g),d,A,p,i.mode,i.filter),g})})}else return null}}class wN{constructor(e){this.name=wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const i=t.meshes[n.mesh];for(const h of i.primitives)if(h.mode!==oi.TRIANGLES&&h.mode!==oi.TRIANGLE_STRIP&&h.mode!==oi.TRIANGLE_FAN&&h.mode!==void 0)return null;const s=n.extensions[this.name].attributes,o=[],l={};for(const h in s)o.push(this.parser.getDependency("accessor",s[h]).then(u=>(l[h]=u,l[h])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(h=>{const u=h.pop(),d=u.isGroup?u.children:[u],A=h[0].count,p=[];for(const g of d){const _=new rt,E=new H,m=new Yi,v=new H(1,1,1),w=new _8(g.geometry,g.material,A);for(let x=0;x<A;x++)l.TRANSLATION&&E.fromBufferAttribute(l.TRANSLATION,x),l.ROTATION&&m.fromBufferAttribute(l.ROTATION,x),l.SCALE&&v.fromBufferAttribute(l.SCALE,x),w.setMatrixAt(x,_.compose(E,m,v));for(const x in l)if(x==="_COLOR_0"){const I=l[x];w.instanceColor=new dg(I.array,I.itemSize,I.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&g.geometry.setAttribute(x,l[x]);Zt.prototype.copy.call(w,g),this.parser.assignFinalMaterial(w),p.push(w)}return u.isGroup?(u.clear(),u.add(...p),u):p[0]}))}}const Sx="glTF",Mu=12,Tx={JSON:1313821514,BIN:5130562};class IN{constructor(e){this.name=wt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,Mu),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Sx)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-Mu,s=new DataView(e,Mu);let o=0;for(;o<i;){const l=s.getUint32(o,!0);o+=4;const h=s.getUint32(o,!0);if(o+=4,h===Tx.JSON){const u=new Uint8Array(e,Mu+o,l);this.content=n.decode(u)}else if(h===Tx.BIN){const u=Mu+o;this.body=e.slice(u,u+l)}o+=l}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class CN{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=wt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,i=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,l={},h={},u={};for(const d in o){const A=Cg[d]||d.toLowerCase();l[A]=o[d]}for(const d in e.attributes){const A=Cg[d]||d.toLowerCase();if(o[d]!==void 0){const p=n.accessors[e.attributes[d]],g=Ql[p.componentType];u[A]=g.name,h[A]=p.normalized===!0}}return t.getDependency("bufferView",s).then(function(d){return new Promise(function(A,p){i.decodeDracoFile(d,function(g){for(const _ in g.attributes){const E=g.attributes[_],m=h[_];m!==void 0&&(E.normalized=m)}A(g)},l,u,cr,p)})})}}class MN{constructor(){this.name=wt.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class SN{constructor(){this.name=wt.KHR_MESH_QUANTIZATION}}class Bx extends wu{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=e*i*3+i;for(let o=0;o!==i;o++)t[o]=n[s+o];return t}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=l*2,u=l*3,d=i-t,A=(n-t)/d,p=A*A,g=p*A,_=e*u,E=_-u,m=-2*g+3*p,v=g-p,w=1-m,x=v-p+A;for(let I=0;I!==l;I++){const R=o[E+I+l],S=o[E+I+h]*d,T=o[_+I+l],D=o[_+I]*d;s[I]=w*R+x*S+m*T+v*D}return s}}const TN=new Yi;class BN extends Bx{interpolate_(e,t,n,i){const s=super.interpolate_(e,t,n,i);return TN.fromArray(s).normalize().toArray(s),s}}const oi={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Ql={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},bx={9728:Ar,9729:gr,9984:oE,9985:$h,9986:nu,9987:Mi},Rx={33071:Ci,33648:Zh,10497:ea},Ig={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Cg={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},ha={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},bN={CUBICSPLINE:void 0,LINEAR:ll,STEP:lu},Mg={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function RN(r){return r.DefaultMaterial===void 0&&(r.DefaultMaterial=new gg({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:wi})),r.DefaultMaterial}function _o(r,e,t){for(const n in t.extensions)r[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function da(r,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(r.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function DN(r,e,t){let n=!1,i=!1,s=!1;for(let u=0,d=e.length;u<d;u++){const A=e[u];if(A.POSITION!==void 0&&(n=!0),A.NORMAL!==void 0&&(i=!0),A.COLOR_0!==void 0&&(s=!0),n&&i&&s)break}if(!n&&!i&&!s)return Promise.resolve(r);const o=[],l=[],h=[];for(let u=0,d=e.length;u<d;u++){const A=e[u];if(n){const p=A.POSITION!==void 0?t.getDependency("accessor",A.POSITION):r.attributes.position;o.push(p)}if(i){const p=A.NORMAL!==void 0?t.getDependency("accessor",A.NORMAL):r.attributes.normal;l.push(p)}if(s){const p=A.COLOR_0!==void 0?t.getDependency("accessor",A.COLOR_0):r.attributes.color;h.push(p)}}return Promise.all([Promise.all(o),Promise.all(l),Promise.all(h)]).then(function(u){const d=u[0],A=u[1],p=u[2];return n&&(r.morphAttributes.position=d),i&&(r.morphAttributes.normal=A),s&&(r.morphAttributes.color=p),r.morphTargetsRelative=!0,r})}function LN(r,e){if(r.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)r.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(r.morphTargetInfluences.length===t.length){r.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)r.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function NN(r){let e;const t=r.extensions&&r.extensions[wt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Sg(t.attributes):e=r.indices+":"+Sg(r.attributes)+":"+r.mode,r.targets!==void 0)for(let n=0,i=r.targets.length;n<i;n++)e+=":"+Sg(r.targets[n]);return e}function Sg(r){let e="";const t=Object.keys(r).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+r[t[n]]+";";return e}function Tg(r){switch(r){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function UN(r){return r.search(/\.jpe?g($|\?)/i)>0||r.search(/^data\:image\/jpeg/)===0?"image/jpeg":r.search(/\.webp($|\?)/i)>0||r.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const PN=new rt;class kN{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new aN,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,s=-1;typeof navigator<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,s=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||i&&s<98?this.textureLoader=new fx(this.options.manager):this.textureLoader=new j8(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new kl(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,i=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const l={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:n,userData:{}};return _o(s,l,i),da(l,i),Promise.all(n._invokeAll(function(h){return h.afterRoot&&h.afterRoot(l)})).then(function(){for(const h of l.scenes)h.updateMatrixWorld();e(l)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,s=t.length;i<s;i++){const o=t[i].joints;for(let l=0,h=o.length;l<h;l++)e[o[l]].isBone=!0}for(let i=0,s=e.length;i<s;i++){const o=e[i];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const i=n.clone(),s=(o,l)=>{const h=this.associations.get(o);h!=null&&this.associations.set(l,h);for(const[u,d]of o.children.entries())s(d,l.children[u])};return s(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const i=e(t[n]);if(i)return i}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let i=0;i<t.length;i++){const s=e(t[i]);s&&n.push(s)}return n}getDependency(e,t){const n=e+":"+t;let i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":i=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(s,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[wt.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(s,o){n.load(Cu.resolveURL(t.uri,i.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const i=t.byteLength||0,s=t.byteOffset||0;return n.slice(s,s+i)})}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){const o=Ig[i.type],l=Ql[i.componentType],h=i.normalized===!0,u=new l(i.count*o);return Promise.resolve(new zr(u,o,h))}const s=[];return i.bufferView!==void 0?s.push(this.getDependency("bufferView",i.bufferView)):s.push(null),i.sparse!==void 0&&(s.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(s).then(function(o){const l=o[0],h=Ig[i.type],u=Ql[i.componentType],d=u.BYTES_PER_ELEMENT,A=d*h,p=i.byteOffset||0,g=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,_=i.normalized===!0;let E,m;if(g&&g!==A){const v=Math.floor(p/g),w="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+v+":"+i.count;let x=t.cache.get(w);x||(E=new u(l,v*g,i.count*g/d),x=new p8(E,g/d),t.cache.add(w,x)),m=new lg(x,h,p%g/d,_)}else l===null?E=new u(i.count*h):E=new u(l,p,i.count*h),m=new zr(E,h,_);if(i.sparse!==void 0){const v=Ig.SCALAR,w=Ql[i.sparse.indices.componentType],x=i.sparse.indices.byteOffset||0,I=i.sparse.values.byteOffset||0,R=new w(o[1],x,i.sparse.count*v),S=new u(o[2],I,i.sparse.count*h);l!==null&&(m=new zr(m.array.slice(),m.itemSize,m.normalized));for(let T=0,D=R.length;T<D;T++){const b=R[T];if(m.setX(b,S[T*h]),h>=2&&m.setY(b,S[T*h+1]),h>=3&&m.setZ(b,S[T*h+2]),h>=4&&m.setW(b,S[T*h+3]),h>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m})}loadTexture(e){const t=this.json,n=this.options,i=t.textures[e].source,s=t.images[i];let o=this.textureLoader;if(s.uri){const l=n.manager.getHandler(s.uri);l!==null&&(o=l)}return this.loadTextureImage(e,i,o)}loadTextureImage(e,t,n){const i=this,s=this.json,o=s.textures[e],l=s.images[t],h=(l.uri||l.bufferView)+":"+o.sampler;if(this.textureCache[h])return this.textureCache[h];const u=this.loadImageSource(t,n).then(function(d){d.flipY=!1,d.name=o.name||l.name||"",d.name===""&&typeof l.uri=="string"&&l.uri.startsWith("data:image/")===!1&&(d.name=l.uri);const A=(s.samplers||{})[o.sampler]||{};return d.magFilter=bx[A.magFilter]||gr,d.minFilter=bx[A.minFilter]||Mi,d.wrapS=Rx[A.wrapS]||ea,d.wrapT=Rx[A.wrapT]||ea,i.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[h]=u,u}loadImageSource(e,t){const n=this,i=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(A=>A.clone());const o=i.images[e],l=self.URL||self.webkitURL;let h=o.uri||"",u=!1;if(o.bufferView!==void 0)h=n.getDependency("bufferView",o.bufferView).then(function(A){u=!0;const p=new Blob([A],{type:o.mimeType});return h=l.createObjectURL(p),h});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(h).then(function(A){return new Promise(function(p,g){let _=p;t.isImageBitmapLoader===!0&&(_=function(E){const m=new br(E);m.needsUpdate=!0,p(m)}),t.load(Cu.resolveURL(A,s.path),_,void 0,g)})}).then(function(A){return u===!0&&l.revokeObjectURL(h),A.userData.mimeType=o.mimeType||UN(o.uri),A}).catch(function(A){throw console.error("THREE.GLTFLoader: Couldn't load texture",h),A});return this.sourceCache[e]=d,d}assignTexture(e,t,n,i){const s=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),s.extensions[wt.KHR_TEXTURE_TRANSFORM]){const l=n.extensions!==void 0?n.extensions[wt.KHR_TEXTURE_TRANSFORM]:void 0;if(l){const h=s.associations.get(o);o=s.extensions[wt.KHR_TEXTURE_TRANSFORM].extendTexture(o,l),s.associations.set(o,h)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const l="PointsMaterial:"+n.uuid;let h=this.cache.get(l);h||(h=new ax,Xi.prototype.copy.call(h,n),h.color.copy(n.color),h.map=n.map,h.sizeAttenuation=!1,this.cache.add(l,h)),n=h}else if(e.isLine){const l="LineBasicMaterial:"+n.uuid;let h=this.cache.get(l);h||(h=new ex,Xi.prototype.copy.call(h,n),h.color.copy(n.color),h.map=n.map,this.cache.add(l,h)),n=h}if(i||s||o){let l="ClonedMaterial:"+n.uuid+":";i&&(l+="derivative-tangents:"),s&&(l+="vertex-colors:"),o&&(l+="flat-shading:");let h=this.cache.get(l);h||(h=n.clone(),s&&(h.vertexColors=!0),o&&(h.flatShading=!0),i&&(h.normalScale&&(h.normalScale.y*=-1),h.clearcoatNormalScale&&(h.clearcoatNormalScale.y*=-1)),this.cache.add(l,h),this.associations.set(h,this.associations.get(n))),n=h}e.material=n}getMaterialType(){return gg}loadMaterial(e){const t=this,n=this.json,i=this.extensions,s=n.materials[e];let o;const l={},h=s.extensions||{},u=[];if(h[wt.KHR_MATERIALS_UNLIT]){const A=i[wt.KHR_MATERIALS_UNLIT];o=A.getMaterialType(),u.push(A.extendParams(l,s,t))}else{const A=s.pbrMetallicRoughness||{};if(l.color=new He(1,1,1),l.opacity=1,Array.isArray(A.baseColorFactor)){const p=A.baseColorFactor;l.color.setRGB(p[0],p[1],p[2],cr),l.opacity=p[3]}A.baseColorTexture!==void 0&&u.push(t.assignTexture(l,"map",A.baseColorTexture,Fr)),l.metalness=A.metallicFactor!==void 0?A.metallicFactor:1,l.roughness=A.roughnessFactor!==void 0?A.roughnessFactor:1,A.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(l,"metalnessMap",A.metallicRoughnessTexture)),u.push(t.assignTexture(l,"roughnessMap",A.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,l)})))}s.doubleSided===!0&&(l.side=Ii);const d=s.alphaMode||Mg.OPAQUE;if(d===Mg.BLEND?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,d===Mg.MASK&&(l.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==Ki&&(u.push(t.assignTexture(l,"normalMap",s.normalTexture)),l.normalScale=new Ue(1,1),s.normalTexture.scale!==void 0)){const A=s.normalTexture.scale;l.normalScale.set(A,A)}if(s.occlusionTexture!==void 0&&o!==Ki&&(u.push(t.assignTexture(l,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(l.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==Ki){const A=s.emissiveFactor;l.emissive=new He().setRGB(A[0],A[1],A[2],cr)}return s.emissiveTexture!==void 0&&o!==Ki&&u.push(t.assignTexture(l,"emissiveMap",s.emissiveTexture,Fr)),Promise.all(u).then(function(){const A=new o(l);return s.name&&(A.name=s.name),da(A,s),t.associations.set(A,{materials:e}),s.extensions&&_o(i,A,s),A})}createUniqueName(e){const t=Pt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function s(l){return n[wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(l,t).then(function(h){return Dx(h,l,t)})}const o=[];for(let l=0,h=e.length;l<h;l++){const u=e[l],d=NN(u),A=i[d];if(A)o.push(A.promise);else{let p;u.extensions&&u.extensions[wt.KHR_DRACO_MESH_COMPRESSION]?p=s(u):p=Dx(new Vn,u,t),i[d]={primitive:u,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,i=this.extensions,s=n.meshes[e],o=s.primitives,l=[];for(let h=0,u=o.length;h<u;h++){const d=o[h].material===void 0?RN(this.cache):this.getDependency("material",o[h].material);l.push(d)}return l.push(t.loadGeometries(o)),Promise.all(l).then(function(h){const u=h.slice(0,h.length-1),d=h[h.length-1],A=[];for(let g=0,_=d.length;g<_;g++){const E=d[g],m=o[g];let v;const w=u[g];if(m.mode===oi.TRIANGLES||m.mode===oi.TRIANGLE_STRIP||m.mode===oi.TRIANGLE_FAN||m.mode===void 0)v=s.isSkinnedMesh===!0?new g8(E,w):new Xr(E,w),v.isSkinnedMesh===!0&&v.normalizeSkinWeights(),m.mode===oi.TRIANGLE_STRIP?v.geometry=Mx(v.geometry,LE):m.mode===oi.TRIANGLE_FAN&&(v.geometry=Mx(v.geometry,bA));else if(m.mode===oi.LINES)v=new y8(E,w);else if(m.mode===oi.LINE_STRIP)v=new pg(E,w);else if(m.mode===oi.LINE_LOOP)v=new E8(E,w);else if(m.mode===oi.POINTS)v=new x8(E,w);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(v.geometry.morphAttributes).length>0&&LN(v,s),v.name=t.createUniqueName(s.name||"mesh_"+e),da(v,s),m.extensions&&_o(i,v,m),t.assignFinalMaterial(v),A.push(v)}for(let g=0,_=A.length;g<_;g++)t.associations.set(A[g],{meshes:e,primitives:g});if(A.length===1)return s.extensions&&_o(i,A[0],s),A[0];const p=new la;s.extensions&&_o(i,p,s),t.associations.set(p,{meshes:e});for(let g=0,_=A.length;g<_;g++)p.add(A[g]);return p})}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new dn(LA.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new _u(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),da(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let i=0,s=t.joints.length;i<s;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){const s=i.pop(),o=i,l=[],h=[];for(let u=0,d=o.length;u<d;u++){const A=o[u];if(A){l.push(A);const p=new rt;s!==null&&p.fromArray(s.array,u*16),h.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new hg(l,h)})}loadAnimation(e){const t=this.json,n=this,i=t.animations[e],s=i.name?i.name:"animation_"+e,o=[],l=[],h=[],u=[],d=[];for(let A=0,p=i.channels.length;A<p;A++){const g=i.channels[A],_=i.samplers[g.sampler],E=g.target,m=E.node,v=i.parameters!==void 0?i.parameters[_.input]:_.input,w=i.parameters!==void 0?i.parameters[_.output]:_.output;E.node!==void 0&&(o.push(this.getDependency("node",m)),l.push(this.getDependency("accessor",v)),h.push(this.getDependency("accessor",w)),u.push(_),d.push(E))}return Promise.all([Promise.all(o),Promise.all(l),Promise.all(h),Promise.all(u),Promise.all(d)]).then(function(A){const p=A[0],g=A[1],_=A[2],E=A[3],m=A[4],v=[];for(let w=0,x=p.length;w<x;w++){const I=p[w],R=g[w],S=_[w],T=E[w],D=m[w];if(I===void 0)continue;I.updateMatrix&&I.updateMatrix();const b=n._createAnimationTracks(I,R,S,T,D);if(b)for(let M=0;M<b.length;M++)v.push(b[M])}return new D8(s,void 0,v)})}createNodeMesh(e){const t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(s){const o=n._getNodeRef(n.meshCache,i.mesh,s);return i.weights!==void 0&&o.traverse(function(l){if(l.isMesh)for(let h=0,u=i.weights.length;h<u;h++)l.morphTargetInfluences[h]=i.weights[h]}),o})}loadNode(e){const t=this.json,n=this,i=t.nodes[e],s=n._loadNodeShallow(e),o=[],l=i.children||[];for(let u=0,d=l.length;u<d;u++)o.push(n.getDependency("node",l[u]));const h=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([s,Promise.all(o),h]).then(function(u){const d=u[0],A=u[1],p=u[2];p!==null&&d.traverse(function(g){g.isSkinnedMesh&&g.bind(p,PN)});for(let g=0,_=A.length;g<_;g++)d.add(A[g]);return d})}_loadNodeShallow(e){const t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?i.createUniqueName(s.name):"",l=[],h=i._invokeOne(function(u){return u.createNodeMesh&&u.createNodeMesh(e)});return h&&l.push(h),s.camera!==void 0&&l.push(i.getDependency("camera",s.camera).then(function(u){return i._getNodeRef(i.cameraCache,s.camera,u)})),i._invokeAll(function(u){return u.createNodeAttachment&&u.createNodeAttachment(e)}).forEach(function(u){l.push(u)}),this.nodeCache[e]=Promise.all(l).then(function(u){let d;if(s.isBone===!0?d=new K2:u.length>1?d=new la:u.length===1?d=u[0]:d=new Zt,d!==u[0])for(let A=0,p=u.length;A<p;A++)d.add(u[A]);if(s.name&&(d.userData.name=s.name,d.name=o),da(d,s),s.extensions&&_o(n,d,s),s.matrix!==void 0){const A=new rt;A.fromArray(s.matrix),d.applyMatrix4(A)}else s.translation!==void 0&&d.position.fromArray(s.translation),s.rotation!==void 0&&d.quaternion.fromArray(s.rotation),s.scale!==void 0&&d.scale.fromArray(s.scale);return i.associations.has(d)||i.associations.set(d,{}),i.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],i=this,s=new la;n.name&&(s.name=i.createUniqueName(n.name)),da(s,n),n.extensions&&_o(t,s,n);const o=n.nodes||[],l=[];for(let h=0,u=o.length;h<u;h++)l.push(i.getDependency("node",o[h]));return Promise.all(l).then(function(h){for(let d=0,A=h.length;d<A;d++)s.add(h[d]);const u=d=>{const A=new Map;for(const[p,g]of i.associations)(p instanceof Xi||p instanceof br)&&A.set(p,g);return d.traverse(p=>{const g=i.associations.get(p);g!=null&&A.set(p,g)}),A};return i.associations=u(s),s})}_createAnimationTracks(e,t,n,i,s){const o=[],l=e.name?e.name:e.uuid,h=[];ha[s.path]===ha.weights?e.traverse(function(p){p.morphTargetInfluences&&h.push(p.name?p.name:p.uuid)}):h.push(l);let u;switch(ha[s.path]){case ha.weights:u=Nl;break;case ha.rotation:u=vo;break;case ha.position:case ha.scale:u=Pl;break;default:switch(n.itemSize){case 1:u=Nl;break;case 2:case 3:default:u=Pl;break}break}const d=i.interpolation!==void 0?bN[i.interpolation]:ll,A=this._getArrayFromAccessor(n);for(let p=0,g=h.length;p<g;p++){const _=new u(h[p]+"."+ha[s.path],t.array,A,d);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(_),o.push(_)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=Tg(t.constructor),i=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)i[s]=t[s]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(t){const n=this instanceof vo?BN:Bx;return new n(this.times,this.values,this.getValueSize()/3,t)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function QN(r,e,t){const n=e.attributes,i=new _r;if(n.POSITION!==void 0){const l=t.json.accessors[n.POSITION],h=l.min,u=l.max;if(h!==void 0&&u!==void 0){if(i.set(new H(h[0],h[1],h[2]),new H(u[0],u[1],u[2])),l.normalized){const d=Tg(Ql[l.componentType]);i.min.multiplyScalar(d),i.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const l=new H,h=new H;for(let u=0,d=s.length;u<d;u++){const A=s[u];if(A.POSITION!==void 0){const p=t.json.accessors[A.POSITION],g=p.min,_=p.max;if(g!==void 0&&_!==void 0){if(h.setX(Math.max(Math.abs(g[0]),Math.abs(_[0]))),h.setY(Math.max(Math.abs(g[1]),Math.abs(_[1]))),h.setZ(Math.max(Math.abs(g[2]),Math.abs(_[2]))),p.normalized){const E=Tg(Ql[p.componentType]);h.multiplyScalar(E)}l.max(h)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(l)}r.boundingBox=i;const o=new Ri;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,r.boundingSphere=o}function Dx(r,e,t){const n=e.attributes,i=[];function s(o,l){return t.getDependency("accessor",o).then(function(h){r.setAttribute(l,h)})}for(const o in n){const l=Cg[o]||o.toLowerCase();l in r.attributes||i.push(s(n[o],l))}if(e.indices!==void 0&&!r.index){const o=t.getDependency("accessor",e.indices).then(function(l){r.setIndex(l)});i.push(o)}return Tt.workingColorSpace!==cr&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Tt.workingColorSpace}" not supported.`),da(r,e),QN(r,e,t),Promise.all(i).then(function(){return e.targets!==void 0?DN(r,e.targets,t):r})}class ON{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:i,msg:s,transfer:o}=this.queue.shift();this.workersResolve[e]=i,this.workers[e].postMessage(s,o)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(n=>{const i=this._getIdleWorker();i!==-1?(this._initWorker(i),this.workerStatus|=1<<i,this.workersResolve[i]=n,this.workers[i].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const FN=0,Lx=2,zN=1,Nx=2,HN=0,GN=1,VN=10,jN=0,Ux=9,Px=15,kx=16,Qx=22,Ox=37,Fx=43,zx=76,Hx=83,Gx=97,Vx=100,jx=103,Wx=109,Yx=165,qx=166;class WN{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Su{constructor(e,t,n,i){this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=i,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==t&&i<e;)i++,this._offset++;return i<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}const pn=[171,75,84,88,32,50,48,187,13,10,26,10];function Xx(r){return typeof TextDecoder<"u"?new TextDecoder().decode(r):Buffer.from(r).toString("utf8")}function YN(r){const e=new Uint8Array(r.buffer,r.byteOffset,pn.length);if(e[0]!==pn[0]||e[1]!==pn[1]||e[2]!==pn[2]||e[3]!==pn[3]||e[4]!==pn[4]||e[5]!==pn[5]||e[6]!==pn[6]||e[7]!==pn[7]||e[8]!==pn[8]||e[9]!==pn[9]||e[10]!==pn[10]||e[11]!==pn[11])throw new Error("Missing KTX 2.0 identifier.");const t=new WN,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new Su(r,pn.length,n,!0);t.vkFormat=i._nextUint32(),t.typeSize=i._nextUint32(),t.pixelWidth=i._nextUint32(),t.pixelHeight=i._nextUint32(),t.pixelDepth=i._nextUint32(),t.layerCount=i._nextUint32(),t.faceCount=i._nextUint32();const s=i._nextUint32();t.supercompressionScheme=i._nextUint32();const o=i._nextUint32(),l=i._nextUint32(),h=i._nextUint32(),u=i._nextUint32(),d=i._nextUint64(),A=i._nextUint64(),p=new Su(r,pn.length+n,3*s*8,!0);for(let te=0;te<s;te++)t.levels.push({levelData:new Uint8Array(r.buffer,r.byteOffset+p._nextUint64(),p._nextUint64()),uncompressedByteLength:p._nextUint64()});const g=new Su(r,o,l,!0),_={vendorId:g._skip(4)._nextUint16(),descriptorType:g._nextUint16(),versionNumber:g._nextUint16(),descriptorBlockSize:g._nextUint16(),colorModel:g._nextUint8(),colorPrimaries:g._nextUint8(),transferFunction:g._nextUint8(),flags:g._nextUint8(),texelBlockDimension:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],bytesPlane:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],samples:[]},E=(_.descriptorBlockSize/4-6)/4;for(let te=0;te<E;te++){const V={bitOffset:g._nextUint16(),bitLength:g._nextUint8(),channelType:g._nextUint8(),samplePosition:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&V.channelType?(V.sampleLower=g._nextInt32(),V.sampleUpper=g._nextInt32()):(V.sampleLower=g._nextUint32(),V.sampleUpper=g._nextUint32()),_.samples[te]=V}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(_);const m=new Su(r,h,u,!0);for(;m._offset<u;){const te=m._nextUint32(),V=m._scan(te),ee=Xx(V),Q=m._scan(te-V.byteLength);t.keyValue[ee]=ee.match(/^ktx/i)?Xx(Q):Q,m._offset%4&&m._skip(4-m._offset%4)}if(A<=0)return t;const v=new Su(r,d,A,!0),w=v._nextUint16(),x=v._nextUint16(),I=v._nextUint32(),R=v._nextUint32(),S=v._nextUint32(),T=v._nextUint32(),D=[];for(let te=0;te<s;te++)D.push({imageFlags:v._nextUint32(),rgbSliceByteOffset:v._nextUint32(),rgbSliceByteLength:v._nextUint32(),alphaSliceByteOffset:v._nextUint32(),alphaSliceByteLength:v._nextUint32()});const b=d+v._offset,M=b+I,L=M+R,P=L+S,N=new Uint8Array(r.buffer,r.byteOffset+b,I),W=new Uint8Array(r.buffer,r.byteOffset+M,R),X=new Uint8Array(r.buffer,r.byteOffset+L,S),K=new Uint8Array(r.buffer,r.byteOffset+P,T);return t.globalData={endpointCount:w,selectorCount:x,imageDescs:D,endpointsData:N,selectorsData:W,tablesData:X,extendedData:K},t}let Bg,Ss,bg;const Rg={env:{emscripten_notify_memory_growth:function(r){bg=new Uint8Array(Ss.exports.memory.buffer)}}};class qN{init(){return Bg||(Bg=typeof fetch<"u"?fetch("data:application/wasm;base64,"+Kx).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,Rg)).then(this._init):WebAssembly.instantiate(Buffer.from(Kx,"base64"),Rg).then(this._init),Bg)}_init(e){Ss=e.instance,Rg.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!Ss)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,i=Ss.exports.malloc(n);bg.set(e,i),t=t||Number(Ss.exports.ZSTD_findDecompressedSize(i,n));const s=Ss.exports.malloc(t),o=Ss.exports.ZSTD_decompress(s,t,i,n),l=bg.slice(s,s+o);return Ss.exports.free(i),Ss.exports.free(s),l}}const Kx="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1l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ICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0E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sMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAML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CAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKA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BaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAs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ACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgA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KAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",Dg=new WeakMap;let Lg=0,Ng;class es extends ua{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new ON,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return this.workerConfig={astcSupported:await e.hasFeatureAsync("texture-compression-astc"),etc1Supported:await e.hasFeatureAsync("texture-compression-etc1"),etc2Supported:await e.hasFeatureAsync("texture-compression-etc2"),dxtSupported:await e.hasFeatureAsync("texture-compression-bc"),bptcSupported:await e.hasFeatureAsync("texture-compression-bptc"),pvrtcSupported:await e.hasFeatureAsync("texture-compression-pvrtc")},this}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-bc"),bptcSupported:e.hasFeature("texture-compression-bptc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const e=new kl(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new kl(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const i=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,i]).then(([s,o])=>{const l=es.BasisWorker.toString(),h=["/* constants */","let _EngineFormat = "+JSON.stringify(es.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(es.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(es.BasisFormat),"/* basis_transcoder.js */",s,"/* worker */",l.substring(l.indexOf("{")+1,l.lastIndexOf("}"))].join(`
3828
+ }`;class o8{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new br,s=e.properties.get(i);s.__webglTexture=t.texture,(t.depthNear!=n.depthNear||t.depthFar!=n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}render(e,t){if(this.texture!==null){if(this.mesh===null){const n=t.cameras[0].viewport,i=new Cr({vertexShader:s8,fragmentShader:a8,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Xr(new vu(20,20),i)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class l8 extends ao{constructor(e,t){super();const n=this;let i=null,s=1,o=null,l="local-floor",h=1,u=null,d=null,A=null,p=null,g=null,_=null;const E=new o8,m=t.getContextAttributes();let v=null,w=null;const x=[],I=[],R=new Ue;let S=null;const T=new dn;T.layers.enable(1),T.viewport=new Ft;const D=new dn;D.layers.enable(2),D.viewport=new Ft;const b=[T,D],M=new n8;M.layers.enable(1),M.layers.enable(2);let L=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let de=x[j];return de===void 0&&(de=new og,x[j]=de),de.getTargetRaySpace()},this.getControllerGrip=function(j){let de=x[j];return de===void 0&&(de=new og,x[j]=de),de.getGripSpace()},this.getHand=function(j){let de=x[j];return de===void 0&&(de=new og,x[j]=de),de.getHandSpace()};function N(j){const de=I.indexOf(j.inputSource);if(de===-1)return;const Ae=x[de];Ae!==void 0&&(Ae.update(j.inputSource,j.frame,u||o),Ae.dispatchEvent({type:j.type,data:j.inputSource}))}function W(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",W),i.removeEventListener("inputsourceschange",X);for(let j=0;j<x.length;j++){const de=I[j];de!==null&&(I[j]=null,x[j].disconnect(de))}L=null,P=null,E.reset(),e.setRenderTarget(v),g=null,p=null,A=null,i=null,w=null,re.stop(),n.isPresenting=!1,e.setPixelRatio(S),e.setSize(R.width,R.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(j){s=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(j){l=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(j){u=j},this.getBaseLayer=function(){return p!==null?p:g},this.getBinding=function(){return A},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(j){if(i=j,i!==null){if(v=e.getRenderTarget(),i.addEventListener("select",N),i.addEventListener("selectstart",N),i.addEventListener("selectend",N),i.addEventListener("squeeze",N),i.addEventListener("squeezestart",N),i.addEventListener("squeezeend",N),i.addEventListener("end",W),i.addEventListener("inputsourceschange",X),m.xrCompatible!==!0&&await t.makeXRCompatible(),S=e.getPixelRatio(),e.getSize(R),i.renderState.layers===void 0){const de={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(i,t,de),i.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),w=new cn(g.framebufferWidth,g.framebufferHeight,{format:vr,type:mr,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let de=null,Ae=null,_e=null;m.depth&&(_e=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,de=m.stencil?au:ol,Ae=m.stencil?su:Si);const Ee={colorFormat:t.RGBA8,depthFormat:_e,scaleFactor:s};A=new XRWebGLBinding(i,t),p=A.createProjectionLayer(Ee),i.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),w=new cn(p.textureWidth,p.textureHeight,{format:vr,type:mr,depthTexture:new w2(p.textureWidth,p.textureHeight,Ae,void 0,void 0,void 0,void 0,void 0,void 0,de),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0});const Le=e.properties.get(w);Le.__ignoreDepthValues=p.ignoreDepthValues}w.isXRRenderTarget=!0,this.setFoveation(h),u=null,o=await i.requestReferenceSpace(l),re.setContext(i),re.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function X(j){for(let de=0;de<j.removed.length;de++){const Ae=j.removed[de],_e=I.indexOf(Ae);_e>=0&&(I[_e]=null,x[_e].disconnect(Ae))}for(let de=0;de<j.added.length;de++){const Ae=j.added[de];let _e=I.indexOf(Ae);if(_e===-1){for(let Le=0;Le<x.length;Le++)if(Le>=I.length){I.push(Ae),_e=Le;break}else if(I[Le]===null){I[Le]=Ae,_e=Le;break}if(_e===-1)break}const Ee=x[_e];Ee&&Ee.connect(Ae)}}const K=new H,te=new H;function V(j,de,Ae){K.setFromMatrixPosition(de.matrixWorld),te.setFromMatrixPosition(Ae.matrixWorld);const _e=K.distanceTo(te),Ee=de.projectionMatrix.elements,Le=Ae.projectionMatrix.elements,st=Ee[14]/(Ee[10]-1),se=Ee[14]/(Ee[10]+1),et=(Ee[9]+1)/Ee[5],Qe=(Ee[9]-1)/Ee[5],ht=(Ee[8]-1)/Ee[0],Ke=(Le[8]+1)/Le[0],pt=st*ht,Y=st*Ke,k=_e/(-ht+Ke),le=k*-ht;de.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(le),j.translateZ(k),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert();const pe=st+k,me=se+k,ye=pt-le,Ge=Y+(_e-le),Ie=et*se/me*pe,je=Qe*se/me*pe;j.projectionMatrix.makePerspective(ye,Ge,Ie,je,pe,me),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}function ee(j,de){de===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(de.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(i===null)return;E.texture!==null&&(j.near=E.depthNear,j.far=E.depthFar),M.near=D.near=T.near=j.near,M.far=D.far=T.far=j.far,(L!==M.near||P!==M.far)&&(i.updateRenderState({depthNear:M.near,depthFar:M.far}),L=M.near,P=M.far,T.near=L,T.far=P,D.near=L,D.far=P,T.updateProjectionMatrix(),D.updateProjectionMatrix(),j.updateProjectionMatrix());const de=j.parent,Ae=M.cameras;ee(M,de);for(let _e=0;_e<Ae.length;_e++)ee(Ae[_e],de);Ae.length===2?V(M,T,D):M.projectionMatrix.copy(T.projectionMatrix),Q(j,M,de)};function Q(j,de,Ae){Ae===null?j.matrix.copy(de.matrixWorld):(j.matrix.copy(Ae.matrixWorld),j.matrix.invert(),j.matrix.multiply(de.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(de.projectionMatrix),j.projectionMatrixInverse.copy(de.projectionMatrixInverse),j.isPerspectiveCamera&&(j.fov=ul*2*Math.atan(1/j.projectionMatrix.elements[5]),j.zoom=1)}this.getCamera=function(){return M},this.getFoveation=function(){if(!(p===null&&g===null))return h},this.setFoveation=function(j){h=j,p!==null&&(p.fixedFoveation=j),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=j)},this.hasDepthSensing=function(){return E.texture!==null};let z=null;function Z(j,de){if(d=de.getViewerPose(u||o),_=de,d!==null){const Ae=d.views;g!==null&&(e.setRenderTargetFramebuffer(w,g.framebuffer),e.setRenderTarget(w));let _e=!1;Ae.length!==M.cameras.length&&(M.cameras.length=0,_e=!0);for(let Le=0;Le<Ae.length;Le++){const st=Ae[Le];let se=null;if(g!==null)se=g.getViewport(st);else{const Qe=A.getViewSubImage(p,st);se=Qe.viewport,Le===0&&(e.setRenderTargetTextures(w,Qe.colorTexture,p.ignoreDepthValues?void 0:Qe.depthStencilTexture),e.setRenderTarget(w))}let et=b[Le];et===void 0&&(et=new dn,et.layers.enable(Le),et.viewport=new Ft,b[Le]=et),et.matrix.fromArray(st.transform.matrix),et.matrix.decompose(et.position,et.quaternion,et.scale),et.projectionMatrix.fromArray(st.projectionMatrix),et.projectionMatrixInverse.copy(et.projectionMatrix).invert(),et.viewport.set(se.x,se.y,se.width,se.height),Le===0&&(M.matrix.copy(et.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),_e===!0&&M.cameras.push(et)}const Ee=i.enabledFeatures;if(Ee&&Ee.includes("depth-sensing")){const Le=A.getDepthInformation(Ae[0]);Le&&Le.isValid&&Le.texture&&E.init(e,Le,i.renderState)}}for(let Ae=0;Ae<x.length;Ae++){const _e=I[Ae],Ee=x[Ae];_e!==null&&Ee!==void 0&&Ee.update(_e,de,u||o)}E.render(e,M),z&&z(j,de),de.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:de}),_=null}const re=new A2;re.setAnimationLoop(Z),this.setAnimationLoop=function(j){z=j},this.dispose=function(){}}}const go=new qi,c8=new rt;function u8(r,e){function t(m,v){m.matrixAutoUpdate===!0&&m.updateMatrix(),v.value.copy(m.matrix)}function n(m,v){v.color.getRGB(m.fogColor.value,u2(r)),v.isFog?(m.fogNear.value=v.near,m.fogFar.value=v.far):v.isFogExp2&&(m.fogDensity.value=v.density)}function i(m,v,w,x,I){v.isMeshBasicMaterial||v.isMeshLambertMaterial?s(m,v):v.isMeshToonMaterial?(s(m,v),A(m,v)):v.isMeshPhongMaterial?(s(m,v),d(m,v)):v.isMeshStandardMaterial?(s(m,v),p(m,v),v.isMeshPhysicalMaterial&&g(m,v,I)):v.isMeshMatcapMaterial?(s(m,v),_(m,v)):v.isMeshDepthMaterial?s(m,v):v.isMeshDistanceMaterial?(s(m,v),E(m,v)):v.isMeshNormalMaterial?s(m,v):v.isLineBasicMaterial?(o(m,v),v.isLineDashedMaterial&&l(m,v)):v.isPointsMaterial?h(m,v,w,x):v.isSpriteMaterial?u(m,v):v.isShadowMaterial?(m.color.value.copy(v.color),m.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function s(m,v){m.opacity.value=v.opacity,v.color&&m.diffuse.value.copy(v.color),v.emissive&&m.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(m.map.value=v.map,t(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.bumpMap&&(m.bumpMap.value=v.bumpMap,t(v.bumpMap,m.bumpMapTransform),m.bumpScale.value=v.bumpScale,v.side===Qr&&(m.bumpScale.value*=-1)),v.normalMap&&(m.normalMap.value=v.normalMap,t(v.normalMap,m.normalMapTransform),m.normalScale.value.copy(v.normalScale),v.side===Qr&&m.normalScale.value.negate()),v.displacementMap&&(m.displacementMap.value=v.displacementMap,t(v.displacementMap,m.displacementMapTransform),m.displacementScale.value=v.displacementScale,m.displacementBias.value=v.displacementBias),v.emissiveMap&&(m.emissiveMap.value=v.emissiveMap,t(v.emissiveMap,m.emissiveMapTransform)),v.specularMap&&(m.specularMap.value=v.specularMap,t(v.specularMap,m.specularMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest);const w=e.get(v),x=w.envMap,I=w.envMapRotation;if(x&&(m.envMap.value=x,go.copy(I),go.x*=-1,go.y*=-1,go.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(go.y*=-1,go.z*=-1),m.envMapRotation.value.setFromMatrix4(c8.makeRotationFromEuler(go)),m.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=v.reflectivity,m.ior.value=v.ior,m.refractionRatio.value=v.refractionRatio),v.lightMap){m.lightMap.value=v.lightMap;const R=r._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=v.lightMapIntensity*R,t(v.lightMap,m.lightMapTransform)}v.aoMap&&(m.aoMap.value=v.aoMap,m.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,m.aoMapTransform))}function o(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform))}function l(m,v){m.dashSize.value=v.dashSize,m.totalSize.value=v.dashSize+v.gapSize,m.scale.value=v.scale}function h(m,v,w,x){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.size.value=v.size*w,m.scale.value=x*.5,v.map&&(m.map.value=v.map,t(v.map,m.uvTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function u(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.rotation.value=v.rotation,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function d(m,v){m.specular.value.copy(v.specular),m.shininess.value=Math.max(v.shininess,1e-4)}function A(m,v){v.gradientMap&&(m.gradientMap.value=v.gradientMap)}function p(m,v){m.metalness.value=v.metalness,v.metalnessMap&&(m.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,m.metalnessMapTransform)),m.roughness.value=v.roughness,v.roughnessMap&&(m.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,m.roughnessMapTransform)),v.envMap&&(m.envMapIntensity.value=v.envMapIntensity)}function g(m,v,w){m.ior.value=v.ior,v.sheen>0&&(m.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),m.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(m.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,m.sheenColorMapTransform)),v.sheenRoughnessMap&&(m.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,m.sheenRoughnessMapTransform))),v.clearcoat>0&&(m.clearcoat.value=v.clearcoat,m.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(m.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,m.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(m.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Qr&&m.clearcoatNormalScale.value.negate())),v.iridescence>0&&(m.iridescence.value=v.iridescence,m.iridescenceIOR.value=v.iridescenceIOR,m.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(m.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,m.iridescenceMapTransform)),v.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),v.transmission>0&&(m.transmission.value=v.transmission,m.transmissionSamplerMap.value=w.texture,m.transmissionSamplerSize.value.set(w.width,w.height),v.transmissionMap&&(m.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,m.transmissionMapTransform)),m.thickness.value=v.thickness,v.thicknessMap&&(m.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=v.attenuationDistance,m.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(m.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(m.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=v.specularIntensity,m.specularColor.value.copy(v.specularColor),v.specularColorMap&&(m.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,m.specularColorMapTransform)),v.specularIntensityMap&&(m.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,m.specularIntensityMapTransform))}function _(m,v){v.matcap&&(m.matcap.value=v.matcap)}function E(m,v){const w=e.get(v).light;m.referencePosition.value.setFromMatrixPosition(w.matrixWorld),m.nearDistance.value=w.shadow.camera.near,m.farDistance.value=w.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function h8(r,e,t,n){let i={},s={},o=[];const l=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function h(w,x){const I=x.program;n.uniformBlockBinding(w,I)}function u(w,x){let I=i[w.id];I===void 0&&(_(w),I=d(w),i[w.id]=I,w.addEventListener("dispose",m));const R=x.program;n.updateUBOMapping(w,R);const S=e.render.frame;s[w.id]!==S&&(p(w),s[w.id]=S)}function d(w){const x=A();w.__bindingPointIndex=x;const I=r.createBuffer(),R=w.__size,S=w.usage;return r.bindBuffer(r.UNIFORM_BUFFER,I),r.bufferData(r.UNIFORM_BUFFER,R,S),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,x,I),I}function A(){for(let w=0;w<l;w++)if(o.indexOf(w)===-1)return o.push(w),w;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(w){const x=i[w.id],I=w.uniforms,R=w.__cache;r.bindBuffer(r.UNIFORM_BUFFER,x);for(let S=0,T=I.length;S<T;S++){const D=Array.isArray(I[S])?I[S]:[I[S]];for(let b=0,M=D.length;b<M;b++){const L=D[b];if(g(L,S,b,R)===!0){const P=L.__offset,N=Array.isArray(L.value)?L.value:[L.value];let W=0;for(let X=0;X<N.length;X++){const K=N[X],te=E(K);typeof K=="number"||typeof K=="boolean"?(L.__data[0]=K,r.bufferSubData(r.UNIFORM_BUFFER,P+W,L.__data)):K.isMatrix3?(L.__data[0]=K.elements[0],L.__data[1]=K.elements[1],L.__data[2]=K.elements[2],L.__data[3]=0,L.__data[4]=K.elements[3],L.__data[5]=K.elements[4],L.__data[6]=K.elements[5],L.__data[7]=0,L.__data[8]=K.elements[6],L.__data[9]=K.elements[7],L.__data[10]=K.elements[8],L.__data[11]=0):(K.toArray(L.__data,W),W+=te.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,P,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function g(w,x,I,R){const S=w.value,T=x+"_"+I;if(R[T]===void 0)return typeof S=="number"||typeof S=="boolean"?R[T]=S:R[T]=S.clone(),!0;{const D=R[T];if(typeof S=="number"||typeof S=="boolean"){if(D!==S)return R[T]=S,!0}else if(D.equals(S)===!1)return D.copy(S),!0}return!1}function _(w){const x=w.uniforms;let I=0;const R=16;for(let T=0,D=x.length;T<D;T++){const b=Array.isArray(x[T])?x[T]:[x[T]];for(let M=0,L=b.length;M<L;M++){const P=b[M],N=Array.isArray(P.value)?P.value:[P.value];for(let W=0,X=N.length;W<X;W++){const K=N[W],te=E(K),V=I%R;V!==0&&R-V<te.boundary&&(I+=R-V),P.__data=new Float32Array(te.storage/Float32Array.BYTES_PER_ELEMENT),P.__offset=I,I+=te.storage}}}const S=I%R;return S>0&&(I+=R-S),w.__size=I,w.__cache={},this}function E(w){const x={boundary:0,storage:0};return typeof w=="number"||typeof w=="boolean"?(x.boundary=4,x.storage=4):w.isVector2?(x.boundary=8,x.storage=8):w.isVector3||w.isColor?(x.boundary=16,x.storage=12):w.isVector4?(x.boundary=16,x.storage=16):w.isMatrix3?(x.boundary=48,x.storage=48):w.isMatrix4?(x.boundary=64,x.storage=64):w.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",w),x}function m(w){const x=w.target;x.removeEventListener("dispose",m);const I=o.indexOf(x.__bindingPointIndex);o.splice(I,1),r.deleteBuffer(i[x.id]),delete i[x.id],delete s[x.id]}function v(){for(const w in i)r.deleteBuffer(i[w]);o=[],i={},s={}}return{bind:h,update:u,dispose:v}}class d8{constructor(e={}){const{canvas:t=i5(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:l=!1,premultipliedAlpha:h=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:A=!1}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=n.getContextAttributes().alpha}else p=o;const g=new Uint32Array(4),_=new Int32Array(4);let E=null,m=null;const v=[],w=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Fr,this._useLegacyLights=!1,this.toneMapping=$s,this.toneMappingExposure=1;const x=this;let I=!1,R=0,S=0,T=null,D=-1,b=null;const M=new Ft,L=new Ft;let P=null;const N=new He(0);let W=0,X=t.width,K=t.height,te=1,V=null,ee=null;const Q=new Ft(0,0,X,K),z=new Ft(0,0,X,K);let Z=!1;const re=new ZA;let j=!1,de=!1;const Ae=new rt,_e=new Ue,Ee=new H,Le={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function st(){return T===null?te:1}let se=n;function et(F,ne){const ue=t.getContext(F,ne);return ue!==null?ue:null}try{const F={alpha:!0,depth:i,stencil:s,antialias:l,premultipliedAlpha:h,preserveDrawingBuffer:u,powerPreference:d,failIfMajorPerformanceCaveat:A};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Xh}`),t.addEventListener("webglcontextlost",ge,!1),t.addEventListener("webglcontextrestored",ve,!1),t.addEventListener("webglcontextcreationerror",Fe,!1),se===null){const ne="webgl2";if(se=et(ne,F),se===null)throw et(ne)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(F){throw console.error("THREE.WebGLRenderer: "+F.message),F}let Qe,ht,Ke,pt,Y,k,le,pe,me,ye,Ge,Ie,je,Ve,Me,fe,De,Be,be,nt,lt,dt,ct,ut;function G(){Qe=new ED(se),Qe.init(),ht=new AD(se,Qe,e),dt=new r8(se,Qe),Ke=new e8(se),pt=new ID(se),Y=new zL,k=new t8(se,Qe,Ke,Y,ht,dt,pt),le=new mD(x),pe=new yD(x),me=new b5(se),ct=new fD(se,me),ye=new xD(se,me,pt,ct),Ge=new MD(se,ye,me,pt),be=new CD(se,ht,k),fe=new gD(Y),Ie=new FL(x,le,pe,Qe,ht,ct,fe),je=new u8(x,Y),Ve=new GL,Me=new XL(Qe),Be=new dD(x,le,pe,Ke,Ge,p,h),De=new $L(x,Ge,ht),ut=new h8(se,pt,ht,Ke),nt=new pD(se,Qe,pt),lt=new wD(se,Qe,pt),pt.programs=Ie.programs,x.capabilities=ht,x.extensions=Qe,x.properties=Y,x.renderLists=Ve,x.shadowMap=De,x.state=Ke,x.info=pt}G();const O=new l8(x,se);this.xr=O,this.getContext=function(){return se},this.getContextAttributes=function(){return se.getContextAttributes()},this.forceContextLoss=function(){const F=Qe.get("WEBGL_lose_context");F&&F.loseContext()},this.forceContextRestore=function(){const F=Qe.get("WEBGL_lose_context");F&&F.restoreContext()},this.getPixelRatio=function(){return te},this.setPixelRatio=function(F){F!==void 0&&(te=F,this.setSize(X,K,!1))},this.getSize=function(F){return F.set(X,K)},this.setSize=function(F,ne,ue=!0){if(O.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=F,K=ne,t.width=Math.floor(F*te),t.height=Math.floor(ne*te),ue===!0&&(t.style.width=F+"px",t.style.height=ne+"px"),this.setViewport(0,0,F,ne)},this.getDrawingBufferSize=function(F){return F.set(X*te,K*te).floor()},this.setDrawingBufferSize=function(F,ne,ue){X=F,K=ne,te=ue,t.width=Math.floor(F*ue),t.height=Math.floor(ne*ue),this.setViewport(0,0,F,ne)},this.getCurrentViewport=function(F){return F.copy(M)},this.getViewport=function(F){return F.copy(Q)},this.setViewport=function(F,ne,ue,he){F.isVector4?Q.set(F.x,F.y,F.z,F.w):Q.set(F,ne,ue,he),Ke.viewport(M.copy(Q).multiplyScalar(te).round())},this.getScissor=function(F){return F.copy(z)},this.setScissor=function(F,ne,ue,he){F.isVector4?z.set(F.x,F.y,F.z,F.w):z.set(F,ne,ue,he),Ke.scissor(L.copy(z).multiplyScalar(te).round())},this.getScissorTest=function(){return Z},this.setScissorTest=function(F){Ke.setScissorTest(Z=F)},this.setOpaqueSort=function(F){V=F},this.setTransparentSort=function(F){ee=F},this.getClearColor=function(F){return F.copy(Be.getClearColor())},this.setClearColor=function(){Be.setClearColor.apply(Be,arguments)},this.getClearAlpha=function(){return Be.getClearAlpha()},this.setClearAlpha=function(){Be.setClearAlpha.apply(Be,arguments)},this.clear=function(F=!0,ne=!0,ue=!0){let he=0;if(F){let oe=!1;if(T!==null){const Re=T.texture.format;oe=Re===ou||Re===ed||Re===yA}if(oe){const Re=T.texture.type,Je=Re===mr||Re===Si||Re===_A||Re===su||Re===cE||Re===uE,it=Be.getClearColor(),at=Be.getClearAlpha(),Xe=it.r,At=it.g,ft=it.b;Je?(g[0]=Xe,g[1]=At,g[2]=ft,g[3]=at,se.clearBufferuiv(se.COLOR,0,g)):(_[0]=Xe,_[1]=At,_[2]=ft,_[3]=at,se.clearBufferiv(se.COLOR,0,_))}else he|=se.COLOR_BUFFER_BIT}ne&&(he|=se.DEPTH_BUFFER_BIT),ue&&(he|=se.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),se.clear(he)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ge,!1),t.removeEventListener("webglcontextrestored",ve,!1),t.removeEventListener("webglcontextcreationerror",Fe,!1),Ve.dispose(),Me.dispose(),Y.dispose(),le.dispose(),pe.dispose(),Ge.dispose(),ct.dispose(),ut.dispose(),Ie.dispose(),O.dispose(),O.removeEventListener("sessionstart",fr),O.removeEventListener("sessionend",Vt),Er.stop()};function ge(F){F.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),I=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),I=!1;const F=pt.autoReset,ne=De.enabled,ue=De.autoUpdate,he=De.needsUpdate,oe=De.type;G(),pt.autoReset=F,De.enabled=ne,De.autoUpdate=ue,De.needsUpdate=he,De.type=oe}function Fe(F){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",F.statusMessage)}function Pe(F){const ne=F.target;ne.removeEventListener("dispose",Pe),vt(ne)}function vt(F){Lt(F),Y.remove(F)}function Lt(F){const ne=Y.get(F).programs;ne!==void 0&&(ne.forEach(function(ue){Ie.releaseProgram(ue)}),F.isShaderMaterial&&Ie.releaseShaderCache(F))}this.renderBufferDirect=function(F,ne,ue,he,oe,Re){ne===null&&(ne=Le);const Je=oe.isMesh&&oe.matrixWorld.determinant()<0,it=d0(F,ne,ue,he,oe);Ke.setMaterial(he,Je);let at=ue.index,Xe=1;if(he.wireframe===!0){if(at=ye.getWireframeAttribute(ue),at===void 0)return;Xe=2}const At=ue.drawRange,ft=ue.attributes.position;let Lr=At.start*Xe,er=(At.start+At.count)*Xe;Re!==null&&(Lr=Math.max(Lr,Re.start*Xe),er=Math.min(er,(Re.start+Re.count)*Xe)),at!==null?(Lr=Math.max(Lr,0),er=Math.min(er,at.count)):ft!=null&&(Lr=Math.max(Lr,0),er=Math.min(er,ft.count));const Dn=er-Lr;if(Dn<0||Dn===1/0)return;ct.setup(oe,he,it,ue,at);let Ai,jt=nt;if(at!==null&&(Ai=me.get(at),jt=lt,jt.setIndex(Ai)),oe.isMesh)he.wireframe===!0?(Ke.setLineWidth(he.wireframeLinewidth*st()),jt.setMode(se.LINES)):jt.setMode(se.TRIANGLES);else if(oe.isLine){let tt=he.linewidth;tt===void 0&&(tt=1),Ke.setLineWidth(tt*st()),oe.isLineSegments?jt.setMode(se.LINES):oe.isLineLoop?jt.setMode(se.LINE_LOOP):jt.setMode(se.LINE_STRIP)}else oe.isPoints?jt.setMode(se.POINTS):oe.isSprite&&jt.setMode(se.TRIANGLES);if(oe.isBatchedMesh)jt.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else if(oe.isInstancedMesh)jt.renderInstances(Lr,Dn,oe.count);else if(ue.isInstancedBufferGeometry){const tt=ue._maxInstanceCount!==void 0?ue._maxInstanceCount:1/0,Ju=Math.min(ue.instanceCount,tt);jt.renderInstances(Lr,Dn,Ju)}else jt.render(Lr,Dn)};function Nt(F,ne,ue){F.transparent===!0&&F.side===Ii&&F.forceSinglePass===!1?(F.side=Qr,F.needsUpdate=!0,Ps(F,ne,ue),F.side=wi,F.needsUpdate=!0,Ps(F,ne,ue),F.side=Ii):Ps(F,ne,ue)}this.compile=function(F,ne,ue=null){ue===null&&(ue=F),m=Me.get(ue),m.init(),w.push(m),ue.traverseVisible(function(oe){oe.isLight&&oe.layers.test(ne.layers)&&(m.pushLight(oe),oe.castShadow&&m.pushShadow(oe))}),F!==ue&&F.traverseVisible(function(oe){oe.isLight&&oe.layers.test(ne.layers)&&(m.pushLight(oe),oe.castShadow&&m.pushShadow(oe))}),m.setupLights(x._useLegacyLights);const he=new Set;return F.traverse(function(oe){const Re=oe.material;if(Re)if(Array.isArray(Re))for(let Je=0;Je<Re.length;Je++){const it=Re[Je];Nt(it,ue,oe),he.add(it)}else Nt(Re,ue,oe),he.add(Re)}),w.pop(),m=null,he},this.compileAsync=function(F,ne,ue=null){const he=this.compile(F,ne,ue);return new Promise(oe=>{function Re(){if(he.forEach(function(Je){Y.get(Je).currentProgram.isReady()&&he.delete(Je)}),he.size===0){oe(F);return}setTimeout(Re,10)}Qe.get("KHR_parallel_shader_compile")!==null?Re():setTimeout(Re,10)})};let Bt=null;function _t(F){Bt&&Bt(F)}function fr(){Er.stop()}function Vt(){Er.start()}const Er=new A2;Er.setAnimationLoop(_t),typeof self<"u"&&Er.setContext(self),this.setAnimationLoop=function(F){Bt=F,O.setAnimationLoop(F),F===null?Er.stop():Er.start()},O.addEventListener("sessionstart",fr),O.addEventListener("sessionend",Vt),this.render=function(F,ne){if(ne!==void 0&&ne.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(I===!0)return;F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),ne.parent===null&&ne.matrixWorldAutoUpdate===!0&&ne.updateMatrixWorld(),O.enabled===!0&&O.isPresenting===!0&&(O.cameraAutoUpdate===!0&&O.updateCamera(ne),ne=O.getCamera()),F.isScene===!0&&F.onBeforeRender(x,F,ne,T),m=Me.get(F,w.length),m.init(),w.push(m),Ae.multiplyMatrices(ne.projectionMatrix,ne.matrixWorldInverse),re.setFromProjectionMatrix(Ae),de=this.localClippingEnabled,j=fe.init(this.clippingPlanes,de),E=Ve.get(F,v.length),E.init(),v.push(E),Rn(F,ne,0,x.sortObjects),E.finish(),x.sortObjects===!0&&E.sort(V,ee),this.info.render.frame++,j===!0&&fe.beginShadows();const ue=m.state.shadowsArray;if(De.render(ue,F,ne),j===!0&&fe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(O.enabled===!1||O.isPresenting===!1||O.hasDepthSensing()===!1)&&Be.render(E,F),m.setupLights(x._useLegacyLights),ne.isArrayCamera){const he=ne.cameras;for(let oe=0,Re=he.length;oe<Re;oe++){const Je=he[oe];qt(E,F,Je,Je.viewport)}}else qt(E,F,ne);T!==null&&(k.updateMultisampleRenderTarget(T),k.updateRenderTargetMipmap(T)),F.isScene===!0&&F.onAfterRender(x,F,ne),ct.resetDefaultState(),D=-1,b=null,w.pop(),w.length>0?m=w[w.length-1]:m=null,v.pop(),v.length>0?E=v[v.length-1]:E=null};function Rn(F,ne,ue,he){if(F.visible===!1)return;if(F.layers.test(ne.layers)){if(F.isGroup)ue=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(ne);else if(F.isLight)m.pushLight(F),F.castShadow&&m.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||re.intersectsSprite(F)){he&&Ee.setFromMatrixPosition(F.matrixWorld).applyMatrix4(Ae);const Re=Ge.update(F),Je=F.material;Je.visible&&E.push(F,Re,Je,ue,Ee.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||re.intersectsObject(F))){const Re=Ge.update(F),Je=F.material;if(he&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),Ee.copy(F.boundingSphere.center)):(Re.boundingSphere===null&&Re.computeBoundingSphere(),Ee.copy(Re.boundingSphere.center)),Ee.applyMatrix4(F.matrixWorld).applyMatrix4(Ae)),Array.isArray(Je)){const it=Re.groups;for(let at=0,Xe=it.length;at<Xe;at++){const At=it[at],ft=Je[At.materialIndex];ft&&ft.visible&&E.push(F,Re,ft,ue,Ee.z,At)}}else Je.visible&&E.push(F,Re,Je,ue,Ee.z,null)}}const oe=F.children;for(let Re=0,Je=oe.length;Re<Je;Re++)Rn(oe[Re],ne,ue,he)}function qt(F,ne,ue,he){const oe=F.opaque,Re=F.transmissive,Je=F.transparent;m.setupLightsView(ue),j===!0&&fe.setGlobalState(x.clippingPlanes,ue),Re.length>0&&pi(oe,Re,ne,ue),he&&Ke.viewport(M.copy(he)),oe.length>0&&$n(oe,ne,ue),Re.length>0&&$n(Re,ne,ue),Je.length>0&&$n(Je,ne,ue),Ke.buffers.depth.setTest(!0),Ke.buffers.depth.setMask(!0),Ke.buffers.color.setMask(!0),Ke.setPolygonOffset(!1)}function pi(F,ne,ue,he){if((ue.isScene===!0?ue.overrideMaterial:null)!==null)return;if(m.state.transmissionRenderTarget===null){m.state.transmissionRenderTarget=new cn(1,1,{generateMipmaps:!0,type:Qe.has("EXT_color_buffer_half_float")||Qe.has("EXT_color_buffer_float")?Or:mr,minFilter:Mi,samples:4,stencilBuffer:s});const at=Y.get(m.state.transmissionRenderTarget);at.__isTransmissionRenderTarget=!0}const oe=m.state.transmissionRenderTarget;x.getDrawingBufferSize(_e),oe.setSize(_e.x,_e.y);const Re=x.getRenderTarget();x.setRenderTarget(oe),x.getClearColor(N),W=x.getClearAlpha(),W<1&&x.setClearColor(16777215,.5),x.clear();const Je=x.toneMapping;x.toneMapping=$s,$n(F,ue,he),k.updateMultisampleRenderTarget(oe),k.updateRenderTargetMipmap(oe);let it=!1;for(let at=0,Xe=ne.length;at<Xe;at++){const At=ne[at],ft=At.object,Lr=At.geometry,er=At.material,Dn=At.group;if(er.side===Ii&&ft.layers.test(he.layers)){const Ai=er.side;er.side=Qr,er.needsUpdate=!0,Us(ft,ue,he,Lr,er,Dn),er.side=Ai,er.needsUpdate=!0,it=!0}}it===!0&&(k.updateMultisampleRenderTarget(oe),k.updateRenderTargetMipmap(oe)),x.setRenderTarget(Re),x.setClearColor(N,W),x.toneMapping=Je}function $n(F,ne,ue){const he=ne.isScene===!0?ne.overrideMaterial:null;for(let oe=0,Re=F.length;oe<Re;oe++){const Je=F[oe],it=Je.object,at=Je.geometry,Xe=he===null?Je.material:he,At=Je.group;it.layers.test(ue.layers)&&Us(it,ne,ue,at,Xe,At)}}function Us(F,ne,ue,he,oe,Re){F.onBeforeRender(x,ne,ue,he,oe,Re),F.modelViewMatrix.multiplyMatrices(ue.matrixWorldInverse,F.matrixWorld),F.normalMatrix.getNormalMatrix(F.modelViewMatrix),oe.onBeforeRender(x,ne,ue,he,F,Re),oe.transparent===!0&&oe.side===Ii&&oe.forceSinglePass===!1?(oe.side=Qr,oe.needsUpdate=!0,x.renderBufferDirect(ue,ne,he,oe,F,Re),oe.side=wi,oe.needsUpdate=!0,x.renderBufferDirect(ue,ne,he,oe,F,Re),oe.side=Ii):x.renderBufferDirect(ue,ne,he,oe,F,Re),F.onAfterRender(x,ne,ue,he,oe,Re)}function Ps(F,ne,ue){ne.isScene!==!0&&(ne=Le);const he=Y.get(F),oe=m.state.lights,Re=m.state.shadowsArray,Je=oe.state.version,it=Ie.getParameters(F,oe.state,Re,ne,ue),at=Ie.getProgramCacheKey(it);let Xe=he.programs;he.environment=F.isMeshStandardMaterial?ne.environment:null,he.fog=ne.fog,he.envMap=(F.isMeshStandardMaterial?pe:le).get(F.envMap||he.environment),he.envMapRotation=he.environment!==null&&F.envMap===null?ne.environmentRotation:F.envMapRotation,Xe===void 0&&(F.addEventListener("dispose",Pe),Xe=new Map,he.programs=Xe);let At=Xe.get(at);if(At!==void 0){if(he.currentProgram===At&&he.lightsStateVersion===Je)return Bf(F,it),At}else it.uniforms=Ie.getUniforms(F),F.onBuild(ue,it,x),F.onBeforeCompile(it,x),At=Ie.acquireProgram(it,at),Xe.set(at,At),he.uniforms=it.uniforms;const ft=he.uniforms;return(!F.isShaderMaterial&&!F.isRawShaderMaterial||F.clipping===!0)&&(ft.clippingPlanes=fe.uniform),Bf(F,it),he.needsLights=ks(F),he.lightsStateVersion=Je,he.needsLights&&(ft.ambientLightColor.value=oe.state.ambient,ft.lightProbe.value=oe.state.probe,ft.directionalLights.value=oe.state.directional,ft.directionalLightShadows.value=oe.state.directionalShadow,ft.spotLights.value=oe.state.spot,ft.spotLightShadows.value=oe.state.spotShadow,ft.rectAreaLights.value=oe.state.rectArea,ft.ltc_1.value=oe.state.rectAreaLTC1,ft.ltc_2.value=oe.state.rectAreaLTC2,ft.pointLights.value=oe.state.point,ft.pointLightShadows.value=oe.state.pointShadow,ft.hemisphereLights.value=oe.state.hemi,ft.directionalShadowMap.value=oe.state.directionalShadowMap,ft.directionalShadowMatrix.value=oe.state.directionalShadowMatrix,ft.spotShadowMap.value=oe.state.spotShadowMap,ft.spotLightMatrix.value=oe.state.spotLightMatrix,ft.spotLightMap.value=oe.state.spotLightMap,ft.pointShadowMap.value=oe.state.pointShadowMap,ft.pointShadowMatrix.value=oe.state.pointShadowMatrix),he.currentProgram=At,he.uniformsList=null,At}function dc(F){if(F.uniformsList===null){const ne=F.currentProgram.getUniforms();F.uniformsList=Nd.seqWithValue(ne.seq,F.uniforms)}return F.uniformsList}function Bf(F,ne){const ue=Y.get(F);ue.outputColorSpace=ne.outputColorSpace,ue.batching=ne.batching,ue.instancing=ne.instancing,ue.instancingColor=ne.instancingColor,ue.instancingMorph=ne.instancingMorph,ue.skinning=ne.skinning,ue.morphTargets=ne.morphTargets,ue.morphNormals=ne.morphNormals,ue.morphColors=ne.morphColors,ue.morphTargetsCount=ne.morphTargetsCount,ue.numClippingPlanes=ne.numClippingPlanes,ue.numIntersection=ne.numClipIntersection,ue.vertexAlphas=ne.vertexAlphas,ue.vertexTangents=ne.vertexTangents,ue.toneMapping=ne.toneMapping}function d0(F,ne,ue,he,oe){ne.isScene!==!0&&(ne=Le),k.resetTextureUnits();const Re=ne.fog,Je=he.isMeshStandardMaterial?ne.environment:null,it=T===null?x.outputColorSpace:T.isXRRenderTarget===!0?T.texture.colorSpace:cr,at=(he.isMeshStandardMaterial?pe:le).get(he.envMap||Je),Xe=he.vertexColors===!0&&!!ue.attributes.color&&ue.attributes.color.itemSize===4,At=!!ue.attributes.tangent&&(!!he.normalMap||he.anisotropy>0),ft=!!ue.morphAttributes.position,Lr=!!ue.morphAttributes.normal,er=!!ue.morphAttributes.color;let Dn=$s;he.toneMapped&&(T===null||T.isXRRenderTarget===!0)&&(Dn=x.toneMapping);const Ai=ue.morphAttributes.position||ue.morphAttributes.normal||ue.morphAttributes.color,jt=Ai!==void 0?Ai.length:0,tt=Y.get(he),Ju=m.state.lights;if(j===!0&&(de===!0||F!==b)){const Nn=F===b&&he.id===D;fe.setState(he,F,Nn)}let vn=!1;he.version===tt.__version?(tt.needsLights&&tt.lightsStateVersion!==Ju.state.version||tt.outputColorSpace!==it||oe.isBatchedMesh&&tt.batching===!1||!oe.isBatchedMesh&&tt.batching===!0||oe.isInstancedMesh&&tt.instancing===!1||!oe.isInstancedMesh&&tt.instancing===!0||oe.isSkinnedMesh&&tt.skinning===!1||!oe.isSkinnedMesh&&tt.skinning===!0||oe.isInstancedMesh&&tt.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&tt.instancingColor===!1&&oe.instanceColor!==null||oe.isInstancedMesh&&tt.instancingMorph===!0&&oe.morphTexture===null||oe.isInstancedMesh&&tt.instancingMorph===!1&&oe.morphTexture!==null||tt.envMap!==at||he.fog===!0&&tt.fog!==Re||tt.numClippingPlanes!==void 0&&(tt.numClippingPlanes!==fe.numPlanes||tt.numIntersection!==fe.numIntersection)||tt.vertexAlphas!==Xe||tt.vertexTangents!==At||tt.morphTargets!==ft||tt.morphNormals!==Lr||tt.morphColors!==er||tt.toneMapping!==Dn||tt.morphTargetsCount!==jt)&&(vn=!0):(vn=!0,tt.__version=he.version);let Qs=tt.currentProgram;vn===!0&&(Qs=Ps(he,ne,oe));let bf=!1,Uo=!1,Ca=!1;const xr=Qs.getUniforms(),Ln=tt.uniforms;if(Ke.useProgram(Qs.program)&&(bf=!0,Uo=!0,Ca=!0),he.id!==D&&(D=he.id,Uo=!0),bf||b!==F){xr.setValue(se,"projectionMatrix",F.projectionMatrix),xr.setValue(se,"viewMatrix",F.matrixWorldInverse);const Nn=xr.map.cameraPosition;Nn!==void 0&&Nn.setValue(se,Ee.setFromMatrixPosition(F.matrixWorld)),ht.logarithmicDepthBuffer&&xr.setValue(se,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(he.isMeshPhongMaterial||he.isMeshToonMaterial||he.isMeshLambertMaterial||he.isMeshBasicMaterial||he.isMeshStandardMaterial||he.isShaderMaterial)&&xr.setValue(se,"isOrthographic",F.isOrthographicCamera===!0),b!==F&&(b=F,Uo=!0,Ca=!0)}if(oe.isSkinnedMesh){xr.setOptional(se,oe,"bindMatrix"),xr.setOptional(se,oe,"bindMatrixInverse");const Nn=oe.skeleton;Nn&&(Nn.boneTexture===null&&Nn.computeBoneTexture(),xr.setValue(se,"boneTexture",Nn.boneTexture,k))}oe.isBatchedMesh&&(xr.setOptional(se,oe,"batchingTexture"),xr.setValue(se,"batchingTexture",oe._matricesTexture,k));const Ma=ue.morphAttributes;if((Ma.position!==void 0||Ma.normal!==void 0||Ma.color!==void 0)&&be.update(oe,ue,Qs),(Uo||tt.receiveShadow!==oe.receiveShadow)&&(tt.receiveShadow=oe.receiveShadow,xr.setValue(se,"receiveShadow",oe.receiveShadow)),he.isMeshGouraudMaterial&&he.envMap!==null&&(Ln.envMap.value=at,Ln.flipEnvMap.value=at.isCubeTexture&&at.isRenderTargetTexture===!1?-1:1),he.isMeshStandardMaterial&&he.envMap===null&&ne.environment!==null&&(Ln.envMapIntensity.value=ne.environmentIntensity),Uo&&(xr.setValue(se,"toneMappingExposure",x.toneMappingExposure),tt.needsLights&&f0(Ln,Ca),Re&&he.fog===!0&&je.refreshFogUniforms(Ln,Re),je.refreshMaterialUniforms(Ln,he,te,K,m.state.transmissionRenderTarget),Nd.upload(se,dc(tt),Ln,k)),he.isShaderMaterial&&he.uniformsNeedUpdate===!0&&(Nd.upload(se,dc(tt),Ln,k),he.uniformsNeedUpdate=!1),he.isSpriteMaterial&&xr.setValue(se,"center",oe.center),xr.setValue(se,"modelViewMatrix",oe.modelViewMatrix),xr.setValue(se,"normalMatrix",oe.normalMatrix),xr.setValue(se,"modelMatrix",oe.matrixWorld),he.isShaderMaterial||he.isRawShaderMaterial){const Nn=he.uniformsGroups;for(let Zu=0,$u=Nn.length;Zu<$u;Zu++){const eh=Nn[Zu];ut.update(eh,Qs),ut.bind(eh,Qs)}}return Qs}function f0(F,ne){F.ambientLightColor.needsUpdate=ne,F.lightProbe.needsUpdate=ne,F.directionalLights.needsUpdate=ne,F.directionalLightShadows.needsUpdate=ne,F.pointLights.needsUpdate=ne,F.pointLightShadows.needsUpdate=ne,F.spotLights.needsUpdate=ne,F.spotLightShadows.needsUpdate=ne,F.rectAreaLights.needsUpdate=ne,F.hemisphereLights.needsUpdate=ne}function ks(F){return F.isMeshLambertMaterial||F.isMeshToonMaterial||F.isMeshPhongMaterial||F.isMeshStandardMaterial||F.isShadowMaterial||F.isShaderMaterial&&F.lights===!0}this.getActiveCubeFace=function(){return R},this.getActiveMipmapLevel=function(){return S},this.getRenderTarget=function(){return T},this.setRenderTargetTextures=function(F,ne,ue){Y.get(F.texture).__webglTexture=ne,Y.get(F.depthTexture).__webglTexture=ue;const he=Y.get(F);he.__hasExternalTextures=!0,he.__autoAllocateDepthBuffer=ue===void 0,he.__autoAllocateDepthBuffer||Qe.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),he.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,ne){const ue=Y.get(F);ue.__webglFramebuffer=ne,ue.__useDefaultFramebuffer=ne===void 0},this.setRenderTarget=function(F,ne=0,ue=0){T=F,R=ne,S=ue;let he=!0,oe=null,Re=!1,Je=!1;if(F){const it=Y.get(F);it.__useDefaultFramebuffer!==void 0?(Ke.bindFramebuffer(se.FRAMEBUFFER,null),he=!1):it.__webglFramebuffer===void 0?k.setupRenderTarget(F):it.__hasExternalTextures&&k.rebindTextures(F,Y.get(F.texture).__webglTexture,Y.get(F.depthTexture).__webglTexture);const at=F.texture;(at.isData3DTexture||at.isDataArrayTexture||at.isCompressedArrayTexture)&&(Je=!0);const Xe=Y.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(Array.isArray(Xe[ne])?oe=Xe[ne][ue]:oe=Xe[ne],Re=!0):F.samples>0&&k.useMultisampledRTT(F)===!1?oe=Y.get(F).__webglMultisampledFramebuffer:Array.isArray(Xe)?oe=Xe[ue]:oe=Xe,M.copy(F.viewport),L.copy(F.scissor),P=F.scissorTest}else M.copy(Q).multiplyScalar(te).floor(),L.copy(z).multiplyScalar(te).floor(),P=Z;if(Ke.bindFramebuffer(se.FRAMEBUFFER,oe)&&he&&Ke.drawBuffers(F,oe),Ke.viewport(M),Ke.scissor(L),Ke.setScissorTest(P),Re){const it=Y.get(F.texture);se.framebufferTexture2D(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,se.TEXTURE_CUBE_MAP_POSITIVE_X+ne,it.__webglTexture,ue)}else if(Je){const it=Y.get(F.texture),at=ne||0;se.framebufferTextureLayer(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,it.__webglTexture,ue||0,at)}D=-1},this.readRenderTargetPixels=function(F,ne,ue,he,oe,Re,Je){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let it=Y.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&Je!==void 0&&(it=it[Je]),it){Ke.bindFramebuffer(se.FRAMEBUFFER,it);try{const at=F.texture,Xe=at.format,At=at.type;if(Xe!==vr&&dt.convert(Xe)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ft=At===Or&&(Qe.has("EXT_color_buffer_half_float")||Qe.has("EXT_color_buffer_float"));if(At!==mr&&dt.convert(At)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_TYPE)&&At!==lr&&!ft){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ne>=0&&ne<=F.width-he&&ue>=0&&ue<=F.height-oe&&se.readPixels(ne,ue,he,oe,dt.convert(Xe),dt.convert(At),Re)}finally{const at=T!==null?Y.get(T).__webglFramebuffer:null;Ke.bindFramebuffer(se.FRAMEBUFFER,at)}}},this.copyFramebufferToTexture=function(F,ne,ue=0){const he=Math.pow(2,-ue),oe=Math.floor(ne.image.width*he),Re=Math.floor(ne.image.height*he);k.setTexture2D(ne,0),se.copyTexSubImage2D(se.TEXTURE_2D,ue,0,0,F.x,F.y,oe,Re),Ke.unbindTexture()},this.copyTextureToTexture=function(F,ne,ue,he=0){const oe=ne.image.width,Re=ne.image.height,Je=dt.convert(ue.format),it=dt.convert(ue.type);k.setTexture2D(ue,0),se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,ue.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ue.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,ue.unpackAlignment),ne.isDataTexture?se.texSubImage2D(se.TEXTURE_2D,he,F.x,F.y,oe,Re,Je,it,ne.image.data):ne.isCompressedTexture?se.compressedTexSubImage2D(se.TEXTURE_2D,he,F.x,F.y,ne.mipmaps[0].width,ne.mipmaps[0].height,Je,ne.mipmaps[0].data):se.texSubImage2D(se.TEXTURE_2D,he,F.x,F.y,Je,it,ne.image),he===0&&ue.generateMipmaps&&se.generateMipmap(se.TEXTURE_2D),Ke.unbindTexture()},this.copyTextureToTexture3D=function(F,ne,ue,he,oe=0){const Re=Math.round(F.max.x-F.min.x),Je=Math.round(F.max.y-F.min.y),it=F.max.z-F.min.z+1,at=dt.convert(he.format),Xe=dt.convert(he.type);let At;if(he.isData3DTexture)k.setTexture3D(he,0),At=se.TEXTURE_3D;else if(he.isDataArrayTexture||he.isCompressedArrayTexture)k.setTexture2DArray(he,0),At=se.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,he.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,he.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,he.unpackAlignment);const ft=se.getParameter(se.UNPACK_ROW_LENGTH),Lr=se.getParameter(se.UNPACK_IMAGE_HEIGHT),er=se.getParameter(se.UNPACK_SKIP_PIXELS),Dn=se.getParameter(se.UNPACK_SKIP_ROWS),Ai=se.getParameter(se.UNPACK_SKIP_IMAGES),jt=ue.isCompressedTexture?ue.mipmaps[oe]:ue.image;se.pixelStorei(se.UNPACK_ROW_LENGTH,jt.width),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,jt.height),se.pixelStorei(se.UNPACK_SKIP_PIXELS,F.min.x),se.pixelStorei(se.UNPACK_SKIP_ROWS,F.min.y),se.pixelStorei(se.UNPACK_SKIP_IMAGES,F.min.z),ue.isDataTexture||ue.isData3DTexture?se.texSubImage3D(At,oe,ne.x,ne.y,ne.z,Re,Je,it,at,Xe,jt.data):he.isCompressedArrayTexture?se.compressedTexSubImage3D(At,oe,ne.x,ne.y,ne.z,Re,Je,it,at,jt.data):se.texSubImage3D(At,oe,ne.x,ne.y,ne.z,Re,Je,it,at,Xe,jt),se.pixelStorei(se.UNPACK_ROW_LENGTH,ft),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,Lr),se.pixelStorei(se.UNPACK_SKIP_PIXELS,er),se.pixelStorei(se.UNPACK_SKIP_ROWS,Dn),se.pixelStorei(se.UNPACK_SKIP_IMAGES,Ai),oe===0&&he.generateMipmaps&&se.generateMipmap(At),Ke.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?k.setTextureCube(F,0):F.isData3DTexture?k.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?k.setTexture2DArray(F,0):k.setTexture2D(F,0),Ke.unbindTexture()},this.resetState=function(){R=0,S=0,T=null,Ke.reset(),ct.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return vs}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===sd?"display-p3":"srgb",t.unpackColorSpace=Tt.workingColorSpace===cu?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class f8 extends Zt{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 qi,this.environmentIntensity=1,this.environmentRotation=new qi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(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),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class p8{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=RA,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Ti()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return zE("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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 i=0,s=this.stride;i<s;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ti()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(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 e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ti()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(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 fn=new H;class lg{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}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++)fn.fromBufferAttribute(this,t),fn.applyMatrix4(e),this.setXYZ(t,fn.x,fn.y,fn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)fn.fromBufferAttribute(this,t),fn.applyNormalMatrix(e),this.setXYZ(t,fn.x,fn.y,fn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)fn.fromBufferAttribute(this,t),fn.transformDirection(e),this.setXYZ(t,fn.x,fn.y,fn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Bi(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ut(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Ut(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ut(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ut(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ut(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=Bi(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Bi(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Bi(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Bi(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ut(t,this.array),n=Ut(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ut(t,this.array),n=Ut(n,this.array),i=Ut(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ut(t,this.array),n=Ut(n,this.array),i=Ut(i,this.array),s=Ut(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[i+s])}return new zr(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new lg(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[i+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const j2=new H,W2=new Ft,Y2=new Ft,A8=new H,q2=new rt,Ud=new H,cg=new Ri,X2=new rt,ug=new co;class g8 extends Xr{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=sE,this.bindMatrix=new rt,this.bindMatrixInverse=new rt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new _r),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ud),this.boundingBox.expandByPoint(Ud)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ri),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ud),this.boundingSphere.expandByPoint(Ud)}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,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),cg.copy(this.boundingSphere),cg.applyMatrix4(i),e.ray.intersectsSphere(cg)!==!1&&(X2.copy(i).invert(),ug.copy(e.ray).applyMatrix4(X2),!(this.boundingBox!==null&&ug.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,ug)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(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 Ft,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===sE?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===xb?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;W2.fromBufferAttribute(i.attributes.skinIndex,e),Y2.fromBufferAttribute(i.attributes.skinWeight,e),j2.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=Y2.getComponent(s);if(o!==0){const l=W2.getComponent(s);q2.multiplyMatrices(n.bones[l].matrixWorld,n.boneInverses[l]),t.addScaledVector(A8.copy(j2).applyMatrix4(q2),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class K2 extends Zt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class mo extends br{constructor(e=null,t=1,n=1,i,s,o,l,h,u=Ar,d=Ar,A,p){super(null,o,l,h,u,d,i,s,A,p),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const J2=new rt,m8=new rt;class hg{constructor(e=[],t=[]){this.uuid=Ti(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new rt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new rt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const l=e[s]?e[s].matrixWorld:m8;J2.multiplyMatrices(l,t[s]),J2.toArray(n,s*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new hg(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new mo(t,e,e,vr,lr);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 i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const s=e.bones[n];let o=t[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new K2),this.bones.push(o),this.boneInverses.push(new rt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,s=t.length;i<s;i++){const o=t[i];e.bones.push(o.uuid);const l=n[i];e.boneInverses.push(l.toArray())}return e}}class dg extends zr{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}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 Dl=new rt,Z2=new rt,Pd=[],$2=new _r,v8=new rt,Eu=new Xr,xu=new Ri;class _8 extends Xr{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new dg(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,v8)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new _r),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Dl),$2.copy(e.boundingBox).applyMatrix4(Dl),this.boundingBox.union($2)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ri),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Dl),xu.copy(e.boundingSphere).applyMatrix4(Dl),this.boundingSphere.union(xu)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,s=n.length+1,o=e*s+1;for(let l=0;l<n.length;l++)n[l]=i[o+l]}raycast(e,t){const n=this.matrixWorld,i=this.count;if(Eu.geometry=this.geometry,Eu.material=this.material,Eu.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),xu.copy(this.boundingSphere),xu.applyMatrix4(n),e.ray.intersectsSphere(xu)!==!1))for(let s=0;s<i;s++){this.getMatrixAt(s,Dl),Z2.multiplyMatrices(n,Dl),Eu.matrixWorld=Z2,Eu.raycast(e,Pd);for(let o=0,l=Pd.length;o<l;o++){const h=Pd[o];h.instanceId=s,h.object=this,t.push(h)}Pd.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new dg(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const n=t.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new mo(new Float32Array(i*this.count),i,this.count,ta,lr));const s=this.morphTexture.source.data.data;let o=0;for(let u=0;u<n.length;u++)o+=n[u];const l=this.geometry.morphTargetsRelative?1:1-o,h=i*e;s[h]=l,s.set(n,h+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}class ex extends Xi{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new He(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 tx=new H,rx=new H,nx=new rt,fg=new co,kd=new Ri;class pg extends Zt{constructor(e=new Vn,t=new ex){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,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(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,s=t.count;i<s;i++)tx.fromBufferAttribute(t,i-1),rx.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=tx.distanceTo(rx);e.setAttribute("lineDistance",new Ni(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,s=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),kd.copy(n.boundingSphere),kd.applyMatrix4(i),kd.radius+=s,e.ray.intersectsSphere(kd)===!1)return;nx.copy(i).invert(),fg.copy(e.ray).applyMatrix4(nx);const l=s/((this.scale.x+this.scale.y+this.scale.z)/3),h=l*l,u=new H,d=new H,A=new H,p=new H,g=this.isLineSegments?2:1,_=n.index,E=n.attributes.position;if(_!==null){const m=Math.max(0,o.start),v=Math.min(_.count,o.start+o.count);for(let w=m,x=v-1;w<x;w+=g){const I=_.getX(w),R=_.getX(w+1);if(u.fromBufferAttribute(E,I),d.fromBufferAttribute(E,R),fg.distanceSqToSegment(u,d,p,A)>h)continue;p.applyMatrix4(this.matrixWorld);const S=e.ray.origin.distanceTo(p);S<e.near||S>e.far||t.push({distance:S,point:A.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),v=Math.min(E.count,o.start+o.count);for(let w=m,x=v-1;w<x;w+=g){if(u.fromBufferAttribute(E,w),d.fromBufferAttribute(E,w+1),fg.distanceSqToSegment(u,d,p,A)>h)continue;p.applyMatrix4(this.matrixWorld);const I=e.ray.origin.distanceTo(p);I<e.near||I>e.far||t.push({distance:I,point:A.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,s=n.length;i<s;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}}const ix=new H,sx=new H;class y8 extends pg{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,s=t.count;i<s;i+=2)ix.fromBufferAttribute(t,i),sx.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ix.distanceTo(sx);e.setAttribute("lineDistance",new Ni(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class E8 extends pg{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class ax extends Xi{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new He(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 ox=new rt,Ag=new co,Qd=new Ri,Od=new H;class x8 extends Zt{constructor(e=new Vn,t=new ax){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,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,i=this.matrixWorld,s=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Qd.copy(n.boundingSphere),Qd.applyMatrix4(i),Qd.radius+=s,e.ray.intersectsSphere(Qd)===!1)return;ox.copy(i).invert(),Ag.copy(e.ray).applyMatrix4(ox);const l=s/((this.scale.x+this.scale.y+this.scale.z)/3),h=l*l,u=n.index,d=n.attributes.position;if(u!==null){const A=Math.max(0,o.start),p=Math.min(u.count,o.start+o.count);for(let g=A,_=p;g<_;g++){const E=u.getX(g);Od.fromBufferAttribute(d,E),lx(Od,E,h,i,e,t,this)}}else{const A=Math.max(0,o.start),p=Math.min(d.count,o.start+o.count);for(let g=A,_=p;g<_;g++)Od.fromBufferAttribute(d,g),lx(Od,g,h,i,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,s=n.length;i<s;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}}function lx(r,e,t,n,i,s,o){const l=Ag.distanceSqToPoint(r);if(l<t){const h=new H;Ag.closestPointToPoint(r,h),h.applyMatrix4(n);const u=i.ray.origin.distanceTo(h);if(u<i.near||u>i.far)return;s.push({distance:u,distanceToRay:Math.sqrt(l),point:h,index:e,face:null,object:o})}}class Fd extends br{constructor(e,t,n,i,s,o,l,h,u,d,A,p){super(null,o,l,h,u,d,i,s,A,p),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class w8 extends Fd{constructor(e,t,n,i,s,o){super(e,t,n,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ci}}class I8 extends Fd{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,io),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class C8 extends Cr{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class gg extends Xi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new He(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 He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=NE,this.normalScale=new Ue(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 qi,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 ai extends gg{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 Ue(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Br(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new He(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 He(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new He(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=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 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.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}}function zd(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function M8(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function S8(r){function e(i,s){return r[i]-r[s]}const t=r.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function cx(r,e,t){const n=r.length,i=new r.constructor(n);for(let s=0,o=0;o!==n;++s){const l=t[s]*e;for(let h=0;h!==e;++h)i[o++]=r[l+h]}return i}function ux(r,e,t,n){let i=1,s=r[0];for(;s!==void 0&&s[n]===void 0;)s=r[i++];if(s===void 0)return;let o=s[n];if(o!==void 0)if(Array.isArray(o))do o=s[n],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=r[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[n],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=r[i++];while(s!==void 0);else do o=s[n],o!==void 0&&(e.push(s.time),t.push(o)),s=r[i++];while(s!==void 0)}class wu{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i: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,i=t[n],s=t[n-1];e:{t:{let o;r:{n:if(!(e<i)){for(let l=n+2;;){if(i===void 0){if(e<s)break n;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===l)break;if(s=i,i=t[++n],e<i)break t}o=t.length;break r}if(!(e>=s)){const l=t[1];e<l&&(n=2,s=l);for(let h=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===h)break;if(i=s,s=t[--n-1],e>=s)break t}o=n,n=0;break r}break e}for(;n<o;){const l=n+o>>>1;e<t[l]?o=l:n=l+1}if(i=t[n],s=t[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,i)}return this.interpolate_(n,s,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=e*i;for(let o=0;o!==i;++o)t[o]=n[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class T8 extends wu{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:bE,endingEnd:bE}}intervalChanged_(e,t,n){const i=this.parameterPositions;let s=e-2,o=e+1,l=i[s],h=i[o];if(l===void 0)switch(this.getSettings_().endingStart){case RE:s=e,l=2*t-n;break;case DE:s=i.length-2,l=t+i[s]-i[s+1];break;default:s=e,l=n}if(h===void 0)switch(this.getSettings_().endingEnd){case RE:o=e,h=2*n-t;break;case DE:o=1,h=n+i[1]-i[0];break;default:o=e-1,h=t}const u=(n-t)*.5,d=this.valueSize;this._weightPrev=u/(t-l),this._weightNext=u/(h-n),this._offsetPrev=s*d,this._offsetNext=o*d}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=e*l,u=h-l,d=this._offsetPrev,A=this._offsetNext,p=this._weightPrev,g=this._weightNext,_=(n-t)/(i-t),E=_*_,m=E*_,v=-p*m+2*p*E-p*_,w=(1+p)*m+(-1.5-2*p)*E+(-.5+p)*_+1,x=(-1-g)*m+(1.5+g)*E+.5*_,I=g*m-g*E;for(let R=0;R!==l;++R)s[R]=v*o[d+R]+w*o[u+R]+x*o[h+R]+I*o[A+R];return s}}class B8 extends wu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=e*l,u=h-l,d=(n-t)/(i-t),A=1-d;for(let p=0;p!==l;++p)s[p]=o[u+p]*A+o[h+p]*d;return s}}class b8 extends wu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class $i{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=zd(t,this.TimeBufferType),this.values=zd(n,this.ValueBufferType),this.setInterpolation(i||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:zd(e.times,Array),values:zd(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new b8(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new B8(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new T8(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case lu:t=this.InterpolantFactoryMethodDiscrete;break;case ll:t=this.InterpolantFactoryMethodLinear;break;case BA:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return lu;case this.InterpolantFactoryMethodLinear:return ll;case this.InterpolantFactoryMethodSmooth:return BA}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let s=0,o=i-1;for(;s!==i&&n[s]<e;)++s;for(;o!==-1&&n[o]>t;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const l=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*l,o*l)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let l=0;l!==s;l++){const h=n[l];if(typeof h=="number"&&isNaN(h)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,l,h),e=!1;break}if(o!==null&&o>h){console.error("THREE.KeyframeTrack: Out of order keys.",this,l,h,o),e=!1;break}o=h}if(i!==void 0&&M8(i))for(let l=0,h=i.length;l!==h;++l){const u=i[l];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===BA,s=e.length-1;let o=1;for(let l=1;l<s;++l){let h=!1;const u=e[l],d=e[l+1];if(u!==d&&(l!==1||u!==e[0]))if(i)h=!0;else{const A=l*n,p=A-n,g=A+n;for(let _=0;_!==n;++_){const E=t[A+_];if(E!==t[p+_]||E!==t[g+_]){h=!0;break}}}if(h){if(l!==o){e[o]=e[l];const A=l*n,p=o*n;for(let g=0;g!==n;++g)t[p+g]=t[A+g]}++o}}if(s>0){e[o]=e[s];for(let l=s*n,h=o*n,u=0;u!==n;++u)t[h+u]=t[l+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}$i.prototype.TimeBufferType=Float32Array,$i.prototype.ValueBufferType=Float32Array,$i.prototype.DefaultInterpolation=ll;class Ll extends $i{}Ll.prototype.ValueTypeName="bool",Ll.prototype.ValueBufferType=Array,Ll.prototype.DefaultInterpolation=lu,Ll.prototype.InterpolantFactoryMethodLinear=void 0,Ll.prototype.InterpolantFactoryMethodSmooth=void 0;class hx extends $i{}hx.prototype.ValueTypeName="color";class Nl extends $i{}Nl.prototype.ValueTypeName="number";class R8 extends wu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=(n-t)/(i-t);let u=e*l;for(let d=u+l;u!==d;u+=4)Yi.slerpFlat(s,0,o,u-l,o,u,h);return s}}class vo extends $i{InterpolantFactoryMethodLinear(e){return new R8(this.times,this.values,this.getValueSize(),e)}}vo.prototype.ValueTypeName="quaternion",vo.prototype.DefaultInterpolation=ll,vo.prototype.InterpolantFactoryMethodSmooth=void 0;class Ul extends $i{}Ul.prototype.ValueTypeName="string",Ul.prototype.ValueBufferType=Array,Ul.prototype.DefaultInterpolation=lu,Ul.prototype.InterpolantFactoryMethodLinear=void 0,Ul.prototype.InterpolantFactoryMethodSmooth=void 0;class Pl extends $i{}Pl.prototype.ValueTypeName="vector";class D8{constructor(e="",t=-1,n=[],i=bb){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=Ti(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,l=n.length;o!==l;++o)t.push(N8(n[o]).scale(i));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=n.length;s!==o;++s)t.push($i.toJSON(n[s]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const s=t.length,o=[];for(let l=0;l<s;l++){let h=[],u=[];h.push((l+s-1)%s,l,(l+1)%s),u.push(0,1,0);const d=S8(h);h=cx(h,1,d),u=cx(u,1,d),!i&&h[0]===0&&(h.push(s),u.push(u[0])),o.push(new Nl(".morphTargetInfluences["+t[l].name+"]",h,u).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},s=/^([\w-]*?)([\d]+)$/;for(let l=0,h=e.length;l<h;l++){const u=e[l],d=u.name.match(s);if(d&&d.length>1){const A=d[1];let p=i[A];p||(i[A]=p=[]),p.push(u)}}const o=[];for(const l in i)o.push(this.CreateFromMorphTargetSequence(l,i[l],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(d,A,p,g,_){if(p.length!==0){const E=[],m=[];ux(p,E,m,g),E.length!==0&&_.push(new d(A,E,m))}},i=[],s=e.name||"default",o=e.fps||30,l=e.blendMode;let h=e.length||-1;const u=e.hierarchy||[];for(let d=0;d<u.length;d++){const A=u[d].keys;if(!(!A||A.length===0))if(A[0].morphTargets){const p={};let g;for(g=0;g<A.length;g++)if(A[g].morphTargets)for(let _=0;_<A[g].morphTargets.length;_++)p[A[g].morphTargets[_]]=-1;for(const _ in p){const E=[],m=[];for(let v=0;v!==A[g].morphTargets.length;++v){const w=A[g];E.push(w.time),m.push(w.morphTarget===_?1:0)}i.push(new Nl(".morphTargetInfluence["+_+"]",E,m))}h=p.length*o}else{const p=".bones["+t[d].name+"]";n(Pl,p+".position",A,"pos",i),n(vo,p+".quaternion",A,"rot",i),n(Pl,p+".scale",A,"scl",i)}}return i.length===0?null:new this(s,h,i,l)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const s=this.tracks[n];t=Math.max(t,s.times[s.times.length-1])}return this.duration=t,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 t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function L8(r){switch(r.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Nl;case"vector":case"vector2":case"vector3":case"vector4":return Pl;case"color":return hx;case"quaternion":return vo;case"bool":case"boolean":return Ll;case"string":return Ul}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+r)}function N8(r){if(r.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=L8(r.type);if(r.times===void 0){const t=[],n=[];ux(r.keys,t,n,"value"),r.times=t,r.values=n}return e.parse!==void 0?e.parse(r):new e(r.name,r.times,r.values,r.interpolation)}const ca={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class dx{constructor(e,t,n){const i=this;let s=!1,o=0,l=0,h;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){l++,s===!1&&i.onStart!==void 0&&i.onStart(d,o,l),s=!0},this.itemEnd=function(d){o++,i.onProgress!==void 0&&i.onProgress(d,o,l),o===l&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(d){i.onError!==void 0&&i.onError(d)},this.resolveURL=function(d){return h?h(d):d},this.setURLModifier=function(d){return h=d,this},this.addHandler=function(d,A){return u.push(d,A),this},this.removeHandler=function(d){const A=u.indexOf(d);return A!==-1&&u.splice(A,2),this},this.getHandler=function(d){for(let A=0,p=u.length;A<p;A+=2){const g=u[A],_=u[A+1];if(g.global&&(g.lastIndex=0),g.test(d))return _}return null}}}const U8=new dx;class ua{constructor(e){this.manager=e!==void 0?e:U8,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,s){n.load(e,i,t,s)})}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}}ua.DEFAULT_MATERIAL_NAME="__DEFAULT";const Cs={};class P8 extends Error{constructor(e,t){super(e),this.response=t}}class kl extends ua{constructor(e){super(e)}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=ca.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(Cs[e]!==void 0){Cs[e].push({onLoad:t,onProgress:n,onError:i});return}Cs[e]=[],Cs[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),l=this.mimeType,h=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=Cs[e],A=u.body.getReader(),p=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),g=p?parseInt(p):0,_=g!==0;let E=0;const m=new ReadableStream({start(v){w();function w(){A.read().then(({done:x,value:I})=>{if(x)v.close();else{E+=I.byteLength;const R=new ProgressEvent("progress",{lengthComputable:_,loaded:E,total:g});for(let S=0,T=d.length;S<T;S++){const D=d[S];D.onProgress&&D.onProgress(R)}v.enqueue(I),w()}})}}});return new Response(m)}else throw new P8(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(h){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,l));case"json":return u.json();default:if(l===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(l),A=d&&d[1]?d[1].toLowerCase():void 0,p=new TextDecoder(A);return u.arrayBuffer().then(g=>p.decode(g))}}}).then(u=>{ca.add(e,u);const d=Cs[e];delete Cs[e];for(let A=0,p=d.length;A<p;A++){const g=d[A];g.onLoad&&g.onLoad(u)}}).catch(u=>{const d=Cs[e];if(d===void 0)throw this.manager.itemError(e),u;delete Cs[e];for(let A=0,p=d.length;A<p;A++){const g=d[A];g.onError&&g.onError(u)}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}}class k8 extends ua{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ca.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const l=du("img");function h(){d(),ca.add(e,this),t&&t(this),s.manager.itemEnd(e)}function u(A){d(),i&&i(A),s.manager.itemError(e),s.manager.itemEnd(e)}function d(){l.removeEventListener("load",h,!1),l.removeEventListener("error",u,!1)}return l.addEventListener("load",h,!1),l.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(l.crossOrigin=this.crossOrigin),s.manager.itemStart(e),l.src=e,l}}class Q8 extends ua{constructor(e){super(e)}load(e,t,n,i){const s=this,o=new mo,l=new kl(this.manager);return l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setPath(this.path),l.setWithCredentials(s.withCredentials),l.load(e,function(h){let u;try{u=s.parse(h)}catch(d){if(i!==void 0)i(d);else{console.error(d);return}}u.image!==void 0?o.image=u.image:u.data!==void 0&&(o.image.width=u.width,o.image.height=u.height,o.image.data=u.data),o.wrapS=u.wrapS!==void 0?u.wrapS:Ci,o.wrapT=u.wrapT!==void 0?u.wrapT:Ci,o.magFilter=u.magFilter!==void 0?u.magFilter:gr,o.minFilter=u.minFilter!==void 0?u.minFilter:gr,o.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.colorSpace!==void 0&&(o.colorSpace=u.colorSpace),u.flipY!==void 0&&(o.flipY=u.flipY),u.format!==void 0&&(o.format=u.format),u.type!==void 0&&(o.type=u.type),u.mipmaps!==void 0&&(o.mipmaps=u.mipmaps,o.minFilter=Mi),u.mipmapCount===1&&(o.minFilter=gr),u.generateMipmaps!==void 0&&(o.generateMipmaps=u.generateMipmaps),o.needsUpdate=!0,t&&t(o,u)},n,i),o}}class fx extends ua{constructor(e){super(e)}load(e,t,n,i){const s=new br,o=new k8(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(l){s.image=l,s.needsUpdate=!0,t!==void 0&&t(s)},n,i),s}}class Hd extends Zt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new He(e),this.intensity=t}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,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}class O8 extends Hd{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new He(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const mg=new rt,px=new H,Ax=new H;class vg{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ue(512,512),this.map=null,this.mapPass=null,this.matrix=new rt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ZA,this._frameExtents=new Ue(1,1),this._viewportCount=1,this._viewports=[new Ft(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;px.setFromMatrixPosition(e.matrixWorld),t.position.copy(px),Ax.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Ax),t.updateMatrixWorld(),mg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(mg),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(mg)}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.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class F8 extends vg{constructor(){super(new dn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=ul*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(n!==t.fov||i!==t.aspect||s!==t.far)&&(t.fov=n,t.aspect=i,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class z8 extends Hd{constructor(e,t,n=0,i=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.target=new Zt,this.distance=n,this.angle=i,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new F8}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}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.shadow=e.shadow.clone(),this}}const gx=new rt,Iu=new H,_g=new H;class H8 extends vg{constructor(){super(new dn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ue(4,2),this._viewportCount=6,this._viewports=[new Ft(2,1,1,1),new Ft(0,1,1,1),new Ft(3,1,1,1),new Ft(1,1,1,1),new Ft(3,0,1,1),new Ft(1,0,1,1)],this._cubeDirections=[new H(1,0,0),new H(-1,0,0),new H(0,0,1),new H(0,0,-1),new H(0,1,0),new H(0,-1,0)],this._cubeUps=[new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,0,1),new H(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,s=e.distance||n.far;s!==n.far&&(n.far=s,n.updateProjectionMatrix()),Iu.setFromMatrixPosition(e.matrixWorld),n.position.copy(Iu),_g.copy(n.position),_g.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(_g),n.updateMatrixWorld(),i.makeTranslation(-Iu.x,-Iu.y,-Iu.z),gx.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gx)}}class G8 extends Hd{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new H8}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}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}}class V8 extends vg{constructor(){super(new _u(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class mx extends Hd{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.target=new Zt,this.shadow=new V8}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Cu{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||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 j8 extends ua{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ca.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(u=>{t&&t(u),s.manager.itemEnd(e)}).catch(u=>{i&&i(u)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const l={};l.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",l.headers=this.requestHeader;const h=fetch(e,l).then(function(u){return u.blob()}).then(function(u){return createImageBitmap(u,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(u){return ca.add(e,u),t&&t(u),s.manager.itemEnd(e),u}).catch(function(u){i&&i(u),ca.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});ca.add(e,h),s.manager.itemStart(e)}}class W8{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=vx(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=vx();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function vx(){return(typeof performance>"u"?Date:performance).now()}const yg="\\[\\]\\.:\\/",Y8=new RegExp("["+yg+"]","g"),Eg="[^"+yg+"]",q8="[^"+yg.replace("\\.","")+"]",X8=/((?:WC+[\/:])*)/.source.replace("WC",Eg),K8=/(WCOD+)?/.source.replace("WCOD",q8),J8=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Eg),Z8=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Eg),$8=new RegExp("^"+X8+K8+J8+Z8+"$"),eN=["material","materials","bones","map"];class tN{constructor(e,t,n){const i=n||Pt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].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()}}class Pt{constructor(e,t,n){this.path=t,this.parsedPath=n||Pt.parseTrackName(t),this.node=Pt.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 Pt.Composite(e,t,n):new Pt(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Y8,"")}static parseTrackName(e){const t=$8.exec(e);if(t===null)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]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=n.nodeName.substring(i+1);eN.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(s){for(let o=0;o<s.length;o++){const l=s[o];if(l.name===t||l.uuid===t)return l;const h=n(l.children);if(h)return h}return null},i=n(e.children);if(i)return i}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 i=0,s=n.length;i!==s;++i)e[t++]=n[i]}_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 i=0,s=n.length;i!==s;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=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,i=t.propertyName;let s=t.propertyIndex;if(e||(e=Pt.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let d=0;d<e.length;d++)if(e[d].name===u){u=d;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const o=e[i];if(o===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+i+" but it wasn't found.",e);return}let l=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?l=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(l=this.Versioning.MatrixWorldNeedsUpdate);let h=this.BindingType.Direct;if(s!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}h=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(h=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(h=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][l]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Pt.Composite=tN,Pt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Pt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Pt.prototype.GetterByBindingType=[Pt.prototype._getValue_direct,Pt.prototype._getValue_array,Pt.prototype._getValue_arrayElement,Pt.prototype._getValue_toArray],Pt.prototype.SetterByBindingTypeAndVersioning=[[Pt.prototype._setValue_direct,Pt.prototype._setValue_direct_setNeedsUpdate,Pt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Pt.prototype._setValue_array,Pt.prototype._setValue_array_setNeedsUpdate,Pt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Pt.prototype._setValue_arrayElement,Pt.prototype._setValue_arrayElement_setNeedsUpdate,Pt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Pt.prototype._setValue_fromArray,Pt.prototype._setValue_fromArray_setNeedsUpdate,Pt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];const _x=new rt;class rN{constructor(e,t,n=0,i=1/0){this.ray=new co(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new md,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return _x.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(_x),this}intersectObject(e,t=!0,n=[]){return xg(e,this,n,t),n.sort(yx),n}intersectObjects(e,t=!0,n=[]){for(let i=0,s=e.length;i<s;i++)xg(e[i],this,n,t);return n.sort(yx),n}}function yx(r,e){return r.distance-e.distance}function xg(r,e,t,n){if(r.layers.test(e.layers)&&r.raycast(e,t),n===!0){const i=r.children;for(let s=0,o=i.length;s<o;s++)xg(i[s],e,t,!0)}}class Ex{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Br(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const xx=new H,Gd=new H;class Ms{constructor(e=new H,t=new H){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){xx.subVectors(e,this.start),Gd.subVectors(this.end,this.start);const n=Gd.dot(Gd);let i=Gd.dot(xx)/n;return t&&(i=Br(i,0,1)),i}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Xh}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Xh);const wx={type:"change"},wg={type:"start"},Ix={type:"end"},Vd=new co,Cx=new Ji,nN=Math.cos(70*LA.DEG2RAD);class iN extends ao{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new H,this.cursor=new H,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:nl.ROTATE,MIDDLE:nl.DOLLY,RIGHT:nl.PAN},this.touches={ONE:il.ROTATE,TWO:il.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(G){G.addEventListener("keydown",fe),this._domElementKeyEvents=G},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",fe),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(wx),n.update(),s=i.NONE},this.update=function(){const G=new H,O=new Yi().setFromUnitVectors(e.up,new H(0,1,0)),ge=O.clone().invert(),ve=new H,Fe=new Yi,Pe=new H,vt=2*Math.PI;return function(Lt=null){const Nt=n.object.position;G.copy(Nt).sub(n.target),G.applyQuaternion(O),l.setFromVector3(G),n.autoRotate&&s===i.NONE&&P(M(Lt)),n.enableDamping?(l.theta+=h.theta*n.dampingFactor,l.phi+=h.phi*n.dampingFactor):(l.theta+=h.theta,l.phi+=h.phi);let Bt=n.minAzimuthAngle,_t=n.maxAzimuthAngle;isFinite(Bt)&&isFinite(_t)&&(Bt<-Math.PI?Bt+=vt:Bt>Math.PI&&(Bt-=vt),_t<-Math.PI?_t+=vt:_t>Math.PI&&(_t-=vt),Bt<=_t?l.theta=Math.max(Bt,Math.min(_t,l.theta)):l.theta=l.theta>(Bt+_t)/2?Math.max(Bt,l.theta):Math.min(_t,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(d,n.dampingFactor):n.target.add(d),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor);let fr=!1;if(n.zoomToCursor&&S||n.object.isOrthographicCamera)l.radius=Q(l.radius);else{const Vt=l.radius;l.radius=Q(l.radius*u),fr=Vt!=l.radius}if(G.setFromSpherical(l),G.applyQuaternion(ge),Nt.copy(n.target).add(G),n.object.lookAt(n.target),n.enableDamping===!0?(h.theta*=1-n.dampingFactor,h.phi*=1-n.dampingFactor,d.multiplyScalar(1-n.dampingFactor)):(h.set(0,0,0),d.set(0,0,0)),n.zoomToCursor&&S){let Vt=null;if(n.object.isPerspectiveCamera){const Er=G.length();Vt=Q(Er*u);const Rn=Er-Vt;n.object.position.addScaledVector(I,Rn),n.object.updateMatrixWorld(),fr=!!Rn}else if(n.object.isOrthographicCamera){const Er=new H(R.x,R.y,0);Er.unproject(n.object);const Rn=n.object.zoom;n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),fr=Rn!==n.object.zoom;const qt=new H(R.x,R.y,0);qt.unproject(n.object),n.object.position.sub(qt).add(Er),n.object.updateMatrixWorld(),Vt=G.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Vt!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Vt).add(n.object.position):(Vd.origin.copy(n.object.position),Vd.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(Vd.direction))<nN?e.lookAt(n.target):(Cx.setFromNormalAndCoplanarPoint(n.object.up,n.target),Vd.intersectPlane(Cx,n.target))))}else if(n.object.isOrthographicCamera){const Vt=n.object.zoom;n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),Vt!==n.object.zoom&&(n.object.updateProjectionMatrix(),fr=!0)}return u=1,S=!1,fr||ve.distanceToSquared(n.object.position)>o||8*(1-Fe.dot(n.object.quaternion))>o||Pe.distanceToSquared(n.target)>o?(n.dispatchEvent(wx),ve.copy(n.object.position),Fe.copy(n.object.quaternion),Pe.copy(n.target),!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",be),n.domElement.removeEventListener("pointerdown",le),n.domElement.removeEventListener("pointercancel",me),n.domElement.removeEventListener("wheel",Ie),n.domElement.removeEventListener("pointermove",pe),n.domElement.removeEventListener("pointerup",me),n.domElement.getRootNode().removeEventListener("keydown",Ve,{capture:!0}),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",fe),n._domElementKeyEvents=null)};const n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let s=i.NONE;const o=1e-6,l=new Ex,h=new Ex;let u=1;const d=new H,A=new Ue,p=new Ue,g=new Ue,_=new Ue,E=new Ue,m=new Ue,v=new Ue,w=new Ue,x=new Ue,I=new H,R=new Ue;let S=!1;const T=[],D={};let b=!1;function M(G){return G!==null?2*Math.PI/60*n.autoRotateSpeed*G:2*Math.PI/60/60*n.autoRotateSpeed}function L(G){const O=Math.abs(G*.01);return Math.pow(.95,n.zoomSpeed*O)}function P(G){h.theta-=G}function N(G){h.phi-=G}const W=function(){const G=new H;return function(O,ge){G.setFromMatrixColumn(ge,0),G.multiplyScalar(-O),d.add(G)}}(),X=function(){const G=new H;return function(O,ge){n.screenSpacePanning===!0?G.setFromMatrixColumn(ge,1):(G.setFromMatrixColumn(ge,0),G.crossVectors(n.object.up,G)),G.multiplyScalar(O),d.add(G)}}(),K=function(){const G=new H;return function(O,ge){const ve=n.domElement;if(n.object.isPerspectiveCamera){const Fe=n.object.position;G.copy(Fe).sub(n.target);let Pe=G.length();Pe*=Math.tan(n.object.fov/2*Math.PI/180),W(2*O*Pe/ve.clientHeight,n.object.matrix),X(2*ge*Pe/ve.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(W(O*(n.object.right-n.object.left)/n.object.zoom/ve.clientWidth,n.object.matrix),X(ge*(n.object.top-n.object.bottom)/n.object.zoom/ve.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function te(G){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u/=G:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function V(G){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u*=G:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function ee(G,O){if(!n.zoomToCursor)return;S=!0;const ge=n.domElement.getBoundingClientRect(),ve=G-ge.left,Fe=O-ge.top,Pe=ge.width,vt=ge.height;R.x=ve/Pe*2-1,R.y=-(Fe/vt)*2+1,I.set(R.x,R.y,1).unproject(n.object).sub(n.object.position).normalize()}function Q(G){return Math.max(n.minDistance,Math.min(n.maxDistance,G))}function z(G){A.set(G.clientX,G.clientY)}function Z(G){ee(G.clientX,G.clientX),v.set(G.clientX,G.clientY)}function re(G){_.set(G.clientX,G.clientY)}function j(G){p.set(G.clientX,G.clientY),g.subVectors(p,A).multiplyScalar(n.rotateSpeed);const O=n.domElement;P(2*Math.PI*g.x/O.clientHeight),N(2*Math.PI*g.y/O.clientHeight),A.copy(p),n.update()}function de(G){w.set(G.clientX,G.clientY),x.subVectors(w,v),x.y>0?te(L(x.y)):x.y<0&&V(L(x.y)),v.copy(w),n.update()}function Ae(G){E.set(G.clientX,G.clientY),m.subVectors(E,_).multiplyScalar(n.panSpeed),K(m.x,m.y),_.copy(E),n.update()}function _e(G){ee(G.clientX,G.clientY),G.deltaY<0?V(L(G.deltaY)):G.deltaY>0&&te(L(G.deltaY)),n.update()}function Ee(G){let O=!1;switch(G.code){case n.keys.UP:G.ctrlKey||G.metaKey||G.shiftKey?N(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(0,n.keyPanSpeed),O=!0;break;case n.keys.BOTTOM:G.ctrlKey||G.metaKey||G.shiftKey?N(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(0,-n.keyPanSpeed),O=!0;break;case n.keys.LEFT:G.ctrlKey||G.metaKey||G.shiftKey?P(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(n.keyPanSpeed,0),O=!0;break;case n.keys.RIGHT:G.ctrlKey||G.metaKey||G.shiftKey?P(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):K(-n.keyPanSpeed,0),O=!0;break}O&&(G.preventDefault(),n.update())}function Le(G){if(T.length===1)A.set(G.pageX,G.pageY);else{const O=ut(G),ge=.5*(G.pageX+O.x),ve=.5*(G.pageY+O.y);A.set(ge,ve)}}function st(G){if(T.length===1)_.set(G.pageX,G.pageY);else{const O=ut(G),ge=.5*(G.pageX+O.x),ve=.5*(G.pageY+O.y);_.set(ge,ve)}}function se(G){const O=ut(G),ge=G.pageX-O.x,ve=G.pageY-O.y,Fe=Math.sqrt(ge*ge+ve*ve);v.set(0,Fe)}function et(G){n.enableZoom&&se(G),n.enablePan&&st(G)}function Qe(G){n.enableZoom&&se(G),n.enableRotate&&Le(G)}function ht(G){if(T.length==1)p.set(G.pageX,G.pageY);else{const ge=ut(G),ve=.5*(G.pageX+ge.x),Fe=.5*(G.pageY+ge.y);p.set(ve,Fe)}g.subVectors(p,A).multiplyScalar(n.rotateSpeed);const O=n.domElement;P(2*Math.PI*g.x/O.clientHeight),N(2*Math.PI*g.y/O.clientHeight),A.copy(p)}function Ke(G){if(T.length===1)E.set(G.pageX,G.pageY);else{const O=ut(G),ge=.5*(G.pageX+O.x),ve=.5*(G.pageY+O.y);E.set(ge,ve)}m.subVectors(E,_).multiplyScalar(n.panSpeed),K(m.x,m.y),_.copy(E)}function pt(G){const O=ut(G),ge=G.pageX-O.x,ve=G.pageY-O.y,Fe=Math.sqrt(ge*ge+ve*ve);w.set(0,Fe),x.set(0,Math.pow(w.y/v.y,n.zoomSpeed)),te(x.y),v.copy(w);const Pe=(G.pageX+O.x)*.5,vt=(G.pageY+O.y)*.5;ee(Pe,vt)}function Y(G){n.enableZoom&&pt(G),n.enablePan&&Ke(G)}function k(G){n.enableZoom&&pt(G),n.enableRotate&&ht(G)}function le(G){n.enabled!==!1&&(T.length===0&&(n.domElement.setPointerCapture(G.pointerId),n.domElement.addEventListener("pointermove",pe),n.domElement.addEventListener("pointerup",me)),!dt(G)&&(nt(G),G.pointerType==="touch"?De(G):ye(G)))}function pe(G){n.enabled!==!1&&(G.pointerType==="touch"?Be(G):Ge(G))}function me(G){switch(lt(G),T.length){case 0:n.domElement.releasePointerCapture(G.pointerId),n.domElement.removeEventListener("pointermove",pe),n.domElement.removeEventListener("pointerup",me),n.dispatchEvent(Ix),s=i.NONE;break;case 1:const O=T[0],ge=D[O];De({pointerId:O,pageX:ge.x,pageY:ge.y});break}}function ye(G){let O;switch(G.button){case 0:O=n.mouseButtons.LEFT;break;case 1:O=n.mouseButtons.MIDDLE;break;case 2:O=n.mouseButtons.RIGHT;break;default:O=-1}switch(O){case nl.DOLLY:if(n.enableZoom===!1)return;Z(G),s=i.DOLLY;break;case nl.ROTATE:if(G.ctrlKey||G.metaKey||G.shiftKey){if(n.enablePan===!1)return;re(G),s=i.PAN}else{if(n.enableRotate===!1)return;z(G),s=i.ROTATE}break;case nl.PAN:if(G.ctrlKey||G.metaKey||G.shiftKey){if(n.enableRotate===!1)return;z(G),s=i.ROTATE}else{if(n.enablePan===!1)return;re(G),s=i.PAN}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(wg)}function Ge(G){switch(s){case i.ROTATE:if(n.enableRotate===!1)return;j(G);break;case i.DOLLY:if(n.enableZoom===!1)return;de(G);break;case i.PAN:if(n.enablePan===!1)return;Ae(G);break}}function Ie(G){n.enabled===!1||n.enableZoom===!1||s!==i.NONE||(G.preventDefault(),n.dispatchEvent(wg),_e(je(G)),n.dispatchEvent(Ix))}function je(G){const O=G.deltaMode,ge={clientX:G.clientX,clientY:G.clientY,deltaY:G.deltaY};switch(O){case 1:ge.deltaY*=16;break;case 2:ge.deltaY*=100;break}return G.ctrlKey&&!b&&(ge.deltaY*=10),ge}function Ve(G){G.key==="Control"&&(b=!0,n.domElement.getRootNode().addEventListener("keyup",Me,{passive:!0,capture:!0}))}function Me(G){G.key==="Control"&&(b=!1,n.domElement.getRootNode().removeEventListener("keyup",Me,{passive:!0,capture:!0}))}function fe(G){n.enabled===!1||n.enablePan===!1||Ee(G)}function De(G){switch(ct(G),T.length){case 1:switch(n.touches.ONE){case il.ROTATE:if(n.enableRotate===!1)return;Le(G),s=i.TOUCH_ROTATE;break;case il.PAN:if(n.enablePan===!1)return;st(G),s=i.TOUCH_PAN;break;default:s=i.NONE}break;case 2:switch(n.touches.TWO){case il.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;et(G),s=i.TOUCH_DOLLY_PAN;break;case il.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Qe(G),s=i.TOUCH_DOLLY_ROTATE;break;default:s=i.NONE}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(wg)}function Be(G){switch(ct(G),s){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;ht(G),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;Ke(G),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Y(G),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;k(G),n.update();break;default:s=i.NONE}}function be(G){n.enabled!==!1&&G.preventDefault()}function nt(G){T.push(G.pointerId)}function lt(G){delete D[G.pointerId];for(let O=0;O<T.length;O++)if(T[O]==G.pointerId){T.splice(O,1);return}}function dt(G){for(let O=0;O<T.length;O++)if(T[O]==G.pointerId)return!0;return!1}function ct(G){let O=D[G.pointerId];O===void 0&&(O=new Ue,D[G.pointerId]=O),O.set(G.pageX,G.pageY)}function ut(G){const O=G.pointerId===T[0]?T[1]:T[0];return D[O]}n.domElement.addEventListener("contextmenu",be),n.domElement.addEventListener("pointerdown",le),n.domElement.addEventListener("pointercancel",me),n.domElement.addEventListener("wheel",Ie,{passive:!1}),n.domElement.getRootNode().addEventListener("keydown",Ve,{passive:!0,capture:!0}),this.update()}}function Mx(r,e){if(e===Rb)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),r;if(e===bA||e===LE){let t=r.getIndex();if(t===null){const o=[],l=r.getAttribute("position");if(l!==void 0){for(let h=0;h<l.count;h++)o.push(h);r.setIndex(o),t=r.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),r}const n=t.count-2,i=[];if(e===bA)for(let o=1;o<=n;o++)i.push(t.getX(0)),i.push(t.getX(o)),i.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(i.push(t.getX(o)),i.push(t.getX(o+1)),i.push(t.getX(o+2))):(i.push(t.getX(o+2)),i.push(t.getX(o+1)),i.push(t.getX(o)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=r.clone();return s.setIndex(i),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),r}class sN extends ua{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new uN(t)}),this.register(function(t){return new _N(t)}),this.register(function(t){return new yN(t)}),this.register(function(t){return new EN(t)}),this.register(function(t){return new dN(t)}),this.register(function(t){return new fN(t)}),this.register(function(t){return new pN(t)}),this.register(function(t){return new AN(t)}),this.register(function(t){return new cN(t)}),this.register(function(t){return new gN(t)}),this.register(function(t){return new hN(t)}),this.register(function(t){return new vN(t)}),this.register(function(t){return new mN(t)}),this.register(function(t){return new oN(t)}),this.register(function(t){return new xN(t)}),this.register(function(t){return new wN(t)})}load(e,t,n,i){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const u=Cu.extractUrlBase(e);o=Cu.resolveURL(u,this.path)}else o=Cu.extractUrlBase(e);this.manager.itemStart(e);const l=function(u){i?i(u):console.error(u),s.manager.itemError(e),s.manager.itemEnd(e)},h=new kl(this.manager);h.setPath(this.path),h.setResponseType("arraybuffer"),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(e,function(u){try{s.parse(u,o,function(d){t(d),s.manager.itemEnd(e)},l)}catch(d){l(d)}},n,l)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let s;const o={},l={},h=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(h.decode(new Uint8Array(e,0,4))===Sx){try{o[wt.KHR_BINARY_GLTF]=new IN(e)}catch(d){i&&i(d);return}s=JSON.parse(o[wt.KHR_BINARY_GLTF].content)}else s=JSON.parse(h.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const u=new kN(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const A=this.pluginCallbacks[d](u);A.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),l[A.name]=A,o[A.name]=!0}if(s.extensionsUsed)for(let d=0;d<s.extensionsUsed.length;++d){const A=s.extensionsUsed[d],p=s.extensionsRequired||[];switch(A){case wt.KHR_MATERIALS_UNLIT:o[A]=new lN;break;case wt.KHR_DRACO_MESH_COMPRESSION:o[A]=new CN(s,this.dracoLoader);break;case wt.KHR_TEXTURE_TRANSFORM:o[A]=new MN;break;case wt.KHR_MESH_QUANTIZATION:o[A]=new SN;break;default:p.indexOf(A)>=0&&l[A]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+A+'".')}}u.setExtensions(o),u.setPlugins(l),u.parse(n,i)}parseAsync(e,t){const n=this;return new Promise(function(i,s){n.parse(e,t,i,s)})}}function aN(){let r={};return{get:function(e){return r[e]},add:function(e,t){r[e]=t},remove:function(e){delete r[e]},removeAll:function(){r={}}}}const wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class oN{constructor(e){this.parser=e,this.name=wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){const s=t[n];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let i=t.cache.get(n);if(i)return i;const s=t.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let l;const h=new He(16777215);o.color!==void 0&&h.setRGB(o.color[0],o.color[1],o.color[2],cr);const u=o.range!==void 0?o.range:0;switch(o.type){case"directional":l=new mx(h),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new G8(h),l.distance=u;break;case"spot":l=new z8(h),l.distance=u,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,l.angle=o.spot.outerConeAngle,l.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return l.position.set(0,0,0),l.decay=2,da(l,o),o.intensity!==void 0&&(l.intensity=o.intensity),l.name=t.createUniqueName(o.name||"light_"+e),i=Promise.resolve(l),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,i=n.json.nodes[e],s=(i.extensions&&i.extensions[this.name]||{}).light;return s===void 0?null:this._loadLight(s).then(function(o){return n._getNodeRef(t.cache,s,o)})}}class lN{constructor(){this.name=wt.KHR_MATERIALS_UNLIT}getMaterialType(){return Ki}extendParams(e,t,n){const i=[];e.color=new He(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],cr),e.opacity=o[3]}s.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",s.baseColorTexture,Fr))}return Promise.all(i)}}class cN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name].emissiveStrength;return i!==void 0&&(t.emissiveIntensity=i),Promise.resolve()}}class uN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const l=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Ue(l,l)}return Promise.all(s)}}class hN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class dN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new He(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=i.extensions[this.name];if(o.sheenColorFactor!==void 0){const l=o.sheenColorFactor;t.sheenColor.setRGB(l[0],l[1],l[2],cr)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,Fr)),o.sheenRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class fN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class pN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const l=o.attenuationColor||[1,1,1];return t.attenuationColor=new He().setRGB(l[0],l[1],l[2],cr),Promise.all(s)}}class AN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name];return t.ior=i.ior!==void 0?i.ior:1.5,Promise.resolve()}}class gN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const l=o.specularColorFactor||[1,1,1];return t.specularColor=new He().setRGB(l[0],l[1],l[2],cr),o.specularColorTexture!==void 0&&s.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,Fr)),Promise.all(s)}}class mN{constructor(e){this.parser=e,this.name=wt.EXT_MATERIALS_BUMP}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class vN{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return!t.extensions||!t.extensions[this.name]?null:ai}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class _N{constructor(e){this.parser=e,this.name=wt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const s=i.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class yN{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,s=i.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],l=i.images[o.source];let h=n.textureLoader;if(l.uri){const u=n.options.manager.getHandler(l.uri);u!==null&&(h=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,o.source,h);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class EN{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,s=i.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],l=i.images[o.source];let h=n.textureLoader;if(l.uri){const u=n.options.manager.getHandler(l.uri);u!==null&&(h=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,o.source,h);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class xN{constructor(e){this.name=wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const i=n.extensions[this.name],s=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(l){const h=i.byteOffset||0,u=i.byteLength||0,d=i.count,A=i.byteStride,p=new Uint8Array(l,h,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,A,p,i.mode,i.filter).then(function(g){return g.buffer}):o.ready.then(function(){const g=new ArrayBuffer(d*A);return o.decodeGltfBuffer(new Uint8Array(g),d,A,p,i.mode,i.filter),g})})}else return null}}class wN{constructor(e){this.name=wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const i=t.meshes[n.mesh];for(const h of i.primitives)if(h.mode!==oi.TRIANGLES&&h.mode!==oi.TRIANGLE_STRIP&&h.mode!==oi.TRIANGLE_FAN&&h.mode!==void 0)return null;const s=n.extensions[this.name].attributes,o=[],l={};for(const h in s)o.push(this.parser.getDependency("accessor",s[h]).then(u=>(l[h]=u,l[h])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(h=>{const u=h.pop(),d=u.isGroup?u.children:[u],A=h[0].count,p=[];for(const g of d){const _=new rt,E=new H,m=new Yi,v=new H(1,1,1),w=new _8(g.geometry,g.material,A);for(let x=0;x<A;x++)l.TRANSLATION&&E.fromBufferAttribute(l.TRANSLATION,x),l.ROTATION&&m.fromBufferAttribute(l.ROTATION,x),l.SCALE&&v.fromBufferAttribute(l.SCALE,x),w.setMatrixAt(x,_.compose(E,m,v));for(const x in l)if(x==="_COLOR_0"){const I=l[x];w.instanceColor=new dg(I.array,I.itemSize,I.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&g.geometry.setAttribute(x,l[x]);Zt.prototype.copy.call(w,g),this.parser.assignFinalMaterial(w),p.push(w)}return u.isGroup?(u.clear(),u.add(...p),u):p[0]}))}}const Sx="glTF",Mu=12,Tx={JSON:1313821514,BIN:5130562};class IN{constructor(e){this.name=wt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,Mu),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Sx)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-Mu,s=new DataView(e,Mu);let o=0;for(;o<i;){const l=s.getUint32(o,!0);o+=4;const h=s.getUint32(o,!0);if(o+=4,h===Tx.JSON){const u=new Uint8Array(e,Mu+o,l);this.content=n.decode(u)}else if(h===Tx.BIN){const u=Mu+o;this.body=e.slice(u,u+l)}o+=l}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class CN{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=wt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,i=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,l={},h={},u={};for(const d in o){const A=Cg[d]||d.toLowerCase();l[A]=o[d]}for(const d in e.attributes){const A=Cg[d]||d.toLowerCase();if(o[d]!==void 0){const p=n.accessors[e.attributes[d]],g=Ql[p.componentType];u[A]=g.name,h[A]=p.normalized===!0}}return t.getDependency("bufferView",s).then(function(d){return new Promise(function(A,p){i.decodeDracoFile(d,function(g){for(const _ in g.attributes){const E=g.attributes[_],m=h[_];m!==void 0&&(E.normalized=m)}A(g)},l,u,cr,p)})})}}class MN{constructor(){this.name=wt.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class SN{constructor(){this.name=wt.KHR_MESH_QUANTIZATION}}class Bx extends wu{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=e*i*3+i;for(let o=0;o!==i;o++)t[o]=n[s+o];return t}interpolate_(e,t,n,i){const s=this.resultBuffer,o=this.sampleValues,l=this.valueSize,h=l*2,u=l*3,d=i-t,A=(n-t)/d,p=A*A,g=p*A,_=e*u,E=_-u,m=-2*g+3*p,v=g-p,w=1-m,x=v-p+A;for(let I=0;I!==l;I++){const R=o[E+I+l],S=o[E+I+h]*d,T=o[_+I+l],D=o[_+I]*d;s[I]=w*R+x*S+m*T+v*D}return s}}const TN=new Yi;class BN extends Bx{interpolate_(e,t,n,i){const s=super.interpolate_(e,t,n,i);return TN.fromArray(s).normalize().toArray(s),s}}const oi={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Ql={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},bx={9728:Ar,9729:gr,9984:oE,9985:$h,9986:nu,9987:Mi},Rx={33071:Ci,33648:Zh,10497:ea},Ig={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Cg={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},ha={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},bN={CUBICSPLINE:void 0,LINEAR:ll,STEP:lu},Mg={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function RN(r){return r.DefaultMaterial===void 0&&(r.DefaultMaterial=new gg({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:wi})),r.DefaultMaterial}function _o(r,e,t){for(const n in t.extensions)r[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function da(r,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(r.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function DN(r,e,t){let n=!1,i=!1,s=!1;for(let u=0,d=e.length;u<d;u++){const A=e[u];if(A.POSITION!==void 0&&(n=!0),A.NORMAL!==void 0&&(i=!0),A.COLOR_0!==void 0&&(s=!0),n&&i&&s)break}if(!n&&!i&&!s)return Promise.resolve(r);const o=[],l=[],h=[];for(let u=0,d=e.length;u<d;u++){const A=e[u];if(n){const p=A.POSITION!==void 0?t.getDependency("accessor",A.POSITION):r.attributes.position;o.push(p)}if(i){const p=A.NORMAL!==void 0?t.getDependency("accessor",A.NORMAL):r.attributes.normal;l.push(p)}if(s){const p=A.COLOR_0!==void 0?t.getDependency("accessor",A.COLOR_0):r.attributes.color;h.push(p)}}return Promise.all([Promise.all(o),Promise.all(l),Promise.all(h)]).then(function(u){const d=u[0],A=u[1],p=u[2];return n&&(r.morphAttributes.position=d),i&&(r.morphAttributes.normal=A),s&&(r.morphAttributes.color=p),r.morphTargetsRelative=!0,r})}function LN(r,e){if(r.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)r.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(r.morphTargetInfluences.length===t.length){r.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)r.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function NN(r){let e;const t=r.extensions&&r.extensions[wt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Sg(t.attributes):e=r.indices+":"+Sg(r.attributes)+":"+r.mode,r.targets!==void 0)for(let n=0,i=r.targets.length;n<i;n++)e+=":"+Sg(r.targets[n]);return e}function Sg(r){let e="";const t=Object.keys(r).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+r[t[n]]+";";return e}function Tg(r){switch(r){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function UN(r){return r.search(/\.jpe?g($|\?)/i)>0||r.search(/^data\:image\/jpeg/)===0?"image/jpeg":r.search(/\.webp($|\?)/i)>0||r.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const PN=new rt;class kN{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new aN,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,s=-1;typeof navigator<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,s=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||i&&s<98?this.textureLoader=new fx(this.options.manager):this.textureLoader=new j8(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new kl(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,i=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const l={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:n,userData:{}};return _o(s,l,i),da(l,i),Promise.all(n._invokeAll(function(h){return h.afterRoot&&h.afterRoot(l)})).then(function(){for(const h of l.scenes)h.updateMatrixWorld();e(l)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,s=t.length;i<s;i++){const o=t[i].joints;for(let l=0,h=o.length;l<h;l++)e[o[l]].isBone=!0}for(let i=0,s=e.length;i<s;i++){const o=e[i];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const i=n.clone(),s=(o,l)=>{const h=this.associations.get(o);h!=null&&this.associations.set(l,h);for(const[u,d]of o.children.entries())s(d,l.children[u])};return s(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const i=e(t[n]);if(i)return i}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let i=0;i<t.length;i++){const s=e(t[i]);s&&n.push(s)}return n}getDependency(e,t){const n=e+":"+t;let i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":i=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(s,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[wt.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(s,o){n.load(Cu.resolveURL(t.uri,i.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const i=t.byteLength||0,s=t.byteOffset||0;return n.slice(s,s+i)})}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){const o=Ig[i.type],l=Ql[i.componentType],h=i.normalized===!0,u=new l(i.count*o);return Promise.resolve(new zr(u,o,h))}const s=[];return i.bufferView!==void 0?s.push(this.getDependency("bufferView",i.bufferView)):s.push(null),i.sparse!==void 0&&(s.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(s).then(function(o){const l=o[0],h=Ig[i.type],u=Ql[i.componentType],d=u.BYTES_PER_ELEMENT,A=d*h,p=i.byteOffset||0,g=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,_=i.normalized===!0;let E,m;if(g&&g!==A){const v=Math.floor(p/g),w="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+v+":"+i.count;let x=t.cache.get(w);x||(E=new u(l,v*g,i.count*g/d),x=new p8(E,g/d),t.cache.add(w,x)),m=new lg(x,h,p%g/d,_)}else l===null?E=new u(i.count*h):E=new u(l,p,i.count*h),m=new zr(E,h,_);if(i.sparse!==void 0){const v=Ig.SCALAR,w=Ql[i.sparse.indices.componentType],x=i.sparse.indices.byteOffset||0,I=i.sparse.values.byteOffset||0,R=new w(o[1],x,i.sparse.count*v),S=new u(o[2],I,i.sparse.count*h);l!==null&&(m=new zr(m.array.slice(),m.itemSize,m.normalized));for(let T=0,D=R.length;T<D;T++){const b=R[T];if(m.setX(b,S[T*h]),h>=2&&m.setY(b,S[T*h+1]),h>=3&&m.setZ(b,S[T*h+2]),h>=4&&m.setW(b,S[T*h+3]),h>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m})}loadTexture(e){const t=this.json,n=this.options,i=t.textures[e].source,s=t.images[i];let o=this.textureLoader;if(s.uri){const l=n.manager.getHandler(s.uri);l!==null&&(o=l)}return this.loadTextureImage(e,i,o)}loadTextureImage(e,t,n){const i=this,s=this.json,o=s.textures[e],l=s.images[t],h=(l.uri||l.bufferView)+":"+o.sampler;if(this.textureCache[h])return this.textureCache[h];const u=this.loadImageSource(t,n).then(function(d){d.flipY=!1,d.name=o.name||l.name||"",d.name===""&&typeof l.uri=="string"&&l.uri.startsWith("data:image/")===!1&&(d.name=l.uri);const A=(s.samplers||{})[o.sampler]||{};return d.magFilter=bx[A.magFilter]||gr,d.minFilter=bx[A.minFilter]||Mi,d.wrapS=Rx[A.wrapS]||ea,d.wrapT=Rx[A.wrapT]||ea,i.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[h]=u,u}loadImageSource(e,t){const n=this,i=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(A=>A.clone());const o=i.images[e],l=self.URL||self.webkitURL;let h=o.uri||"",u=!1;if(o.bufferView!==void 0)h=n.getDependency("bufferView",o.bufferView).then(function(A){u=!0;const p=new Blob([A],{type:o.mimeType});return h=l.createObjectURL(p),h});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(h).then(function(A){return new Promise(function(p,g){let _=p;t.isImageBitmapLoader===!0&&(_=function(E){const m=new br(E);m.needsUpdate=!0,p(m)}),t.load(Cu.resolveURL(A,s.path),_,void 0,g)})}).then(function(A){return u===!0&&l.revokeObjectURL(h),A.userData.mimeType=o.mimeType||UN(o.uri),A}).catch(function(A){throw console.error("THREE.GLTFLoader: Couldn't load texture",h),A});return this.sourceCache[e]=d,d}assignTexture(e,t,n,i){const s=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),s.extensions[wt.KHR_TEXTURE_TRANSFORM]){const l=n.extensions!==void 0?n.extensions[wt.KHR_TEXTURE_TRANSFORM]:void 0;if(l){const h=s.associations.get(o);o=s.extensions[wt.KHR_TEXTURE_TRANSFORM].extendTexture(o,l),s.associations.set(o,h)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const l="PointsMaterial:"+n.uuid;let h=this.cache.get(l);h||(h=new ax,Xi.prototype.copy.call(h,n),h.color.copy(n.color),h.map=n.map,h.sizeAttenuation=!1,this.cache.add(l,h)),n=h}else if(e.isLine){const l="LineBasicMaterial:"+n.uuid;let h=this.cache.get(l);h||(h=new ex,Xi.prototype.copy.call(h,n),h.color.copy(n.color),h.map=n.map,this.cache.add(l,h)),n=h}if(i||s||o){let l="ClonedMaterial:"+n.uuid+":";i&&(l+="derivative-tangents:"),s&&(l+="vertex-colors:"),o&&(l+="flat-shading:");let h=this.cache.get(l);h||(h=n.clone(),s&&(h.vertexColors=!0),o&&(h.flatShading=!0),i&&(h.normalScale&&(h.normalScale.y*=-1),h.clearcoatNormalScale&&(h.clearcoatNormalScale.y*=-1)),this.cache.add(l,h),this.associations.set(h,this.associations.get(n))),n=h}e.material=n}getMaterialType(){return gg}loadMaterial(e){const t=this,n=this.json,i=this.extensions,s=n.materials[e];let o;const l={},h=s.extensions||{},u=[];if(h[wt.KHR_MATERIALS_UNLIT]){const A=i[wt.KHR_MATERIALS_UNLIT];o=A.getMaterialType(),u.push(A.extendParams(l,s,t))}else{const A=s.pbrMetallicRoughness||{};if(l.color=new He(1,1,1),l.opacity=1,Array.isArray(A.baseColorFactor)){const p=A.baseColorFactor;l.color.setRGB(p[0],p[1],p[2],cr),l.opacity=p[3]}A.baseColorTexture!==void 0&&u.push(t.assignTexture(l,"map",A.baseColorTexture,Fr)),l.metalness=A.metallicFactor!==void 0?A.metallicFactor:1,l.roughness=A.roughnessFactor!==void 0?A.roughnessFactor:1,A.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(l,"metalnessMap",A.metallicRoughnessTexture)),u.push(t.assignTexture(l,"roughnessMap",A.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,l)})))}s.doubleSided===!0&&(l.side=Ii);const d=s.alphaMode||Mg.OPAQUE;if(d===Mg.BLEND?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,d===Mg.MASK&&(l.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==Ki&&(u.push(t.assignTexture(l,"normalMap",s.normalTexture)),l.normalScale=new Ue(1,1),s.normalTexture.scale!==void 0)){const A=s.normalTexture.scale;l.normalScale.set(A,A)}if(s.occlusionTexture!==void 0&&o!==Ki&&(u.push(t.assignTexture(l,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(l.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==Ki){const A=s.emissiveFactor;l.emissive=new He().setRGB(A[0],A[1],A[2],cr)}return s.emissiveTexture!==void 0&&o!==Ki&&u.push(t.assignTexture(l,"emissiveMap",s.emissiveTexture,Fr)),Promise.all(u).then(function(){const A=new o(l);return s.name&&(A.name=s.name),da(A,s),t.associations.set(A,{materials:e}),s.extensions&&_o(i,A,s),A})}createUniqueName(e){const t=Pt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function s(l){return n[wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(l,t).then(function(h){return Dx(h,l,t)})}const o=[];for(let l=0,h=e.length;l<h;l++){const u=e[l],d=NN(u),A=i[d];if(A)o.push(A.promise);else{let p;u.extensions&&u.extensions[wt.KHR_DRACO_MESH_COMPRESSION]?p=s(u):p=Dx(new Vn,u,t),i[d]={primitive:u,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,i=this.extensions,s=n.meshes[e],o=s.primitives,l=[];for(let h=0,u=o.length;h<u;h++){const d=o[h].material===void 0?RN(this.cache):this.getDependency("material",o[h].material);l.push(d)}return l.push(t.loadGeometries(o)),Promise.all(l).then(function(h){const u=h.slice(0,h.length-1),d=h[h.length-1],A=[];for(let g=0,_=d.length;g<_;g++){const E=d[g],m=o[g];let v;const w=u[g];if(m.mode===oi.TRIANGLES||m.mode===oi.TRIANGLE_STRIP||m.mode===oi.TRIANGLE_FAN||m.mode===void 0)v=s.isSkinnedMesh===!0?new g8(E,w):new Xr(E,w),v.isSkinnedMesh===!0&&v.normalizeSkinWeights(),m.mode===oi.TRIANGLE_STRIP?v.geometry=Mx(v.geometry,LE):m.mode===oi.TRIANGLE_FAN&&(v.geometry=Mx(v.geometry,bA));else if(m.mode===oi.LINES)v=new y8(E,w);else if(m.mode===oi.LINE_STRIP)v=new pg(E,w);else if(m.mode===oi.LINE_LOOP)v=new E8(E,w);else if(m.mode===oi.POINTS)v=new x8(E,w);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(v.geometry.morphAttributes).length>0&&LN(v,s),v.name=t.createUniqueName(s.name||"mesh_"+e),da(v,s),m.extensions&&_o(i,v,m),t.assignFinalMaterial(v),A.push(v)}for(let g=0,_=A.length;g<_;g++)t.associations.set(A[g],{meshes:e,primitives:g});if(A.length===1)return s.extensions&&_o(i,A[0],s),A[0];const p=new la;s.extensions&&_o(i,p,s),t.associations.set(p,{meshes:e});for(let g=0,_=A.length;g<_;g++)p.add(A[g]);return p})}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new dn(LA.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new _u(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),da(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let i=0,s=t.joints.length;i<s;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){const s=i.pop(),o=i,l=[],h=[];for(let u=0,d=o.length;u<d;u++){const A=o[u];if(A){l.push(A);const p=new rt;s!==null&&p.fromArray(s.array,u*16),h.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new hg(l,h)})}loadAnimation(e){const t=this.json,n=this,i=t.animations[e],s=i.name?i.name:"animation_"+e,o=[],l=[],h=[],u=[],d=[];for(let A=0,p=i.channels.length;A<p;A++){const g=i.channels[A],_=i.samplers[g.sampler],E=g.target,m=E.node,v=i.parameters!==void 0?i.parameters[_.input]:_.input,w=i.parameters!==void 0?i.parameters[_.output]:_.output;E.node!==void 0&&(o.push(this.getDependency("node",m)),l.push(this.getDependency("accessor",v)),h.push(this.getDependency("accessor",w)),u.push(_),d.push(E))}return Promise.all([Promise.all(o),Promise.all(l),Promise.all(h),Promise.all(u),Promise.all(d)]).then(function(A){const p=A[0],g=A[1],_=A[2],E=A[3],m=A[4],v=[];for(let w=0,x=p.length;w<x;w++){const I=p[w],R=g[w],S=_[w],T=E[w],D=m[w];if(I===void 0)continue;I.updateMatrix&&I.updateMatrix();const b=n._createAnimationTracks(I,R,S,T,D);if(b)for(let M=0;M<b.length;M++)v.push(b[M])}return new D8(s,void 0,v)})}createNodeMesh(e){const t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(s){const o=n._getNodeRef(n.meshCache,i.mesh,s);return i.weights!==void 0&&o.traverse(function(l){if(l.isMesh)for(let h=0,u=i.weights.length;h<u;h++)l.morphTargetInfluences[h]=i.weights[h]}),o})}loadNode(e){const t=this.json,n=this,i=t.nodes[e],s=n._loadNodeShallow(e),o=[],l=i.children||[];for(let u=0,d=l.length;u<d;u++)o.push(n.getDependency("node",l[u]));const h=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([s,Promise.all(o),h]).then(function(u){const d=u[0],A=u[1],p=u[2];p!==null&&d.traverse(function(g){g.isSkinnedMesh&&g.bind(p,PN)});for(let g=0,_=A.length;g<_;g++)d.add(A[g]);return d})}_loadNodeShallow(e){const t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?i.createUniqueName(s.name):"",l=[],h=i._invokeOne(function(u){return u.createNodeMesh&&u.createNodeMesh(e)});return h&&l.push(h),s.camera!==void 0&&l.push(i.getDependency("camera",s.camera).then(function(u){return i._getNodeRef(i.cameraCache,s.camera,u)})),i._invokeAll(function(u){return u.createNodeAttachment&&u.createNodeAttachment(e)}).forEach(function(u){l.push(u)}),this.nodeCache[e]=Promise.all(l).then(function(u){let d;if(s.isBone===!0?d=new K2:u.length>1?d=new la:u.length===1?d=u[0]:d=new Zt,d!==u[0])for(let A=0,p=u.length;A<p;A++)d.add(u[A]);if(s.name&&(d.userData.name=s.name,d.name=o),da(d,s),s.extensions&&_o(n,d,s),s.matrix!==void 0){const A=new rt;A.fromArray(s.matrix),d.applyMatrix4(A)}else s.translation!==void 0&&d.position.fromArray(s.translation),s.rotation!==void 0&&d.quaternion.fromArray(s.rotation),s.scale!==void 0&&d.scale.fromArray(s.scale);return i.associations.has(d)||i.associations.set(d,{}),i.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],i=this,s=new la;n.name&&(s.name=i.createUniqueName(n.name)),da(s,n),n.extensions&&_o(t,s,n);const o=n.nodes||[],l=[];for(let h=0,u=o.length;h<u;h++)l.push(i.getDependency("node",o[h]));return Promise.all(l).then(function(h){for(let d=0,A=h.length;d<A;d++)s.add(h[d]);const u=d=>{const A=new Map;for(const[p,g]of i.associations)(p instanceof Xi||p instanceof br)&&A.set(p,g);return d.traverse(p=>{const g=i.associations.get(p);g!=null&&A.set(p,g)}),A};return i.associations=u(s),s})}_createAnimationTracks(e,t,n,i,s){const o=[],l=e.name?e.name:e.uuid,h=[];ha[s.path]===ha.weights?e.traverse(function(p){p.morphTargetInfluences&&h.push(p.name?p.name:p.uuid)}):h.push(l);let u;switch(ha[s.path]){case ha.weights:u=Nl;break;case ha.rotation:u=vo;break;case ha.position:case ha.scale:u=Pl;break;default:switch(n.itemSize){case 1:u=Nl;break;case 2:case 3:default:u=Pl;break}break}const d=i.interpolation!==void 0?bN[i.interpolation]:ll,A=this._getArrayFromAccessor(n);for(let p=0,g=h.length;p<g;p++){const _=new u(h[p]+"."+ha[s.path],t.array,A,d);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(_),o.push(_)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=Tg(t.constructor),i=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)i[s]=t[s]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(t){const n=this instanceof vo?BN:Bx;return new n(this.times,this.values,this.getValueSize()/3,t)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function QN(r,e,t){const n=e.attributes,i=new _r;if(n.POSITION!==void 0){const l=t.json.accessors[n.POSITION],h=l.min,u=l.max;if(h!==void 0&&u!==void 0){if(i.set(new H(h[0],h[1],h[2]),new H(u[0],u[1],u[2])),l.normalized){const d=Tg(Ql[l.componentType]);i.min.multiplyScalar(d),i.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const l=new H,h=new H;for(let u=0,d=s.length;u<d;u++){const A=s[u];if(A.POSITION!==void 0){const p=t.json.accessors[A.POSITION],g=p.min,_=p.max;if(g!==void 0&&_!==void 0){if(h.setX(Math.max(Math.abs(g[0]),Math.abs(_[0]))),h.setY(Math.max(Math.abs(g[1]),Math.abs(_[1]))),h.setZ(Math.max(Math.abs(g[2]),Math.abs(_[2]))),p.normalized){const E=Tg(Ql[p.componentType]);h.multiplyScalar(E)}l.max(h)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(l)}r.boundingBox=i;const o=new Ri;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,r.boundingSphere=o}function Dx(r,e,t){const n=e.attributes,i=[];function s(o,l){return t.getDependency("accessor",o).then(function(h){r.setAttribute(l,h)})}for(const o in n){const l=Cg[o]||o.toLowerCase();l in r.attributes||i.push(s(n[o],l))}if(e.indices!==void 0&&!r.index){const o=t.getDependency("accessor",e.indices).then(function(l){r.setIndex(l)});i.push(o)}return Tt.workingColorSpace!==cr&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Tt.workingColorSpace}" not supported.`),da(r,e),QN(r,e,t),Promise.all(i).then(function(){return e.targets!==void 0?DN(r,e.targets,t):r})}class ON{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:i,msg:s,transfer:o}=this.queue.shift();this.workersResolve[e]=i,this.workers[e].postMessage(s,o)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(n=>{const i=this._getIdleWorker();i!==-1?(this._initWorker(i),this.workerStatus|=1<<i,this.workersResolve[i]=n,this.workers[i].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const FN=0,Lx=2,zN=1,Nx=2,HN=0,GN=1,VN=10,jN=0,Ux=9,Px=15,kx=16,Qx=22,Ox=37,Fx=43,zx=76,Hx=83,Gx=97,Vx=100,jx=103,Wx=109,Yx=165,qx=166;class WN{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Su{constructor(e,t,n,i){this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=i,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==t&&i<e;)i++,this._offset++;return i<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}const pn=[171,75,84,88,32,50,48,187,13,10,26,10];function Xx(r){return typeof TextDecoder<"u"?new TextDecoder().decode(r):Buffer.from(r).toString("utf8")}function YN(r){const e=new Uint8Array(r.buffer,r.byteOffset,pn.length);if(e[0]!==pn[0]||e[1]!==pn[1]||e[2]!==pn[2]||e[3]!==pn[3]||e[4]!==pn[4]||e[5]!==pn[5]||e[6]!==pn[6]||e[7]!==pn[7]||e[8]!==pn[8]||e[9]!==pn[9]||e[10]!==pn[10]||e[11]!==pn[11])throw new Error("Missing KTX 2.0 identifier.");const t=new WN,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new Su(r,pn.length,n,!0);t.vkFormat=i._nextUint32(),t.typeSize=i._nextUint32(),t.pixelWidth=i._nextUint32(),t.pixelHeight=i._nextUint32(),t.pixelDepth=i._nextUint32(),t.layerCount=i._nextUint32(),t.faceCount=i._nextUint32();const s=i._nextUint32();t.supercompressionScheme=i._nextUint32();const o=i._nextUint32(),l=i._nextUint32(),h=i._nextUint32(),u=i._nextUint32(),d=i._nextUint64(),A=i._nextUint64(),p=new Su(r,pn.length+n,3*s*8,!0);for(let te=0;te<s;te++)t.levels.push({levelData:new Uint8Array(r.buffer,r.byteOffset+p._nextUint64(),p._nextUint64()),uncompressedByteLength:p._nextUint64()});const g=new Su(r,o,l,!0),_={vendorId:g._skip(4)._nextUint16(),descriptorType:g._nextUint16(),versionNumber:g._nextUint16(),descriptorBlockSize:g._nextUint16(),colorModel:g._nextUint8(),colorPrimaries:g._nextUint8(),transferFunction:g._nextUint8(),flags:g._nextUint8(),texelBlockDimension:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],bytesPlane:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],samples:[]},E=(_.descriptorBlockSize/4-6)/4;for(let te=0;te<E;te++){const V={bitOffset:g._nextUint16(),bitLength:g._nextUint8(),channelType:g._nextUint8(),samplePosition:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&V.channelType?(V.sampleLower=g._nextInt32(),V.sampleUpper=g._nextInt32()):(V.sampleLower=g._nextUint32(),V.sampleUpper=g._nextUint32()),_.samples[te]=V}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(_);const m=new Su(r,h,u,!0);for(;m._offset<u;){const te=m._nextUint32(),V=m._scan(te),ee=Xx(V),Q=m._scan(te-V.byteLength);t.keyValue[ee]=ee.match(/^ktx/i)?Xx(Q):Q,m._offset%4&&m._skip(4-m._offset%4)}if(A<=0)return t;const v=new Su(r,d,A,!0),w=v._nextUint16(),x=v._nextUint16(),I=v._nextUint32(),R=v._nextUint32(),S=v._nextUint32(),T=v._nextUint32(),D=[];for(let te=0;te<s;te++)D.push({imageFlags:v._nextUint32(),rgbSliceByteOffset:v._nextUint32(),rgbSliceByteLength:v._nextUint32(),alphaSliceByteOffset:v._nextUint32(),alphaSliceByteLength:v._nextUint32()});const b=d+v._offset,M=b+I,L=M+R,P=L+S,N=new Uint8Array(r.buffer,r.byteOffset+b,I),W=new Uint8Array(r.buffer,r.byteOffset+M,R),X=new Uint8Array(r.buffer,r.byteOffset+L,S),K=new Uint8Array(r.buffer,r.byteOffset+P,T);return t.globalData={endpointCount:w,selectorCount:x,imageDescs:D,endpointsData:N,selectorsData:W,tablesData:X,extendedData:K},t}let Bg,Ss,bg;const Rg={env:{emscripten_notify_memory_growth:function(r){bg=new Uint8Array(Ss.exports.memory.buffer)}}};class qN{init(){return Bg||(Bg=typeof fetch<"u"?fetch("data:application/wasm;base64,"+Kx).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,Rg)).then(this._init):WebAssembly.instantiate(Buffer.from(Kx,"base64"),Rg).then(this._init),Bg)}_init(e){Ss=e.instance,Rg.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!Ss)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,i=Ss.exports.malloc(n);bg.set(e,i),t=t||Number(Ss.exports.ZSTD_findDecompressedSize(i,n));const s=Ss.exports.malloc(t),o=Ss.exports.ZSTD_decompress(s,t,i,n),l=bg.slice(s,s+o);return Ss.exports.free(i),Ss.exports.free(s),l}}const Kx="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93d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0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQ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AGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAg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ABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",Dg=new WeakMap;let Lg=0,Ng;class es extends ua{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new ON,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return this.workerConfig={astcSupported:await e.hasFeatureAsync("texture-compression-astc"),etc1Supported:await e.hasFeatureAsync("texture-compression-etc1"),etc2Supported:await e.hasFeatureAsync("texture-compression-etc2"),dxtSupported:await e.hasFeatureAsync("texture-compression-bc"),bptcSupported:await e.hasFeatureAsync("texture-compression-bptc"),pvrtcSupported:await e.hasFeatureAsync("texture-compression-pvrtc")},this}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-bc"),bptcSupported:e.hasFeature("texture-compression-bptc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const e=new kl(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new kl(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const i=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,i]).then(([s,o])=>{const l=es.BasisWorker.toString(),h=["/* constants */","let _EngineFormat = "+JSON.stringify(es.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(es.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(es.BasisFormat),"/* basis_transcoder.js */",s,"/* worker */",l.substring(l.indexOf("{")+1,l.lastIndexOf("}"))].join(`
3829
3829
  `);this.workerSourceURL=URL.createObjectURL(new Blob([h])),this.transcoderBinary=o,this.workerPool.setWorkerCreator(()=>{const u=new Worker(this.workerSourceURL),d=this.transcoderBinary.slice(0);return u.postMessage({type:"init",config:this.workerConfig,transcoderBinary:d},[d]),u})}),Lg>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Lg++}return this.transcoderPending}load(e,t,n,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const s=new kl(this.manager);s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials),s.load(e,o=>{if(Dg.has(o))return Dg.get(o).promise.then(t).catch(i);this._createTexture(o).then(l=>t?t(l):null).catch(i)},n,i)}_createTextureFrom(e,t){const{faces:n,width:i,height:s,format:o,type:l,error:h,dfdFlags:u}=e;if(l==="error")return Promise.reject(h);let d;if(t.faceCount===6)d=new I8(n,o,mr);else{const A=n[0].mipmaps;d=t.layerCount>1?new w8(A,i,s,t.layerCount,o,mr):new Fd(A,i,s,o,mr)}return d.minFilter=n[0].mipmaps.length===1?gr:Mi,d.magFilter=gr,d.generateMipmaps=!1,d.needsUpdate=!0,d.colorSpace=Jx(t),d.premultiplyAlpha=!!(u&zN),d}async _createTexture(e,t={}){const n=YN(new Uint8Array(e));if(n.vkFormat!==jN)return KN(n);const i=t,s=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:i},[e])).then(o=>this._createTextureFrom(o.data,n));return Dg.set(e,{promise:s}),s}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Lg--,this}}es.BasisFormat={ETC1S:0,UASTC_4x4:1},es.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},es.EngineFormat={RGBAFormat:vr,RGBA_ASTC_4x4_Format:TA,RGBA_BPTC_Format:id,RGBA_ETC2_EAC_Format:SA,RGBA_PVRTC_4BPPV1_Format:IA,RGBA_S3TC_DXT5_Format:rd,RGB_ETC1_Format:CA,RGB_ETC2_Format:MA,RGB_PVRTC_4BPPV1_Format:wA,RGB_S3TC_DXT1_Format:td},es.BasisWorker=function(){let r,e,t;const n=_EngineFormat,i=_TranscoderFormat,s=_BasisFormat;self.addEventListener("message",function(_){const E=_.data;switch(E.type){case"init":r=E.config,o(E.transcoderBinary);break;case"transcode":e.then(()=>{try{const{faces:m,buffers:v,width:w,height:x,hasAlpha:I,format:R,dfdFlags:S}=l(E.buffer);self.postMessage({type:"transcode",id:E.id,faces:m,width:w,height:x,hasAlpha:I,format:R,dfdFlags:S},v)}catch(m){console.error(m),self.postMessage({type:"error",id:E.id,error:m.message})}});break}});function o(_){e=new Promise(E=>{t={wasmBinary:_,onRuntimeInitialized:E},BASIS(t)}).then(()=>{t.initializeBasis(),t.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function l(_){const E=new t.KTX2File(new Uint8Array(_));function m(){E.close(),E.delete()}if(!E.isValid())throw m(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");const v=E.isUASTC()?s.UASTC_4x4:s.ETC1S,w=E.getWidth(),x=E.getHeight(),I=E.getLayers()||1,R=E.getLevels(),S=E.getFaces(),T=E.getHasAlpha(),D=E.getDFDFlags(),{transcoderFormat:b,engineFormat:M}=A(v,w,x,T);if(!w||!x||!R)throw m(),new Error("THREE.KTX2Loader: Invalid texture");if(!E.startTranscoding())throw m(),new Error("THREE.KTX2Loader: .startTranscoding failed");const L=[],P=[];for(let N=0;N<S;N++){const W=[];for(let X=0;X<R;X++){const K=[];let te,V;for(let Q=0;Q<I;Q++){const z=E.getImageLevelInfo(X,Q,N);N===0&&X===0&&Q===0&&(z.origWidth%4!==0||z.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),R>1?(te=z.origWidth,V=z.origHeight):(te=z.width,V=z.height);const Z=new Uint8Array(E.getImageTranscodedSizeInBytes(X,Q,0,b));if(!E.transcodeImage(Z,X,Q,N,b,0,-1,-1))throw m(),new Error("THREE.KTX2Loader: .transcodeImage failed.");K.push(Z)}const ee=g(K);W.push({data:ee,width:te,height:V}),P.push(ee.buffer)}L.push({mipmaps:W,width:w,height:x,format:M})}return m(),{faces:L,buffers:P,width:w,height:x,hasAlpha:T,format:M,dfdFlags:D}}const h=[{if:"astcSupported",basisFormat:[s.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[n.RGB_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[n.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],u=h.sort(function(_,E){return _.priorityETC1S-E.priorityETC1S}),d=h.sort(function(_,E){return _.priorityUASTC-E.priorityUASTC});function A(_,E,m,v){let w,x;const I=_===s.ETC1S?u:d;for(let R=0;R<I.length;R++){const S=I[R];if(r[S.if]&&S.basisFormat.includes(_)&&!(v&&S.transcoderFormat.length<2)&&!(S.needsPowerOfTwo&&!(p(E)&&p(m))))return w=S.transcoderFormat[v?1:0],x=S.engineFormat[v?1:0],{transcoderFormat:w,engineFormat:x}}return console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32."),w=i.RGBA32,x=n.RGBAFormat,{transcoderFormat:w,engineFormat:x}}function p(_){return _<=2?!0:(_&_-1)===0&&_!==0}function g(_){if(_.length===1)return _[0];let E=0;for(let w=0;w<_.length;w++){const x=_[w];E+=x.byteLength}const m=new Uint8Array(E);let v=0;for(let w=0;w<_.length;w++){const x=_[w];m.set(x,v),v+=x.byteLength}return m}};const XN=new Set([vr,so,ta]),Ug={[Wx]:vr,[Gx]:vr,[Ox]:vr,[Fx]:vr,[jx]:so,[Hx]:so,[kx]:so,[Qx]:so,[Vx]:ta,[zx]:ta,[Px]:ta,[Ux]:ta,[qx]:nd,[Yx]:nd},Pg={[Wx]:lr,[Gx]:Or,[Ox]:mr,[Fx]:mr,[jx]:lr,[Hx]:Or,[kx]:mr,[Qx]:mr,[Vx]:lr,[zx]:Or,[Px]:mr,[Ux]:mr,[qx]:mr,[Yx]:mr};async function KN(r){const{vkFormat:e}=r;if(Ug[e]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");let t;r.supercompressionScheme===Lx&&(Ng||(Ng=new Promise(async s=>{const o=new qN;await o.init(),s(o)})),t=await Ng);const n=[];for(let s=0;s<r.levels.length;s++){const o=Math.max(1,r.pixelWidth>>s),l=Math.max(1,r.pixelHeight>>s),h=r.pixelDepth?Math.max(1,r.pixelDepth>>s):0,u=r.levels[s];let d;if(r.supercompressionScheme===FN)d=u.levelData;else if(r.supercompressionScheme===Lx)d=t.decode(u.levelData,u.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let A;Pg[e]===lr?A=new Float32Array(d.buffer,d.byteOffset,d.byteLength/Float32Array.BYTES_PER_ELEMENT):Pg[e]===Or?A=new Uint16Array(d.buffer,d.byteOffset,d.byteLength/Uint16Array.BYTES_PER_ELEMENT):A=d,n.push({data:A,width:o,height:l,depth:h})}let i;if(XN.has(Ug[e]))i=r.pixelDepth===0?new mo(n[0].data,r.pixelWidth,r.pixelHeight):new WE(n[0].data,r.pixelWidth,r.pixelHeight,r.pixelDepth);else{if(r.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");i=new Fd(n,r.pixelWidth,r.pixelHeight)}return i.mipmaps=n,i.type=Pg[e],i.format=Ug[e],i.colorSpace=Jx(r),i.needsUpdate=!0,Promise.resolve(i)}function Jx(r){const e=r.dataFormatDescriptor[0];return e.colorPrimaries===GN?e.transferFunction===Nx?Fr:cr:e.colorPrimaries===VN?e.transferFunction===Nx?sd:cu:(e.colorPrimaries===HN||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),ms)}class JN extends Q8{constructor(e){super(e),this.type=Or}parse(e){const t=function(v,w){switch(v){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(w||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(w||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(w||""));default:case 4:throw new Error("THREE.RGBELoader: Memory Error: "+(w||""))}},n=`
3830
3830
  `,i=function(v,w,x){w=w||1024;let I=v.pos,R=-1,S=0,T="",D=String.fromCharCode.apply(null,new Uint16Array(v.subarray(I,I+128)));for(;0>(R=D.indexOf(n))&&S<w&&I<v.byteLength;)T+=D,S+=D.length,I+=128,D+=String.fromCharCode.apply(null,new Uint16Array(v.subarray(I,I+128)));return-1<R?(x!==!1&&(v.pos+=S+R+1),T+D.slice(0,R)):!1},s=function(v){const w=/^#\?(\S+)/,x=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,I=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,R=/^\s*FORMAT=(\S+)\s*$/,S=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,T={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let D,b;for((v.pos>=v.byteLength||!(D=i(v)))&&t(1,"no header found"),(b=D.match(w))||t(3,"bad initial token"),T.valid|=1,T.programtype=b[1],T.string+=D+`
3831
3831
  `;D=i(v),D!==!1;){if(T.string+=D+`
@@ -4555,7 +4555,7 @@ bool bvhIntersectFirstHit(
4555
4555
 
4556
4556
  `)},Bn.needsUpdate=!0,Lo&&(e.visible=Xm)))}setupOrbitalMaterial(e){Lo&&e.material&&e.material.name.toLowerCase()=="frame-stems"&&(Zm=e,hr=R7,hr.envMap=this.scene.environment,e.material=hr,hr.needsUpdate=!0,e.visible=Jm)}setupGemstoneMaterial(e){var t;if(!e.material||((t=e.material)==null?void 0:t.length)>1)return;const n=e.name.toLowerCase();if(n.includes("diamond")||n.includes("gemstone")){const i=new AP;i.toneMapped=!1,i.name=e.name,this.initGemstoneDependencies(i),i.uniforms.bvh.value=new Mw,i.uniforms.bvh.value.updateFrom(new am(e.geometry.clone().toNonIndexed(),{strategy:nw})),e.material=i,this.setupRaycast(e),Ns.push(e),e.layers.toggle(jI)}}updateLensMaterial(e){if(Bn){if(e.direction=="u")dr.color.value=new He(e.color),dr.opacity.value=e.opacity,dr.uAlpha.value=!1;else if(e.direction=="tb"){const t=e.gradientColors;dr.uAlpha.value=!0;let n=0;t.forEach(()=>{dr.gradientColors.value[n]=new He(t[n].color),dr.positions.value[n]=t[n].position,dr.opacities.value[n]=t[n].alpha,n++})}e.finish=="MIRBLKHMC"?(Bn.clearcoat=1,Bn.clearcoatRoughness=0):e.finish=="HMCCR"?(Bn.clearcoat=0,Bn.clearcoatRoughness=1):e.finish=="MIRSILHMC"&&(Bn.clearcoat=1,Bn.clearcoatRoughness=0),Bn.roughness=e.roughness,Bn.metalness=e.metalness}}async updateOrbitalMaterial(e){Lo&&(!hr||!e||(e.ior>1?(hr.ior=1.45,hr.thickness=.0035):(hr.ior=1,hr.thickness=0),hr.opacity=1,hr.transmission=1,hr.transparent=!1,hr.clearcoat=0,hr.roughness=1,hr.metalness=e.metalness,hr.shadowSide=Qr,hr.depthWrite=!0,e.texture&&(e.texture.baseColor&&await this.downloadTexture(e.texture.baseColor).then(t=>{hr.map=t}),e.texture.opacity&&await this.downloadTexture(e.texture.opacity).then(t=>{hr.transmissionMap=t}),e.texture.orm&&await this.downloadTexture(e.texture.orm).then(t=>{hr.aoMap=t,hr.roughnessMap=t,hr.metalnessMap=t}))))}async downloadTexture(e){return await this.textureLoader.loadAsync(e).then(t=>(t.colorSpace=Fr,t.flipY=!1,t.magFilter=gr,t.minFilter=wb,t.wrapS=ea,t.wrapT=ea,t))}sortGemstoneMaterials(){Ns.sort((e,t)=>e.name.toLowerCase().localeCompare(t.name.toLowerCase()))}initGemstoneDependencies(e){var t;const n=A=>A&&A.isCubeTexture;e.uniforms.envMap.value=No,e.uniforms.aberrationStrength.value=.01,e.uniforms.resolution.value=this.canvasSize;const i={},s=n(No),o=((s?(t=No==null?void 0:No.image[0])==null?void 0:t.width:No==null?void 0:No.image.width)??1024)/4,l=Math.floor(Math.log2(o)),h=Math.pow(2,l),u=3*Math.max(h,16*7),d=4*h;s&&(i.ENVMAP_TYPE_CUBEM=""),i.CUBEUV_TEXEL_WIDTH=`${1/u}`,i.CUBEUV_TEXEL_HEIGHT=`${1/d}`,i.CUBEUV_MAX_MIP=`${l}.0`,i.CHROMATIC_ABERRATIONS="",i.FAST_CHROMA="",e.defines=i}setupRaycast(e){e.raycast=function(t,n){new co;let i=new H,s=new H;const o=this.matrixWorld;if(t.ray.intersectBox(new _r().setFromObject(e),i)===null)return;s.copy(i),s.applyMatrix4(o);let l=t.ray.origin.distanceTo(s);if(l<t.near||l>t.far)return;let h={distance:l,point:s.clone(),index:void 0,face:null,object:e};n.push(h)}}async loadFirstFrame(e,t,n){if(t&&e){const i=await this.downloadModel(e,t._id);let s;n?s=n:s=t.customisation;const[o,l]=this.getCustomisations(s);If=!!o,Lo=!!l,Lo||(Xm=!0,Jm=!0),await this.renderModel(i.asset.cloudfrontUrl,i.decryptionKey).then(async()=>new Promise(async(h,u)=>{o&&this.updateLensMaterial(o),h(),l?await this.updateOrbitalMaterial(l).then(()=>{h()}):h()}))}else return}async changeFrame(e,t,n){if(t&&e){If=!1,Lo=!1;const i=await this.downloadModel(e,t._id),[s,o]=this.getCustomisations(n),[l,h]=this.getCustomisations(t.customisation);If=!!(l||s&&(s==null?void 0:s.sku)!=="lens-default"),Lo=!!(h||o&&(o==null?void 0:o.sku)!=="orbital-default"),await this.renderModel(i.asset.cloudfrontUrl,i.decryptionKey).then(async()=>new Promise(async(u,d)=>{!s||(s==null?void 0:s.sku)=="lens-default"?(l&&this.updateLensMaterial(l),u()):(this.updateLensMaterial(s),u()),(o==null?void 0:o.sku)=="orbital-default"?h&&await this.updateOrbitalMaterial(h).then(()=>{u()}):await this.updateOrbitalMaterial(o).then(()=>{u()})}))}}async changeLens(e,t,n,i){return new Promise((s,o)=>{if(n)this.changeFrame(t,i,e).then(()=>{s()});else{Km&&(Km.visible=!0);const l=e.find(h=>(h==null?void 0:h.type)=="Lens");this.updateLensMaterial(l),Xm=!0,s()}})}async changeOrbital(e){return new Promise(async(t,n)=>{Zm&&(Zm.visible=!0),await this.updateOrbitalMaterial(e).then(()=>{Jm=!0,t()})})}async changeGemType(e,t,n){return new Promise(async(i,s)=>{try{const o=new He(`#${t}`);n0?(e0=o,t0=n,r0=!0,i()):(Ns[e].material.uniforms.color.value=o.multiplyScalar(n),this.updateSelectiveBloom(cc,Xu),i())}catch(o){s(o)}})}async changeStudType(e,t){return new Promise(async(n,i)=>{try{const s=Ns[e].parent;let o;switch(e){case 0:o=s==null?void 0:s.children.find(l=>l.name.toLowerCase().includes("stud_right"));break;case 1:o=s==null?void 0:s.children.find(l=>l.name.toLowerCase().includes("stud_left"));break}if(o&&t){const l=o.material,h=new ai({color:new He(`#${t.color}`),roughness:.05,metalness:1,aoMap:l.aoMap,normalMap:l.normalMap});o.material=h}n()}catch(s){i(s)}})}async flashFocusOnZone(e,t,n,i){return new Promise(async(s,o)=>{try{const l=Ns[e].material.uniforms.color.value,h=new He(t).multiplyScalar(n);qm.to(l,{r:h.r,g:h.g,b:h.b,ease:"sine.inOut",duration:.2,onStart:function(){n0=!0},onUpdate:function(){Ns[e].material.uniforms.color.value=l},onComplete:function(){n0=!1}}).yoyo(!0).repeat(i*2-1).then(()=>{r0&&(Ns[e].material.uniforms.color.value=e0.multiplyScalar(t0??1),this.updateSelectiveBloom(cc,Xu),r0=!1,e0=void 0,t0=void 0),s()})}catch(l){o(l)}})}snapCamToPos(e){return new Promise(async(t,n)=>{var i;try{if(!this.camera||!this.renderer)return;const s=(i=b7[e])==null?void 0:i.value;qm.to(this.camera.position,{duration:1,ease:"sine.inOut",x:s.x,y:s.y,z:s.z}).then(()=>t())}catch(s){n(s)}})}}class P7{constructor(){xt(this,"customRenderer"),this.customRenderer=new U7}async Init(e,t){this.customRenderer.isInitialised||(await this.customRenderer.intialise(t),this.customRenderer.setupAndRenderScene(e))}loadFirstFrame(e,t,n){return new Promise((i,s)=>{this.customRenderer.loadFirstFrame(e,t,n).then(()=>{i(1)}).catch(o=>{s(o)})})}changeFrame(e,t,n){return this.customRenderer.changeFrame(e,t,n)}changeLens(e,t,n,i){return this.customRenderer.changeLens(e,t,n,i)}changeOrbital(e){return this.customRenderer.changeOrbital(e)}changeGemType(e,t,n){return this.customRenderer.changeGemType(e,t,n)}changeStudType(e,t){return this.customRenderer.changeStudType(e,t)}focusOnZone(e,t,n,i){return this.customRenderer.flashFocusOnZone(e,t,n,i)}snapCamToPos(e){return this.customRenderer.snapCamToPos(e)}}class JI{constructor(e){xt(this,"orgId"),xt(this,"rendererService"),xt(this,"isLoading",!1),xt(this,"userContainerId"),xt(this,"containerElement",null),xt(this,"defaultSelectorId","dita-3dconfig-element"),xt(this,"defaultCanvasStyle",{width:"100%",height:"100%"}),xt(this,"customisationArr",[]),xt(this,"assetDetails",null),this.userContainerId=e.userContainerId,this.rendererService=new P7,this.orgId=e.orgId}prepareDOM(){const e=this.userContainerId??this.defaultSelectorId,t=document.getElementById(e);if(!t)throw new Error(`Container not found to embed 3d-configurator ${this.defaultSelectorId}`);this.containerElement=t;const n=document.createElement("canvas");return n.className="sprie-config-webgl",t.innerHTML="",t.appendChild(n),Object.assign(n.style,this.defaultCanvasStyle),!0}snapCameraToPos(e){return this.rendererService.snapCamToPos(e)}async loadFrame(e){return this.assetDetails=e.data.assetDetails,this.customisationArr=e.data.customisation,this.prepareDOM(),await this.rendererService.Init(e.autoRotateSpeed,e.forInovati),await this.rendererService.loadFirstFrame(this.orgId,this.assetDetails,this.customisationArr),this}changeFrame(e,t){return this.rendererService.changeFrame(this.orgId,e,t)}changeLens(e,t,n){return this.rendererService.changeLens(e,this.orgId,t,n)}changeOrbital(e){return this.rendererService.changeOrbital(e)}changeGemType(e,t,n){return this.rendererService.changeGemType(e,t,n)}changeStudType(e,t){return this.rendererService.changeStudType(e,t)}focusOnZone(e,t,n,i){return this.rendererService.focusOnZone(e,t,n,i)}unmount(){this.containerElement&&(this.containerElement.innerHTML="",this.containerElement.style.height="0px",this.containerElement.style.width="auto")}}class ZI{constructor(){xt(this,"events"),xt(this,"authService"),xt(this,"instanceArr"),this.authService=new rS,this.events=new dS,this.instanceArr=[]}async Init(e){await this.authService.Init(e),Pc.setJWT(this.authService.authPayload.JWT)}async loadBySKU(e){const t=await Dp.FetchAssetBySKUOrBarcode({sku:e.SKU,barcode:null});return await this.renderAsset({data:{assetDetails:t,customisation:t.customisation}})}async renderAsset(e){return new JI({orgId:this.authService.authPayload.ORGID,userContainerId:e.containerId}).loadFrame({containerId:e.containerId,data:{assetDetails:e.data.assetDetails,customisation:e.data.customisation}})}async getInstance(e){return new JI({orgId:this.authService.authPayload.ORGID,userContainerId:e.containerId})}}window.ThreeDConfigurator=ZI;const rO="",sr=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),nO="";var Mf=(r=>(r.Front="Front",r.Back="Back",r.Left="Left",r.Right="Right",r.Top="Top",r.Bottom="Bottom",r))(Mf||{}),mn=(r=>(r.LoadedCustomiser="Frame customiser loaded.",r.EnteredViewer="3d view of a frame with view orientation buttons",r.EnteredFramesListSection="Select a frame from the list of available frames.",r.EnteredOrbitalsListSection="Select a frame from the list of available frames.",r.EnteredLensListSection="Select a lens from the list of available lenses.",r.EnteredEngravingSection="Choose custom engraving for your frame.",r.ChangedViewFront="Changed orientation to front view",r.ChangedViewBack="Changed orientation to back view",r.ChangedViewLeft="Changed orientation to left view",r.ChangedViewRight="Changed orientation to right view",r.ChangedViewTop="Changed orientation to top view",r.ChangedViewBottom="Changed orientation to bottom view",r.ChangedFrame="Changed current 3d frame to ",r.ChangedLens="Changed current lens to ",r.ChangedOrbital="Changed current orbital to ",r.AddedEngravingText="Added the engraving text ",r.EnteredEngravingTextInput="Enter upto 15 characters for engraving. Press enter to submit.",r.EngravingInputAvailable="Input text box for engraving text is available on tab",r.EngravingInputHidden="Input text box for engraving text is disabled",r))(mn||{});function k7({frameList:r,selectedFrame:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeFrame:s}){const o=Ye.useRef(null),l=Ye.useRef(null),h=()=>{o.current&&(o.current.textContent=mn.EnteredFramesListSection)};return Ye.useEffect(()=>{i&&l.current&&l.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[i]),Se.jsxs("div",{className:"sprie-config-palette",ref:l,style:{gap:sr?"3rem":"5rem",display:n?"flex":"none",padding:"0 3rem"},children:[Se.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:o}),r==null?void 0:r.map(u=>Se.jsxs("div",{className:"sprie-config-palette-img-box",children:[Se.jsx("button",{"aria-labelledby":(e==null?void 0:e._id)===u._id?"sprie-config-frameName":"",style:{border:"0",cursor:t?"default":"pointer",width:sr?45:60,height:sr?45:60},onClick:()=>s(u),onFocus:()=>h(),disabled:t,children:Se.jsx("img",{"aria-label":`Select frame ${u.name}`,src:u.variantImage,alt:u.name+"image",className:`sprie-config-image ${sr?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===u._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),Se.jsxs("p",{className:"sprie-config-palette-img-text",children:[Se.jsx("span",{className:"sprie-config-palette-imgName",children:u.name}),Se.jsx("span",{id:"sprie-config-frameName",className:"sprie-config-sr-only",children:`Selected frame ${u.name}`})]})]},u._id))]})}function Q7({lensList:r,selectedLens:e,selectedDitaLens:t,modelLoading:n,isSelected:i,paletteEntered:s,onChangeLens:o}){const l=Ye.useRef(null),h=Ye.useRef(null),u=()=>{l.current&&(l.current.textContent=mn.EnteredLensListSection)};return Ye.useEffect(()=>{s&&h.current&&h.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[s]),Se.jsxs("div",{className:"sprie-config-palette",ref:h,style:{display:i?"flex":"none",padding:"0 3rem",gap:sr?"3rem":"5rem"},children:[Se.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:l}),r==null?void 0:r.map(d=>Se.jsxs("div",{className:"sprie-config-palette-img-box",children:[Se.jsx("button",{"aria-labelledby":(e==null?void 0:e._id)===d._id?"sprie-config-lensName":"",style:{border:"0",cursor:n?"default":"pointer",width:sr?45:60,height:sr?45:60},onClick:()=>o(d),onFocus:u,disabled:n,children:Se.jsx("img",{"aria-label":`Select lens ${d.name}`,src:d.thumbnail,alt:d.name+"image",className:`sprie-config-image ${sr?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===d._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),Se.jsxs("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.2rem",textAlign:"center"},children:[Se.jsx("span",{className:"sprie-config-palette-imgName",children:`${d.name}`}),Se.jsx("br",{}),(e==null?void 0:e._id)===d._id&&Se.jsx("span",{className:"sprie-config-price-tag",children:(t==null?void 0:t.variantId)==0?"":`(+ ${t==null?void 0:t.variantPrice}.00 ${t==null?void 0:t.priceCurrency})`}),Se.jsxs("span",{id:"sprie-config-lensName",className:"sprie-config-sr-only",children:[" ",`Selected lens ${d.name}`]})]})]},d._id))]})}const iO="";function O7({heading:r,isSelected:e,onEngravingLinkClicked:t,onChecked:n,onTextAdded:i,paletteEntered:s}){const[o,l]=Ye.useState(""),[h,u]=Ye.useState(!1),[d,A]=Ye.useState(!1);Ye.useState(!1);const p=Ye.useRef(null),g=Ye.useRef(null),_=Ye.useRef(null);Ye.useEffect(()=>{n(h),h&&p.current?(p.current.style.backgroundColor="#ffffff",_.current&&(_.current.textContent=mn.EngravingInputAvailable)):!h&&p.current&&(p.current.style.backgroundColor="transparent",_.current&&(_.current.textContent=mn.EngravingInputHidden),l(""))}),Ye.useEffect(()=>{d&&o!=""&&i(o)},[d]),Ye.useEffect(()=>{var v;s&&((v=g.current)==null||v.focus())},[s]);const E=()=>{_.current&&(_.current.textContent=mn.EnteredEngravingSection)},m=v=>{var w;v.key==="Enter"&&(i(o),(w=p.current)==null||w.blur(),_.current&&(_.current.textContent=mn.AddedEngravingText+o))};return Se.jsxs("div",{className:"sprie-config-engraving-block",style:{display:e?"flex":"none",marginTop:".5rem"},children:[Se.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:_}),Se.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".8rem"},children:[Se.jsx("input",{type:"checkbox",ref:g,className:"sprie-config-engraving-checkbox",onChange:v=>{u(v.target.checked)},onFocus:E,checked:h}),Se.jsxs("p",{style:{fontSize:".9rem",color:"#4d4d4d",fontWeight:"500",margin:"0"},children:["Add ","Laser Engraving"," ",Se.jsx("span",{style:{fontWeight:"400"},children:"(OPTIONAL)"})]})]}),Se.jsxs("div",{className:"sprie-config-engraving-inputField-block",children:[Se.jsx("input",{"aria-label":mn.EnteredEngravingTextInput,type:"text",ref:p,className:"sprie-config-engraving-inputField",placeholder:"ADD CUSTOM TEXT",value:o,onChange:v=>l(v.target.value),maxLength:15,style:{padding:"0.7rem"},disabled:!h,onBlur:()=>A(!0),onFocus:()=>A(!1),onKeyDown:v=>m(v)}),Se.jsx("span",{className:"sprie-config-engraving-inputInfo",children:`${o.length}/15 characters`})]})]})}const sO="";function F7({totalSteps:r,currentStep:e}){return Se.jsx("div",{className:"step-tracker-block",style:{margin:sr?"auto":""}})}function z7({nextSlide:r,previousSlide:e,currentIndex:t,stepsName:n,isLastStep:i}){const s=()=>{e()},o=()=>{r()};return Se.jsxs("div",{className:"carousel-header",children:[Se.jsx("button",{className:"carousel-btn prev","aria-label":`return to the step number ${t} : ${n[t-1]}`,"aria-hidden":t==0,onClick:s,style:{visibility:t!==0?"visible":"hidden"},children:Se.jsx("i",{className:"arrow left-arrow",style:{padding:".25rem"}})}),Se.jsxs("p",{children:[Se.jsx("span",{className:"step-syntax",children:`STEP ${t+1} of ${n.length} : `}),Se.jsx("span",{className:"select-syntax",children:n[t]})]}),Se.jsx("button",{className:"carousel-btn next","aria-label":`advance to step number ${t+2} : ${n[t+1]}`,"aria-hidden":!!i,onClick:o,style:{visibility:i?"hidden":"visible"},children:Se.jsx("i",{className:"arrow right-arrow",style:{padding:".25rem"}})})]})}function H7({setShowAddToCart:r,setSelectedChild:e,setSectionEntered:t,children:n}){var g;const[i,s]=Ye.useState(0),o=Lh.Children.toArray(n),l=i===o.length-1,h=Ye.useRef(null),u=(g=o.map(_=>_))==null?void 0:g.map(_=>_.props.heading),d=()=>{s(_=>_===0?Lh.Children.count(n)-1:_-1),h.current&&h.current.focus()},A=()=>{s(_=>_===Lh.Children.count(n)-1?0:_+1),h.current&&h.current.focus()};Ye.useEffect(()=>{r(!!l)},[l]),Ye.useEffect(()=>{e(i)},[i]);const p=_=>{(_.key==="Enter"||_.key===" ")&&_.target===h.current&&t(i)};return Se.jsxs("div",{className:"carousel",children:[Se.jsx("span",{className:"sprie-config-sr-only",id:"sprie-config-step-selector",children:`Customisation Step Selector. ${l?"This is an optional":""} Step ${i+1} -
4557
4557
  ${o[i].props.heading}.
4558
- Press enter to `+(l?"configure your optional custom engraving. Add to cart button is now present at the end of this section.":"select or press tab for next.")}),Se.jsxs("div",{tabIndex:0,style:{height:"30%",alignContent:"center"},"aria-labelledby":"sprie-config-step-selector",onKeyDown:p,ref:h,children:[Se.jsx(z7,{nextSlide:A,previousSlide:d,currentIndex:i,stepsName:u,isLastStep:l}),Se.jsx(F7,{totalSteps:u==null?void 0:u.length,currentStep:i+1})]}),Se.jsx("div",{className:"carousel-container",style:{paddingTop:sr?"":"1rem"},children:o.map((_,E)=>Se.jsx("div",{className:"carousel-item",style:{transform:`translateX(-${i*100}%)`},children:_},E))})]})}const aO="";function $I({conditionRequired:r,onButtonClick:e}){const[t,n]=Ye.useState(!1),i=Ye.useRef(null),s=Ye.useRef(null);return Ye.useEffect(()=>{s.current&&(s.current.disabled=!t)},[t]),Ye.useEffect(()=>{i.current&&(i.current.style.display=r?"flex":"none"),s.current&&(s.current.disabled=r)},[r]),Se.jsxs("div",{className:"sprie-config-add-to-cart-block",children:[Se.jsxs("label",{htmlFor:"Sprie-Config-return-policy-checkbox",id:"Sprie-Config-return-policy-label",ref:i,style:{display:"none"},children:[Se.jsx("input",{type:"checkbox","aria-label":"return policy checkbox","aria-describedby":"sprie-config-return-policy-desc",id:"Sprie-Config-return-policy-checkbox",name:"sprie-config-return-policy-checkbox",onChange:o=>n(o.target.checked),checked:t}),Se.jsx("p",{id:"sprie-config-return-policy-desc",children:"I agree this customized Item cannot be returned or exchanged."})]}),Se.jsx("button",{className:"sprie-config-add-to-cart-btn",ref:s,onClick:e,children:"ADD TO CART"})]})}function G7({orbitalList:r,selectedOrbital:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeOrbital:s}){const o=Ye.useRef(null),l=Ye.useRef(null),h=()=>{o.current&&(o.current.textContent=mn.EnteredOrbitalsListSection)};return Ye.useEffect(()=>{i&&l.current&&l.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[i]),Se.jsxs("div",{className:"sprie-config-palette",ref:l,style:{display:n?"flex":"none",padding:"0 3rem",gap:sr?"3rem":"5rem"},children:[Se.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:o}),r==null?void 0:r.map(u=>Se.jsxs("div",{className:"sprie-config-palette-img-box",children:[Se.jsx("button",{"aria-labelledby":(e==null?void 0:e._id)===u._id?"sprie-config-orbitalName":"",style:{border:"0",cursor:t?"default":"pointer",width:sr?45:60,height:sr?45:60},onClick:()=>s(u),onFocus:h,disabled:t,children:Se.jsx("img",{"aria-label":`Select orbital ${u.name}`,src:u.thumbnail,alt:u.name+"image",className:`sprie-config-image ${sr?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===u._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),Se.jsxs("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.5rem"},children:[Se.jsx("span",{className:"sprie-config-palette-imgName",children:u.name}),Se.jsx("span",{id:"sprie-config-orbitalName",className:"sprie-config-sr-only",children:`Selected orbital ${u.name}`})]})]},u._id))]})}const V7="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8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})),[t,n]=Ye.useState(),i=s=>{n(s),r(s)};return Se.jsx("div",{className:"sprie-3d-snap-button-block",children:e.map((s,o)=>Se.jsx("button",{className:"sprie-3d-snap-button","aria-label":`orient 3d frame to ${s.label} view`,style:{backgroundColor:t!==s.label?"#ccc":"#000",color:t!==s.label?"#f3f3f3":"#fff"},onClick:()=>{i(Mf[s.label])},children:s.label},o))})}function q7({frameName:r,customEvent:e,apiService:t,frameList:n,lensList:i,orbitalList:s,showOrbitalList:o,viewerOnly:l,domService:h,ThreeDConfigurator:u,dataVariants:d,dataLenses:A,dataOrbitals:p,firstDitaVariant:g}){const[_,E]=Ye.useState(0),[m,v]=Ye.useState(),[w,x]=Ye.useState(),[I,R]=Ye.useState(),[S,T]=Ye.useState(),[D,b]=Ye.useState(!1),[M,L]=Ye.useState(!1);Ye.useState(!1),Ye.useState(!1);const[P,N]=Ye.useState(sr?M?35:30:M?28:25),[W,X]=Ye.useState(sr?10:8),[K,te]=Ye.useState(),[V,ee]=Ye.useState(),[Q,z]=Ye.useState(),[Z,re]=Ye.useState(!1),[j,de]=Ye.useState("placeholder"),[Ae,_e]=Ye.useState(0),Ee=Ye.useRef(null),Le=Ye.useRef(),st=Ye.useRef(null);Le.current=h;const se={variantId:0,variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",varinatSku:"lens-default"};let et,Qe,ct;const Ke=fe=>{Le.current&&(Le.current.snapCameraToPos(fe),Me(mn[`ChangedView${fe}`]))},pt=async(fe,De)=>{fe._id===(w==null?void 0:w._id)&&!De||Le.current&&(b(!0),Le.current.changeFrame(fe,[I,S]).then(()=>{b(!1)}),x(fe),te(d==null?void 0:d.find(Be=>Be.varinatSku==fe.sku)),Me(`${mn.ChangedFrame}${fe.name}`))},Y=fe=>fe==null?void 0:fe.customisation.find(Be=>Be.type=="Lens"),k=async fe=>{var nt;if(!Le.current||fe==I)return;const De=fe.sku=="lens-default",Be=Y(w),be=me();if(!Be&&De?(b(!0),Le.current.changeLens([fe,S],!0,w).then(()=>{b(!1)})):!Be&&!De?(I==null?void 0:I.sku)=="lens-default"?(b(!0),Le.current.changeLens([fe,S],!0,w).then(()=>{b(!1)})):Le.current.changeLens([fe,S],!1,w):Be&&De?Le.current.changeLens([Be,S],!1,w):Le.current.changeLens([fe,S],!1,w),fe.sku=="lens-default")ee(se),Me(`${mn.ChangedLens}${se.variantName}`);else{const lt=(nt=fe.metadata.find(ut=>ut.key==be))==null?void 0:nt.value,dt=A==null?void 0:A.find(ut=>ut.variantId===Number.parseInt(lt));ee(dt),Me(`${mn.ChangedLens}${fe.name}. Price will increase by ${V==null?void 0:V.variantPrice} ${V==null?void 0:V.priceCurrency}`)}R(fe)},le=async fe=>{Le.current&&fe!=S&&(b(!0),await Le.current.changeOrbital(fe).then(()=>{z(p==null?void 0:p.find(De=>De.variantId==Number(fe.sku))),b(!1)}),T(fe),Me(`${mn.ChangedOrbital}${fe.name}`))},pe=()=>{if(K&&V){const fe=K.variantPrice,De=V.variantPrice;return fe+De}return 0},me=()=>{var Be;if(!w)return;const fe=(Be=w.metadata.find(be=>be.key=="baseCurve"))==null?void 0:Be.value;let De="variantId";return fe=="2B"?De="2bVariantId":fe=="6B"&&(De="6bVariantId"),De},ye=fe=>{re(fe)},Ge=fe=>{de(fe)},Ie=()=>{var fe,De;sr?(fe=document.querySelector('[id$="main-laser-etch-popover"]'))==null||fe.setAttribute("open",""):(De=document.querySelector('[id$="main-laser-etch-drawer"]'))==null||De.setAttribute("open","")},je=()=>{if(o&&!Q||!(w&&I)||w.name.toLowerCase().includes("default")||I.name.toLowerCase().includes("default"))return;const fe=w.metadata.find(O=>O.key=="variantId"),De=w.metadata.find(O=>O.key=="baseCurve");let Be="variantId";De&&De.value=="2B"?Be="2bVariantId":De&&De.value=="6B"&&(Be="6bVariantId");const be=I.metadata.find(O=>O.key==Be),nt=fe?Number(fe.value):null,lt=be?Number(be.value):null,dt=Q!=null&&Q.variantId?Number(Q.variantId):null,ut={frameIdentifier:nt,lensIdentifier:lt,orbitalIdentifier:dt};e.emitEvent("onAddToCart",ut);const ht=new Date().getTime(),G=[];if(lt&&be){const O={id:lt,quantity:1,properties:{_uniqueTimestamp:ht}};G.push(O)}if(dt&&(Q!=null&&Q.variantId)){const O={id:dt,quantity:1,properties:{_uniqueTimestamp:ht}};G.push(O)}if(Z){const O={id:44745490890985,quantity:1,properties:{_uniqueTimestamp:ht}};G.push(O)}if(fe){const O={id:nt,quantity:1,properties:Z?{_uniqueTimestamp:ht,customText:j}:{_uniqueTimestamp:ht}};G.push(O)}t.HandleShopifyAddToCart(G,ht)},Ve=()=>{var fe,De;sr?(fe=document.querySelector(".popover.hidden-lap-and-up.popover-full"))==null||fe.removeAttribute("open"):(De=document.querySelector(".drawer.drawer--full.hidden-phone.lens-customizer"))==null||De.removeAttribute("open")};Ye.useEffect(()=>{N(sr?M?35:30:M?28:25)},[M]),Ye.useEffect(()=>{n&&(o?n&&!et&&(et=n.find(fe=>fe._id=="660c23a0d1d8f617271918f3"),x(et)):x(n[0]))},[n]),Ye.useEffect(()=>{o?(i&&!I&&(Qe=i.find(fe=>fe._id=="65111d718d4c652ece493034"),k(Qe).then(()=>_e(pe()))),s&&!ct&&(ct=s.find(fe=>fe._id=="660c1c0231c23bd36b188fd4"),le(ct))):i&&!I&&R(i[0])},[w]),Ye.useEffect(()=>{te(g)},[g]),Ye.useEffect(()=>{},[Z,j]),Ye.useEffect(()=>{_e(pe())},[K,V]);const Me=fe=>{st.current&&(st.current.textContent=fe)};return Se.jsxs("section",{id:"sprie-config-main-container",ref:Ee,children:[!l&&Se.jsxs("header",{id:"sprie-config-main-header",style:{height:`${W}%`},children:[Se.jsxs("div",{id:"sprie-config-header-content",children:[Se.jsx("img",{src:V7,alt:"dita-logo",width:97,height:20}),Se.jsxs("p",{style:{margin:"0"},className:"sprie-config-mainHeader-frameName",children:[r," CUSTOMIZER"]})]}),Se.jsx("button",{className:"sprie-config-main-header-close",onClick:Ve,"aria-label":"close frame customizer",children:Se.jsx("img",{src:W7,alt:"close",style:{width:"2rem",height:"2rem"}})})]}),Se.jsx("span",{className:"sprie-config-sr-only",ref:st,"aria-live":"assertive"}),Se.jsxs("section",{tabIndex:0,"aria-label":"3D viewer",onFocus:()=>Me(mn.EnteredViewer),id:"sprie-config-viewer-container",style:{height:`${l?100:100-(P+W+(sr?8.5:0))}%`},children:[!l&&Se.jsx("img",{src:j7,alt:"360deg-logo",width:44,height:34}),!l&&Se.jsx(Y7,{snapCameraTo:Ke}),D&&Se.jsx("div",{className:"sprie-config-loadingFrame",children:Se.jsx("div",{className:"sprie-config-loader"})}),Se.jsx("div",{style:{width:"100%",height:"100%"},id:"holder-canvas"})]}),!l&&Se.jsxs("section",{id:"Sprie-config-Cust-block",style:{height:`${P}%`},children:[Se.jsxs(H7,{setShowAddToCart:L,setSelectedChild:E,setSectionEntered:v,children:[Se.jsx(k7,{modelLoading:D,frameList:n,selectedFrame:w,isSelected:_===0,onChangeFrame:pt,heading:"SELECT FRAME COLOR",paletteEntered:m===0}),o&&Se.jsx(G7,{orbitalList:s,selectedOrbital:S,modelLoading:D,isSelected:_===1,onChangeOrbital:le,heading:"SELECT ORBITAL COLOR",paletteEntered:m===1}),Se.jsx(Q7,{modelLoading:D,lensList:i,selectedLens:I,selectedDitaLens:V,isSelected:_===(o?2:1),paletteEntered:m===(o?2:1),onChangeLens:k,heading:"SELECT LENS COLOR"}),Se.jsx(O7,{heading:"LASER ENGRAVING",isSelected:_===(o?3:2),paletteEntered:m===(o?3:2),onEngravingLinkClicked:Ie,onChecked:ye,onTextAdded:Ge})]}),Se.jsxs("div",{className:"sprie-config-price-block",children:[Se.jsx("p",{id:"sprie-config-price-text",style:{bottom:sr?"100%":"",margin:"0 0.8rem 0.5rem 0"},children:`${Ae}.00 ${K==null?void 0:K.priceCurrency} `}),!sr&&M&&Se.jsx($I,{conditionRequired:!0,onButtonClick:je}),M&&Se.jsx("p",{id:"sprie-config-process-time-text",style:{fontSize:".9rem",textAlign:"right",marginTop:"0",marginBottom:"0.5rem"},children:"Please Allow 7-10 Days for Customization Process."})]}),sr&&M&&Se.jsx("div",{style:{position:"absolute",bottom:"0%",width:"100%"},children:Se.jsx($I,{conditionRequired:!0,onButtonClick:je})})]})]})}function X7({apiService:r,sku:e,events:t,viewerOnly:n=!1}){var A;const i=Ye.useRef(),[s,o]=Ye.useState(null),l=(s==null?void 0:s.frameName)||"",h=(s==null?void 0:s.frameList)||null,u=(s==null?void 0:s.lensList)||null,d=(s==null?void 0:s.orbitalList)||null;return s!=null&&s.dataVariants,s!=null&&s.dataLenses,s!=null&&s.dataOrbitals,Ye.useEffect(()=>((async()=>{var v,w;i.current=new ZI,await((v=i.current)==null?void 0:v.Init(r.apiKey)),e.includes("7806")&&e.endsWith("x")&&(e="7806-G-SMK-PLD-52-Zx");const p=await r.FetchAssetBySKUOrBarcode({sku:e,barcode:null}),g=((w=p==null?void 0:p.customisation)==null?void 0:w.filter(x=>x.type==="Orbital").length)>0,_=await r.FetchCustomisationList("Lens",!g),E=await r.FetchCustomisationList("Orbital",!g),m=await i.current.getInstance({containerId:"holder-canvas"});await m.loadFrame({containerId:"holder-canvas",data:{assetDetails:p,customisation:p==null?void 0:p.customisation}}),o({frameList:p==null?void 0:p.variants,lensList:_==null?void 0:_.data,orbitalList:E==null?void 0:E.data,frameName:p==null?void 0:p.group.name,showOrbitals:g,domService:m,dataVariants:await r.PopulateDataList("data-variants"),dataLenses:await r.PopulateDataList("data-lenses"),dataOrbitals:await r.PopulateDataList("data-orbital")})})(),()=>{i.current=void 0}),[r,e]),Se.jsxs(Se.Fragment,{children:[(!h||!u)&&Se.jsxs("div",{children:[Se.jsx("span",{id:"sprie-config-loader-srtext",className:"sprie-config-sr-only",children:"Loading frame customiser"}),Se.jsx("div",{className:"sprie-config-loadingBox","aria-labelledby":"sprie-config-loader-srtext",children:"Loading..."})]}),Se.jsx(q7,{customEvent:t,frameName:l,apiService:r,frameList:h,lensList:u,orbitalList:d,showOrbitalList:(s==null?void 0:s.showOrbitals)||!1,viewerOnly:n,ThreeDConfigurator:i.current,domService:s==null?void 0:s.domService,dataVariants:s==null?void 0:s.dataVariants,dataLenses:s==null?void 0:s.dataLenses,dataOrbitals:s==null?void 0:s.dataOrbitals,firstDitaVariant:(A=s==null?void 0:s.dataVariants)==null?void 0:A.find(p=>p.varinatSku==e)})]})}var a0={},eC={exports:{}},bn={},o0={exports:{}},l0={};/**
4558
+ Press enter to `+(l?"configure your optional custom engraving. Add to cart button is now present at the end of this section.":"select or press tab for next.")}),Se.jsxs("div",{tabIndex:0,style:{height:"30%",alignContent:"center"},"aria-labelledby":"sprie-config-step-selector",onKeyDown:p,ref:h,children:[Se.jsx(z7,{nextSlide:A,previousSlide:d,currentIndex:i,stepsName:u,isLastStep:l}),Se.jsx(F7,{totalSteps:u==null?void 0:u.length,currentStep:i+1})]}),Se.jsx("div",{className:"carousel-container",style:{paddingTop:sr?"":"1rem"},children:o.map((_,E)=>Se.jsx("div",{className:"carousel-item",style:{transform:`translateX(-${i*100}%)`},children:_},E))})]})}const aO="";function $I({conditionRequired:r,onButtonClick:e}){const[t,n]=Ye.useState(!1),i=Ye.useRef(null),s=Ye.useRef(null);return Ye.useEffect(()=>{s.current&&(s.current.disabled=!t)},[t]),Ye.useEffect(()=>{i.current&&(i.current.style.display=r?"flex":"none"),s.current&&(s.current.disabled=r)},[r]),Se.jsxs("div",{className:"sprie-config-add-to-cart-block",children:[Se.jsxs("label",{htmlFor:"Sprie-Config-return-policy-checkbox",id:"Sprie-Config-return-policy-label",ref:i,style:{display:"none"},children:[Se.jsx("input",{type:"checkbox","aria-label":"return policy checkbox","aria-describedby":"sprie-config-return-policy-desc",id:"Sprie-Config-return-policy-checkbox",name:"sprie-config-return-policy-checkbox",onChange:o=>n(o.target.checked),checked:t}),Se.jsx("p",{id:"sprie-config-return-policy-desc",children:"I agree this customized Item cannot be returned or exchanged."})]}),Se.jsx("button",{className:"sprie-config-add-to-cart-btn",ref:s,onClick:e,children:"ADD TO CART"})]})}function G7({orbitalList:r,selectedOrbital:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeOrbital:s}){const o=Ye.useRef(null),l=Ye.useRef(null),h=()=>{o.current&&(o.current.textContent=mn.EnteredOrbitalsListSection)};return Ye.useEffect(()=>{i&&l.current&&l.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[i]),Se.jsxs("div",{className:"sprie-config-palette",ref:l,style:{display:n?"flex":"none",padding:"0 3rem",gap:sr?"3rem":"5rem"},children:[Se.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:o}),r==null?void 0:r.map(u=>Se.jsxs("div",{className:"sprie-config-palette-img-box",children:[Se.jsx("button",{"aria-labelledby":(e==null?void 0:e._id)===u._id?"sprie-config-orbitalName":"",style:{border:"0",cursor:t?"default":"pointer",width:sr?45:60,height:sr?45:60},onClick:()=>s(u),onFocus:h,disabled:t,children:Se.jsx("img",{"aria-label":`Select orbital ${u.name}`,src:u.thumbnail,alt:u.name+"image",className:`sprie-config-image ${sr?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===u._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),Se.jsxs("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.5rem"},children:[Se.jsx("span",{className:"sprie-config-palette-imgName",children:u.name}),Se.jsx("span",{id:"sprie-config-orbitalName",className:"sprie-config-sr-only",children:`Selected orbital ${u.name}`})]})]},u._id))]})}const V7="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3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E1LjM2NjkzNyAxMy44MDQ5MzcgMTYuNjMzMDYzIDE0LjU4NTkzOCAxNy40MTQwNjIgTCAyOS4xNzE4NzUgMzIgTCAxNC41ODU5MzggNDYuNTg1OTM4IEMgMTMuODA0OTM4IDQ3LjM2NjkzOCAxMy44MDQ5MzcgNDguNjMzMDYzIDE0LjU4NTkzOCA0OS40MTQwNjIgQyAxNC45NzY5MzcgNDkuODA1MDYyIDE1LjQ4OCA1MCAxNiA1MCBDIDE2LjUxMiA1MCAxNy4wMjMwNjIgNDkuODA1MDYyIDE3LjQxNDA2MiA0OS40MTQwNjIgTCAzMiAzNC44MjgxMjUgTCA0Ni41ODU5MzggNDkuNDE0MDYyIEMgNDcuMzY2OTM4IDUwLjE5NTA2MyA0OC42MzMwNjMgNTAuMTk1MDYyIDQ5LjQxNDA2MiA0OS40MTQwNjIgQyA1MC4xOTUwNjMgNDguNjMzMDYyIDUwLjE5NTA2MiA0Ny4zNjY5MzcgNDkuNDE0MDYyIDQ2LjU4NTkzOCBMIDM0LjgyODEyNSAzMiBMIDQ5LjQxNDA2MiAxNy40MTQwNjIgQyA1MC4xOTUwNjMgMTYuNjMzMDYzIDUwLjE5NTA2MiAxNS4zNjY5MzggNDkuNDE0MDYyIDE0LjU4NTkzOCBDIDQ4LjYzMzA2MiAxMy44MDQ5MzggNDcuMzY2OTM3IDEzLjgwNDkzOCA0Ni41ODU5MzggMTQuNTg1OTM4IEwgMzIgMjkuMTcxODc1IEwgMTcuNDE0MDYyIDE0LjU4NTkzOCBDIDE3LjAyMzA2MiAxNC4xOTQ5MzggMTYuNTEyIDE0IDE2IDE0IHoiLz48L3N2Zz4=",oO="";function Y7({snapCameraTo:r}){const e=Object.keys(Mf).map(s=>({label:Mf[s],isDisabled:!0})),[t,n]=Ye.useState(),i=s=>{n(s),r(s)};return Se.jsx("div",{className:"sprie-3d-snap-button-block",children:e.map((s,o)=>Se.jsx("button",{className:"sprie-3d-snap-button","aria-label":`orient 3d frame to ${s.label} view`,style:{backgroundColor:t!==s.label?"#ccc":"#000",color:t!==s.label?"#f3f3f3":"#fff"},onClick:()=>{i(Mf[s.label])},children:s.label},o))})}function q7({frameName:r,customEvent:e,apiService:t,frameList:n,lensList:i,orbitalList:s,showOrbitalList:o,viewerOnly:l,domService:h,ThreeDConfigurator:u,dataVariants:d,dataLenses:A,dataOrbitals:p,firstDitaVariant:g}){const[_,E]=Ye.useState(0),[m,v]=Ye.useState(),[w,x]=Ye.useState(),[I,R]=Ye.useState(),[S,T]=Ye.useState(),[D,b]=Ye.useState(!1),[M,L]=Ye.useState(!1);Ye.useState(!1),Ye.useState(!1);const[P,N]=Ye.useState(sr?M?35:30:M?28:25),[W,X]=Ye.useState(sr?10:8),[K,te]=Ye.useState(),[V,ee]=Ye.useState(),[Q,z]=Ye.useState(),[Z,re]=Ye.useState(!1),[j,de]=Ye.useState("placeholder"),[Ae,_e]=Ye.useState(0),Ee=Ye.useRef(null),Le=Ye.useRef(),st=Ye.useRef(null);Le.current=h;const se={variantId:0,variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",varinatSku:"lens-default"};let et,Qe,ht;const Ke=fe=>{Le.current&&(Le.current.snapCameraToPos(fe),Me(mn[`ChangedView${fe}`]))},pt=async(fe,De)=>{fe._id===(w==null?void 0:w._id)&&!De||Le.current&&(b(!0),Le.current.changeFrame(fe,[I,S]).then(()=>{b(!1)}),x(fe),te(d==null?void 0:d.find(Be=>Be.varinatSku==fe.sku)),Me(`${mn.ChangedFrame}${fe.name}`))},Y=fe=>fe==null?void 0:fe.customisation.find(Be=>Be.type=="Lens"),k=async fe=>{var nt;if(!Le.current||fe==I)return;const De=fe.sku=="lens-default",Be=Y(w),be=me();if(!Be&&De?(b(!0),Le.current.changeLens([fe,S],!0,w).then(()=>{b(!1)})):!Be&&!De?(I==null?void 0:I.sku)=="lens-default"?(b(!0),Le.current.changeLens([fe,S],!0,w).then(()=>{b(!1)})):Le.current.changeLens([fe,S],!1,w):Be&&De?Le.current.changeLens([Be,S],!1,w):Le.current.changeLens([fe,S],!1,w),fe.sku=="lens-default")ee(se),Me(`${mn.ChangedLens}${se.variantName}`);else{const lt=(nt=fe.metadata.find(ct=>ct.key==be))==null?void 0:nt.value,dt=A==null?void 0:A.find(ct=>ct.variantId===Number.parseInt(lt));ee(dt),Me(`${mn.ChangedLens}${fe.name}. Price will increase by ${V==null?void 0:V.variantPrice} ${V==null?void 0:V.priceCurrency}`)}R(fe)},le=async fe=>{Le.current&&fe!=S&&(b(!0),await Le.current.changeOrbital(fe).then(()=>{z(p==null?void 0:p.find(De=>De.variantId==Number(fe.sku))),b(!1)}),T(fe),Me(`${mn.ChangedOrbital}${fe.name}`))},pe=()=>{if(K&&V){const fe=K.variantPrice,De=V.variantPrice;return fe+De}return 0},me=()=>{var Be;if(!w)return;const fe=(Be=w.metadata.find(be=>be.key=="baseCurve"))==null?void 0:Be.value;let De="variantId";return fe=="2B"?De="2bVariantId":fe=="6B"&&(De="6bVariantId"),De},ye=fe=>{re(fe)},Ge=fe=>{de(fe)},Ie=()=>{var fe,De;sr?(fe=document.querySelector('[id$="main-laser-etch-popover"]'))==null||fe.setAttribute("open",""):(De=document.querySelector('[id$="main-laser-etch-drawer"]'))==null||De.setAttribute("open","")},je=()=>{if(o&&!Q||!(w&&I)||w.name.toLowerCase().includes("default")||I.name.toLowerCase().includes("default"))return;const fe=w.metadata.find(O=>O.key=="variantId"),De=w.metadata.find(O=>O.key=="baseCurve");let Be="variantId";De&&De.value=="2B"?Be="2bVariantId":De&&De.value=="6B"&&(Be="6bVariantId");const be=I.metadata.find(O=>O.key==Be),nt=fe?Number(fe.value):null,lt=be?Number(be.value):null,dt=Q!=null&&Q.variantId?Number(Q.variantId):null,ct={frameIdentifier:nt,lensIdentifier:lt,orbitalIdentifier:dt};e.emitEvent("onAddToCart",ct);const ut=new Date().getTime(),G=[];if(lt&&be){const O={id:lt,quantity:1,properties:{_uniqueTimestamp:ut}};G.push(O)}if(dt&&(Q!=null&&Q.variantId)){const O={id:dt,quantity:1,properties:{_uniqueTimestamp:ut}};G.push(O)}if(Z){const O={id:44745490890985,quantity:1,properties:{_uniqueTimestamp:ut}};G.push(O)}if(fe){const O={id:nt,quantity:1,properties:Z?{_uniqueTimestamp:ut,customText:j}:{_uniqueTimestamp:ut}};G.push(O)}t.HandleShopifyAddToCart(G,ut)},Ve=()=>{var fe,De;sr?(fe=document.querySelector(".popover.hidden-lap-and-up.popover-full"))==null||fe.removeAttribute("open"):(De=document.querySelector(".drawer.drawer--full.hidden-phone.lens-customizer"))==null||De.removeAttribute("open")};Ye.useEffect(()=>{N(sr?M?35:30:M?28:25)},[M]),Ye.useEffect(()=>{n&&(o?n&&!et&&(et=n.find(fe=>fe._id=="660c23a0d1d8f617271918f3"),x(et)):x(n[0]))},[n]),Ye.useEffect(()=>{o?(i&&!I&&(Qe=i.find(fe=>fe._id=="65111d718d4c652ece493034"),k(Qe).then(()=>_e(pe()))),s&&!S&&(ht=s.find(fe=>fe._id=="660c1c0231c23bd36b188fd4"),le(ht))):i&&!I&&R(i[0])},[w]),Ye.useEffect(()=>{te(g)},[g]),Ye.useEffect(()=>{},[Z,j]),Ye.useEffect(()=>{_e(pe())},[K,V]);const Me=fe=>{st.current&&(st.current.textContent=fe)};return Se.jsxs("section",{id:"sprie-config-main-container",ref:Ee,children:[!l&&Se.jsxs("header",{id:"sprie-config-main-header",style:{height:`${W}%`},children:[Se.jsxs("div",{id:"sprie-config-header-content",children:[Se.jsx("img",{src:V7,alt:"dita-logo",width:97,height:20}),Se.jsxs("p",{style:{margin:"0"},className:"sprie-config-mainHeader-frameName",children:[r," CUSTOMIZER"]})]}),Se.jsx("button",{className:"sprie-config-main-header-close",onClick:Ve,"aria-label":"close frame customizer",children:Se.jsx("img",{src:W7,alt:"close",style:{width:"2rem",height:"2rem"}})})]}),Se.jsx("span",{className:"sprie-config-sr-only",ref:st,"aria-live":"assertive"}),Se.jsxs("section",{tabIndex:0,"aria-label":"3D viewer",onFocus:()=>Me(mn.EnteredViewer),id:"sprie-config-viewer-container",style:{height:`${l?100:100-(P+W+(sr?8.5:0))}%`},children:[!l&&Se.jsx("img",{src:j7,alt:"360deg-logo",width:44,height:34}),!l&&Se.jsx(Y7,{snapCameraTo:Ke}),D&&Se.jsx("div",{className:"sprie-config-loadingFrame",children:Se.jsx("div",{className:"sprie-config-loader"})}),Se.jsx("div",{style:{width:"100%",height:"100%"},id:"holder-canvas"})]}),!l&&Se.jsxs("section",{id:"Sprie-config-Cust-block",style:{height:`${P}%`},children:[Se.jsxs(H7,{setShowAddToCart:L,setSelectedChild:E,setSectionEntered:v,children:[Se.jsx(k7,{modelLoading:D,frameList:n,selectedFrame:w,isSelected:_===0,onChangeFrame:pt,heading:"SELECT FRAME COLOR",paletteEntered:m===0}),o&&Se.jsx(G7,{orbitalList:s,selectedOrbital:S,modelLoading:D,isSelected:_===1,onChangeOrbital:le,heading:"SELECT ORBITAL COLOR",paletteEntered:m===1}),Se.jsx(Q7,{modelLoading:D,lensList:i,selectedLens:I,selectedDitaLens:V,isSelected:_===(o?2:1),paletteEntered:m===(o?2:1),onChangeLens:k,heading:"SELECT LENS COLOR"}),Se.jsx(O7,{heading:"LASER ENGRAVING",isSelected:_===(o?3:2),paletteEntered:m===(o?3:2),onEngravingLinkClicked:Ie,onChecked:ye,onTextAdded:Ge})]}),Se.jsxs("div",{className:"sprie-config-price-block",children:[Se.jsx("p",{id:"sprie-config-price-text",style:{bottom:sr?"100%":"",margin:"0 0.8rem 0.5rem 0"},children:`${Ae}.00 ${K==null?void 0:K.priceCurrency} `}),!sr&&M&&Se.jsx($I,{conditionRequired:!0,onButtonClick:je}),M&&Se.jsx("p",{id:"sprie-config-process-time-text",style:{fontSize:".9rem",textAlign:"right",marginTop:"0",marginBottom:"0.5rem"},children:"Please Allow 7-10 Days for Customization Process."})]}),sr&&M&&Se.jsx("div",{style:{position:"absolute",bottom:"0%",width:"100%"},children:Se.jsx($I,{conditionRequired:!0,onButtonClick:je})})]})]})}function X7({apiService:r,sku:e,events:t,viewerOnly:n=!1}){var A;const i=Ye.useRef(),[s,o]=Ye.useState(null),l=(s==null?void 0:s.frameName)||"",h=(s==null?void 0:s.frameList)||null,u=(s==null?void 0:s.lensList)||null,d=(s==null?void 0:s.orbitalList)||null;return s!=null&&s.dataVariants,s!=null&&s.dataLenses,s!=null&&s.dataOrbitals,Ye.useEffect(()=>((async()=>{var v,w;i.current=new ZI,await((v=i.current)==null?void 0:v.Init(r.apiKey)),e.includes("7806")&&e.endsWith("x")&&(e="7806-G-SMK-PLD-52-Zx");const p=await r.FetchAssetBySKUOrBarcode({sku:e,barcode:null}),g=((w=p==null?void 0:p.customisation)==null?void 0:w.filter(x=>x.type==="Orbital").length)>0,_=await r.FetchCustomisationList("Lens",!g),E=await r.FetchCustomisationList("Orbital",!g),m=await i.current.getInstance({containerId:"holder-canvas"});await m.loadFrame({containerId:"holder-canvas",data:{assetDetails:p,customisation:p==null?void 0:p.customisation}}),o({frameList:p==null?void 0:p.variants,lensList:_==null?void 0:_.data,orbitalList:E==null?void 0:E.data,frameName:p==null?void 0:p.group.name,showOrbitals:g,domService:m,dataVariants:await r.PopulateDataList("data-variants"),dataLenses:await r.PopulateDataList("data-lenses"),dataOrbitals:await r.PopulateDataList("data-orbital")})})(),()=>{i.current=void 0}),[r,e]),Se.jsxs(Se.Fragment,{children:[(!h||!u)&&Se.jsxs("div",{children:[Se.jsx("span",{id:"sprie-config-loader-srtext",className:"sprie-config-sr-only",children:"Loading frame customiser"}),Se.jsx("div",{className:"sprie-config-loadingBox","aria-labelledby":"sprie-config-loader-srtext",children:"Loading..."})]}),Se.jsx(q7,{customEvent:t,frameName:l,apiService:r,frameList:h,lensList:u,orbitalList:d,showOrbitalList:(s==null?void 0:s.showOrbitals)||!1,viewerOnly:n,ThreeDConfigurator:i.current,domService:s==null?void 0:s.domService,dataVariants:s==null?void 0:s.dataVariants,dataLenses:s==null?void 0:s.dataLenses,dataOrbitals:s==null?void 0:s.dataOrbitals,firstDitaVariant:(A=s==null?void 0:s.dataVariants)==null?void 0:A.find(p=>p.varinatSku==e)})]})}var a0={},eC={exports:{}},bn={},o0={exports:{}},l0={};/**
4559
4559
  * @license React
4560
4560
  * scheduler.production.min.js
4561
4561
  *
@@ -4575,7 +4575,7 @@ bool bvhIntersectFirstHit(
4575
4575
  `+z+a}var re=!1;function j(a,c){if(!a||re)return"";re=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(ce){var y=ce}Reflect.construct(a,[],c)}else{try{c.call()}catch(ce){y=ce}a.call(c.prototype)}else{try{throw Error()}catch(ce){y=ce}a()}}catch(ce){if(ce&&y&&typeof ce.stack=="string"){for(var C=ce.stack.split(`
4576
4576
  `),B=y.stack.split(`
4577
4577
  `),U=C.length-1,q=B.length-1;1<=U&&0<=q&&C[U]!==B[q];)q--;for(;1<=U&&0<=q;U--,q--)if(C[U]!==B[q]){if(U!==1||q!==1)do if(U--,q--,0>q||C[U]!==B[q]){var J=`
4578
- `+C[U].replace(" at new "," at ");return a.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",a.displayName)),J}while(1<=U&&0<=q);break}}}finally{re=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?Z(a):""}function de(a){switch(a.tag){case 5:return Z(a.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return a=j(a.type,!1),a;case 11:return a=j(a.type.render,!1),a;case 1:return a=j(a.type,!0),a;default:return""}}function Ae(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case T:return"Fragment";case S:return"Portal";case b:return"Profiler";case D:return"StrictMode";case N:return"Suspense";case W:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case L:return(a.displayName||"Context")+".Consumer";case M:return(a._context.displayName||"Context")+".Provider";case P:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case X:return c=a.displayName||null,c!==null?c:Ae(a.type)||"Memo";case K:c=a._payload,a=a._init;try{return Ae(a(c))}catch{}}return null}function _e(a){var c=a.type;switch(a.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=c.render,a=a.displayName||a.name||"",c.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ae(c);case 8:return c===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function Ee(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Le(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function st(a){var c=Le(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,c),y=""+a[c];if(!a.hasOwnProperty(c)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var C=f.get,B=f.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return C.call(this)},set:function(U){y=""+U,B.call(this,U)}}),Object.defineProperty(a,c,{enumerable:f.enumerable}),{getValue:function(){return y},setValue:function(U){y=""+U},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function se(a){a._valueTracker||(a._valueTracker=st(a))}function et(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),y="";return a&&(y=Le(a)?a.checked?"true":"false":a.value),a=y,a!==f?(c.setValue(a),!0):!1}function Qe(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function ct(a,c){var f=c.checked;return Q({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function Ke(a,c){var f=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;f=Ee(c.value!=null?c.value:f),a._wrapperState={initialChecked:y,initialValue:f,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function pt(a,c){c=c.checked,c!=null&&x(a,"checked",c,!1)}function Y(a,c){pt(a,c);var f=Ee(c.value),y=c.type;if(f!=null)y==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(y==="submit"||y==="reset"){a.removeAttribute("value");return}c.hasOwnProperty("value")?le(a,c.type,f):c.hasOwnProperty("defaultValue")&&le(a,c.type,Ee(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function k(a,c,f){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var y=c.type;if(!(y!=="submit"&&y!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+a._wrapperState.initialValue,f||c===a.value||(a.value=c),a.defaultValue=c}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function le(a,c,f){(c!=="number"||Qe(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var pe=Array.isArray;function me(a,c,f,y){if(a=a.options,c){c={};for(var C=0;C<f.length;C++)c["$"+f[C]]=!0;for(f=0;f<a.length;f++)C=c.hasOwnProperty("$"+a[f].value),a[f].selected!==C&&(a[f].selected=C),C&&y&&(a[f].defaultSelected=!0)}else{for(f=""+Ee(f),c=null,C=0;C<a.length;C++){if(a[C].value===f){a[C].selected=!0,y&&(a[C].defaultSelected=!0);return}c!==null||a[C].disabled||(c=a[C])}c!==null&&(c.selected=!0)}}function ye(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(t(91));return Q({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ge(a,c){var f=c.value;if(f==null){if(f=c.children,c=c.defaultValue,f!=null){if(c!=null)throw Error(t(92));if(pe(f)){if(1<f.length)throw Error(t(93));f=f[0]}c=f}c==null&&(c=""),f=c}a._wrapperState={initialValue:Ee(f)}}function Ie(a,c){var f=Ee(c.value),y=Ee(c.defaultValue);f!=null&&(f=""+f,f!==a.value&&(a.value=f),c.defaultValue==null&&a.defaultValue!==f&&(a.defaultValue=f)),y!=null&&(a.defaultValue=""+y)}function je(a){var c=a.textContent;c===a._wrapperState.initialValue&&c!==""&&c!==null&&(a.value=c)}function Ve(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Me(a,c){return a==null||a==="http://www.w3.org/1999/xhtml"?Ve(c):a==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var fe,De=function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,f,y,C){MSApp.execUnsafeLocalFunction(function(){return a(c,f,y,C)})}:a}(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(fe=fe||document.createElement("div"),fe.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=fe.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function Be(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var be={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nt=["Webkit","ms","Moz","O"];Object.keys(be).forEach(function(a){nt.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),be[c]=be[a]})});function lt(a,c,f){return c==null||typeof c=="boolean"||c===""?"":f||typeof c!="number"||c===0||be.hasOwnProperty(a)&&be[a]?(""+c).trim():c+"px"}function dt(a,c){a=a.style;for(var f in c)if(c.hasOwnProperty(f)){var y=f.indexOf("--")===0,C=lt(f,c[f],y);f==="float"&&(f="cssFloat"),y?a.setProperty(f,C):a[f]=C}}var ut=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ht(a,c){if(c){if(ut[a]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(t(137,a));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(t(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(t(61))}if(c.style!=null&&typeof c.style!="object")throw Error(t(62))}}function G(a,c){if(a.indexOf("-")===-1)return typeof c.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var O=null;function ge(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ve=null,Fe=null,Pe=null;function vt(a){if(a=vh(a)){if(typeof ve!="function")throw Error(t(280));var c=a.stateNode;c&&(c=Wf(c),ve(a.stateNode,a.type,c))}}function Lt(a){Fe?Pe?Pe.push(a):Pe=[a]:Fe=a}function Nt(){if(Fe){var a=Fe,c=Pe;if(Pe=Fe=null,vt(a),c)for(a=0;a<c.length;a++)vt(c[a])}}function Bt(a,c){return a(c)}function _t(){}var fr=!1;function Vt(a,c,f){if(fr)return a(c,f);fr=!0;try{return Bt(a,c,f)}finally{fr=!1,(Fe!==null||Pe!==null)&&(_t(),Nt())}}function Er(a,c){var f=a.stateNode;if(f===null)return null;var y=Wf(f);if(y===null)return null;f=y[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(t(231,c,typeof f));return f}var Rn=!1;if(l)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Rn=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch{Rn=!1}function pi(a,c,f,y,C,B,U,q,J){var ce=Array.prototype.slice.call(arguments,3);try{c.apply(f,ce)}catch(we){this.onError(we)}}var $n=!1,Us=null,Ps=!1,dc=null,Bf={onError:function(a){$n=!0,Us=a}};function d0(a,c,f,y,C,B,U,q,J){$n=!1,Us=null,pi.apply(Bf,arguments)}function f0(a,c,f,y,C,B,U,q,J){if(d0.apply(this,arguments),$n){if($n){var ce=Us;$n=!1,Us=null}else throw Error(t(198));Ps||(Ps=!0,dc=ce)}}function ks(a){var c=a,f=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,c.flags&4098&&(f=c.return),a=c.return;while(a)}return c.tag===3?f:null}function F(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function ne(a){if(ks(a)!==a)throw Error(t(188))}function ue(a){var c=a.alternate;if(!c){if(c=ks(a),c===null)throw Error(t(188));return c!==a?null:a}for(var f=a,y=c;;){var C=f.return;if(C===null)break;var B=C.alternate;if(B===null){if(y=C.return,y!==null){f=y;continue}break}if(C.child===B.child){for(B=C.child;B;){if(B===f)return ne(C),a;if(B===y)return ne(C),c;B=B.sibling}throw Error(t(188))}if(f.return!==y.return)f=C,y=B;else{for(var U=!1,q=C.child;q;){if(q===f){U=!0,f=C,y=B;break}if(q===y){U=!0,y=C,f=B;break}q=q.sibling}if(!U){for(q=B.child;q;){if(q===f){U=!0,f=B,y=C;break}if(q===y){U=!0,y=B,f=C;break}q=q.sibling}if(!U)throw Error(t(189))}}if(f.alternate!==y)throw Error(t(190))}if(f.tag!==3)throw Error(t(188));return f.stateNode.current===f?a:c}function he(a){return a=ue(a),a!==null?oe(a):null}function oe(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=oe(a);if(c!==null)return c;a=a.sibling}return null}var Re=e.unstable_scheduleCallback,Je=e.unstable_cancelCallback,it=e.unstable_shouldYield,at=e.unstable_requestPaint,Xe=e.unstable_now,At=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,Lr=e.unstable_UserBlockingPriority,er=e.unstable_NormalPriority,Dn=e.unstable_LowPriority,Ai=e.unstable_IdlePriority,jt=null,tt=null;function Ju(a){if(tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(jt,a,void 0,(a.current.flags&128)===128)}catch{}}var vn=Math.clz32?Math.clz32:Uo,Qs=Math.log,bf=Math.LN2;function Uo(a){return a>>>=0,a===0?32:31-(Qs(a)/bf|0)|0}var Ca=64,xr=4194304;function Ln(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Ma(a,c){var f=a.pendingLanes;if(f===0)return 0;var y=0,C=a.suspendedLanes,B=a.pingedLanes,U=f&268435455;if(U!==0){var q=U&~C;q!==0?y=Ln(q):(B&=U,B!==0&&(y=Ln(B)))}else U=f&~C,U!==0?y=Ln(U):B!==0&&(y=Ln(B));if(y===0)return 0;if(c!==0&&c!==y&&!(c&C)&&(C=y&-y,B=c&-c,C>=B||C===16&&(B&4194240)!==0))return c;if(y&4&&(y|=f&16),c=a.entangledLanes,c!==0)for(a=a.entanglements,c&=y;0<c;)f=31-vn(c),C=1<<f,y|=a[f],c&=~C;return y}function Nn(a,c){switch(a){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zu(a,c){for(var f=a.suspendedLanes,y=a.pingedLanes,C=a.expirationTimes,B=a.pendingLanes;0<B;){var U=31-vn(B),q=1<<U,J=C[U];J===-1?(!(q&f)||q&y)&&(C[U]=Nn(q,c)):J<=c&&(a.expiredLanes|=q),B&=~q}}function $u(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function eh(){var a=Ca;return Ca<<=1,!(Ca&4194240)&&(Ca=64),a}function p0(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function th(a,c,f){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-vn(c),a[c]=f}function mk(a,c){var f=a.pendingLanes&~c;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=c,a.mutableReadLanes&=c,a.entangledLanes&=c,c=a.entanglements;var y=a.eventTimes;for(a=a.expirationTimes;0<f;){var C=31-vn(f),B=1<<C;c[C]=0,y[C]=-1,a[C]=-1,f&=~B}}function A0(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var y=31-vn(f),C=1<<y;C&c|a[y]&c&&(a[y]|=c),f&=~C}}var kt=0;function _C(a){return a&=-a,1<a?4<a?a&268435455?16:536870912:4:1}var yC,g0,EC,xC,wC,m0=!1,Rf=[],Sa=null,Ta=null,Ba=null,rh=new Map,nh=new Map,ba=[],vk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function IC(a,c){switch(a){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":Ta=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":rh.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":nh.delete(c.pointerId)}}function ih(a,c,f,y,C,B){return a===null||a.nativeEvent!==B?(a={blockedOn:c,domEventName:f,eventSystemFlags:y,nativeEvent:B,targetContainers:[C]},c!==null&&(c=vh(c),c!==null&&g0(c)),a):(a.eventSystemFlags|=y,c=a.targetContainers,C!==null&&c.indexOf(C)===-1&&c.push(C),a)}function _k(a,c,f,y,C){switch(c){case"focusin":return Sa=ih(Sa,a,c,f,y,C),!0;case"dragenter":return Ta=ih(Ta,a,c,f,y,C),!0;case"mouseover":return Ba=ih(Ba,a,c,f,y,C),!0;case"pointerover":var B=C.pointerId;return rh.set(B,ih(rh.get(B)||null,a,c,f,y,C)),!0;case"gotpointercapture":return B=C.pointerId,nh.set(B,ih(nh.get(B)||null,a,c,f,y,C)),!0}return!1}function CC(a){var c=Po(a.target);if(c!==null){var f=ks(c);if(f!==null){if(c=f.tag,c===13){if(c=F(f),c!==null){a.blockedOn=c,wC(a.priority,function(){EC(f)});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Df(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=_0(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);O=y,f.target.dispatchEvent(y),O=null}else return c=vh(f),c!==null&&g0(c),a.blockedOn=f,!1;c.shift()}return!0}function MC(a,c,f){Df(a)&&f.delete(c)}function yk(){m0=!1,Sa!==null&&Df(Sa)&&(Sa=null),Ta!==null&&Df(Ta)&&(Ta=null),Ba!==null&&Df(Ba)&&(Ba=null),rh.forEach(MC),nh.forEach(MC)}function sh(a,c){a.blockedOn===c&&(a.blockedOn=null,m0||(m0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,yk)))}function ah(a){function c(C){return sh(C,a)}if(0<Rf.length){sh(Rf[0],a);for(var f=1;f<Rf.length;f++){var y=Rf[f];y.blockedOn===a&&(y.blockedOn=null)}}for(Sa!==null&&sh(Sa,a),Ta!==null&&sh(Ta,a),Ba!==null&&sh(Ba,a),rh.forEach(c),nh.forEach(c),f=0;f<ba.length;f++)y=ba[f],y.blockedOn===a&&(y.blockedOn=null);for(;0<ba.length&&(f=ba[0],f.blockedOn===null);)CC(f),f.blockedOn===null&&ba.shift()}var fc=I.ReactCurrentBatchConfig,Lf=!0;function Ek(a,c,f,y){var C=kt,B=fc.transition;fc.transition=null;try{kt=1,v0(a,c,f,y)}finally{kt=C,fc.transition=B}}function xk(a,c,f,y){var C=kt,B=fc.transition;fc.transition=null;try{kt=4,v0(a,c,f,y)}finally{kt=C,fc.transition=B}}function v0(a,c,f,y){if(Lf){var C=_0(a,c,f,y);if(C===null)P0(a,c,y,Nf,f),IC(a,y);else if(_k(C,a,c,f,y))y.stopPropagation();else if(IC(a,y),c&4&&-1<vk.indexOf(a)){for(;C!==null;){var B=vh(C);if(B!==null&&yC(B),B=_0(a,c,f,y),B===null&&P0(a,c,y,Nf,f),B===C)break;C=B}C!==null&&y.stopPropagation()}else P0(a,c,y,null,f)}}var Nf=null;function _0(a,c,f,y){if(Nf=null,a=ge(y),a=Po(a),a!==null)if(c=ks(a),c===null)a=null;else if(f=c.tag,f===13){if(a=F(c),a!==null)return a;a=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null);return Nf=a,null}function SC(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(At()){case ft:return 1;case Lr:return 4;case er:case Dn:return 16;case Ai:return 536870912;default:return 16}default:return 16}}var Ra=null,y0=null,Uf=null;function TC(){if(Uf)return Uf;var a,c=y0,f=c.length,y,C="value"in Ra?Ra.value:Ra.textContent,B=C.length;for(a=0;a<f&&c[a]===C[a];a++);var U=f-a;for(y=1;y<=U&&c[f-y]===C[B-y];y++);return Uf=C.slice(a,1<y?1-y:void 0)}function Pf(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function kf(){return!0}function BC(){return!1}function ei(a){function c(f,y,C,B,U){this._reactName=f,this._targetInst=C,this.type=y,this.nativeEvent=B,this.target=U,this.currentTarget=null;for(var q in a)a.hasOwnProperty(q)&&(f=a[q],this[q]=f?f(B):B[q]);return this.isDefaultPrevented=(B.defaultPrevented!=null?B.defaultPrevented:B.returnValue===!1)?kf:BC,this.isPropagationStopped=BC,this}return Q(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=kf)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=kf)},persist:function(){},isPersistent:kf}),c}var pc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},E0=ei(pc),oh=Q({},pc,{view:0,detail:0}),wk=ei(oh),x0,w0,lh,Qf=Q({},oh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:C0,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==lh&&(lh&&a.type==="mousemove"?(x0=a.screenX-lh.screenX,w0=a.screenY-lh.screenY):w0=x0=0,lh=a),x0)},movementY:function(a){return"movementY"in a?a.movementY:w0}}),bC=ei(Qf),Ik=Q({},Qf,{dataTransfer:0}),Ck=ei(Ik),Mk=Q({},oh,{relatedTarget:0}),I0=ei(Mk),Sk=Q({},pc,{animationName:0,elapsedTime:0,pseudoElement:0}),Tk=ei(Sk),Bk=Q({},pc,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),bk=ei(Bk),Rk=Q({},pc,{data:0}),RC=ei(Rk),Dk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Nk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uk(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=Nk[a])?!!c[a]:!1}function C0(){return Uk}var Pk=Q({},oh,{key:function(a){if(a.key){var c=Dk[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Pf(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Lk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:C0,charCode:function(a){return a.type==="keypress"?Pf(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Pf(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),kk=ei(Pk),Qk=Q({},Qf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DC=ei(Qk),Ok=Q({},oh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:C0}),Fk=ei(Ok),zk=Q({},pc,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hk=ei(zk),Gk=Q({},Qf,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Vk=ei(Gk),jk=[9,13,27,32],M0=l&&"CompositionEvent"in window,ch=null;l&&"documentMode"in document&&(ch=document.documentMode);var Wk=l&&"TextEvent"in window&&!ch,LC=l&&(!M0||ch&&8<ch&&11>=ch),NC=String.fromCharCode(32),UC=!1;function PC(a,c){switch(a){case"keyup":return jk.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kC(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ac=!1;function Yk(a,c){switch(a){case"compositionend":return kC(c);case"keypress":return c.which!==32?null:(UC=!0,NC);case"textInput":return a=c.data,a===NC&&UC?null:a;default:return null}}function qk(a,c){if(Ac)return a==="compositionend"||!M0&&PC(a,c)?(a=TC(),Uf=y0=Ra=null,Ac=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return LC&&c.locale!=="ko"?null:c.data;default:return null}}var Xk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function QC(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!Xk[a.type]:c==="textarea"}function OC(a,c,f,y){Lt(y),c=Gf(c,"onChange"),0<c.length&&(f=new E0("onChange","change",null,f,y),a.push({event:f,listeners:c}))}var uh=null,hh=null;function Kk(a){nM(a,0)}function Of(a){var c=yc(a);if(et(c))return a}function Jk(a,c){if(a==="change")return c}var FC=!1;if(l){var S0;if(l){var T0="oninput"in document;if(!T0){var zC=document.createElement("div");zC.setAttribute("oninput","return;"),T0=typeof zC.oninput=="function"}S0=T0}else S0=!1;FC=S0&&(!document.documentMode||9<document.documentMode)}function HC(){uh&&(uh.detachEvent("onpropertychange",GC),hh=uh=null)}function GC(a){if(a.propertyName==="value"&&Of(hh)){var c=[];OC(c,hh,a,ge(a)),Vt(Kk,c)}}function Zk(a,c,f){a==="focusin"?(HC(),uh=c,hh=f,uh.attachEvent("onpropertychange",GC)):a==="focusout"&&HC()}function $k(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Of(hh)}function eQ(a,c){if(a==="click")return Of(c)}function tQ(a,c){if(a==="input"||a==="change")return Of(c)}function rQ(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var ki=typeof Object.is=="function"?Object.is:rQ;function dh(a,c){if(ki(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var f=Object.keys(a),y=Object.keys(c);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var C=f[y];if(!h.call(c,C)||!ki(a[C],c[C]))return!1}return!0}function VC(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function jC(a,c){var f=VC(a);a=0;for(var y;f;){if(f.nodeType===3){if(y=a+f.textContent.length,a<=c&&y>=c)return{node:f,offset:c-a};a=y}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=VC(f)}}function WC(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?WC(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function YC(){for(var a=window,c=Qe();c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=Qe(a.document)}return c}function B0(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}function nQ(a){var c=YC(),f=a.focusedElem,y=a.selectionRange;if(c!==f&&f&&f.ownerDocument&&WC(f.ownerDocument.documentElement,f)){if(y!==null&&B0(f)){if(c=y.start,a=y.end,a===void 0&&(a=c),"selectionStart"in f)f.selectionStart=c,f.selectionEnd=Math.min(a,f.value.length);else if(a=(c=f.ownerDocument||document)&&c.defaultView||window,a.getSelection){a=a.getSelection();var C=f.textContent.length,B=Math.min(y.start,C);y=y.end===void 0?B:Math.min(y.end,C),!a.extend&&B>y&&(C=y,y=B,B=C),C=jC(f,B);var U=jC(f,y);C&&U&&(a.rangeCount!==1||a.anchorNode!==C.node||a.anchorOffset!==C.offset||a.focusNode!==U.node||a.focusOffset!==U.offset)&&(c=c.createRange(),c.setStart(C.node,C.offset),a.removeAllRanges(),B>y?(a.addRange(c),a.extend(U.node,U.offset)):(c.setEnd(U.node,U.offset),a.addRange(c)))}}for(c=[],a=f;a=a.parentNode;)a.nodeType===1&&c.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<c.length;f++)a=c[f],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var iQ=l&&"documentMode"in document&&11>=document.documentMode,gc=null,b0=null,fh=null,R0=!1;function qC(a,c,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;R0||gc==null||gc!==Qe(y)||(y=gc,"selectionStart"in y&&B0(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),fh&&dh(fh,y)||(fh=y,y=Gf(b0,"onSelect"),0<y.length&&(c=new E0("onSelect","select",null,c,f),a.push({event:c,listeners:y}),c.target=gc)))}function Ff(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var mc={animationend:Ff("Animation","AnimationEnd"),animationiteration:Ff("Animation","AnimationIteration"),animationstart:Ff("Animation","AnimationStart"),transitionend:Ff("Transition","TransitionEnd")},D0={},XC={};l&&(XC=document.createElement("div").style,"AnimationEvent"in window||(delete mc.animationend.animation,delete mc.animationiteration.animation,delete mc.animationstart.animation),"TransitionEvent"in window||delete mc.transitionend.transition);function zf(a){if(D0[a])return D0[a];if(!mc[a])return a;var c=mc[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in XC)return D0[a]=c[f];return a}var KC=zf("animationend"),JC=zf("animationiteration"),ZC=zf("animationstart"),$C=zf("transitionend"),eM=new Map,tM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Da(a,c){eM.set(a,c),s(c,[a])}for(var L0=0;L0<tM.length;L0++){var N0=tM[L0],sQ=N0.toLowerCase(),aQ=N0[0].toUpperCase()+N0.slice(1);Da(sQ,"on"+aQ)}Da(KC,"onAnimationEnd"),Da(JC,"onAnimationIteration"),Da(ZC,"onAnimationStart"),Da("dblclick","onDoubleClick"),Da("focusin","onFocus"),Da("focusout","onBlur"),Da($C,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ph="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),oQ=new Set("cancel close invalid load scroll toggle".split(" ").concat(ph));function rM(a,c,f){var y=a.type||"unknown-event";a.currentTarget=f,f0(y,c,void 0,a),a.currentTarget=null}function nM(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],C=y.event;y=y.listeners;e:{var B=void 0;if(c)for(var U=y.length-1;0<=U;U--){var q=y[U],J=q.instance,ce=q.currentTarget;if(q=q.listener,J!==B&&C.isPropagationStopped())break e;rM(C,q,ce),B=J}else for(U=0;U<y.length;U++){if(q=y[U],J=q.instance,ce=q.currentTarget,q=q.listener,J!==B&&C.isPropagationStopped())break e;rM(C,q,ce),B=J}}}if(Ps)throw a=dc,Ps=!1,dc=null,a}function Xt(a,c){var f=c[H0];f===void 0&&(f=c[H0]=new Set);var y=a+"__bubble";f.has(y)||(iM(c,a,2,!1),f.add(y))}function U0(a,c,f){var y=0;c&&(y|=4),iM(f,a,y,c)}var Hf="_reactListening"+Math.random().toString(36).slice(2);function Ah(a){if(!a[Hf]){a[Hf]=!0,n.forEach(function(f){f!=="selectionchange"&&(oQ.has(f)||U0(f,!1,a),U0(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[Hf]||(c[Hf]=!0,U0("selectionchange",!1,c))}}function iM(a,c,f,y){switch(SC(c)){case 1:var C=Ek;break;case 4:C=xk;break;default:C=v0}f=C.bind(null,c,f,a),C=void 0,!Rn||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(C=!0),y?C!==void 0?a.addEventListener(c,f,{capture:!0,passive:C}):a.addEventListener(c,f,!0):C!==void 0?a.addEventListener(c,f,{passive:C}):a.addEventListener(c,f,!1)}function P0(a,c,f,y,C){var B=y;if(!(c&1)&&!(c&2)&&y!==null)e:for(;;){if(y===null)return;var U=y.tag;if(U===3||U===4){var q=y.stateNode.containerInfo;if(q===C||q.nodeType===8&&q.parentNode===C)break;if(U===4)for(U=y.return;U!==null;){var J=U.tag;if((J===3||J===4)&&(J=U.stateNode.containerInfo,J===C||J.nodeType===8&&J.parentNode===C))return;U=U.return}for(;q!==null;){if(U=Po(q),U===null)return;if(J=U.tag,J===5||J===6){y=B=U;continue e}q=q.parentNode}}y=y.return}Vt(function(){var ce=B,we=ge(f),Ce=[];e:{var xe=eM.get(a);if(xe!==void 0){var ke=E0,ze=a;switch(a){case"keypress":if(Pf(f)===0)break e;case"keydown":case"keyup":ke=kk;break;case"focusin":ze="focus",ke=I0;break;case"focusout":ze="blur",ke=I0;break;case"beforeblur":case"afterblur":ke=I0;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=bC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=Ck;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=Fk;break;case KC:case JC:case ZC:ke=Tk;break;case $C:ke=Hk;break;case"scroll":ke=wk;break;case"wheel":ke=Vk;break;case"copy":case"cut":case"paste":ke=bk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=DC}var We=(c&4)!==0,wr=!We&&a==="scroll",ie=We?xe!==null?xe+"Capture":null:xe;We=[];for(var $=ce,ae;$!==null;){ae=$;var Te=ae.stateNode;if(ae.tag===5&&Te!==null&&(ae=Te,ie!==null&&(Te=Er($,ie),Te!=null&&We.push(gh($,Te,ae)))),wr)break;$=$.return}0<We.length&&(xe=new ke(xe,ze,null,f,we),Ce.push({event:xe,listeners:We}))}}if(!(c&7)){e:{if(xe=a==="mouseover"||a==="pointerover",ke=a==="mouseout"||a==="pointerout",xe&&f!==O&&(ze=f.relatedTarget||f.fromElement)&&(Po(ze)||ze[Os]))break e;if((ke||xe)&&(xe=we.window===we?we:(xe=we.ownerDocument)?xe.defaultView||xe.parentWindow:window,ke?(ze=f.relatedTarget||f.toElement,ke=ce,ze=ze?Po(ze):null,ze!==null&&(wr=ks(ze),ze!==wr||ze.tag!==5&&ze.tag!==6)&&(ze=null)):(ke=null,ze=ce),ke!==ze)){if(We=bC,Te="onMouseLeave",ie="onMouseEnter",$="mouse",(a==="pointerout"||a==="pointerover")&&(We=DC,Te="onPointerLeave",ie="onPointerEnter",$="pointer"),wr=ke==null?xe:yc(ke),ae=ze==null?xe:yc(ze),xe=new We(Te,$+"leave",ke,f,we),xe.target=wr,xe.relatedTarget=ae,Te=null,Po(we)===ce&&(We=new We(ie,$+"enter",ze,f,we),We.target=ae,We.relatedTarget=wr,Te=We),wr=Te,ke&&ze)t:{for(We=ke,ie=ze,$=0,ae=We;ae;ae=vc(ae))$++;for(ae=0,Te=ie;Te;Te=vc(Te))ae++;for(;0<$-ae;)We=vc(We),$--;for(;0<ae-$;)ie=vc(ie),ae--;for(;$--;){if(We===ie||ie!==null&&We===ie.alternate)break t;We=vc(We),ie=vc(ie)}We=null}else We=null;ke!==null&&sM(Ce,xe,ke,We,!1),ze!==null&&wr!==null&&sM(Ce,wr,ze,We,!0)}}e:{if(xe=ce?yc(ce):window,ke=xe.nodeName&&xe.nodeName.toLowerCase(),ke==="select"||ke==="input"&&xe.type==="file")var qe=Jk;else if(QC(xe))if(FC)qe=tQ;else{qe=$k;var Ze=Zk}else(ke=xe.nodeName)&&ke.toLowerCase()==="input"&&(xe.type==="checkbox"||xe.type==="radio")&&(qe=eQ);if(qe&&(qe=qe(a,ce))){OC(Ce,qe,f,we);break e}Ze&&Ze(a,xe,ce),a==="focusout"&&(Ze=xe._wrapperState)&&Ze.controlled&&xe.type==="number"&&le(xe,"number",xe.value)}switch(Ze=ce?yc(ce):window,a){case"focusin":(QC(Ze)||Ze.contentEditable==="true")&&(gc=Ze,b0=ce,fh=null);break;case"focusout":fh=b0=gc=null;break;case"mousedown":R0=!0;break;case"contextmenu":case"mouseup":case"dragend":R0=!1,qC(Ce,f,we);break;case"selectionchange":if(iQ)break;case"keydown":case"keyup":qC(Ce,f,we)}var $e;if(M0)e:{switch(a){case"compositionstart":var ot="onCompositionStart";break e;case"compositionend":ot="onCompositionEnd";break e;case"compositionupdate":ot="onCompositionUpdate";break e}ot=void 0}else Ac?PC(a,f)&&(ot="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(ot="onCompositionStart");ot&&(LC&&f.locale!=="ko"&&(Ac||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&Ac&&($e=TC()):(Ra=we,y0="value"in Ra?Ra.value:Ra.textContent,Ac=!0)),Ze=Gf(ce,ot),0<Ze.length&&(ot=new RC(ot,a,null,f,we),Ce.push({event:ot,listeners:Ze}),$e?ot.data=$e:($e=kC(f),$e!==null&&(ot.data=$e)))),($e=Wk?Yk(a,f):qk(a,f))&&(ce=Gf(ce,"onBeforeInput"),0<ce.length&&(we=new RC("onBeforeInput","beforeinput",null,f,we),Ce.push({event:we,listeners:ce}),we.data=$e))}nM(Ce,c)})}function gh(a,c,f){return{instance:a,listener:c,currentTarget:f}}function Gf(a,c){for(var f=c+"Capture",y=[];a!==null;){var C=a,B=C.stateNode;C.tag===5&&B!==null&&(C=B,B=Er(a,f),B!=null&&y.unshift(gh(a,B,C)),B=Er(a,c),B!=null&&y.push(gh(a,B,C))),a=a.return}return y}function vc(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function sM(a,c,f,y,C){for(var B=c._reactName,U=[];f!==null&&f!==y;){var q=f,J=q.alternate,ce=q.stateNode;if(J!==null&&J===y)break;q.tag===5&&ce!==null&&(q=ce,C?(J=Er(f,B),J!=null&&U.unshift(gh(f,J,q))):C||(J=Er(f,B),J!=null&&U.push(gh(f,J,q)))),f=f.return}U.length!==0&&a.push({event:c,listeners:U})}var lQ=/\r\n?/g,cQ=/\u0000|\uFFFD/g;function aM(a){return(typeof a=="string"?a:""+a).replace(lQ,`
4578
+ `+C[U].replace(" at new "," at ");return a.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",a.displayName)),J}while(1<=U&&0<=q);break}}}finally{re=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?Z(a):""}function de(a){switch(a.tag){case 5:return Z(a.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return a=j(a.type,!1),a;case 11:return a=j(a.type.render,!1),a;case 1:return a=j(a.type,!0),a;default:return""}}function Ae(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case T:return"Fragment";case S:return"Portal";case b:return"Profiler";case D:return"StrictMode";case N:return"Suspense";case W:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case L:return(a.displayName||"Context")+".Consumer";case M:return(a._context.displayName||"Context")+".Provider";case P:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case X:return c=a.displayName||null,c!==null?c:Ae(a.type)||"Memo";case K:c=a._payload,a=a._init;try{return Ae(a(c))}catch{}}return null}function _e(a){var c=a.type;switch(a.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=c.render,a=a.displayName||a.name||"",c.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ae(c);case 8:return c===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function Ee(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Le(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function st(a){var c=Le(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,c),y=""+a[c];if(!a.hasOwnProperty(c)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var C=f.get,B=f.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return C.call(this)},set:function(U){y=""+U,B.call(this,U)}}),Object.defineProperty(a,c,{enumerable:f.enumerable}),{getValue:function(){return y},setValue:function(U){y=""+U},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function se(a){a._valueTracker||(a._valueTracker=st(a))}function et(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),y="";return a&&(y=Le(a)?a.checked?"true":"false":a.value),a=y,a!==f?(c.setValue(a),!0):!1}function Qe(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function ht(a,c){var f=c.checked;return Q({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function Ke(a,c){var f=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;f=Ee(c.value!=null?c.value:f),a._wrapperState={initialChecked:y,initialValue:f,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function pt(a,c){c=c.checked,c!=null&&x(a,"checked",c,!1)}function Y(a,c){pt(a,c);var f=Ee(c.value),y=c.type;if(f!=null)y==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(y==="submit"||y==="reset"){a.removeAttribute("value");return}c.hasOwnProperty("value")?le(a,c.type,f):c.hasOwnProperty("defaultValue")&&le(a,c.type,Ee(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function k(a,c,f){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var y=c.type;if(!(y!=="submit"&&y!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+a._wrapperState.initialValue,f||c===a.value||(a.value=c),a.defaultValue=c}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function le(a,c,f){(c!=="number"||Qe(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var pe=Array.isArray;function me(a,c,f,y){if(a=a.options,c){c={};for(var C=0;C<f.length;C++)c["$"+f[C]]=!0;for(f=0;f<a.length;f++)C=c.hasOwnProperty("$"+a[f].value),a[f].selected!==C&&(a[f].selected=C),C&&y&&(a[f].defaultSelected=!0)}else{for(f=""+Ee(f),c=null,C=0;C<a.length;C++){if(a[C].value===f){a[C].selected=!0,y&&(a[C].defaultSelected=!0);return}c!==null||a[C].disabled||(c=a[C])}c!==null&&(c.selected=!0)}}function ye(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(t(91));return Q({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ge(a,c){var f=c.value;if(f==null){if(f=c.children,c=c.defaultValue,f!=null){if(c!=null)throw Error(t(92));if(pe(f)){if(1<f.length)throw Error(t(93));f=f[0]}c=f}c==null&&(c=""),f=c}a._wrapperState={initialValue:Ee(f)}}function Ie(a,c){var f=Ee(c.value),y=Ee(c.defaultValue);f!=null&&(f=""+f,f!==a.value&&(a.value=f),c.defaultValue==null&&a.defaultValue!==f&&(a.defaultValue=f)),y!=null&&(a.defaultValue=""+y)}function je(a){var c=a.textContent;c===a._wrapperState.initialValue&&c!==""&&c!==null&&(a.value=c)}function Ve(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Me(a,c){return a==null||a==="http://www.w3.org/1999/xhtml"?Ve(c):a==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var fe,De=function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,f,y,C){MSApp.execUnsafeLocalFunction(function(){return a(c,f,y,C)})}:a}(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(fe=fe||document.createElement("div"),fe.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=fe.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function Be(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var be={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nt=["Webkit","ms","Moz","O"];Object.keys(be).forEach(function(a){nt.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),be[c]=be[a]})});function lt(a,c,f){return c==null||typeof c=="boolean"||c===""?"":f||typeof c!="number"||c===0||be.hasOwnProperty(a)&&be[a]?(""+c).trim():c+"px"}function dt(a,c){a=a.style;for(var f in c)if(c.hasOwnProperty(f)){var y=f.indexOf("--")===0,C=lt(f,c[f],y);f==="float"&&(f="cssFloat"),y?a.setProperty(f,C):a[f]=C}}var ct=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ut(a,c){if(c){if(ct[a]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(t(137,a));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(t(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(t(61))}if(c.style!=null&&typeof c.style!="object")throw Error(t(62))}}function G(a,c){if(a.indexOf("-")===-1)return typeof c.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var O=null;function ge(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ve=null,Fe=null,Pe=null;function vt(a){if(a=vh(a)){if(typeof ve!="function")throw Error(t(280));var c=a.stateNode;c&&(c=Wf(c),ve(a.stateNode,a.type,c))}}function Lt(a){Fe?Pe?Pe.push(a):Pe=[a]:Fe=a}function Nt(){if(Fe){var a=Fe,c=Pe;if(Pe=Fe=null,vt(a),c)for(a=0;a<c.length;a++)vt(c[a])}}function Bt(a,c){return a(c)}function _t(){}var fr=!1;function Vt(a,c,f){if(fr)return a(c,f);fr=!0;try{return Bt(a,c,f)}finally{fr=!1,(Fe!==null||Pe!==null)&&(_t(),Nt())}}function Er(a,c){var f=a.stateNode;if(f===null)return null;var y=Wf(f);if(y===null)return null;f=y[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(t(231,c,typeof f));return f}var Rn=!1;if(l)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Rn=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch{Rn=!1}function pi(a,c,f,y,C,B,U,q,J){var ce=Array.prototype.slice.call(arguments,3);try{c.apply(f,ce)}catch(we){this.onError(we)}}var $n=!1,Us=null,Ps=!1,dc=null,Bf={onError:function(a){$n=!0,Us=a}};function d0(a,c,f,y,C,B,U,q,J){$n=!1,Us=null,pi.apply(Bf,arguments)}function f0(a,c,f,y,C,B,U,q,J){if(d0.apply(this,arguments),$n){if($n){var ce=Us;$n=!1,Us=null}else throw Error(t(198));Ps||(Ps=!0,dc=ce)}}function ks(a){var c=a,f=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,c.flags&4098&&(f=c.return),a=c.return;while(a)}return c.tag===3?f:null}function F(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function ne(a){if(ks(a)!==a)throw Error(t(188))}function ue(a){var c=a.alternate;if(!c){if(c=ks(a),c===null)throw Error(t(188));return c!==a?null:a}for(var f=a,y=c;;){var C=f.return;if(C===null)break;var B=C.alternate;if(B===null){if(y=C.return,y!==null){f=y;continue}break}if(C.child===B.child){for(B=C.child;B;){if(B===f)return ne(C),a;if(B===y)return ne(C),c;B=B.sibling}throw Error(t(188))}if(f.return!==y.return)f=C,y=B;else{for(var U=!1,q=C.child;q;){if(q===f){U=!0,f=C,y=B;break}if(q===y){U=!0,y=C,f=B;break}q=q.sibling}if(!U){for(q=B.child;q;){if(q===f){U=!0,f=B,y=C;break}if(q===y){U=!0,y=B,f=C;break}q=q.sibling}if(!U)throw Error(t(189))}}if(f.alternate!==y)throw Error(t(190))}if(f.tag!==3)throw Error(t(188));return f.stateNode.current===f?a:c}function he(a){return a=ue(a),a!==null?oe(a):null}function oe(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=oe(a);if(c!==null)return c;a=a.sibling}return null}var Re=e.unstable_scheduleCallback,Je=e.unstable_cancelCallback,it=e.unstable_shouldYield,at=e.unstable_requestPaint,Xe=e.unstable_now,At=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,Lr=e.unstable_UserBlockingPriority,er=e.unstable_NormalPriority,Dn=e.unstable_LowPriority,Ai=e.unstable_IdlePriority,jt=null,tt=null;function Ju(a){if(tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(jt,a,void 0,(a.current.flags&128)===128)}catch{}}var vn=Math.clz32?Math.clz32:Uo,Qs=Math.log,bf=Math.LN2;function Uo(a){return a>>>=0,a===0?32:31-(Qs(a)/bf|0)|0}var Ca=64,xr=4194304;function Ln(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Ma(a,c){var f=a.pendingLanes;if(f===0)return 0;var y=0,C=a.suspendedLanes,B=a.pingedLanes,U=f&268435455;if(U!==0){var q=U&~C;q!==0?y=Ln(q):(B&=U,B!==0&&(y=Ln(B)))}else U=f&~C,U!==0?y=Ln(U):B!==0&&(y=Ln(B));if(y===0)return 0;if(c!==0&&c!==y&&!(c&C)&&(C=y&-y,B=c&-c,C>=B||C===16&&(B&4194240)!==0))return c;if(y&4&&(y|=f&16),c=a.entangledLanes,c!==0)for(a=a.entanglements,c&=y;0<c;)f=31-vn(c),C=1<<f,y|=a[f],c&=~C;return y}function Nn(a,c){switch(a){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zu(a,c){for(var f=a.suspendedLanes,y=a.pingedLanes,C=a.expirationTimes,B=a.pendingLanes;0<B;){var U=31-vn(B),q=1<<U,J=C[U];J===-1?(!(q&f)||q&y)&&(C[U]=Nn(q,c)):J<=c&&(a.expiredLanes|=q),B&=~q}}function $u(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function eh(){var a=Ca;return Ca<<=1,!(Ca&4194240)&&(Ca=64),a}function p0(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function th(a,c,f){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-vn(c),a[c]=f}function mk(a,c){var f=a.pendingLanes&~c;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=c,a.mutableReadLanes&=c,a.entangledLanes&=c,c=a.entanglements;var y=a.eventTimes;for(a=a.expirationTimes;0<f;){var C=31-vn(f),B=1<<C;c[C]=0,y[C]=-1,a[C]=-1,f&=~B}}function A0(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var y=31-vn(f),C=1<<y;C&c|a[y]&c&&(a[y]|=c),f&=~C}}var kt=0;function _C(a){return a&=-a,1<a?4<a?a&268435455?16:536870912:4:1}var yC,g0,EC,xC,wC,m0=!1,Rf=[],Sa=null,Ta=null,Ba=null,rh=new Map,nh=new Map,ba=[],vk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function IC(a,c){switch(a){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":Ta=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":rh.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":nh.delete(c.pointerId)}}function ih(a,c,f,y,C,B){return a===null||a.nativeEvent!==B?(a={blockedOn:c,domEventName:f,eventSystemFlags:y,nativeEvent:B,targetContainers:[C]},c!==null&&(c=vh(c),c!==null&&g0(c)),a):(a.eventSystemFlags|=y,c=a.targetContainers,C!==null&&c.indexOf(C)===-1&&c.push(C),a)}function _k(a,c,f,y,C){switch(c){case"focusin":return Sa=ih(Sa,a,c,f,y,C),!0;case"dragenter":return Ta=ih(Ta,a,c,f,y,C),!0;case"mouseover":return Ba=ih(Ba,a,c,f,y,C),!0;case"pointerover":var B=C.pointerId;return rh.set(B,ih(rh.get(B)||null,a,c,f,y,C)),!0;case"gotpointercapture":return B=C.pointerId,nh.set(B,ih(nh.get(B)||null,a,c,f,y,C)),!0}return!1}function CC(a){var c=Po(a.target);if(c!==null){var f=ks(c);if(f!==null){if(c=f.tag,c===13){if(c=F(f),c!==null){a.blockedOn=c,wC(a.priority,function(){EC(f)});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Df(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=_0(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);O=y,f.target.dispatchEvent(y),O=null}else return c=vh(f),c!==null&&g0(c),a.blockedOn=f,!1;c.shift()}return!0}function MC(a,c,f){Df(a)&&f.delete(c)}function yk(){m0=!1,Sa!==null&&Df(Sa)&&(Sa=null),Ta!==null&&Df(Ta)&&(Ta=null),Ba!==null&&Df(Ba)&&(Ba=null),rh.forEach(MC),nh.forEach(MC)}function sh(a,c){a.blockedOn===c&&(a.blockedOn=null,m0||(m0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,yk)))}function ah(a){function c(C){return sh(C,a)}if(0<Rf.length){sh(Rf[0],a);for(var f=1;f<Rf.length;f++){var y=Rf[f];y.blockedOn===a&&(y.blockedOn=null)}}for(Sa!==null&&sh(Sa,a),Ta!==null&&sh(Ta,a),Ba!==null&&sh(Ba,a),rh.forEach(c),nh.forEach(c),f=0;f<ba.length;f++)y=ba[f],y.blockedOn===a&&(y.blockedOn=null);for(;0<ba.length&&(f=ba[0],f.blockedOn===null);)CC(f),f.blockedOn===null&&ba.shift()}var fc=I.ReactCurrentBatchConfig,Lf=!0;function Ek(a,c,f,y){var C=kt,B=fc.transition;fc.transition=null;try{kt=1,v0(a,c,f,y)}finally{kt=C,fc.transition=B}}function xk(a,c,f,y){var C=kt,B=fc.transition;fc.transition=null;try{kt=4,v0(a,c,f,y)}finally{kt=C,fc.transition=B}}function v0(a,c,f,y){if(Lf){var C=_0(a,c,f,y);if(C===null)P0(a,c,y,Nf,f),IC(a,y);else if(_k(C,a,c,f,y))y.stopPropagation();else if(IC(a,y),c&4&&-1<vk.indexOf(a)){for(;C!==null;){var B=vh(C);if(B!==null&&yC(B),B=_0(a,c,f,y),B===null&&P0(a,c,y,Nf,f),B===C)break;C=B}C!==null&&y.stopPropagation()}else P0(a,c,y,null,f)}}var Nf=null;function _0(a,c,f,y){if(Nf=null,a=ge(y),a=Po(a),a!==null)if(c=ks(a),c===null)a=null;else if(f=c.tag,f===13){if(a=F(c),a!==null)return a;a=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null);return Nf=a,null}function SC(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(At()){case ft:return 1;case Lr:return 4;case er:case Dn:return 16;case Ai:return 536870912;default:return 16}default:return 16}}var Ra=null,y0=null,Uf=null;function TC(){if(Uf)return Uf;var a,c=y0,f=c.length,y,C="value"in Ra?Ra.value:Ra.textContent,B=C.length;for(a=0;a<f&&c[a]===C[a];a++);var U=f-a;for(y=1;y<=U&&c[f-y]===C[B-y];y++);return Uf=C.slice(a,1<y?1-y:void 0)}function Pf(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function kf(){return!0}function BC(){return!1}function ei(a){function c(f,y,C,B,U){this._reactName=f,this._targetInst=C,this.type=y,this.nativeEvent=B,this.target=U,this.currentTarget=null;for(var q in a)a.hasOwnProperty(q)&&(f=a[q],this[q]=f?f(B):B[q]);return this.isDefaultPrevented=(B.defaultPrevented!=null?B.defaultPrevented:B.returnValue===!1)?kf:BC,this.isPropagationStopped=BC,this}return Q(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=kf)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=kf)},persist:function(){},isPersistent:kf}),c}var pc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},E0=ei(pc),oh=Q({},pc,{view:0,detail:0}),wk=ei(oh),x0,w0,lh,Qf=Q({},oh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:C0,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==lh&&(lh&&a.type==="mousemove"?(x0=a.screenX-lh.screenX,w0=a.screenY-lh.screenY):w0=x0=0,lh=a),x0)},movementY:function(a){return"movementY"in a?a.movementY:w0}}),bC=ei(Qf),Ik=Q({},Qf,{dataTransfer:0}),Ck=ei(Ik),Mk=Q({},oh,{relatedTarget:0}),I0=ei(Mk),Sk=Q({},pc,{animationName:0,elapsedTime:0,pseudoElement:0}),Tk=ei(Sk),Bk=Q({},pc,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),bk=ei(Bk),Rk=Q({},pc,{data:0}),RC=ei(Rk),Dk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Nk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uk(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=Nk[a])?!!c[a]:!1}function C0(){return Uk}var Pk=Q({},oh,{key:function(a){if(a.key){var c=Dk[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Pf(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Lk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:C0,charCode:function(a){return a.type==="keypress"?Pf(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Pf(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),kk=ei(Pk),Qk=Q({},Qf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DC=ei(Qk),Ok=Q({},oh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:C0}),Fk=ei(Ok),zk=Q({},pc,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hk=ei(zk),Gk=Q({},Qf,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Vk=ei(Gk),jk=[9,13,27,32],M0=l&&"CompositionEvent"in window,ch=null;l&&"documentMode"in document&&(ch=document.documentMode);var Wk=l&&"TextEvent"in window&&!ch,LC=l&&(!M0||ch&&8<ch&&11>=ch),NC=String.fromCharCode(32),UC=!1;function PC(a,c){switch(a){case"keyup":return jk.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kC(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ac=!1;function Yk(a,c){switch(a){case"compositionend":return kC(c);case"keypress":return c.which!==32?null:(UC=!0,NC);case"textInput":return a=c.data,a===NC&&UC?null:a;default:return null}}function qk(a,c){if(Ac)return a==="compositionend"||!M0&&PC(a,c)?(a=TC(),Uf=y0=Ra=null,Ac=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return LC&&c.locale!=="ko"?null:c.data;default:return null}}var Xk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function QC(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!Xk[a.type]:c==="textarea"}function OC(a,c,f,y){Lt(y),c=Gf(c,"onChange"),0<c.length&&(f=new E0("onChange","change",null,f,y),a.push({event:f,listeners:c}))}var uh=null,hh=null;function Kk(a){nM(a,0)}function Of(a){var c=yc(a);if(et(c))return a}function Jk(a,c){if(a==="change")return c}var FC=!1;if(l){var S0;if(l){var T0="oninput"in document;if(!T0){var zC=document.createElement("div");zC.setAttribute("oninput","return;"),T0=typeof zC.oninput=="function"}S0=T0}else S0=!1;FC=S0&&(!document.documentMode||9<document.documentMode)}function HC(){uh&&(uh.detachEvent("onpropertychange",GC),hh=uh=null)}function GC(a){if(a.propertyName==="value"&&Of(hh)){var c=[];OC(c,hh,a,ge(a)),Vt(Kk,c)}}function Zk(a,c,f){a==="focusin"?(HC(),uh=c,hh=f,uh.attachEvent("onpropertychange",GC)):a==="focusout"&&HC()}function $k(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Of(hh)}function eQ(a,c){if(a==="click")return Of(c)}function tQ(a,c){if(a==="input"||a==="change")return Of(c)}function rQ(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var ki=typeof Object.is=="function"?Object.is:rQ;function dh(a,c){if(ki(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var f=Object.keys(a),y=Object.keys(c);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var C=f[y];if(!h.call(c,C)||!ki(a[C],c[C]))return!1}return!0}function VC(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function jC(a,c){var f=VC(a);a=0;for(var y;f;){if(f.nodeType===3){if(y=a+f.textContent.length,a<=c&&y>=c)return{node:f,offset:c-a};a=y}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=VC(f)}}function WC(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?WC(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function YC(){for(var a=window,c=Qe();c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=Qe(a.document)}return c}function B0(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}function nQ(a){var c=YC(),f=a.focusedElem,y=a.selectionRange;if(c!==f&&f&&f.ownerDocument&&WC(f.ownerDocument.documentElement,f)){if(y!==null&&B0(f)){if(c=y.start,a=y.end,a===void 0&&(a=c),"selectionStart"in f)f.selectionStart=c,f.selectionEnd=Math.min(a,f.value.length);else if(a=(c=f.ownerDocument||document)&&c.defaultView||window,a.getSelection){a=a.getSelection();var C=f.textContent.length,B=Math.min(y.start,C);y=y.end===void 0?B:Math.min(y.end,C),!a.extend&&B>y&&(C=y,y=B,B=C),C=jC(f,B);var U=jC(f,y);C&&U&&(a.rangeCount!==1||a.anchorNode!==C.node||a.anchorOffset!==C.offset||a.focusNode!==U.node||a.focusOffset!==U.offset)&&(c=c.createRange(),c.setStart(C.node,C.offset),a.removeAllRanges(),B>y?(a.addRange(c),a.extend(U.node,U.offset)):(c.setEnd(U.node,U.offset),a.addRange(c)))}}for(c=[],a=f;a=a.parentNode;)a.nodeType===1&&c.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<c.length;f++)a=c[f],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var iQ=l&&"documentMode"in document&&11>=document.documentMode,gc=null,b0=null,fh=null,R0=!1;function qC(a,c,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;R0||gc==null||gc!==Qe(y)||(y=gc,"selectionStart"in y&&B0(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),fh&&dh(fh,y)||(fh=y,y=Gf(b0,"onSelect"),0<y.length&&(c=new E0("onSelect","select",null,c,f),a.push({event:c,listeners:y}),c.target=gc)))}function Ff(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var mc={animationend:Ff("Animation","AnimationEnd"),animationiteration:Ff("Animation","AnimationIteration"),animationstart:Ff("Animation","AnimationStart"),transitionend:Ff("Transition","TransitionEnd")},D0={},XC={};l&&(XC=document.createElement("div").style,"AnimationEvent"in window||(delete mc.animationend.animation,delete mc.animationiteration.animation,delete mc.animationstart.animation),"TransitionEvent"in window||delete mc.transitionend.transition);function zf(a){if(D0[a])return D0[a];if(!mc[a])return a;var c=mc[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in XC)return D0[a]=c[f];return a}var KC=zf("animationend"),JC=zf("animationiteration"),ZC=zf("animationstart"),$C=zf("transitionend"),eM=new Map,tM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Da(a,c){eM.set(a,c),s(c,[a])}for(var L0=0;L0<tM.length;L0++){var N0=tM[L0],sQ=N0.toLowerCase(),aQ=N0[0].toUpperCase()+N0.slice(1);Da(sQ,"on"+aQ)}Da(KC,"onAnimationEnd"),Da(JC,"onAnimationIteration"),Da(ZC,"onAnimationStart"),Da("dblclick","onDoubleClick"),Da("focusin","onFocus"),Da("focusout","onBlur"),Da($C,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ph="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),oQ=new Set("cancel close invalid load scroll toggle".split(" ").concat(ph));function rM(a,c,f){var y=a.type||"unknown-event";a.currentTarget=f,f0(y,c,void 0,a),a.currentTarget=null}function nM(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],C=y.event;y=y.listeners;e:{var B=void 0;if(c)for(var U=y.length-1;0<=U;U--){var q=y[U],J=q.instance,ce=q.currentTarget;if(q=q.listener,J!==B&&C.isPropagationStopped())break e;rM(C,q,ce),B=J}else for(U=0;U<y.length;U++){if(q=y[U],J=q.instance,ce=q.currentTarget,q=q.listener,J!==B&&C.isPropagationStopped())break e;rM(C,q,ce),B=J}}}if(Ps)throw a=dc,Ps=!1,dc=null,a}function Xt(a,c){var f=c[H0];f===void 0&&(f=c[H0]=new Set);var y=a+"__bubble";f.has(y)||(iM(c,a,2,!1),f.add(y))}function U0(a,c,f){var y=0;c&&(y|=4),iM(f,a,y,c)}var Hf="_reactListening"+Math.random().toString(36).slice(2);function Ah(a){if(!a[Hf]){a[Hf]=!0,n.forEach(function(f){f!=="selectionchange"&&(oQ.has(f)||U0(f,!1,a),U0(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[Hf]||(c[Hf]=!0,U0("selectionchange",!1,c))}}function iM(a,c,f,y){switch(SC(c)){case 1:var C=Ek;break;case 4:C=xk;break;default:C=v0}f=C.bind(null,c,f,a),C=void 0,!Rn||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(C=!0),y?C!==void 0?a.addEventListener(c,f,{capture:!0,passive:C}):a.addEventListener(c,f,!0):C!==void 0?a.addEventListener(c,f,{passive:C}):a.addEventListener(c,f,!1)}function P0(a,c,f,y,C){var B=y;if(!(c&1)&&!(c&2)&&y!==null)e:for(;;){if(y===null)return;var U=y.tag;if(U===3||U===4){var q=y.stateNode.containerInfo;if(q===C||q.nodeType===8&&q.parentNode===C)break;if(U===4)for(U=y.return;U!==null;){var J=U.tag;if((J===3||J===4)&&(J=U.stateNode.containerInfo,J===C||J.nodeType===8&&J.parentNode===C))return;U=U.return}for(;q!==null;){if(U=Po(q),U===null)return;if(J=U.tag,J===5||J===6){y=B=U;continue e}q=q.parentNode}}y=y.return}Vt(function(){var ce=B,we=ge(f),Ce=[];e:{var xe=eM.get(a);if(xe!==void 0){var ke=E0,ze=a;switch(a){case"keypress":if(Pf(f)===0)break e;case"keydown":case"keyup":ke=kk;break;case"focusin":ze="focus",ke=I0;break;case"focusout":ze="blur",ke=I0;break;case"beforeblur":case"afterblur":ke=I0;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=bC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=Ck;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=Fk;break;case KC:case JC:case ZC:ke=Tk;break;case $C:ke=Hk;break;case"scroll":ke=wk;break;case"wheel":ke=Vk;break;case"copy":case"cut":case"paste":ke=bk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=DC}var We=(c&4)!==0,wr=!We&&a==="scroll",ie=We?xe!==null?xe+"Capture":null:xe;We=[];for(var $=ce,ae;$!==null;){ae=$;var Te=ae.stateNode;if(ae.tag===5&&Te!==null&&(ae=Te,ie!==null&&(Te=Er($,ie),Te!=null&&We.push(gh($,Te,ae)))),wr)break;$=$.return}0<We.length&&(xe=new ke(xe,ze,null,f,we),Ce.push({event:xe,listeners:We}))}}if(!(c&7)){e:{if(xe=a==="mouseover"||a==="pointerover",ke=a==="mouseout"||a==="pointerout",xe&&f!==O&&(ze=f.relatedTarget||f.fromElement)&&(Po(ze)||ze[Os]))break e;if((ke||xe)&&(xe=we.window===we?we:(xe=we.ownerDocument)?xe.defaultView||xe.parentWindow:window,ke?(ze=f.relatedTarget||f.toElement,ke=ce,ze=ze?Po(ze):null,ze!==null&&(wr=ks(ze),ze!==wr||ze.tag!==5&&ze.tag!==6)&&(ze=null)):(ke=null,ze=ce),ke!==ze)){if(We=bC,Te="onMouseLeave",ie="onMouseEnter",$="mouse",(a==="pointerout"||a==="pointerover")&&(We=DC,Te="onPointerLeave",ie="onPointerEnter",$="pointer"),wr=ke==null?xe:yc(ke),ae=ze==null?xe:yc(ze),xe=new We(Te,$+"leave",ke,f,we),xe.target=wr,xe.relatedTarget=ae,Te=null,Po(we)===ce&&(We=new We(ie,$+"enter",ze,f,we),We.target=ae,We.relatedTarget=wr,Te=We),wr=Te,ke&&ze)t:{for(We=ke,ie=ze,$=0,ae=We;ae;ae=vc(ae))$++;for(ae=0,Te=ie;Te;Te=vc(Te))ae++;for(;0<$-ae;)We=vc(We),$--;for(;0<ae-$;)ie=vc(ie),ae--;for(;$--;){if(We===ie||ie!==null&&We===ie.alternate)break t;We=vc(We),ie=vc(ie)}We=null}else We=null;ke!==null&&sM(Ce,xe,ke,We,!1),ze!==null&&wr!==null&&sM(Ce,wr,ze,We,!0)}}e:{if(xe=ce?yc(ce):window,ke=xe.nodeName&&xe.nodeName.toLowerCase(),ke==="select"||ke==="input"&&xe.type==="file")var qe=Jk;else if(QC(xe))if(FC)qe=tQ;else{qe=$k;var Ze=Zk}else(ke=xe.nodeName)&&ke.toLowerCase()==="input"&&(xe.type==="checkbox"||xe.type==="radio")&&(qe=eQ);if(qe&&(qe=qe(a,ce))){OC(Ce,qe,f,we);break e}Ze&&Ze(a,xe,ce),a==="focusout"&&(Ze=xe._wrapperState)&&Ze.controlled&&xe.type==="number"&&le(xe,"number",xe.value)}switch(Ze=ce?yc(ce):window,a){case"focusin":(QC(Ze)||Ze.contentEditable==="true")&&(gc=Ze,b0=ce,fh=null);break;case"focusout":fh=b0=gc=null;break;case"mousedown":R0=!0;break;case"contextmenu":case"mouseup":case"dragend":R0=!1,qC(Ce,f,we);break;case"selectionchange":if(iQ)break;case"keydown":case"keyup":qC(Ce,f,we)}var $e;if(M0)e:{switch(a){case"compositionstart":var ot="onCompositionStart";break e;case"compositionend":ot="onCompositionEnd";break e;case"compositionupdate":ot="onCompositionUpdate";break e}ot=void 0}else Ac?PC(a,f)&&(ot="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(ot="onCompositionStart");ot&&(LC&&f.locale!=="ko"&&(Ac||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&Ac&&($e=TC()):(Ra=we,y0="value"in Ra?Ra.value:Ra.textContent,Ac=!0)),Ze=Gf(ce,ot),0<Ze.length&&(ot=new RC(ot,a,null,f,we),Ce.push({event:ot,listeners:Ze}),$e?ot.data=$e:($e=kC(f),$e!==null&&(ot.data=$e)))),($e=Wk?Yk(a,f):qk(a,f))&&(ce=Gf(ce,"onBeforeInput"),0<ce.length&&(we=new RC("onBeforeInput","beforeinput",null,f,we),Ce.push({event:we,listeners:ce}),we.data=$e))}nM(Ce,c)})}function gh(a,c,f){return{instance:a,listener:c,currentTarget:f}}function Gf(a,c){for(var f=c+"Capture",y=[];a!==null;){var C=a,B=C.stateNode;C.tag===5&&B!==null&&(C=B,B=Er(a,f),B!=null&&y.unshift(gh(a,B,C)),B=Er(a,c),B!=null&&y.push(gh(a,B,C))),a=a.return}return y}function vc(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function sM(a,c,f,y,C){for(var B=c._reactName,U=[];f!==null&&f!==y;){var q=f,J=q.alternate,ce=q.stateNode;if(J!==null&&J===y)break;q.tag===5&&ce!==null&&(q=ce,C?(J=Er(f,B),J!=null&&U.unshift(gh(f,J,q))):C||(J=Er(f,B),J!=null&&U.push(gh(f,J,q)))),f=f.return}U.length!==0&&a.push({event:c,listeners:U})}var lQ=/\r\n?/g,cQ=/\u0000|\uFFFD/g;function aM(a){return(typeof a=="string"?a:""+a).replace(lQ,`
4579
4579
  `).replace(cQ,"")}function Vf(a,c,f){if(c=aM(c),aM(a)!==c&&f)throw Error(t(425))}function jf(){}var k0=null,Q0=null;function O0(a,c){return a==="textarea"||a==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var F0=typeof setTimeout=="function"?setTimeout:void 0,uQ=typeof clearTimeout=="function"?clearTimeout:void 0,oM=typeof Promise=="function"?Promise:void 0,hQ=typeof queueMicrotask=="function"?queueMicrotask:typeof oM<"u"?function(a){return oM.resolve(null).then(a).catch(dQ)}:F0;function dQ(a){setTimeout(function(){throw a})}function z0(a,c){var f=c,y=0;do{var C=f.nextSibling;if(a.removeChild(f),C&&C.nodeType===8)if(f=C.data,f==="/$"){if(y===0){a.removeChild(C),ah(c);return}y--}else f!=="$"&&f!=="$?"&&f!=="$!"||y++;f=C}while(f);ah(c)}function La(a){for(;a!=null;a=a.nextSibling){var c=a.nodeType;if(c===1||c===3)break;if(c===8){if(c=a.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return a}function lM(a){a=a.previousSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"){if(c===0)return a;c--}else f==="/$"&&c++}a=a.previousSibling}return null}var _c=Math.random().toString(36).slice(2),as="__reactFiber$"+_c,mh="__reactProps$"+_c,Os="__reactContainer$"+_c,H0="__reactEvents$"+_c,fQ="__reactListeners$"+_c,pQ="__reactHandles$"+_c;function Po(a){var c=a[as];if(c)return c;for(var f=a.parentNode;f;){if(c=f[Os]||f[as]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=lM(a);a!==null;){if(f=a[as])return f;a=lM(a)}return c}a=f,f=a.parentNode}return null}function vh(a){return a=a[as]||a[Os],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function yc(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(t(33))}function Wf(a){return a[mh]||null}var G0=[],Ec=-1;function Na(a){return{current:a}}function Kt(a){0>Ec||(a.current=G0[Ec],G0[Ec]=null,Ec--)}function Wt(a,c){Ec++,G0[Ec]=a.current,a.current=c}var Ua={},nn=Na(Ua),Un=Na(!1),ko=Ua;function xc(a,c){var f=a.type.contextTypes;if(!f)return Ua;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var C={},B;for(B in f)C[B]=c[B];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=C),C}function Pn(a){return a=a.childContextTypes,a!=null}function Yf(){Kt(Un),Kt(nn)}function cM(a,c,f){if(nn.current!==Ua)throw Error(t(168));Wt(nn,c),Wt(Un,f)}function uM(a,c,f){var y=a.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return f;y=y.getChildContext();for(var C in y)if(!(C in c))throw Error(t(108,_e(a)||"Unknown",C));return Q({},f,y)}function qf(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ua,ko=nn.current,Wt(nn,a),Wt(Un,Un.current),!0}function hM(a,c,f){var y=a.stateNode;if(!y)throw Error(t(169));f?(a=uM(a,c,ko),y.__reactInternalMemoizedMergedChildContext=a,Kt(Un),Kt(nn),Wt(nn,a)):Kt(Un),Wt(Un,f)}var Fs=null,Xf=!1,V0=!1;function dM(a){Fs===null?Fs=[a]:Fs.push(a)}function AQ(a){Xf=!0,dM(a)}function Pa(){if(!V0&&Fs!==null){V0=!0;var a=0,c=kt;try{var f=Fs;for(kt=1;a<f.length;a++){var y=f[a];do y=y(!0);while(y!==null)}Fs=null,Xf=!1}catch(C){throw Fs!==null&&(Fs=Fs.slice(a+1)),Re(ft,Pa),C}finally{kt=c,V0=!1}}return null}var wc=[],Ic=0,Kf=null,Jf=0,gi=[],mi=0,Qo=null,zs=1,Hs="";function Oo(a,c){wc[Ic++]=Jf,wc[Ic++]=Kf,Kf=a,Jf=c}function fM(a,c,f){gi[mi++]=zs,gi[mi++]=Hs,gi[mi++]=Qo,Qo=a;var y=zs;a=Hs;var C=32-vn(y)-1;y&=~(1<<C),f+=1;var B=32-vn(c)+C;if(30<B){var U=C-C%5;B=(y&(1<<U)-1).toString(32),y>>=U,C-=U,zs=1<<32-vn(c)+C|f<<C|y,Hs=B+a}else zs=1<<B|f<<C|y,Hs=a}function j0(a){a.return!==null&&(Oo(a,1),fM(a,1,0))}function W0(a){for(;a===Kf;)Kf=wc[--Ic],wc[Ic]=null,Jf=wc[--Ic],wc[Ic]=null;for(;a===Qo;)Qo=gi[--mi],gi[mi]=null,Hs=gi[--mi],gi[mi]=null,zs=gi[--mi],gi[mi]=null}var ti=null,ri=null,tr=!1,Qi=null;function pM(a,c){var f=Ei(5,null,null,0);f.elementType="DELETED",f.stateNode=c,f.return=a,c=a.deletions,c===null?(a.deletions=[f],a.flags|=16):c.push(f)}function AM(a,c){switch(a.tag){case 5:var f=a.type;return c=c.nodeType!==1||f.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(a.stateNode=c,ti=a,ri=La(c.firstChild),!0):!1;case 6:return c=a.pendingProps===""||c.nodeType!==3?null:c,c!==null?(a.stateNode=c,ti=a,ri=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(f=Qo!==null?{id:zs,overflow:Hs}:null,a.memoizedState={dehydrated:c,treeContext:f,retryLane:1073741824},f=Ei(18,null,null,0),f.stateNode=c,f.return=a,a.child=f,ti=a,ri=null,!0):!1;default:return!1}}function Y0(a){return(a.mode&1)!==0&&(a.flags&128)===0}function q0(a){if(tr){var c=ri;if(c){var f=c;if(!AM(a,c)){if(Y0(a))throw Error(t(418));c=La(f.nextSibling);var y=ti;c&&AM(a,c)?pM(y,f):(a.flags=a.flags&-4097|2,tr=!1,ti=a)}}else{if(Y0(a))throw Error(t(418));a.flags=a.flags&-4097|2,tr=!1,ti=a}}}function gM(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;ti=a}function Zf(a){if(a!==ti)return!1;if(!tr)return gM(a),tr=!0,!1;var c;if((c=a.tag!==3)&&!(c=a.tag!==5)&&(c=a.type,c=c!=="head"&&c!=="body"&&!O0(a.type,a.memoizedProps)),c&&(c=ri)){if(Y0(a))throw mM(),Error(t(418));for(;c;)pM(a,c),c=La(c.nextSibling)}if(gM(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(t(317));e:{for(a=a.nextSibling,c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"){if(c===0){ri=La(a.nextSibling);break e}c--}else f!=="$"&&f!=="$!"&&f!=="$?"||c++}a=a.nextSibling}ri=null}}else ri=ti?La(a.stateNode.nextSibling):null;return!0}function mM(){for(var a=ri;a;)a=La(a.nextSibling)}function Cc(){ri=ti=null,tr=!1}function X0(a){Qi===null?Qi=[a]:Qi.push(a)}var gQ=I.ReactCurrentBatchConfig;function Oi(a,c){if(a&&a.defaultProps){c=Q({},c),a=a.defaultProps;for(var f in a)c[f]===void 0&&(c[f]=a[f]);return c}return c}var $f=Na(null),ep=null,Mc=null,K0=null;function J0(){K0=Mc=ep=null}function Z0(a){var c=$f.current;Kt($f),a._currentValue=c}function $0(a,c,f){for(;a!==null;){var y=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,y!==null&&(y.childLanes|=c)):y!==null&&(y.childLanes&c)!==c&&(y.childLanes|=c),a===f)break;a=a.return}}function Sc(a,c){ep=a,K0=Mc=null,a=a.dependencies,a!==null&&a.firstContext!==null&&(a.lanes&c&&(kn=!0),a.firstContext=null)}function vi(a){var c=a._currentValue;if(K0!==a)if(a={context:a,memoizedValue:c,next:null},Mc===null){if(ep===null)throw Error(t(308));Mc=a,ep.dependencies={lanes:0,firstContext:a}}else Mc=Mc.next=a;return c}var Fo=null;function e1(a){Fo===null?Fo=[a]:Fo.push(a)}function vM(a,c,f,y){var C=c.interleaved;return C===null?(f.next=f,e1(c)):(f.next=C.next,C.next=f),c.interleaved=f,Gs(a,y)}function Gs(a,c){a.lanes|=c;var f=a.alternate;for(f!==null&&(f.lanes|=c),f=a,a=a.return;a!==null;)a.childLanes|=c,f=a.alternate,f!==null&&(f.childLanes|=c),f=a,a=a.return;return f.tag===3?f.stateNode:null}var ka=!1;function t1(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _M(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Vs(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function Qa(a,c,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,St&2){var C=y.pending;return C===null?c.next=c:(c.next=C.next,C.next=c),y.pending=c,Gs(a,f)}return C=y.interleaved,C===null?(c.next=c,e1(y)):(c.next=C.next,C.next=c),y.interleaved=c,Gs(a,f)}function tp(a,c,f){if(c=c.updateQueue,c!==null&&(c=c.shared,(f&4194240)!==0)){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,A0(a,f)}}function yM(a,c){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var C=null,B=null;if(f=f.firstBaseUpdate,f!==null){do{var U={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};B===null?C=B=U:B=B.next=U,f=f.next}while(f!==null);B===null?C=B=c:B=B.next=c}else C=B=c;f={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:B,shared:y.shared,effects:y.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=c}function rp(a,c,f,y){var C=a.updateQueue;ka=!1;var B=C.firstBaseUpdate,U=C.lastBaseUpdate,q=C.shared.pending;if(q!==null){C.shared.pending=null;var J=q,ce=J.next;J.next=null,U===null?B=ce:U.next=ce,U=J;var we=a.alternate;we!==null&&(we=we.updateQueue,q=we.lastBaseUpdate,q!==U&&(q===null?we.firstBaseUpdate=ce:q.next=ce,we.lastBaseUpdate=J))}if(B!==null){var Ce=C.baseState;U=0,we=ce=J=null,q=B;do{var xe=q.lane,ke=q.eventTime;if((y&xe)===xe){we!==null&&(we=we.next={eventTime:ke,lane:0,tag:q.tag,payload:q.payload,callback:q.callback,next:null});e:{var ze=a,We=q;switch(xe=c,ke=f,We.tag){case 1:if(ze=We.payload,typeof ze=="function"){Ce=ze.call(ke,Ce,xe);break e}Ce=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=We.payload,xe=typeof ze=="function"?ze.call(ke,Ce,xe):ze,xe==null)break e;Ce=Q({},Ce,xe);break e;case 2:ka=!0}}q.callback!==null&&q.lane!==0&&(a.flags|=64,xe=C.effects,xe===null?C.effects=[q]:xe.push(q))}else ke={eventTime:ke,lane:xe,tag:q.tag,payload:q.payload,callback:q.callback,next:null},we===null?(ce=we=ke,J=Ce):we=we.next=ke,U|=xe;if(q=q.next,q===null){if(q=C.shared.pending,q===null)break;xe=q,q=xe.next,xe.next=null,C.lastBaseUpdate=xe,C.shared.pending=null}}while(1);if(we===null&&(J=Ce),C.baseState=J,C.firstBaseUpdate=ce,C.lastBaseUpdate=we,c=C.shared.interleaved,c!==null){C=c;do U|=C.lane,C=C.next;while(C!==c)}else B===null&&(C.shared.lanes=0);Go|=U,a.lanes=U,a.memoizedState=Ce}}function EM(a,c,f){if(a=c.effects,c.effects=null,a!==null)for(c=0;c<a.length;c++){var y=a[c],C=y.callback;if(C!==null){if(y.callback=null,y=f,typeof C!="function")throw Error(t(191,C));C.call(y)}}}var xM=new r.Component().refs;function r1(a,c,f,y){c=a.memoizedState,f=f(y,c),f=f==null?c:Q({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var np={isMounted:function(a){return(a=a._reactInternals)?ks(a)===a:!1},enqueueSetState:function(a,c,f){a=a._reactInternals;var y=yn(),C=Ha(a),B=Vs(y,C);B.payload=c,f!=null&&(B.callback=f),c=Qa(a,B,C),c!==null&&(Hi(c,a,C,y),tp(c,a,C))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var y=yn(),C=Ha(a),B=Vs(y,C);B.tag=1,B.payload=c,f!=null&&(B.callback=f),c=Qa(a,B,C),c!==null&&(Hi(c,a,C,y),tp(c,a,C))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=yn(),y=Ha(a),C=Vs(f,y);C.tag=2,c!=null&&(C.callback=c),c=Qa(a,C,y),c!==null&&(Hi(c,a,y,f),tp(c,a,y))}};function wM(a,c,f,y,C,B,U){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,B,U):c.prototype&&c.prototype.isPureReactComponent?!dh(f,y)||!dh(C,B):!0}function IM(a,c,f){var y=!1,C=Ua,B=c.contextType;return typeof B=="object"&&B!==null?B=vi(B):(C=Pn(c)?ko:nn.current,y=c.contextTypes,B=(y=y!=null)?xc(a,C):Ua),c=new c(f,B),a.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=np,a.stateNode=c,c._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=C,a.__reactInternalMemoizedMaskedChildContext=B),c}function CM(a,c,f,y){a=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(f,y),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(f,y),c.state!==a&&np.enqueueReplaceState(c,c.state,null)}function n1(a,c,f,y){var C=a.stateNode;C.props=f,C.state=a.memoizedState,C.refs=xM,t1(a);var B=c.contextType;typeof B=="object"&&B!==null?C.context=vi(B):(B=Pn(c)?ko:nn.current,C.context=xc(a,B)),C.state=a.memoizedState,B=c.getDerivedStateFromProps,typeof B=="function"&&(r1(a,c,B,f),C.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(c=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),c!==C.state&&np.enqueueReplaceState(C,C.state,null),rp(a,f,C,y),C.state=a.memoizedState),typeof C.componentDidMount=="function"&&(a.flags|=4194308)}function _h(a,c,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(t(309));var y=f.stateNode}if(!y)throw Error(t(147,a));var C=y,B=""+a;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===B?c.ref:(c=function(U){var q=C.refs;q===xM&&(q=C.refs={}),U===null?delete q[B]:q[B]=U},c._stringRef=B,c)}if(typeof a!="string")throw Error(t(284));if(!f._owner)throw Error(t(290,a))}return a}function ip(a,c){throw a=Object.prototype.toString.call(c),Error(t(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a))}function MM(a){var c=a._init;return c(a._payload)}function SM(a){function c(ie,$){if(a){var ae=ie.deletions;ae===null?(ie.deletions=[$],ie.flags|=16):ae.push($)}}function f(ie,$){if(!a)return null;for(;$!==null;)c(ie,$),$=$.sibling;return null}function y(ie,$){for(ie=new Map;$!==null;)$.key!==null?ie.set($.key,$):ie.set($.index,$),$=$.sibling;return ie}function C(ie,$){return ie=Va(ie,$),ie.index=0,ie.sibling=null,ie}function B(ie,$,ae){return ie.index=ae,a?(ae=ie.alternate,ae!==null?(ae=ae.index,ae<$?(ie.flags|=2,$):ae):(ie.flags|=2,$)):(ie.flags|=1048576,$)}function U(ie){return a&&ie.alternate===null&&(ie.flags|=2),ie}function q(ie,$,ae,Te){return $===null||$.tag!==6?($=F1(ae,ie.mode,Te),$.return=ie,$):($=C($,ae),$.return=ie,$)}function J(ie,$,ae,Te){var qe=ae.type;return qe===T?we(ie,$,ae.props.children,Te,ae.key):$!==null&&($.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===K&&MM(qe)===$.type)?(Te=C($,ae.props),Te.ref=_h(ie,$,ae),Te.return=ie,Te):(Te=wp(ae.type,ae.key,ae.props,null,ie.mode,Te),Te.ref=_h(ie,$,ae),Te.return=ie,Te)}function ce(ie,$,ae,Te){return $===null||$.tag!==4||$.stateNode.containerInfo!==ae.containerInfo||$.stateNode.implementation!==ae.implementation?($=z1(ae,ie.mode,Te),$.return=ie,$):($=C($,ae.children||[]),$.return=ie,$)}function we(ie,$,ae,Te,qe){return $===null||$.tag!==7?($=Yo(ae,ie.mode,Te,qe),$.return=ie,$):($=C($,ae),$.return=ie,$)}function Ce(ie,$,ae){if(typeof $=="string"&&$!==""||typeof $=="number")return $=F1(""+$,ie.mode,ae),$.return=ie,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case R:return ae=wp($.type,$.key,$.props,null,ie.mode,ae),ae.ref=_h(ie,null,$),ae.return=ie,ae;case S:return $=z1($,ie.mode,ae),$.return=ie,$;case K:var Te=$._init;return Ce(ie,Te($._payload),ae)}if(pe($)||ee($))return $=Yo($,ie.mode,ae,null),$.return=ie,$;ip(ie,$)}return null}function xe(ie,$,ae,Te){var qe=$!==null?$.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number")return qe!==null?null:q(ie,$,""+ae,Te);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case R:return ae.key===qe?J(ie,$,ae,Te):null;case S:return ae.key===qe?ce(ie,$,ae,Te):null;case K:return qe=ae._init,xe(ie,$,qe(ae._payload),Te)}if(pe(ae)||ee(ae))return qe!==null?null:we(ie,$,ae,Te,null);ip(ie,ae)}return null}function ke(ie,$,ae,Te,qe){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return ie=ie.get(ae)||null,q($,ie,""+Te,qe);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case R:return ie=ie.get(Te.key===null?ae:Te.key)||null,J($,ie,Te,qe);case S:return ie=ie.get(Te.key===null?ae:Te.key)||null,ce($,ie,Te,qe);case K:var Ze=Te._init;return ke(ie,$,ae,Ze(Te._payload),qe)}if(pe(Te)||ee(Te))return ie=ie.get(ae)||null,we($,ie,Te,qe,null);ip($,Te)}return null}function ze(ie,$,ae,Te){for(var qe=null,Ze=null,$e=$,ot=$=0,Yr=null;$e!==null&&ot<ae.length;ot++){$e.index>ot?(Yr=$e,$e=null):Yr=$e.sibling;var bt=xe(ie,$e,ae[ot],Te);if(bt===null){$e===null&&($e=Yr);break}a&&$e&&bt.alternate===null&&c(ie,$e),$=B(bt,$,ot),Ze===null?qe=bt:Ze.sibling=bt,Ze=bt,$e=Yr}if(ot===ae.length)return f(ie,$e),tr&&Oo(ie,ot),qe;if($e===null){for(;ot<ae.length;ot++)$e=Ce(ie,ae[ot],Te),$e!==null&&($=B($e,$,ot),Ze===null?qe=$e:Ze.sibling=$e,Ze=$e);return tr&&Oo(ie,ot),qe}for($e=y(ie,$e);ot<ae.length;ot++)Yr=ke($e,ie,ot,ae[ot],Te),Yr!==null&&(a&&Yr.alternate!==null&&$e.delete(Yr.key===null?ot:Yr.key),$=B(Yr,$,ot),Ze===null?qe=Yr:Ze.sibling=Yr,Ze=Yr);return a&&$e.forEach(function(ja){return c(ie,ja)}),tr&&Oo(ie,ot),qe}function We(ie,$,ae,Te){var qe=ee(ae);if(typeof qe!="function")throw Error(t(150));if(ae=qe.call(ae),ae==null)throw Error(t(151));for(var Ze=qe=null,$e=$,ot=$=0,Yr=null,bt=ae.next();$e!==null&&!bt.done;ot++,bt=ae.next()){$e.index>ot?(Yr=$e,$e=null):Yr=$e.sibling;var ja=xe(ie,$e,bt.value,Te);if(ja===null){$e===null&&($e=Yr);break}a&&$e&&ja.alternate===null&&c(ie,$e),$=B(ja,$,ot),Ze===null?qe=ja:Ze.sibling=ja,Ze=ja,$e=Yr}if(bt.done)return f(ie,$e),tr&&Oo(ie,ot),qe;if($e===null){for(;!bt.done;ot++,bt=ae.next())bt=Ce(ie,bt.value,Te),bt!==null&&($=B(bt,$,ot),Ze===null?qe=bt:Ze.sibling=bt,Ze=bt);return tr&&Oo(ie,ot),qe}for($e=y(ie,$e);!bt.done;ot++,bt=ae.next())bt=ke($e,ie,ot,bt.value,Te),bt!==null&&(a&&bt.alternate!==null&&$e.delete(bt.key===null?ot:bt.key),$=B(bt,$,ot),Ze===null?qe=bt:Ze.sibling=bt,Ze=bt);return a&&$e.forEach(function(XQ){return c(ie,XQ)}),tr&&Oo(ie,ot),qe}function wr(ie,$,ae,Te){if(typeof ae=="object"&&ae!==null&&ae.type===T&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case R:e:{for(var qe=ae.key,Ze=$;Ze!==null;){if(Ze.key===qe){if(qe=ae.type,qe===T){if(Ze.tag===7){f(ie,Ze.sibling),$=C(Ze,ae.props.children),$.return=ie,ie=$;break e}}else if(Ze.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===K&&MM(qe)===Ze.type){f(ie,Ze.sibling),$=C(Ze,ae.props),$.ref=_h(ie,Ze,ae),$.return=ie,ie=$;break e}f(ie,Ze);break}else c(ie,Ze);Ze=Ze.sibling}ae.type===T?($=Yo(ae.props.children,ie.mode,Te,ae.key),$.return=ie,ie=$):(Te=wp(ae.type,ae.key,ae.props,null,ie.mode,Te),Te.ref=_h(ie,$,ae),Te.return=ie,ie=Te)}return U(ie);case S:e:{for(Ze=ae.key;$!==null;){if($.key===Ze)if($.tag===4&&$.stateNode.containerInfo===ae.containerInfo&&$.stateNode.implementation===ae.implementation){f(ie,$.sibling),$=C($,ae.children||[]),$.return=ie,ie=$;break e}else{f(ie,$);break}else c(ie,$);$=$.sibling}$=z1(ae,ie.mode,Te),$.return=ie,ie=$}return U(ie);case K:return Ze=ae._init,wr(ie,$,Ze(ae._payload),Te)}if(pe(ae))return ze(ie,$,ae,Te);if(ee(ae))return We(ie,$,ae,Te);ip(ie,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?(ae=""+ae,$!==null&&$.tag===6?(f(ie,$.sibling),$=C($,ae),$.return=ie,ie=$):(f(ie,$),$=F1(ae,ie.mode,Te),$.return=ie,ie=$),U(ie)):f(ie,$)}return wr}var Tc=SM(!0),TM=SM(!1),yh={},os=Na(yh),Eh=Na(yh),xh=Na(yh);function zo(a){if(a===yh)throw Error(t(174));return a}function i1(a,c){switch(Wt(xh,c),Wt(Eh,a),Wt(os,yh),a=c.nodeType,a){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:Me(null,"");break;default:a=a===8?c.parentNode:c,c=a.namespaceURI||null,a=a.tagName,c=Me(c,a)}Kt(os),Wt(os,c)}function Bc(){Kt(os),Kt(Eh),Kt(xh)}function BM(a){zo(xh.current);var c=zo(os.current),f=Me(c,a.type);c!==f&&(Wt(Eh,a),Wt(os,f))}function s1(a){Eh.current===a&&(Kt(os),Kt(Eh))}var ar=Na(0);function sp(a){for(var c=a;c!==null;){if(c.tag===13){var f=c.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var a1=[];function o1(){for(var a=0;a<a1.length;a++)a1[a]._workInProgressVersionPrimary=null;a1.length=0}var ap=I.ReactCurrentDispatcher,l1=I.ReactCurrentBatchConfig,Ho=0,or=null,Nr=null,jr=null,op=!1,wh=!1,Ih=0,mQ=0;function sn(){throw Error(t(321))}function c1(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!ki(a[f],c[f]))return!1;return!0}function u1(a,c,f,y,C,B){if(Ho=B,or=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,ap.current=a===null||a.memoizedState===null?EQ:xQ,a=f(y,C),wh){B=0;do{if(wh=!1,Ih=0,25<=B)throw Error(t(301));B+=1,jr=Nr=null,c.updateQueue=null,ap.current=wQ,a=f(y,C)}while(wh)}if(ap.current=up,c=Nr!==null&&Nr.next!==null,Ho=0,jr=Nr=or=null,op=!1,c)throw Error(t(300));return a}function h1(){var a=Ih!==0;return Ih=0,a}function ls(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jr===null?or.memoizedState=jr=a:jr=jr.next=a,jr}function _i(){if(Nr===null){var a=or.alternate;a=a!==null?a.memoizedState:null}else a=Nr.next;var c=jr===null?or.memoizedState:jr.next;if(c!==null)jr=c,Nr=a;else{if(a===null)throw Error(t(310));Nr=a,a={memoizedState:Nr.memoizedState,baseState:Nr.baseState,baseQueue:Nr.baseQueue,queue:Nr.queue,next:null},jr===null?or.memoizedState=jr=a:jr=jr.next=a}return jr}function Ch(a,c){return typeof c=="function"?c(a):c}function d1(a){var c=_i(),f=c.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=a;var y=Nr,C=y.baseQueue,B=f.pending;if(B!==null){if(C!==null){var U=C.next;C.next=B.next,B.next=U}y.baseQueue=C=B,f.pending=null}if(C!==null){B=C.next,y=y.baseState;var q=U=null,J=null,ce=B;do{var we=ce.lane;if((Ho&we)===we)J!==null&&(J=J.next={lane:0,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),y=ce.hasEagerState?ce.eagerState:a(y,ce.action);else{var Ce={lane:we,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};J===null?(q=J=Ce,U=y):J=J.next=Ce,or.lanes|=we,Go|=we}ce=ce.next}while(ce!==null&&ce!==B);J===null?U=y:J.next=q,ki(y,c.memoizedState)||(kn=!0),c.memoizedState=y,c.baseState=U,c.baseQueue=J,f.lastRenderedState=y}if(a=f.interleaved,a!==null){C=a;do B=C.lane,or.lanes|=B,Go|=B,C=C.next;while(C!==a)}else C===null&&(f.lanes=0);return[c.memoizedState,f.dispatch]}function f1(a){var c=_i(),f=c.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=a;var y=f.dispatch,C=f.pending,B=c.memoizedState;if(C!==null){f.pending=null;var U=C=C.next;do B=a(B,U.action),U=U.next;while(U!==C);ki(B,c.memoizedState)||(kn=!0),c.memoizedState=B,c.baseQueue===null&&(c.baseState=B),f.lastRenderedState=B}return[B,y]}function bM(){}function RM(a,c){var f=or,y=_i(),C=c(),B=!ki(y.memoizedState,C);if(B&&(y.memoizedState=C,kn=!0),y=y.queue,p1(NM.bind(null,f,y,a),[a]),y.getSnapshot!==c||B||jr!==null&&jr.memoizedState.tag&1){if(f.flags|=2048,Mh(9,LM.bind(null,f,y,C,c),void 0,null),Wr===null)throw Error(t(349));Ho&30||DM(f,c,C)}return C}function DM(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=or.updateQueue,c===null?(c={lastEffect:null,stores:null},or.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function LM(a,c,f,y){c.value=f,c.getSnapshot=y,UM(c)&&PM(a)}function NM(a,c,f){return f(function(){UM(c)&&PM(a)})}function UM(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!ki(a,f)}catch{return!0}}function PM(a){var c=Gs(a,1);c!==null&&Hi(c,a,1,-1)}function kM(a){var c=ls();return typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ch,lastRenderedState:a},c.queue=a,a=a.dispatch=yQ.bind(null,or,a),[c.memoizedState,a]}function Mh(a,c,f,y){return a={tag:a,create:c,destroy:f,deps:y,next:null},c=or.updateQueue,c===null?(c={lastEffect:null,stores:null},or.updateQueue=c,c.lastEffect=a.next=a):(f=c.lastEffect,f===null?c.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,c.lastEffect=a)),a}function QM(){return _i().memoizedState}function lp(a,c,f,y){var C=ls();or.flags|=a,C.memoizedState=Mh(1|c,f,void 0,y===void 0?null:y)}function cp(a,c,f,y){var C=_i();y=y===void 0?null:y;var B=void 0;if(Nr!==null){var U=Nr.memoizedState;if(B=U.destroy,y!==null&&c1(y,U.deps)){C.memoizedState=Mh(c,f,B,y);return}}or.flags|=a,C.memoizedState=Mh(1|c,f,B,y)}function OM(a,c){return lp(8390656,8,a,c)}function p1(a,c){return cp(2048,8,a,c)}function FM(a,c){return cp(4,2,a,c)}function zM(a,c){return cp(4,4,a,c)}function HM(a,c){if(typeof c=="function")return a=a(),c(a),function(){c(null)};if(c!=null)return a=a(),c.current=a,function(){c.current=null}}function GM(a,c,f){return f=f!=null?f.concat([a]):null,cp(4,4,HM.bind(null,c,a),f)}function A1(){}function VM(a,c){var f=_i();c=c===void 0?null:c;var y=f.memoizedState;return y!==null&&c!==null&&c1(c,y[1])?y[0]:(f.memoizedState=[a,c],a)}function jM(a,c){var f=_i();c=c===void 0?null:c;var y=f.memoizedState;return y!==null&&c!==null&&c1(c,y[1])?y[0]:(a=a(),f.memoizedState=[a,c],a)}function WM(a,c,f){return Ho&21?(ki(f,c)||(f=eh(),or.lanes|=f,Go|=f,a.baseState=!0),c):(a.baseState&&(a.baseState=!1,kn=!0),a.memoizedState=f)}function vQ(a,c){var f=kt;kt=f!==0&&4>f?f:4,a(!0);var y=l1.transition;l1.transition={};try{a(!1),c()}finally{kt=f,l1.transition=y}}function YM(){return _i().memoizedState}function _Q(a,c,f){var y=Ha(a);if(f={lane:y,action:f,hasEagerState:!1,eagerState:null,next:null},qM(a))XM(c,f);else if(f=vM(a,c,f,y),f!==null){var C=yn();Hi(f,a,y,C),KM(f,c,y)}}function yQ(a,c,f){var y=Ha(a),C={lane:y,action:f,hasEagerState:!1,eagerState:null,next:null};if(qM(a))XM(c,C);else{var B=a.alternate;if(a.lanes===0&&(B===null||B.lanes===0)&&(B=c.lastRenderedReducer,B!==null))try{var U=c.lastRenderedState,q=B(U,f);if(C.hasEagerState=!0,C.eagerState=q,ki(q,U)){var J=c.interleaved;J===null?(C.next=C,e1(c)):(C.next=J.next,J.next=C),c.interleaved=C;return}}catch{}finally{}f=vM(a,c,C,y),f!==null&&(C=yn(),Hi(f,a,y,C),KM(f,c,y))}}function qM(a){var c=a.alternate;return a===or||c!==null&&c===or}function XM(a,c){wh=op=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function KM(a,c,f){if(f&4194240){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,A0(a,f)}}var up={readContext:vi,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},EQ={readContext:vi,useCallback:function(a,c){return ls().memoizedState=[a,c===void 0?null:c],a},useContext:vi,useEffect:OM,useImperativeHandle:function(a,c,f){return f=f!=null?f.concat([a]):null,lp(4194308,4,HM.bind(null,c,a),f)},useLayoutEffect:function(a,c){return lp(4194308,4,a,c)},useInsertionEffect:function(a,c){return lp(4,2,a,c)},useMemo:function(a,c){var f=ls();return c=c===void 0?null:c,a=a(),f.memoizedState=[a,c],a},useReducer:function(a,c,f){var y=ls();return c=f!==void 0?f(c):c,y.memoizedState=y.baseState=c,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:c},y.queue=a,a=a.dispatch=_Q.bind(null,or,a),[y.memoizedState,a]},useRef:function(a){var c=ls();return a={current:a},c.memoizedState=a},useState:kM,useDebugValue:A1,useDeferredValue:function(a){return ls().memoizedState=a},useTransition:function(){var a=kM(!1),c=a[0];return a=vQ.bind(null,a[1]),ls().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,f){var y=or,C=ls();if(tr){if(f===void 0)throw Error(t(407));f=f()}else{if(f=c(),Wr===null)throw Error(t(349));Ho&30||DM(y,c,f)}C.memoizedState=f;var B={value:f,getSnapshot:c};return C.queue=B,OM(NM.bind(null,y,B,a),[a]),y.flags|=2048,Mh(9,LM.bind(null,y,B,f,c),void 0,null),f},useId:function(){var a=ls(),c=Wr.identifierPrefix;if(tr){var f=Hs,y=zs;f=(y&~(1<<32-vn(y)-1)).toString(32)+f,c=":"+c+"R"+f,f=Ih++,0<f&&(c+="H"+f.toString(32)),c+=":"}else f=mQ++,c=":"+c+"r"+f.toString(32)+":";return a.memoizedState=c},unstable_isNewReconciler:!1},xQ={readContext:vi,useCallback:VM,useContext:vi,useEffect:p1,useImperativeHandle:GM,useInsertionEffect:FM,useLayoutEffect:zM,useMemo:jM,useReducer:d1,useRef:QM,useState:function(){return d1(Ch)},useDebugValue:A1,useDeferredValue:function(a){var c=_i();return WM(c,Nr.memoizedState,a)},useTransition:function(){var a=d1(Ch)[0],c=_i().memoizedState;return[a,c]},useMutableSource:bM,useSyncExternalStore:RM,useId:YM,unstable_isNewReconciler:!1},wQ={readContext:vi,useCallback:VM,useContext:vi,useEffect:p1,useImperativeHandle:GM,useInsertionEffect:FM,useLayoutEffect:zM,useMemo:jM,useReducer:f1,useRef:QM,useState:function(){return f1(Ch)},useDebugValue:A1,useDeferredValue:function(a){var c=_i();return Nr===null?c.memoizedState=a:WM(c,Nr.memoizedState,a)},useTransition:function(){var a=f1(Ch)[0],c=_i().memoizedState;return[a,c]},useMutableSource:bM,useSyncExternalStore:RM,useId:YM,unstable_isNewReconciler:!1};function bc(a,c){try{var f="",y=c;do f+=de(y),y=y.return;while(y);var C=f}catch(B){C=`
4580
4580
  Error generating stack: `+B.message+`
4581
- `+B.stack}return{value:a,source:c,stack:C,digest:null}}function g1(a,c,f){return{value:a,source:null,stack:f??null,digest:c??null}}function m1(a,c){try{console.error(c.value)}catch(f){setTimeout(function(){throw f})}}var IQ=typeof WeakMap=="function"?WeakMap:Map;function JM(a,c,f){f=Vs(-1,f),f.tag=3,f.payload={element:null};var y=c.value;return f.callback=function(){mp||(mp=!0,D1=y),m1(a,c)},f}function ZM(a,c,f){f=Vs(-1,f),f.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var C=c.value;f.payload=function(){return y(C)},f.callback=function(){m1(a,c)}}var B=a.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(f.callback=function(){m1(a,c),typeof y!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var U=c.stack;this.componentDidCatch(c.value,{componentStack:U!==null?U:""})}),f}function $M(a,c,f){var y=a.pingCache;if(y===null){y=a.pingCache=new IQ;var C=new Set;y.set(c,C)}else C=y.get(c),C===void 0&&(C=new Set,y.set(c,C));C.has(f)||(C.add(f),a=QQ.bind(null,a,c,f),c.then(a,a))}function e3(a){do{var c;if((c=a.tag===13)&&(c=a.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return a;a=a.return}while(a!==null);return null}function t3(a,c,f,y,C){return a.mode&1?(a.flags|=65536,a.lanes=C,a):(a===c?a.flags|=65536:(a.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(c=Vs(-1,1),c.tag=2,Qa(f,c,1))),f.lanes|=1),a)}var CQ=I.ReactCurrentOwner,kn=!1;function _n(a,c,f,y){c.child=a===null?TM(c,null,f,y):Tc(c,a.child,f,y)}function r3(a,c,f,y,C){f=f.render;var B=c.ref;return Sc(c,C),y=u1(a,c,f,y,B,C),f=h1(),a!==null&&!kn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~C,js(a,c,C)):(tr&&f&&j0(c),c.flags|=1,_n(a,c,y,C),c.child)}function n3(a,c,f,y,C){if(a===null){var B=f.type;return typeof B=="function"&&!O1(B)&&B.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(c.tag=15,c.type=B,i3(a,c,B,y,C)):(a=wp(f.type,null,y,c,c.mode,C),a.ref=c.ref,a.return=c,c.child=a)}if(B=a.child,!(a.lanes&C)){var U=B.memoizedProps;if(f=f.compare,f=f!==null?f:dh,f(U,y)&&a.ref===c.ref)return js(a,c,C)}return c.flags|=1,a=Va(B,y),a.ref=c.ref,a.return=c,c.child=a}function i3(a,c,f,y,C){if(a!==null){var B=a.memoizedProps;if(dh(B,y)&&a.ref===c.ref)if(kn=!1,c.pendingProps=y=B,(a.lanes&C)!==0)a.flags&131072&&(kn=!0);else return c.lanes=a.lanes,js(a,c,C)}return v1(a,c,f,y,C)}function s3(a,c,f){var y=c.pendingProps,C=y.children,B=a!==null?a.memoizedState:null;if(y.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wt(Dc,ni),ni|=f;else{if(!(f&1073741824))return a=B!==null?B.baseLanes|f:f,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:a,cachePool:null,transitions:null},c.updateQueue=null,Wt(Dc,ni),ni|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=B!==null?B.baseLanes:f,Wt(Dc,ni),ni|=y}else B!==null?(y=B.baseLanes|f,c.memoizedState=null):y=f,Wt(Dc,ni),ni|=y;return _n(a,c,C,f),c.child}function a3(a,c){var f=c.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(c.flags|=512,c.flags|=2097152)}function v1(a,c,f,y,C){var B=Pn(f)?ko:nn.current;return B=xc(c,B),Sc(c,C),f=u1(a,c,f,y,B,C),y=h1(),a!==null&&!kn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~C,js(a,c,C)):(tr&&y&&j0(c),c.flags|=1,_n(a,c,f,C),c.child)}function o3(a,c,f,y,C){if(Pn(f)){var B=!0;qf(c)}else B=!1;if(Sc(c,C),c.stateNode===null)dp(a,c),IM(c,f,y),n1(c,f,y,C),y=!0;else if(a===null){var U=c.stateNode,q=c.memoizedProps;U.props=q;var J=U.context,ce=f.contextType;typeof ce=="object"&&ce!==null?ce=vi(ce):(ce=Pn(f)?ko:nn.current,ce=xc(c,ce));var we=f.getDerivedStateFromProps,Ce=typeof we=="function"||typeof U.getSnapshotBeforeUpdate=="function";Ce||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==y||J!==ce)&&CM(c,U,y,ce),ka=!1;var xe=c.memoizedState;U.state=xe,rp(c,y,U,C),J=c.memoizedState,q!==y||xe!==J||Un.current||ka?(typeof we=="function"&&(r1(c,f,we,y),J=c.memoizedState),(q=ka||wM(c,f,q,y,xe,J,ce))?(Ce||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(c.flags|=4194308)):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=J),U.props=y,U.state=J,U.context=ce,y=q):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{U=c.stateNode,_M(a,c),q=c.memoizedProps,ce=c.type===c.elementType?q:Oi(c.type,q),U.props=ce,Ce=c.pendingProps,xe=U.context,J=f.contextType,typeof J=="object"&&J!==null?J=vi(J):(J=Pn(f)?ko:nn.current,J=xc(c,J));var ke=f.getDerivedStateFromProps;(we=typeof ke=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==Ce||xe!==J)&&CM(c,U,y,J),ka=!1,xe=c.memoizedState,U.state=xe,rp(c,y,U,C);var ze=c.memoizedState;q!==Ce||xe!==ze||Un.current||ka?(typeof ke=="function"&&(r1(c,f,ke,y),ze=c.memoizedState),(ce=ka||wM(c,f,ce,y,xe,ze,J)||!1)?(we||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(y,ze,J),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(y,ze,J)),typeof U.componentDidUpdate=="function"&&(c.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof U.componentDidUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=ze),U.props=y,U.state=ze,U.context=J,y=ce):(typeof U.componentDidUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),y=!1)}return _1(a,c,f,y,B,C)}function _1(a,c,f,y,C,B){a3(a,c);var U=(c.flags&128)!==0;if(!y&&!U)return C&&hM(c,f,!1),js(a,c,B);y=c.stateNode,CQ.current=c;var q=U&&typeof f.getDerivedStateFromError!="function"?null:y.render();return c.flags|=1,a!==null&&U?(c.child=Tc(c,a.child,null,B),c.child=Tc(c,null,q,B)):_n(a,c,q,B),c.memoizedState=y.state,C&&hM(c,f,!0),c.child}function l3(a){var c=a.stateNode;c.pendingContext?cM(a,c.pendingContext,c.pendingContext!==c.context):c.context&&cM(a,c.context,!1),i1(a,c.containerInfo)}function c3(a,c,f,y,C){return Cc(),X0(C),c.flags|=256,_n(a,c,f,y),c.child}var y1={dehydrated:null,treeContext:null,retryLane:0};function E1(a){return{baseLanes:a,cachePool:null,transitions:null}}function u3(a,c,f){var y=c.pendingProps,C=ar.current,B=!1,U=(c.flags&128)!==0,q;if((q=U)||(q=a!==null&&a.memoizedState===null?!1:(C&2)!==0),q?(B=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(C|=1),Wt(ar,C&1),a===null)return q0(c),a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?(c.mode&1?a.data==="$!"?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(U=y.children,a=y.fallback,B?(y=c.mode,B=c.child,U={mode:"hidden",children:U},!(y&1)&&B!==null?(B.childLanes=0,B.pendingProps=U):B=Ip(U,y,0,null),a=Yo(a,y,f,null),B.return=c,a.return=c,B.sibling=a,c.child=B,c.child.memoizedState=E1(f),c.memoizedState=y1,a):x1(c,U));if(C=a.memoizedState,C!==null&&(q=C.dehydrated,q!==null))return MQ(a,c,U,y,q,C,f);if(B){B=y.fallback,U=c.mode,C=a.child,q=C.sibling;var J={mode:"hidden",children:y.children};return!(U&1)&&c.child!==C?(y=c.child,y.childLanes=0,y.pendingProps=J,c.deletions=null):(y=Va(C,J),y.subtreeFlags=C.subtreeFlags&14680064),q!==null?B=Va(q,B):(B=Yo(B,U,f,null),B.flags|=2),B.return=c,y.return=c,y.sibling=B,c.child=y,y=B,B=c.child,U=a.child.memoizedState,U=U===null?E1(f):{baseLanes:U.baseLanes|f,cachePool:null,transitions:U.transitions},B.memoizedState=U,B.childLanes=a.childLanes&~f,c.memoizedState=y1,y}return B=a.child,a=B.sibling,y=Va(B,{mode:"visible",children:y.children}),!(c.mode&1)&&(y.lanes=f),y.return=c,y.sibling=null,a!==null&&(f=c.deletions,f===null?(c.deletions=[a],c.flags|=16):f.push(a)),c.child=y,c.memoizedState=null,y}function x1(a,c){return c=Ip({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function hp(a,c,f,y){return y!==null&&X0(y),Tc(c,a.child,null,f),a=x1(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function MQ(a,c,f,y,C,B,U){if(f)return c.flags&256?(c.flags&=-257,y=g1(Error(t(422))),hp(a,c,U,y)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(B=y.fallback,C=c.mode,y=Ip({mode:"visible",children:y.children},C,0,null),B=Yo(B,C,U,null),B.flags|=2,y.return=c,B.return=c,y.sibling=B,c.child=y,c.mode&1&&Tc(c,a.child,null,U),c.child.memoizedState=E1(U),c.memoizedState=y1,B);if(!(c.mode&1))return hp(a,c,U,null);if(C.data==="$!"){if(y=C.nextSibling&&C.nextSibling.dataset,y)var q=y.dgst;return y=q,B=Error(t(419)),y=g1(B,y,void 0),hp(a,c,U,y)}if(q=(U&a.childLanes)!==0,kn||q){if(y=Wr,y!==null){switch(U&-U){case 4:C=2;break;case 16:C=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:C=32;break;case 536870912:C=268435456;break;default:C=0}C=C&(y.suspendedLanes|U)?0:C,C!==0&&C!==B.retryLane&&(B.retryLane=C,Gs(a,C),Hi(y,a,C,-1))}return Q1(),y=g1(Error(t(421))),hp(a,c,U,y)}return C.data==="$?"?(c.flags|=128,c.child=a.child,c=OQ.bind(null,a),C._reactRetry=c,null):(a=B.treeContext,ri=La(C.nextSibling),ti=c,tr=!0,Qi=null,a!==null&&(gi[mi++]=zs,gi[mi++]=Hs,gi[mi++]=Qo,zs=a.id,Hs=a.overflow,Qo=c),c=x1(c,y.children),c.flags|=4096,c)}function h3(a,c,f){a.lanes|=c;var y=a.alternate;y!==null&&(y.lanes|=c),$0(a.return,c,f)}function w1(a,c,f,y,C){var B=a.memoizedState;B===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:C}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=f,B.tailMode=C)}function d3(a,c,f){var y=c.pendingProps,C=y.revealOrder,B=y.tail;if(_n(a,c,y.children,f),y=ar.current,y&2)y=y&1|2,c.flags|=128;else{if(a!==null&&a.flags&128)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&h3(a,f,c);else if(a.tag===19)h3(a,f,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}y&=1}if(Wt(ar,y),!(c.mode&1))c.memoizedState=null;else switch(C){case"forwards":for(f=c.child,C=null;f!==null;)a=f.alternate,a!==null&&sp(a)===null&&(C=f),f=f.sibling;f=C,f===null?(C=c.child,c.child=null):(C=f.sibling,f.sibling=null),w1(c,!1,C,f,B);break;case"backwards":for(f=null,C=c.child,c.child=null;C!==null;){if(a=C.alternate,a!==null&&sp(a)===null){c.child=C;break}a=C.sibling,C.sibling=f,f=C,C=a}w1(c,!0,f,null,B);break;case"together":w1(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function dp(a,c){!(c.mode&1)&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function js(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),Go|=c.lanes,!(f&c.childLanes))return null;if(a!==null&&c.child!==a.child)throw Error(t(153));if(c.child!==null){for(a=c.child,f=Va(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=Va(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function SQ(a,c,f){switch(c.tag){case 3:l3(c),Cc();break;case 5:BM(c);break;case 1:Pn(c.type)&&qf(c);break;case 4:i1(c,c.stateNode.containerInfo);break;case 10:var y=c.type._context,C=c.memoizedProps.value;Wt($f,y._currentValue),y._currentValue=C;break;case 13:if(y=c.memoizedState,y!==null)return y.dehydrated!==null?(Wt(ar,ar.current&1),c.flags|=128,null):f&c.child.childLanes?u3(a,c,f):(Wt(ar,ar.current&1),a=js(a,c,f),a!==null?a.sibling:null);Wt(ar,ar.current&1);break;case 19:if(y=(f&c.childLanes)!==0,a.flags&128){if(y)return d3(a,c,f);c.flags|=128}if(C=c.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Wt(ar,ar.current),y)break;return null;case 22:case 23:return c.lanes=0,s3(a,c,f)}return js(a,c,f)}var f3,I1,p3,A3;f3=function(a,c){for(var f=c.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},I1=function(){},p3=function(a,c,f,y){var C=a.memoizedProps;if(C!==y){a=c.stateNode,zo(os.current);var B=null;switch(f){case"input":C=ct(a,C),y=ct(a,y),B=[];break;case"select":C=Q({},C,{value:void 0}),y=Q({},y,{value:void 0}),B=[];break;case"textarea":C=ye(a,C),y=ye(a,y),B=[];break;default:typeof C.onClick!="function"&&typeof y.onClick=="function"&&(a.onclick=jf)}ht(f,y);var U;f=null;for(ce in C)if(!y.hasOwnProperty(ce)&&C.hasOwnProperty(ce)&&C[ce]!=null)if(ce==="style"){var q=C[ce];for(U in q)q.hasOwnProperty(U)&&(f||(f={}),f[U]="")}else ce!=="dangerouslySetInnerHTML"&&ce!=="children"&&ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&ce!=="autoFocus"&&(i.hasOwnProperty(ce)?B||(B=[]):(B=B||[]).push(ce,null));for(ce in y){var J=y[ce];if(q=C!=null?C[ce]:void 0,y.hasOwnProperty(ce)&&J!==q&&(J!=null||q!=null))if(ce==="style")if(q){for(U in q)!q.hasOwnProperty(U)||J&&J.hasOwnProperty(U)||(f||(f={}),f[U]="");for(U in J)J.hasOwnProperty(U)&&q[U]!==J[U]&&(f||(f={}),f[U]=J[U])}else f||(B||(B=[]),B.push(ce,f)),f=J;else ce==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,q=q?q.__html:void 0,J!=null&&q!==J&&(B=B||[]).push(ce,J)):ce==="children"?typeof J!="string"&&typeof J!="number"||(B=B||[]).push(ce,""+J):ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&(i.hasOwnProperty(ce)?(J!=null&&ce==="onScroll"&&Xt("scroll",a),B||q===J||(B=[])):(B=B||[]).push(ce,J))}f&&(B=B||[]).push("style",f);var ce=B;(c.updateQueue=ce)&&(c.flags|=4)}},A3=function(a,c,f,y){f!==y&&(c.flags|=4)};function Sh(a,c){if(!tr)switch(a.tailMode){case"hidden":c=a.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function an(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(c)for(var C=a.child;C!==null;)f|=C.lanes|C.childLanes,y|=C.subtreeFlags&14680064,y|=C.flags&14680064,C.return=a,C=C.sibling;else for(C=a.child;C!==null;)f|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=a,C=C.sibling;return a.subtreeFlags|=y,a.childLanes=f,c}function TQ(a,c,f){var y=c.pendingProps;switch(W0(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(c),null;case 1:return Pn(c.type)&&Yf(),an(c),null;case 3:return y=c.stateNode,Bc(),Kt(Un),Kt(nn),o1(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(Zf(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&!(c.flags&256)||(c.flags|=1024,Qi!==null&&(U1(Qi),Qi=null))),I1(a,c),an(c),null;case 5:s1(c);var C=zo(xh.current);if(f=c.type,a!==null&&c.stateNode!=null)p3(a,c,f,y,C),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!y){if(c.stateNode===null)throw Error(t(166));return an(c),null}if(a=zo(os.current),Zf(c)){y=c.stateNode,f=c.type;var B=c.memoizedProps;switch(y[as]=c,y[mh]=B,a=(c.mode&1)!==0,f){case"dialog":Xt("cancel",y),Xt("close",y);break;case"iframe":case"object":case"embed":Xt("load",y);break;case"video":case"audio":for(C=0;C<ph.length;C++)Xt(ph[C],y);break;case"source":Xt("error",y);break;case"img":case"image":case"link":Xt("error",y),Xt("load",y);break;case"details":Xt("toggle",y);break;case"input":Ke(y,B),Xt("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!B.multiple},Xt("invalid",y);break;case"textarea":Ge(y,B),Xt("invalid",y)}ht(f,B),C=null;for(var U in B)if(B.hasOwnProperty(U)){var q=B[U];U==="children"?typeof q=="string"?y.textContent!==q&&(B.suppressHydrationWarning!==!0&&Vf(y.textContent,q,a),C=["children",q]):typeof q=="number"&&y.textContent!==""+q&&(B.suppressHydrationWarning!==!0&&Vf(y.textContent,q,a),C=["children",""+q]):i.hasOwnProperty(U)&&q!=null&&U==="onScroll"&&Xt("scroll",y)}switch(f){case"input":se(y),k(y,B,!0);break;case"textarea":se(y),je(y);break;case"select":case"option":break;default:typeof B.onClick=="function"&&(y.onclick=jf)}y=C,c.updateQueue=y,y!==null&&(c.flags|=4)}else{U=C.nodeType===9?C:C.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=Ve(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=U.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof y.is=="string"?a=U.createElement(f,{is:y.is}):(a=U.createElement(f),f==="select"&&(U=a,y.multiple?U.multiple=!0:y.size&&(U.size=y.size))):a=U.createElementNS(a,f),a[as]=c,a[mh]=y,f3(a,c,!1,!1),c.stateNode=a;e:{switch(U=G(f,y),f){case"dialog":Xt("cancel",a),Xt("close",a),C=y;break;case"iframe":case"object":case"embed":Xt("load",a),C=y;break;case"video":case"audio":for(C=0;C<ph.length;C++)Xt(ph[C],a);C=y;break;case"source":Xt("error",a),C=y;break;case"img":case"image":case"link":Xt("error",a),Xt("load",a),C=y;break;case"details":Xt("toggle",a),C=y;break;case"input":Ke(a,y),C=ct(a,y),Xt("invalid",a);break;case"option":C=y;break;case"select":a._wrapperState={wasMultiple:!!y.multiple},C=Q({},y,{value:void 0}),Xt("invalid",a);break;case"textarea":Ge(a,y),C=ye(a,y),Xt("invalid",a);break;default:C=y}ht(f,C),q=C;for(B in q)if(q.hasOwnProperty(B)){var J=q[B];B==="style"?dt(a,J):B==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&De(a,J)):B==="children"?typeof J=="string"?(f!=="textarea"||J!=="")&&Be(a,J):typeof J=="number"&&Be(a,""+J):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(i.hasOwnProperty(B)?J!=null&&B==="onScroll"&&Xt("scroll",a):J!=null&&x(a,B,J,U))}switch(f){case"input":se(a),k(a,y,!1);break;case"textarea":se(a),je(a);break;case"option":y.value!=null&&a.setAttribute("value",""+Ee(y.value));break;case"select":a.multiple=!!y.multiple,B=y.value,B!=null?me(a,!!y.multiple,B,!1):y.defaultValue!=null&&me(a,!!y.multiple,y.defaultValue,!0);break;default:typeof C.onClick=="function"&&(a.onclick=jf)}switch(f){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return an(c),null;case 6:if(a&&c.stateNode!=null)A3(a,c,a.memoizedProps,y);else{if(typeof y!="string"&&c.stateNode===null)throw Error(t(166));if(f=zo(xh.current),zo(os.current),Zf(c)){if(y=c.stateNode,f=c.memoizedProps,y[as]=c,(B=y.nodeValue!==f)&&(a=ti,a!==null))switch(a.tag){case 3:Vf(y.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Vf(y.nodeValue,f,(a.mode&1)!==0)}B&&(c.flags|=4)}else y=(f.nodeType===9?f:f.ownerDocument).createTextNode(y),y[as]=c,c.stateNode=y}return an(c),null;case 13:if(Kt(ar),y=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(tr&&ri!==null&&c.mode&1&&!(c.flags&128))mM(),Cc(),c.flags|=98560,B=!1;else if(B=Zf(c),y!==null&&y.dehydrated!==null){if(a===null){if(!B)throw Error(t(318));if(B=c.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(t(317));B[as]=c}else Cc(),!(c.flags&128)&&(c.memoizedState=null),c.flags|=4;an(c),B=!1}else Qi!==null&&(U1(Qi),Qi=null),B=!0;if(!B)return c.flags&65536?c:null}return c.flags&128?(c.lanes=f,c):(y=y!==null,y!==(a!==null&&a.memoizedState!==null)&&y&&(c.child.flags|=8192,c.mode&1&&(a===null||ar.current&1?Ur===0&&(Ur=3):Q1())),c.updateQueue!==null&&(c.flags|=4),an(c),null);case 4:return Bc(),I1(a,c),a===null&&Ah(c.stateNode.containerInfo),an(c),null;case 10:return Z0(c.type._context),an(c),null;case 17:return Pn(c.type)&&Yf(),an(c),null;case 19:if(Kt(ar),B=c.memoizedState,B===null)return an(c),null;if(y=(c.flags&128)!==0,U=B.rendering,U===null)if(y)Sh(B,!1);else{if(Ur!==0||a!==null&&a.flags&128)for(a=c.child;a!==null;){if(U=sp(a),U!==null){for(c.flags|=128,Sh(B,!1),y=U.updateQueue,y!==null&&(c.updateQueue=y,c.flags|=4),c.subtreeFlags=0,y=f,f=c.child;f!==null;)B=f,a=y,B.flags&=14680066,U=B.alternate,U===null?(B.childLanes=0,B.lanes=a,B.child=null,B.subtreeFlags=0,B.memoizedProps=null,B.memoizedState=null,B.updateQueue=null,B.dependencies=null,B.stateNode=null):(B.childLanes=U.childLanes,B.lanes=U.lanes,B.child=U.child,B.subtreeFlags=0,B.deletions=null,B.memoizedProps=U.memoizedProps,B.memoizedState=U.memoizedState,B.updateQueue=U.updateQueue,B.type=U.type,a=U.dependencies,B.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return Wt(ar,ar.current&1|2),c.child}a=a.sibling}B.tail!==null&&Xe()>Lc&&(c.flags|=128,y=!0,Sh(B,!1),c.lanes=4194304)}else{if(!y)if(a=sp(U),a!==null){if(c.flags|=128,y=!0,f=a.updateQueue,f!==null&&(c.updateQueue=f,c.flags|=4),Sh(B,!0),B.tail===null&&B.tailMode==="hidden"&&!U.alternate&&!tr)return an(c),null}else 2*Xe()-B.renderingStartTime>Lc&&f!==1073741824&&(c.flags|=128,y=!0,Sh(B,!1),c.lanes=4194304);B.isBackwards?(U.sibling=c.child,c.child=U):(f=B.last,f!==null?f.sibling=U:c.child=U,B.last=U)}return B.tail!==null?(c=B.tail,B.rendering=c,B.tail=c.sibling,B.renderingStartTime=Xe(),c.sibling=null,f=ar.current,Wt(ar,y?f&1|2:f&1),c):(an(c),null);case 22:case 23:return k1(),y=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==y&&(c.flags|=8192),y&&c.mode&1?ni&1073741824&&(an(c),c.subtreeFlags&6&&(c.flags|=8192)):an(c),null;case 24:return null;case 25:return null}throw Error(t(156,c.tag))}function BQ(a,c){switch(W0(c),c.tag){case 1:return Pn(c.type)&&Yf(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return Bc(),Kt(Un),Kt(nn),o1(),a=c.flags,a&65536&&!(a&128)?(c.flags=a&-65537|128,c):null;case 5:return s1(c),null;case 13:if(Kt(ar),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(t(340));Cc()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return Kt(ar),null;case 4:return Bc(),null;case 10:return Z0(c.type._context),null;case 22:case 23:return k1(),null;case 24:return null;default:return null}}var fp=!1,on=!1,bQ=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Rc(a,c){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(y){pr(a,c,y)}else f.current=null}function C1(a,c,f){try{f()}catch(y){pr(a,c,y)}}var g3=!1;function RQ(a,c){if(k0=Lf,a=YC(),B0(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var C=y.anchorOffset,B=y.focusNode;y=y.focusOffset;try{f.nodeType,B.nodeType}catch{f=null;break e}var U=0,q=-1,J=-1,ce=0,we=0,Ce=a,xe=null;t:for(;;){for(var ke;Ce!==f||C!==0&&Ce.nodeType!==3||(q=U+C),Ce!==B||y!==0&&Ce.nodeType!==3||(J=U+y),Ce.nodeType===3&&(U+=Ce.nodeValue.length),(ke=Ce.firstChild)!==null;)xe=Ce,Ce=ke;for(;;){if(Ce===a)break t;if(xe===f&&++ce===C&&(q=U),xe===B&&++we===y&&(J=U),(ke=Ce.nextSibling)!==null)break;Ce=xe,xe=Ce.parentNode}Ce=ke}f=q===-1||J===-1?null:{start:q,end:J}}else f=null}f=f||{start:0,end:0}}else f=null;for(Q0={focusedElem:a,selectionRange:f},Lf=!1,Oe=c;Oe!==null;)if(c=Oe,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,Oe=a;else for(;Oe!==null;){c=Oe;try{var ze=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(ze!==null){var We=ze.memoizedProps,wr=ze.memoizedState,ie=c.stateNode,$=ie.getSnapshotBeforeUpdate(c.elementType===c.type?We:Oi(c.type,We),wr);ie.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var ae=c.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Te){pr(c,c.return,Te)}if(a=c.sibling,a!==null){a.return=c.return,Oe=a;break}Oe=c.return}return ze=g3,g3=!1,ze}function Th(a,c,f){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var C=y=y.next;do{if((C.tag&a)===a){var B=C.destroy;C.destroy=void 0,B!==void 0&&C1(c,f,B)}C=C.next}while(C!==y)}}function pp(a,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&a)===a){var y=f.create;f.destroy=y()}f=f.next}while(f!==c)}}function M1(a){var c=a.ref;if(c!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof c=="function"?c(a):c.current=a}}function m3(a){var c=a.alternate;c!==null&&(a.alternate=null,m3(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[as],delete c[mh],delete c[H0],delete c[fQ],delete c[pQ])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function v3(a){return a.tag===5||a.tag===3||a.tag===4}function _3(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||v3(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function S1(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?f.nodeType===8?f.parentNode.insertBefore(a,c):f.insertBefore(a,c):(f.nodeType===8?(c=f.parentNode,c.insertBefore(a,f)):(c=f,c.appendChild(a)),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=jf));else if(y!==4&&(a=a.child,a!==null))for(S1(a,c,f),a=a.sibling;a!==null;)S1(a,c,f),a=a.sibling}function T1(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?f.insertBefore(a,c):f.appendChild(a);else if(y!==4&&(a=a.child,a!==null))for(T1(a,c,f),a=a.sibling;a!==null;)T1(a,c,f),a=a.sibling}var Kr=null,Fi=!1;function Oa(a,c,f){for(f=f.child;f!==null;)y3(a,c,f),f=f.sibling}function y3(a,c,f){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(jt,f)}catch{}switch(f.tag){case 5:on||Rc(f,c);case 6:var y=Kr,C=Fi;Kr=null,Oa(a,c,f),Kr=y,Fi=C,Kr!==null&&(Fi?(a=Kr,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):Kr.removeChild(f.stateNode));break;case 18:Kr!==null&&(Fi?(a=Kr,f=f.stateNode,a.nodeType===8?z0(a.parentNode,f):a.nodeType===1&&z0(a,f),ah(a)):z0(Kr,f.stateNode));break;case 4:y=Kr,C=Fi,Kr=f.stateNode.containerInfo,Fi=!0,Oa(a,c,f),Kr=y,Fi=C;break;case 0:case 11:case 14:case 15:if(!on&&(y=f.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){C=y=y.next;do{var B=C,U=B.destroy;B=B.tag,U!==void 0&&(B&2||B&4)&&C1(f,c,U),C=C.next}while(C!==y)}Oa(a,c,f);break;case 1:if(!on&&(Rc(f,c),y=f.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=f.memoizedProps,y.state=f.memoizedState,y.componentWillUnmount()}catch(q){pr(f,c,q)}Oa(a,c,f);break;case 21:Oa(a,c,f);break;case 22:f.mode&1?(on=(y=on)||f.memoizedState!==null,Oa(a,c,f),on=y):Oa(a,c,f);break;default:Oa(a,c,f)}}function E3(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new bQ),c.forEach(function(y){var C=FQ.bind(null,a,y);f.has(y)||(f.add(y),y.then(C,C))})}}function zi(a,c){var f=c.deletions;if(f!==null)for(var y=0;y<f.length;y++){var C=f[y];try{var B=a,U=c,q=U;e:for(;q!==null;){switch(q.tag){case 5:Kr=q.stateNode,Fi=!1;break e;case 3:Kr=q.stateNode.containerInfo,Fi=!0;break e;case 4:Kr=q.stateNode.containerInfo,Fi=!0;break e}q=q.return}if(Kr===null)throw Error(t(160));y3(B,U,C),Kr=null,Fi=!1;var J=C.alternate;J!==null&&(J.return=null),C.return=null}catch(ce){pr(C,c,ce)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)x3(c,a),c=c.sibling}function x3(a,c){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(zi(c,a),cs(a),y&4){try{Th(3,a,a.return),pp(3,a)}catch(We){pr(a,a.return,We)}try{Th(5,a,a.return)}catch(We){pr(a,a.return,We)}}break;case 1:zi(c,a),cs(a),y&512&&f!==null&&Rc(f,f.return);break;case 5:if(zi(c,a),cs(a),y&512&&f!==null&&Rc(f,f.return),a.flags&32){var C=a.stateNode;try{Be(C,"")}catch(We){pr(a,a.return,We)}}if(y&4&&(C=a.stateNode,C!=null)){var B=a.memoizedProps,U=f!==null?f.memoizedProps:B,q=a.type,J=a.updateQueue;if(a.updateQueue=null,J!==null)try{q==="input"&&B.type==="radio"&&B.name!=null&&pt(C,B),G(q,U);var ce=G(q,B);for(U=0;U<J.length;U+=2){var we=J[U],Ce=J[U+1];we==="style"?dt(C,Ce):we==="dangerouslySetInnerHTML"?De(C,Ce):we==="children"?Be(C,Ce):x(C,we,Ce,ce)}switch(q){case"input":Y(C,B);break;case"textarea":Ie(C,B);break;case"select":var xe=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!B.multiple;var ke=B.value;ke!=null?me(C,!!B.multiple,ke,!1):xe!==!!B.multiple&&(B.defaultValue!=null?me(C,!!B.multiple,B.defaultValue,!0):me(C,!!B.multiple,B.multiple?[]:"",!1))}C[mh]=B}catch(We){pr(a,a.return,We)}}break;case 6:if(zi(c,a),cs(a),y&4){if(a.stateNode===null)throw Error(t(162));C=a.stateNode,B=a.memoizedProps;try{C.nodeValue=B}catch(We){pr(a,a.return,We)}}break;case 3:if(zi(c,a),cs(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{ah(c.containerInfo)}catch(We){pr(a,a.return,We)}break;case 4:zi(c,a),cs(a);break;case 13:zi(c,a),cs(a),C=a.child,C.flags&8192&&(B=C.memoizedState!==null,C.stateNode.isHidden=B,!B||C.alternate!==null&&C.alternate.memoizedState!==null||(R1=Xe())),y&4&&E3(a);break;case 22:if(we=f!==null&&f.memoizedState!==null,a.mode&1?(on=(ce=on)||we,zi(c,a),on=ce):zi(c,a),cs(a),y&8192){if(ce=a.memoizedState!==null,(a.stateNode.isHidden=ce)&&!we&&a.mode&1)for(Oe=a,we=a.child;we!==null;){for(Ce=Oe=we;Oe!==null;){switch(xe=Oe,ke=xe.child,xe.tag){case 0:case 11:case 14:case 15:Th(4,xe,xe.return);break;case 1:Rc(xe,xe.return);var ze=xe.stateNode;if(typeof ze.componentWillUnmount=="function"){y=xe,f=xe.return;try{c=y,ze.props=c.memoizedProps,ze.state=c.memoizedState,ze.componentWillUnmount()}catch(We){pr(y,f,We)}}break;case 5:Rc(xe,xe.return);break;case 22:if(xe.memoizedState!==null){C3(Ce);continue}}ke!==null?(ke.return=xe,Oe=ke):C3(Ce)}we=we.sibling}e:for(we=null,Ce=a;;){if(Ce.tag===5){if(we===null){we=Ce;try{C=Ce.stateNode,ce?(B=C.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none"):(q=Ce.stateNode,J=Ce.memoizedProps.style,U=J!=null&&J.hasOwnProperty("display")?J.display:null,q.style.display=lt("display",U))}catch(We){pr(a,a.return,We)}}}else if(Ce.tag===6){if(we===null)try{Ce.stateNode.nodeValue=ce?"":Ce.memoizedProps}catch(We){pr(a,a.return,We)}}else if((Ce.tag!==22&&Ce.tag!==23||Ce.memoizedState===null||Ce===a)&&Ce.child!==null){Ce.child.return=Ce,Ce=Ce.child;continue}if(Ce===a)break e;for(;Ce.sibling===null;){if(Ce.return===null||Ce.return===a)break e;we===Ce&&(we=null),Ce=Ce.return}we===Ce&&(we=null),Ce.sibling.return=Ce.return,Ce=Ce.sibling}}break;case 19:zi(c,a),cs(a),y&4&&E3(a);break;case 21:break;default:zi(c,a),cs(a)}}function cs(a){var c=a.flags;if(c&2){try{e:{for(var f=a.return;f!==null;){if(v3(f)){var y=f;break e}f=f.return}throw Error(t(160))}switch(y.tag){case 5:var C=y.stateNode;y.flags&32&&(Be(C,""),y.flags&=-33);var B=_3(a);T1(a,B,C);break;case 3:case 4:var U=y.stateNode.containerInfo,q=_3(a);S1(a,q,U);break;default:throw Error(t(161))}}catch(J){pr(a,a.return,J)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function DQ(a,c,f){Oe=a,w3(a)}function w3(a,c,f){for(var y=(a.mode&1)!==0;Oe!==null;){var C=Oe,B=C.child;if(C.tag===22&&y){var U=C.memoizedState!==null||fp;if(!U){var q=C.alternate,J=q!==null&&q.memoizedState!==null||on;q=fp;var ce=on;if(fp=U,(on=J)&&!ce)for(Oe=C;Oe!==null;)U=Oe,J=U.child,U.tag===22&&U.memoizedState!==null?M3(C):J!==null?(J.return=U,Oe=J):M3(C);for(;B!==null;)Oe=B,w3(B),B=B.sibling;Oe=C,fp=q,on=ce}I3(a)}else C.subtreeFlags&8772&&B!==null?(B.return=C,Oe=B):I3(a)}}function I3(a){for(;Oe!==null;){var c=Oe;if(c.flags&8772){var f=c.alternate;try{if(c.flags&8772)switch(c.tag){case 0:case 11:case 15:on||pp(5,c);break;case 1:var y=c.stateNode;if(c.flags&4&&!on)if(f===null)y.componentDidMount();else{var C=c.elementType===c.type?f.memoizedProps:Oi(c.type,f.memoizedProps);y.componentDidUpdate(C,f.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var B=c.updateQueue;B!==null&&EM(c,B,y);break;case 3:var U=c.updateQueue;if(U!==null){if(f=null,c.child!==null)switch(c.child.tag){case 5:f=c.child.stateNode;break;case 1:f=c.child.stateNode}EM(c,U,f)}break;case 5:var q=c.stateNode;if(f===null&&c.flags&4){f=q;var J=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&f.focus();break;case"img":J.src&&(f.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var ce=c.alternate;if(ce!==null){var we=ce.memoizedState;if(we!==null){var Ce=we.dehydrated;Ce!==null&&ah(Ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}on||c.flags&512&&M1(c)}catch(xe){pr(c,c.return,xe)}}if(c===a){Oe=null;break}if(f=c.sibling,f!==null){f.return=c.return,Oe=f;break}Oe=c.return}}function C3(a){for(;Oe!==null;){var c=Oe;if(c===a){Oe=null;break}var f=c.sibling;if(f!==null){f.return=c.return,Oe=f;break}Oe=c.return}}function M3(a){for(;Oe!==null;){var c=Oe;try{switch(c.tag){case 0:case 11:case 15:var f=c.return;try{pp(4,c)}catch(J){pr(c,f,J)}break;case 1:var y=c.stateNode;if(typeof y.componentDidMount=="function"){var C=c.return;try{y.componentDidMount()}catch(J){pr(c,C,J)}}var B=c.return;try{M1(c)}catch(J){pr(c,B,J)}break;case 5:var U=c.return;try{M1(c)}catch(J){pr(c,U,J)}}}catch(J){pr(c,c.return,J)}if(c===a){Oe=null;break}var q=c.sibling;if(q!==null){q.return=c.return,Oe=q;break}Oe=c.return}}var LQ=Math.ceil,Ap=I.ReactCurrentDispatcher,B1=I.ReactCurrentOwner,yi=I.ReactCurrentBatchConfig,St=0,Wr=null,Tr=null,Jr=0,ni=0,Dc=Na(0),Ur=0,Bh=null,Go=0,gp=0,b1=0,bh=null,Qn=null,R1=0,Lc=1/0,Ws=null,mp=!1,D1=null,Fa=null,vp=!1,za=null,_p=0,Rh=0,L1=null,yp=-1,Ep=0;function yn(){return St&6?Xe():yp!==-1?yp:yp=Xe()}function Ha(a){return a.mode&1?St&2&&Jr!==0?Jr&-Jr:gQ.transition!==null?(Ep===0&&(Ep=eh()),Ep):(a=kt,a!==0||(a=window.event,a=a===void 0?16:SC(a.type)),a):1}function Hi(a,c,f,y){if(50<Rh)throw Rh=0,L1=null,Error(t(185));th(a,f,y),(!(St&2)||a!==Wr)&&(a===Wr&&(!(St&2)&&(gp|=f),Ur===4&&Ga(a,Jr)),On(a,y),f===1&&St===0&&!(c.mode&1)&&(Lc=Xe()+500,Xf&&Pa()))}function On(a,c){var f=a.callbackNode;Zu(a,c);var y=Ma(a,a===Wr?Jr:0);if(y===0)f!==null&&Je(f),a.callbackNode=null,a.callbackPriority=0;else if(c=y&-y,a.callbackPriority!==c){if(f!=null&&Je(f),c===1)a.tag===0?AQ(T3.bind(null,a)):dM(T3.bind(null,a)),hQ(function(){!(St&6)&&Pa()}),f=null;else{switch(_C(y)){case 1:f=ft;break;case 4:f=Lr;break;case 16:f=er;break;case 536870912:f=Ai;break;default:f=er}f=P3(f,S3.bind(null,a))}a.callbackPriority=c,a.callbackNode=f}}function S3(a,c){if(yp=-1,Ep=0,St&6)throw Error(t(327));var f=a.callbackNode;if(Nc()&&a.callbackNode!==f)return null;var y=Ma(a,a===Wr?Jr:0);if(y===0)return null;if(y&30||y&a.expiredLanes||c)c=xp(a,y);else{c=y;var C=St;St|=2;var B=b3();(Wr!==a||Jr!==c)&&(Ws=null,Lc=Xe()+500,jo(a,c));do try{PQ();break}catch(q){B3(a,q)}while(1);J0(),Ap.current=B,St=C,Tr!==null?c=0:(Wr=null,Jr=0,c=Ur)}if(c!==0){if(c===2&&(C=$u(a),C!==0&&(y=C,c=N1(a,C))),c===1)throw f=Bh,jo(a,0),Ga(a,y),On(a,Xe()),f;if(c===6)Ga(a,y);else{if(C=a.current.alternate,!(y&30)&&!NQ(C)&&(c=xp(a,y),c===2&&(B=$u(a),B!==0&&(y=B,c=N1(a,B))),c===1))throw f=Bh,jo(a,0),Ga(a,y),On(a,Xe()),f;switch(a.finishedWork=C,a.finishedLanes=y,c){case 0:case 1:throw Error(t(345));case 2:Wo(a,Qn,Ws);break;case 3:if(Ga(a,y),(y&130023424)===y&&(c=R1+500-Xe(),10<c)){if(Ma(a,0)!==0)break;if(C=a.suspendedLanes,(C&y)!==y){yn(),a.pingedLanes|=a.suspendedLanes&C;break}a.timeoutHandle=F0(Wo.bind(null,a,Qn,Ws),c);break}Wo(a,Qn,Ws);break;case 4:if(Ga(a,y),(y&4194240)===y)break;for(c=a.eventTimes,C=-1;0<y;){var U=31-vn(y);B=1<<U,U=c[U],U>C&&(C=U),y&=~B}if(y=C,y=Xe()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*LQ(y/1960))-y,10<y){a.timeoutHandle=F0(Wo.bind(null,a,Qn,Ws),y);break}Wo(a,Qn,Ws);break;case 5:Wo(a,Qn,Ws);break;default:throw Error(t(329))}}}return On(a,Xe()),a.callbackNode===f?S3.bind(null,a):null}function N1(a,c){var f=bh;return a.current.memoizedState.isDehydrated&&(jo(a,c).flags|=256),a=xp(a,c),a!==2&&(c=Qn,Qn=f,c!==null&&U1(c)),a}function U1(a){Qn===null?Qn=a:Qn.push.apply(Qn,a)}function NQ(a){for(var c=a;;){if(c.flags&16384){var f=c.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var y=0;y<f.length;y++){var C=f[y],B=C.getSnapshot;C=C.value;try{if(!ki(B(),C))return!1}catch{return!1}}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Ga(a,c){for(c&=~b1,c&=~gp,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var f=31-vn(c),y=1<<f;a[f]=-1,c&=~y}}function T3(a){if(St&6)throw Error(t(327));Nc();var c=Ma(a,0);if(!(c&1))return On(a,Xe()),null;var f=xp(a,c);if(a.tag!==0&&f===2){var y=$u(a);y!==0&&(c=y,f=N1(a,y))}if(f===1)throw f=Bh,jo(a,0),Ga(a,c),On(a,Xe()),f;if(f===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,Wo(a,Qn,Ws),On(a,Xe()),null}function P1(a,c){var f=St;St|=1;try{return a(c)}finally{St=f,St===0&&(Lc=Xe()+500,Xf&&Pa())}}function Vo(a){za!==null&&za.tag===0&&!(St&6)&&Nc();var c=St;St|=1;var f=yi.transition,y=kt;try{if(yi.transition=null,kt=1,a)return a()}finally{kt=y,yi.transition=f,St=c,!(St&6)&&Pa()}}function k1(){ni=Dc.current,Kt(Dc)}function jo(a,c){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,uQ(f)),Tr!==null)for(f=Tr.return;f!==null;){var y=f;switch(W0(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Yf();break;case 3:Bc(),Kt(Un),Kt(nn),o1();break;case 5:s1(y);break;case 4:Bc();break;case 13:Kt(ar);break;case 19:Kt(ar);break;case 10:Z0(y.type._context);break;case 22:case 23:k1()}f=f.return}if(Wr=a,Tr=a=Va(a.current,null),Jr=ni=c,Ur=0,Bh=null,b1=gp=Go=0,Qn=bh=null,Fo!==null){for(c=0;c<Fo.length;c++)if(f=Fo[c],y=f.interleaved,y!==null){f.interleaved=null;var C=y.next,B=f.pending;if(B!==null){var U=B.next;B.next=C,y.next=U}f.pending=y}Fo=null}return a}function B3(a,c){do{var f=Tr;try{if(J0(),ap.current=up,op){for(var y=or.memoizedState;y!==null;){var C=y.queue;C!==null&&(C.pending=null),y=y.next}op=!1}if(Ho=0,jr=Nr=or=null,wh=!1,Ih=0,B1.current=null,f===null||f.return===null){Ur=1,Bh=c,Tr=null;break}e:{var B=a,U=f.return,q=f,J=c;if(c=Jr,q.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var ce=J,we=q,Ce=we.tag;if(!(we.mode&1)&&(Ce===0||Ce===11||Ce===15)){var xe=we.alternate;xe?(we.updateQueue=xe.updateQueue,we.memoizedState=xe.memoizedState,we.lanes=xe.lanes):(we.updateQueue=null,we.memoizedState=null)}var ke=e3(U);if(ke!==null){ke.flags&=-257,t3(ke,U,q,B,c),ke.mode&1&&$M(B,ce,c),c=ke,J=ce;var ze=c.updateQueue;if(ze===null){var We=new Set;We.add(J),c.updateQueue=We}else ze.add(J);break e}else{if(!(c&1)){$M(B,ce,c),Q1();break e}J=Error(t(426))}}else if(tr&&q.mode&1){var wr=e3(U);if(wr!==null){!(wr.flags&65536)&&(wr.flags|=256),t3(wr,U,q,B,c),X0(bc(J,q));break e}}B=J=bc(J,q),Ur!==4&&(Ur=2),bh===null?bh=[B]:bh.push(B),B=U;do{switch(B.tag){case 3:B.flags|=65536,c&=-c,B.lanes|=c;var ie=JM(B,J,c);yM(B,ie);break e;case 1:q=J;var $=B.type,ae=B.stateNode;if(!(B.flags&128)&&(typeof $.getDerivedStateFromError=="function"||ae!==null&&typeof ae.componentDidCatch=="function"&&(Fa===null||!Fa.has(ae)))){B.flags|=65536,c&=-c,B.lanes|=c;var Te=ZM(B,q,c);yM(B,Te);break e}}B=B.return}while(B!==null)}D3(f)}catch(qe){c=qe,Tr===f&&f!==null&&(Tr=f=f.return);continue}break}while(1)}function b3(){var a=Ap.current;return Ap.current=up,a===null?up:a}function Q1(){(Ur===0||Ur===3||Ur===2)&&(Ur=4),Wr===null||!(Go&268435455)&&!(gp&268435455)||Ga(Wr,Jr)}function xp(a,c){var f=St;St|=2;var y=b3();(Wr!==a||Jr!==c)&&(Ws=null,jo(a,c));do try{UQ();break}catch(C){B3(a,C)}while(1);if(J0(),St=f,Ap.current=y,Tr!==null)throw Error(t(261));return Wr=null,Jr=0,Ur}function UQ(){for(;Tr!==null;)R3(Tr)}function PQ(){for(;Tr!==null&&!it();)R3(Tr)}function R3(a){var c=U3(a.alternate,a,ni);a.memoizedProps=a.pendingProps,c===null?D3(a):Tr=c,B1.current=null}function D3(a){var c=a;do{var f=c.alternate;if(a=c.return,c.flags&32768){if(f=BQ(f,c),f!==null){f.flags&=32767,Tr=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Ur=6,Tr=null;return}}else if(f=TQ(f,c,ni),f!==null){Tr=f;return}if(c=c.sibling,c!==null){Tr=c;return}Tr=c=a}while(c!==null);Ur===0&&(Ur=5)}function Wo(a,c,f){var y=kt,C=yi.transition;try{yi.transition=null,kt=1,kQ(a,c,f,y)}finally{yi.transition=C,kt=y}return null}function kQ(a,c,f,y){do Nc();while(za!==null);if(St&6)throw Error(t(327));f=a.finishedWork;var C=a.finishedLanes;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(t(177));a.callbackNode=null,a.callbackPriority=0;var B=f.lanes|f.childLanes;if(mk(a,B),a===Wr&&(Tr=Wr=null,Jr=0),!(f.subtreeFlags&2064)&&!(f.flags&2064)||vp||(vp=!0,P3(er,function(){return Nc(),null})),B=(f.flags&15990)!==0,f.subtreeFlags&15990||B){B=yi.transition,yi.transition=null;var U=kt;kt=1;var q=St;St|=4,B1.current=null,RQ(a,f),x3(f,a),nQ(Q0),Lf=!!k0,Q0=k0=null,a.current=f,DQ(f),at(),St=q,kt=U,yi.transition=B}else a.current=f;if(vp&&(vp=!1,za=a,_p=C),B=a.pendingLanes,B===0&&(Fa=null),Ju(f.stateNode),On(a,Xe()),c!==null)for(y=a.onRecoverableError,f=0;f<c.length;f++)C=c[f],y(C.value,{componentStack:C.stack,digest:C.digest});if(mp)throw mp=!1,a=D1,D1=null,a;return _p&1&&a.tag!==0&&Nc(),B=a.pendingLanes,B&1?a===L1?Rh++:(Rh=0,L1=a):Rh=0,Pa(),null}function Nc(){if(za!==null){var a=_C(_p),c=yi.transition,f=kt;try{if(yi.transition=null,kt=16>a?16:a,za===null)var y=!1;else{if(a=za,za=null,_p=0,St&6)throw Error(t(331));var C=St;for(St|=4,Oe=a.current;Oe!==null;){var B=Oe,U=B.child;if(Oe.flags&16){var q=B.deletions;if(q!==null){for(var J=0;J<q.length;J++){var ce=q[J];for(Oe=ce;Oe!==null;){var we=Oe;switch(we.tag){case 0:case 11:case 15:Th(8,we,B)}var Ce=we.child;if(Ce!==null)Ce.return=we,Oe=Ce;else for(;Oe!==null;){we=Oe;var xe=we.sibling,ke=we.return;if(m3(we),we===ce){Oe=null;break}if(xe!==null){xe.return=ke,Oe=xe;break}Oe=ke}}}var ze=B.alternate;if(ze!==null){var We=ze.child;if(We!==null){ze.child=null;do{var wr=We.sibling;We.sibling=null,We=wr}while(We!==null)}}Oe=B}}if(B.subtreeFlags&2064&&U!==null)U.return=B,Oe=U;else e:for(;Oe!==null;){if(B=Oe,B.flags&2048)switch(B.tag){case 0:case 11:case 15:Th(9,B,B.return)}var ie=B.sibling;if(ie!==null){ie.return=B.return,Oe=ie;break e}Oe=B.return}}var $=a.current;for(Oe=$;Oe!==null;){U=Oe;var ae=U.child;if(U.subtreeFlags&2064&&ae!==null)ae.return=U,Oe=ae;else e:for(U=$;Oe!==null;){if(q=Oe,q.flags&2048)try{switch(q.tag){case 0:case 11:case 15:pp(9,q)}}catch(qe){pr(q,q.return,qe)}if(q===U){Oe=null;break e}var Te=q.sibling;if(Te!==null){Te.return=q.return,Oe=Te;break e}Oe=q.return}}if(St=C,Pa(),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(jt,a)}catch{}y=!0}return y}finally{kt=f,yi.transition=c}}return!1}function L3(a,c,f){c=bc(f,c),c=JM(a,c,1),a=Qa(a,c,1),c=yn(),a!==null&&(th(a,1,c),On(a,c))}function pr(a,c,f){if(a.tag===3)L3(a,a,f);else for(;c!==null;){if(c.tag===3){L3(c,a,f);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Fa===null||!Fa.has(y))){a=bc(f,a),a=ZM(c,a,1),c=Qa(c,a,1),a=yn(),c!==null&&(th(c,1,a),On(c,a));break}}c=c.return}}function QQ(a,c,f){var y=a.pingCache;y!==null&&y.delete(c),c=yn(),a.pingedLanes|=a.suspendedLanes&f,Wr===a&&(Jr&f)===f&&(Ur===4||Ur===3&&(Jr&130023424)===Jr&&500>Xe()-R1?jo(a,0):b1|=f),On(a,c)}function N3(a,c){c===0&&(a.mode&1?(c=xr,xr<<=1,!(xr&130023424)&&(xr=4194304)):c=1);var f=yn();a=Gs(a,c),a!==null&&(th(a,c,f),On(a,f))}function OQ(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),N3(a,f)}function FQ(a,c){var f=0;switch(a.tag){case 13:var y=a.stateNode,C=a.memoizedState;C!==null&&(f=C.retryLane);break;case 19:y=a.stateNode;break;default:throw Error(t(314))}y!==null&&y.delete(c),N3(a,f)}var U3;U3=function(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps||Un.current)kn=!0;else{if(!(a.lanes&f)&&!(c.flags&128))return kn=!1,SQ(a,c,f);kn=!!(a.flags&131072)}else kn=!1,tr&&c.flags&1048576&&fM(c,Jf,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;dp(a,c),a=c.pendingProps;var C=xc(c,nn.current);Sc(c,f),C=u1(null,c,y,a,C,f);var B=h1();return c.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Pn(y)?(B=!0,qf(c)):B=!1,c.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,t1(c),C.updater=np,c.stateNode=C,C._reactInternals=c,n1(c,y,a,f),c=_1(null,c,y,!0,B,f)):(c.tag=0,tr&&B&&j0(c),_n(null,c,C,f),c=c.child),c;case 16:y=c.elementType;e:{switch(dp(a,c),a=c.pendingProps,C=y._init,y=C(y._payload),c.type=y,C=c.tag=HQ(y),a=Oi(y,a),C){case 0:c=v1(null,c,y,a,f);break e;case 1:c=o3(null,c,y,a,f);break e;case 11:c=r3(null,c,y,a,f);break e;case 14:c=n3(null,c,y,Oi(y.type,a),f);break e}throw Error(t(306,y,""))}return c;case 0:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),v1(a,c,y,C,f);case 1:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),o3(a,c,y,C,f);case 3:e:{if(l3(c),a===null)throw Error(t(387));y=c.pendingProps,B=c.memoizedState,C=B.element,_M(a,c),rp(c,y,null,f);var U=c.memoizedState;if(y=U.element,B.isDehydrated)if(B={element:y,isDehydrated:!1,cache:U.cache,pendingSuspenseBoundaries:U.pendingSuspenseBoundaries,transitions:U.transitions},c.updateQueue.baseState=B,c.memoizedState=B,c.flags&256){C=bc(Error(t(423)),c),c=c3(a,c,y,f,C);break e}else if(y!==C){C=bc(Error(t(424)),c),c=c3(a,c,y,f,C);break e}else for(ri=La(c.stateNode.containerInfo.firstChild),ti=c,tr=!0,Qi=null,f=TM(c,null,y,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Cc(),y===C){c=js(a,c,f);break e}_n(a,c,y,f)}c=c.child}return c;case 5:return BM(c),a===null&&q0(c),y=c.type,C=c.pendingProps,B=a!==null?a.memoizedProps:null,U=C.children,O0(y,C)?U=null:B!==null&&O0(y,B)&&(c.flags|=32),a3(a,c),_n(a,c,U,f),c.child;case 6:return a===null&&q0(c),null;case 13:return u3(a,c,f);case 4:return i1(c,c.stateNode.containerInfo),y=c.pendingProps,a===null?c.child=Tc(c,null,y,f):_n(a,c,y,f),c.child;case 11:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),r3(a,c,y,C,f);case 7:return _n(a,c,c.pendingProps,f),c.child;case 8:return _n(a,c,c.pendingProps.children,f),c.child;case 12:return _n(a,c,c.pendingProps.children,f),c.child;case 10:e:{if(y=c.type._context,C=c.pendingProps,B=c.memoizedProps,U=C.value,Wt($f,y._currentValue),y._currentValue=U,B!==null)if(ki(B.value,U)){if(B.children===C.children&&!Un.current){c=js(a,c,f);break e}}else for(B=c.child,B!==null&&(B.return=c);B!==null;){var q=B.dependencies;if(q!==null){U=B.child;for(var J=q.firstContext;J!==null;){if(J.context===y){if(B.tag===1){J=Vs(-1,f&-f),J.tag=2;var ce=B.updateQueue;if(ce!==null){ce=ce.shared;var we=ce.pending;we===null?J.next=J:(J.next=we.next,we.next=J),ce.pending=J}}B.lanes|=f,J=B.alternate,J!==null&&(J.lanes|=f),$0(B.return,f,c),q.lanes|=f;break}J=J.next}}else if(B.tag===10)U=B.type===c.type?null:B.child;else if(B.tag===18){if(U=B.return,U===null)throw Error(t(341));U.lanes|=f,q=U.alternate,q!==null&&(q.lanes|=f),$0(U,f,c),U=B.sibling}else U=B.child;if(U!==null)U.return=B;else for(U=B;U!==null;){if(U===c){U=null;break}if(B=U.sibling,B!==null){B.return=U.return,U=B;break}U=U.return}B=U}_n(a,c,C.children,f),c=c.child}return c;case 9:return C=c.type,y=c.pendingProps.children,Sc(c,f),C=vi(C),y=y(C),c.flags|=1,_n(a,c,y,f),c.child;case 14:return y=c.type,C=Oi(y,c.pendingProps),C=Oi(y.type,C),n3(a,c,y,C,f);case 15:return i3(a,c,c.type,c.pendingProps,f);case 17:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),dp(a,c),c.tag=1,Pn(y)?(a=!0,qf(c)):a=!1,Sc(c,f),IM(c,y,C),n1(c,y,C,f),_1(null,c,y,!0,a,f);case 19:return d3(a,c,f);case 22:return s3(a,c,f)}throw Error(t(156,c.tag))};function P3(a,c){return Re(a,c)}function zQ(a,c,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ei(a,c,f,y){return new zQ(a,c,f,y)}function O1(a){return a=a.prototype,!(!a||!a.isReactComponent)}function HQ(a){if(typeof a=="function")return O1(a)?1:0;if(a!=null){if(a=a.$$typeof,a===P)return 11;if(a===X)return 14}return 2}function Va(a,c){var f=a.alternate;return f===null?(f=Ei(a.tag,c,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=c,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,c=a.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function wp(a,c,f,y,C,B){var U=2;if(y=a,typeof a=="function")O1(a)&&(U=1);else if(typeof a=="string")U=5;else e:switch(a){case T:return Yo(f.children,C,B,c);case D:U=8,C|=8;break;case b:return a=Ei(12,f,c,C|2),a.elementType=b,a.lanes=B,a;case N:return a=Ei(13,f,c,C),a.elementType=N,a.lanes=B,a;case W:return a=Ei(19,f,c,C),a.elementType=W,a.lanes=B,a;case te:return Ip(f,C,B,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case M:U=10;break e;case L:U=9;break e;case P:U=11;break e;case X:U=14;break e;case K:U=16,y=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return c=Ei(U,f,c,C),c.elementType=a,c.type=y,c.lanes=B,c}function Yo(a,c,f,y){return a=Ei(7,a,y,c),a.lanes=f,a}function Ip(a,c,f,y){return a=Ei(22,a,y,c),a.elementType=te,a.lanes=f,a.stateNode={isHidden:!1},a}function F1(a,c,f){return a=Ei(6,a,null,c),a.lanes=f,a}function z1(a,c,f){return c=Ei(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function GQ(a,c,f,y,C){this.tag=c,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=p0(0),this.expirationTimes=p0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=p0(0),this.identifierPrefix=y,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function H1(a,c,f,y,C,B,U,q,J){return a=new GQ(a,c,f,q,J),c===1?(c=1,B===!0&&(c|=8)):c=0,B=Ei(3,null,null,c),a.current=B,B.stateNode=a,B.memoizedState={element:y,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},t1(B),a}function VQ(a,c,f){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:y==null?null:""+y,children:a,containerInfo:c,implementation:f}}function k3(a){if(!a)return Ua;a=a._reactInternals;e:{if(ks(a)!==a||a.tag!==1)throw Error(t(170));var c=a;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Pn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(t(171))}if(a.tag===1){var f=a.type;if(Pn(f))return uM(a,f,c)}return c}function Q3(a,c,f,y,C,B,U,q,J){return a=H1(f,y,!0,a,C,B,U,q,J),a.context=k3(null),f=a.current,y=yn(),C=Ha(f),B=Vs(y,C),B.callback=c??null,Qa(f,B,C),a.current.lanes=C,th(a,C,y),On(a,y),a}function Cp(a,c,f,y){var C=c.current,B=yn(),U=Ha(C);return f=k3(f),c.context===null?c.context=f:c.pendingContext=f,c=Vs(B,U),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=Qa(C,c,U),a!==null&&(Hi(a,C,U,B),tp(a,C,U)),U}function Mp(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function O3(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function G1(a,c){O3(a,c),(a=a.alternate)&&O3(a,c)}function jQ(){return null}var F3=typeof reportError=="function"?reportError:function(a){console.error(a)};function V1(a){this._internalRoot=a}Sp.prototype.render=V1.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(t(409));Cp(a,c,null,null)},Sp.prototype.unmount=V1.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;Vo(function(){Cp(null,a,null,null)}),c[Os]=null}};function Sp(a){this._internalRoot=a}Sp.prototype.unstable_scheduleHydration=function(a){if(a){var c=xC();a={blockedOn:null,target:a,priority:c};for(var f=0;f<ba.length&&c!==0&&c<ba[f].priority;f++);ba.splice(f,0,a),f===0&&CC(a)}};function j1(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Tp(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function z3(){}function WQ(a,c,f,y,C){if(C){if(typeof y=="function"){var B=y;y=function(){var ce=Mp(U);B.call(ce)}}var U=Q3(c,y,a,0,null,!1,!1,"",z3);return a._reactRootContainer=U,a[Os]=U.current,Ah(a.nodeType===8?a.parentNode:a),Vo(),U}for(;C=a.lastChild;)a.removeChild(C);if(typeof y=="function"){var q=y;y=function(){var ce=Mp(J);q.call(ce)}}var J=H1(a,0,!1,null,null,!1,!1,"",z3);return a._reactRootContainer=J,a[Os]=J.current,Ah(a.nodeType===8?a.parentNode:a),Vo(function(){Cp(c,J,f,y)}),J}function Bp(a,c,f,y,C){var B=f._reactRootContainer;if(B){var U=B;if(typeof C=="function"){var q=C;C=function(){var J=Mp(U);q.call(J)}}Cp(c,U,a,C)}else U=WQ(f,c,a,C,y);return Mp(U)}yC=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var f=Ln(c.pendingLanes);f!==0&&(A0(c,f|1),On(c,Xe()),!(St&6)&&(Lc=Xe()+500,Pa()))}break;case 13:Vo(function(){var y=Gs(a,1);if(y!==null){var C=yn();Hi(y,a,1,C)}}),G1(a,1)}},g0=function(a){if(a.tag===13){var c=Gs(a,134217728);if(c!==null){var f=yn();Hi(c,a,134217728,f)}G1(a,134217728)}},EC=function(a){if(a.tag===13){var c=Ha(a),f=Gs(a,c);if(f!==null){var y=yn();Hi(f,a,c,y)}G1(a,c)}},xC=function(){return kt},wC=function(a,c){var f=kt;try{return kt=a,c()}finally{kt=f}},ve=function(a,c,f){switch(c){case"input":if(Y(a,f),c=f.name,f.type==="radio"&&c!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<f.length;c++){var y=f[c];if(y!==a&&y.form===a.form){var C=Wf(y);if(!C)throw Error(t(90));et(y),Y(y,C)}}}break;case"textarea":Ie(a,f);break;case"select":c=f.value,c!=null&&me(a,!!f.multiple,c,!1)}},Bt=P1,_t=Vo;var YQ={usingClientEntryPoint:!1,Events:[vh,yc,Wf,Lt,Nt,P1]},Dh={findFiberByHostInstance:Po,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},qQ={bundleType:Dh.bundleType,version:Dh.version,rendererPackageName:Dh.rendererPackageName,rendererConfig:Dh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=he(a),a===null?null:a.stateNode},findFiberByHostInstance:Dh.findFiberByHostInstance||jQ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bp.isDisabled&&bp.supportsFiber)try{jt=bp.inject(qQ),tt=bp}catch{}}return bn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YQ,bn.createPortal=function(a,c){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!j1(c))throw Error(t(200));return VQ(a,c,null,f)},bn.createRoot=function(a,c){if(!j1(a))throw Error(t(299));var f=!1,y="",C=F3;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(C=c.onRecoverableError)),c=H1(a,1,!1,null,null,f,!1,y,C),a[Os]=c.current,Ah(a.nodeType===8?a.parentNode:a),new V1(c)},bn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(t(188)):(a=Object.keys(a).join(","),Error(t(268,a)));return a=he(c),a=a===null?null:a.stateNode,a},bn.flushSync=function(a){return Vo(a)},bn.hydrate=function(a,c,f){if(!Tp(c))throw Error(t(200));return Bp(null,a,c,!0,f)},bn.hydrateRoot=function(a,c,f){if(!j1(a))throw Error(t(405));var y=f!=null&&f.hydratedSources||null,C=!1,B="",U=F3;if(f!=null&&(f.unstable_strictMode===!0&&(C=!0),f.identifierPrefix!==void 0&&(B=f.identifierPrefix),f.onRecoverableError!==void 0&&(U=f.onRecoverableError)),c=Q3(c,null,a,1,f??null,C,!1,B,U),a[Os]=c.current,Ah(a),y)for(a=0;a<y.length;a++)f=y[a],C=f._getVersion,C=C(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,C]:c.mutableSourceEagerHydrationData.push(f,C);return new Sp(c)},bn.render=function(a,c,f){if(!Tp(c))throw Error(t(200));return Bp(null,a,c,!1,f)},bn.unmountComponentAtNode=function(a){if(!Tp(a))throw Error(t(40));return a._reactRootContainer?(Vo(function(){Bp(null,null,a,!1,function(){a._reactRootContainer=null,a[Os]=null})}),!0):!1},bn.unstable_batchedUpdates=P1,bn.unstable_renderSubtreeIntoContainer=function(a,c,f,y){if(!Tp(f))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Bp(a,c,f,!1,y)},bn.version="18.2.0-next-9e3b772b8-20220608",bn}function iC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iC)}catch(r){console.error(r)}}iC(),eC.exports=Z7();var $7=eC.exports,sC=$7;a0.createRoot=sC.createRoot,a0.hydrateRoot=sC.hydrateRoot;class ek{constructor({apiService:e,events:t}){Rt(this,"targetElement");Rt(this,"apiService");Rt(this,"events");Rt(this,"htmlTarget");this.apiService=e,this.events=t}mount(e,t){if(!this.targetElement){const n=t.customId??"dita-3dconfig-element",i=document.getElementById(n);if(!i)throw new Error(`Element not found with id => '${n}' `);this.htmlTarget=i,this.htmlTarget.style.height="100%",this.htmlTarget.style.width="100%",this.targetElement=a0.createRoot(document.getElementById(n))}this.targetElement.render(Lh.createElement(X7,{apiService:this.apiService,events:this.events,sku:e,viewerOnly:t.viewerOnly}))}unmount(){this.targetElement&&(this.targetElement.unmount(),this.targetElement=void 0,this.htmlTarget&&(this.htmlTarget.style.height="0px",this.htmlTarget.style.width="auto"))}}var c0={exports:{}},hc=typeof Reflect=="object"?Reflect:null,aC=hc&&typeof hc.apply=="function"?hc.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Sf;hc&&typeof hc.ownKeys=="function"?Sf=hc.ownKeys:Object.getOwnPropertySymbols?Sf=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Sf=function(e){return Object.getOwnPropertyNames(e)};function tk(r){console&&console.warn&&console.warn(r)}var oC=Number.isNaN||function(e){return e!==e};function Ot(){Ot.init.call(this)}c0.exports=Ot,c0.exports.once=sk,Ot.EventEmitter=Ot,Ot.prototype._events=void 0,Ot.prototype._eventsCount=0,Ot.prototype._maxListeners=void 0;var lC=10;function Tf(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Ot,"defaultMaxListeners",{enumerable:!0,get:function(){return lC},set:function(r){if(typeof r!="number"||r<0||oC(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");lC=r}}),Ot.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ot.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||oC(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function cC(r){return r._maxListeners===void 0?Ot.defaultMaxListeners:r._maxListeners}Ot.prototype.getMaxListeners=function(){return cC(this)},Ot.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var h=s[e];if(h===void 0)return!1;if(typeof h=="function")aC(h,this,t);else for(var u=h.length,d=pC(h,u),n=0;n<u;++n)aC(d[n],this,t);return!0};function uC(r,e,t,n){var i,s,o;if(Tf(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),o=s[e]),o===void 0)o=s[e]=t,++r._eventsCount;else if(typeof o=="function"?o=s[e]=n?[t,o]:[o,t]:n?o.unshift(t):o.push(t),i=cC(r),i>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=r,l.type=e,l.count=o.length,tk(l)}return r}Ot.prototype.addListener=function(e,t){return uC(this,e,t,!1)},Ot.prototype.on=Ot.prototype.addListener,Ot.prototype.prependListener=function(e,t){return uC(this,e,t,!0)};function rk(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function hC(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=rk.bind(n);return i.listener=t,n.wrapFn=i,i}Ot.prototype.once=function(e,t){return Tf(t),this.on(e,hC(this,e,t)),this},Ot.prototype.prependOnceListener=function(e,t){return Tf(t),this.prependListener(e,hC(this,e,t)),this},Ot.prototype.removeListener=function(e,t){var n,i,s,o,l;if(Tf(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():nk(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this},Ot.prototype.off=Ot.prototype.removeListener,Ot.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function dC(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?ik(i):pC(i,i.length)}Ot.prototype.listeners=function(e){return dC(this,e,!0)},Ot.prototype.rawListeners=function(e){return dC(this,e,!1)},Ot.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):fC.call(r,e)},Ot.prototype.listenerCount=fC;function fC(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Ot.prototype.eventNames=function(){return this._eventsCount>0?Sf(this._events):[]};function pC(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function nk(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function ik(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function sk(r,e){return new Promise(function(t,n){function i(o){r.removeListener(e,s),n(o)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}AC(r,e,s,{once:!0}),e!=="error"&&ak(r,i,{once:!0})})}function ak(r,e,t){typeof r.on=="function"&&AC(r,"error",e,t)}function AC(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var ok=c0.exports;const Ku=class Ku extends ok.EventEmitter{emitEvent(e,t){Object.keys(Ku.EVENTS).includes(e)&&this.emit(Ku.EVENTS[e],t)}};Rt(Ku,"EVENTS",{onAddToCart:"add-to-cart"});let u0=Ku;const lk={getCartUrl:((mC=window.Shopify)==null?void 0:mC.routes.root)+"cart.js",addToCartUrl:((vC=window.Shopify)==null?void 0:vC.routes.root)+"cart/add.js"},gC=Object.freeze(lk);class ck{constructor(e){Rt(this,"config");this.config=e}RequestOptions(e,t){return{method:e,headers:{Accept:"application/json","Content-Type":"application/json"},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(){return(await fetch(this.config.getCartUrl,this.RequestOptions("GET"))).json()}async Post(e){return(await fetch(this.config.addToCartUrl,this.RequestOptions("POST",e||{}))).json()}}const{log:uk,error:hk}=console,dk=(...r)=>{hk("❌ Sprie Error:",...r)},fk="&ui_animations=0&ui_infos=0&ui_stop=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_ar=0&ui_help=0&ui_settings=0&ui_vr=0&ui_fullscreen=0&ui_annotations=0&ui_start=0&",pk={HOST:hs.host,STORE_PREFIX:hs.storePrefix},Ak={addToCartUrl:gC.addToCartUrl,getCartUrl:gC.getCartUrl};let h0=!1;class gk{constructor(){Rt(this,"sdkService");Rt(this,"apiService");Rt(this,"uiService");Rt(this,"events");this.events=new u0,this.apiService=new V3(new Wa(pk),new ck(Ak)),this.uiService=new ek({apiService:this.apiService,events:this.events});const e={apiService:this.apiService,config:hs,log:uk,logErr:dk,metaData:{appVersion:H3,previewUrlPrams:fk,targetClassName:"sprie-embed-element"}};this.sdkService=new j3(e),this.sdkService.Init().then(t=>{h0=t})}isReadyToLoad(){return h0}load(e,t){h0?this.loadOnAuth(e,t):this.waitForAllReady(this.isReadyToLoad,()=>this.loadOnAuth(e,t),e,t)}loadOnAuth(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!1,customId:t})}loadViewerOnly(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!0,customId:t})}unload(){this.uiService.unmount()}waitForAllReady(e,t,n,i){e()?t(n,i):setTimeout(()=>{this.waitForAllReady(e,t,n,i)},200)}}window.ditaConfigurator=new gk})();
4581
+ `+B.stack}return{value:a,source:c,stack:C,digest:null}}function g1(a,c,f){return{value:a,source:null,stack:f??null,digest:c??null}}function m1(a,c){try{console.error(c.value)}catch(f){setTimeout(function(){throw f})}}var IQ=typeof WeakMap=="function"?WeakMap:Map;function JM(a,c,f){f=Vs(-1,f),f.tag=3,f.payload={element:null};var y=c.value;return f.callback=function(){mp||(mp=!0,D1=y),m1(a,c)},f}function ZM(a,c,f){f=Vs(-1,f),f.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var C=c.value;f.payload=function(){return y(C)},f.callback=function(){m1(a,c)}}var B=a.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(f.callback=function(){m1(a,c),typeof y!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var U=c.stack;this.componentDidCatch(c.value,{componentStack:U!==null?U:""})}),f}function $M(a,c,f){var y=a.pingCache;if(y===null){y=a.pingCache=new IQ;var C=new Set;y.set(c,C)}else C=y.get(c),C===void 0&&(C=new Set,y.set(c,C));C.has(f)||(C.add(f),a=QQ.bind(null,a,c,f),c.then(a,a))}function e3(a){do{var c;if((c=a.tag===13)&&(c=a.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return a;a=a.return}while(a!==null);return null}function t3(a,c,f,y,C){return a.mode&1?(a.flags|=65536,a.lanes=C,a):(a===c?a.flags|=65536:(a.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(c=Vs(-1,1),c.tag=2,Qa(f,c,1))),f.lanes|=1),a)}var CQ=I.ReactCurrentOwner,kn=!1;function _n(a,c,f,y){c.child=a===null?TM(c,null,f,y):Tc(c,a.child,f,y)}function r3(a,c,f,y,C){f=f.render;var B=c.ref;return Sc(c,C),y=u1(a,c,f,y,B,C),f=h1(),a!==null&&!kn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~C,js(a,c,C)):(tr&&f&&j0(c),c.flags|=1,_n(a,c,y,C),c.child)}function n3(a,c,f,y,C){if(a===null){var B=f.type;return typeof B=="function"&&!O1(B)&&B.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(c.tag=15,c.type=B,i3(a,c,B,y,C)):(a=wp(f.type,null,y,c,c.mode,C),a.ref=c.ref,a.return=c,c.child=a)}if(B=a.child,!(a.lanes&C)){var U=B.memoizedProps;if(f=f.compare,f=f!==null?f:dh,f(U,y)&&a.ref===c.ref)return js(a,c,C)}return c.flags|=1,a=Va(B,y),a.ref=c.ref,a.return=c,c.child=a}function i3(a,c,f,y,C){if(a!==null){var B=a.memoizedProps;if(dh(B,y)&&a.ref===c.ref)if(kn=!1,c.pendingProps=y=B,(a.lanes&C)!==0)a.flags&131072&&(kn=!0);else return c.lanes=a.lanes,js(a,c,C)}return v1(a,c,f,y,C)}function s3(a,c,f){var y=c.pendingProps,C=y.children,B=a!==null?a.memoizedState:null;if(y.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wt(Dc,ni),ni|=f;else{if(!(f&1073741824))return a=B!==null?B.baseLanes|f:f,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:a,cachePool:null,transitions:null},c.updateQueue=null,Wt(Dc,ni),ni|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=B!==null?B.baseLanes:f,Wt(Dc,ni),ni|=y}else B!==null?(y=B.baseLanes|f,c.memoizedState=null):y=f,Wt(Dc,ni),ni|=y;return _n(a,c,C,f),c.child}function a3(a,c){var f=c.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(c.flags|=512,c.flags|=2097152)}function v1(a,c,f,y,C){var B=Pn(f)?ko:nn.current;return B=xc(c,B),Sc(c,C),f=u1(a,c,f,y,B,C),y=h1(),a!==null&&!kn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~C,js(a,c,C)):(tr&&y&&j0(c),c.flags|=1,_n(a,c,f,C),c.child)}function o3(a,c,f,y,C){if(Pn(f)){var B=!0;qf(c)}else B=!1;if(Sc(c,C),c.stateNode===null)dp(a,c),IM(c,f,y),n1(c,f,y,C),y=!0;else if(a===null){var U=c.stateNode,q=c.memoizedProps;U.props=q;var J=U.context,ce=f.contextType;typeof ce=="object"&&ce!==null?ce=vi(ce):(ce=Pn(f)?ko:nn.current,ce=xc(c,ce));var we=f.getDerivedStateFromProps,Ce=typeof we=="function"||typeof U.getSnapshotBeforeUpdate=="function";Ce||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==y||J!==ce)&&CM(c,U,y,ce),ka=!1;var xe=c.memoizedState;U.state=xe,rp(c,y,U,C),J=c.memoizedState,q!==y||xe!==J||Un.current||ka?(typeof we=="function"&&(r1(c,f,we,y),J=c.memoizedState),(q=ka||wM(c,f,q,y,xe,J,ce))?(Ce||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(c.flags|=4194308)):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=J),U.props=y,U.state=J,U.context=ce,y=q):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{U=c.stateNode,_M(a,c),q=c.memoizedProps,ce=c.type===c.elementType?q:Oi(c.type,q),U.props=ce,Ce=c.pendingProps,xe=U.context,J=f.contextType,typeof J=="object"&&J!==null?J=vi(J):(J=Pn(f)?ko:nn.current,J=xc(c,J));var ke=f.getDerivedStateFromProps;(we=typeof ke=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==Ce||xe!==J)&&CM(c,U,y,J),ka=!1,xe=c.memoizedState,U.state=xe,rp(c,y,U,C);var ze=c.memoizedState;q!==Ce||xe!==ze||Un.current||ka?(typeof ke=="function"&&(r1(c,f,ke,y),ze=c.memoizedState),(ce=ka||wM(c,f,ce,y,xe,ze,J)||!1)?(we||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(y,ze,J),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(y,ze,J)),typeof U.componentDidUpdate=="function"&&(c.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof U.componentDidUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=ze),U.props=y,U.state=ze,U.context=J,y=ce):(typeof U.componentDidUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),y=!1)}return _1(a,c,f,y,B,C)}function _1(a,c,f,y,C,B){a3(a,c);var U=(c.flags&128)!==0;if(!y&&!U)return C&&hM(c,f,!1),js(a,c,B);y=c.stateNode,CQ.current=c;var q=U&&typeof f.getDerivedStateFromError!="function"?null:y.render();return c.flags|=1,a!==null&&U?(c.child=Tc(c,a.child,null,B),c.child=Tc(c,null,q,B)):_n(a,c,q,B),c.memoizedState=y.state,C&&hM(c,f,!0),c.child}function l3(a){var c=a.stateNode;c.pendingContext?cM(a,c.pendingContext,c.pendingContext!==c.context):c.context&&cM(a,c.context,!1),i1(a,c.containerInfo)}function c3(a,c,f,y,C){return Cc(),X0(C),c.flags|=256,_n(a,c,f,y),c.child}var y1={dehydrated:null,treeContext:null,retryLane:0};function E1(a){return{baseLanes:a,cachePool:null,transitions:null}}function u3(a,c,f){var y=c.pendingProps,C=ar.current,B=!1,U=(c.flags&128)!==0,q;if((q=U)||(q=a!==null&&a.memoizedState===null?!1:(C&2)!==0),q?(B=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(C|=1),Wt(ar,C&1),a===null)return q0(c),a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?(c.mode&1?a.data==="$!"?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(U=y.children,a=y.fallback,B?(y=c.mode,B=c.child,U={mode:"hidden",children:U},!(y&1)&&B!==null?(B.childLanes=0,B.pendingProps=U):B=Ip(U,y,0,null),a=Yo(a,y,f,null),B.return=c,a.return=c,B.sibling=a,c.child=B,c.child.memoizedState=E1(f),c.memoizedState=y1,a):x1(c,U));if(C=a.memoizedState,C!==null&&(q=C.dehydrated,q!==null))return MQ(a,c,U,y,q,C,f);if(B){B=y.fallback,U=c.mode,C=a.child,q=C.sibling;var J={mode:"hidden",children:y.children};return!(U&1)&&c.child!==C?(y=c.child,y.childLanes=0,y.pendingProps=J,c.deletions=null):(y=Va(C,J),y.subtreeFlags=C.subtreeFlags&14680064),q!==null?B=Va(q,B):(B=Yo(B,U,f,null),B.flags|=2),B.return=c,y.return=c,y.sibling=B,c.child=y,y=B,B=c.child,U=a.child.memoizedState,U=U===null?E1(f):{baseLanes:U.baseLanes|f,cachePool:null,transitions:U.transitions},B.memoizedState=U,B.childLanes=a.childLanes&~f,c.memoizedState=y1,y}return B=a.child,a=B.sibling,y=Va(B,{mode:"visible",children:y.children}),!(c.mode&1)&&(y.lanes=f),y.return=c,y.sibling=null,a!==null&&(f=c.deletions,f===null?(c.deletions=[a],c.flags|=16):f.push(a)),c.child=y,c.memoizedState=null,y}function x1(a,c){return c=Ip({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function hp(a,c,f,y){return y!==null&&X0(y),Tc(c,a.child,null,f),a=x1(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function MQ(a,c,f,y,C,B,U){if(f)return c.flags&256?(c.flags&=-257,y=g1(Error(t(422))),hp(a,c,U,y)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(B=y.fallback,C=c.mode,y=Ip({mode:"visible",children:y.children},C,0,null),B=Yo(B,C,U,null),B.flags|=2,y.return=c,B.return=c,y.sibling=B,c.child=y,c.mode&1&&Tc(c,a.child,null,U),c.child.memoizedState=E1(U),c.memoizedState=y1,B);if(!(c.mode&1))return hp(a,c,U,null);if(C.data==="$!"){if(y=C.nextSibling&&C.nextSibling.dataset,y)var q=y.dgst;return y=q,B=Error(t(419)),y=g1(B,y,void 0),hp(a,c,U,y)}if(q=(U&a.childLanes)!==0,kn||q){if(y=Wr,y!==null){switch(U&-U){case 4:C=2;break;case 16:C=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:C=32;break;case 536870912:C=268435456;break;default:C=0}C=C&(y.suspendedLanes|U)?0:C,C!==0&&C!==B.retryLane&&(B.retryLane=C,Gs(a,C),Hi(y,a,C,-1))}return Q1(),y=g1(Error(t(421))),hp(a,c,U,y)}return C.data==="$?"?(c.flags|=128,c.child=a.child,c=OQ.bind(null,a),C._reactRetry=c,null):(a=B.treeContext,ri=La(C.nextSibling),ti=c,tr=!0,Qi=null,a!==null&&(gi[mi++]=zs,gi[mi++]=Hs,gi[mi++]=Qo,zs=a.id,Hs=a.overflow,Qo=c),c=x1(c,y.children),c.flags|=4096,c)}function h3(a,c,f){a.lanes|=c;var y=a.alternate;y!==null&&(y.lanes|=c),$0(a.return,c,f)}function w1(a,c,f,y,C){var B=a.memoizedState;B===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:C}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=f,B.tailMode=C)}function d3(a,c,f){var y=c.pendingProps,C=y.revealOrder,B=y.tail;if(_n(a,c,y.children,f),y=ar.current,y&2)y=y&1|2,c.flags|=128;else{if(a!==null&&a.flags&128)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&h3(a,f,c);else if(a.tag===19)h3(a,f,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}y&=1}if(Wt(ar,y),!(c.mode&1))c.memoizedState=null;else switch(C){case"forwards":for(f=c.child,C=null;f!==null;)a=f.alternate,a!==null&&sp(a)===null&&(C=f),f=f.sibling;f=C,f===null?(C=c.child,c.child=null):(C=f.sibling,f.sibling=null),w1(c,!1,C,f,B);break;case"backwards":for(f=null,C=c.child,c.child=null;C!==null;){if(a=C.alternate,a!==null&&sp(a)===null){c.child=C;break}a=C.sibling,C.sibling=f,f=C,C=a}w1(c,!0,f,null,B);break;case"together":w1(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function dp(a,c){!(c.mode&1)&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function js(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),Go|=c.lanes,!(f&c.childLanes))return null;if(a!==null&&c.child!==a.child)throw Error(t(153));if(c.child!==null){for(a=c.child,f=Va(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=Va(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function SQ(a,c,f){switch(c.tag){case 3:l3(c),Cc();break;case 5:BM(c);break;case 1:Pn(c.type)&&qf(c);break;case 4:i1(c,c.stateNode.containerInfo);break;case 10:var y=c.type._context,C=c.memoizedProps.value;Wt($f,y._currentValue),y._currentValue=C;break;case 13:if(y=c.memoizedState,y!==null)return y.dehydrated!==null?(Wt(ar,ar.current&1),c.flags|=128,null):f&c.child.childLanes?u3(a,c,f):(Wt(ar,ar.current&1),a=js(a,c,f),a!==null?a.sibling:null);Wt(ar,ar.current&1);break;case 19:if(y=(f&c.childLanes)!==0,a.flags&128){if(y)return d3(a,c,f);c.flags|=128}if(C=c.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Wt(ar,ar.current),y)break;return null;case 22:case 23:return c.lanes=0,s3(a,c,f)}return js(a,c,f)}var f3,I1,p3,A3;f3=function(a,c){for(var f=c.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},I1=function(){},p3=function(a,c,f,y){var C=a.memoizedProps;if(C!==y){a=c.stateNode,zo(os.current);var B=null;switch(f){case"input":C=ht(a,C),y=ht(a,y),B=[];break;case"select":C=Q({},C,{value:void 0}),y=Q({},y,{value:void 0}),B=[];break;case"textarea":C=ye(a,C),y=ye(a,y),B=[];break;default:typeof C.onClick!="function"&&typeof y.onClick=="function"&&(a.onclick=jf)}ut(f,y);var U;f=null;for(ce in C)if(!y.hasOwnProperty(ce)&&C.hasOwnProperty(ce)&&C[ce]!=null)if(ce==="style"){var q=C[ce];for(U in q)q.hasOwnProperty(U)&&(f||(f={}),f[U]="")}else ce!=="dangerouslySetInnerHTML"&&ce!=="children"&&ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&ce!=="autoFocus"&&(i.hasOwnProperty(ce)?B||(B=[]):(B=B||[]).push(ce,null));for(ce in y){var J=y[ce];if(q=C!=null?C[ce]:void 0,y.hasOwnProperty(ce)&&J!==q&&(J!=null||q!=null))if(ce==="style")if(q){for(U in q)!q.hasOwnProperty(U)||J&&J.hasOwnProperty(U)||(f||(f={}),f[U]="");for(U in J)J.hasOwnProperty(U)&&q[U]!==J[U]&&(f||(f={}),f[U]=J[U])}else f||(B||(B=[]),B.push(ce,f)),f=J;else ce==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,q=q?q.__html:void 0,J!=null&&q!==J&&(B=B||[]).push(ce,J)):ce==="children"?typeof J!="string"&&typeof J!="number"||(B=B||[]).push(ce,""+J):ce!=="suppressContentEditableWarning"&&ce!=="suppressHydrationWarning"&&(i.hasOwnProperty(ce)?(J!=null&&ce==="onScroll"&&Xt("scroll",a),B||q===J||(B=[])):(B=B||[]).push(ce,J))}f&&(B=B||[]).push("style",f);var ce=B;(c.updateQueue=ce)&&(c.flags|=4)}},A3=function(a,c,f,y){f!==y&&(c.flags|=4)};function Sh(a,c){if(!tr)switch(a.tailMode){case"hidden":c=a.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function an(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(c)for(var C=a.child;C!==null;)f|=C.lanes|C.childLanes,y|=C.subtreeFlags&14680064,y|=C.flags&14680064,C.return=a,C=C.sibling;else for(C=a.child;C!==null;)f|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=a,C=C.sibling;return a.subtreeFlags|=y,a.childLanes=f,c}function TQ(a,c,f){var y=c.pendingProps;switch(W0(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(c),null;case 1:return Pn(c.type)&&Yf(),an(c),null;case 3:return y=c.stateNode,Bc(),Kt(Un),Kt(nn),o1(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(Zf(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&!(c.flags&256)||(c.flags|=1024,Qi!==null&&(U1(Qi),Qi=null))),I1(a,c),an(c),null;case 5:s1(c);var C=zo(xh.current);if(f=c.type,a!==null&&c.stateNode!=null)p3(a,c,f,y,C),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!y){if(c.stateNode===null)throw Error(t(166));return an(c),null}if(a=zo(os.current),Zf(c)){y=c.stateNode,f=c.type;var B=c.memoizedProps;switch(y[as]=c,y[mh]=B,a=(c.mode&1)!==0,f){case"dialog":Xt("cancel",y),Xt("close",y);break;case"iframe":case"object":case"embed":Xt("load",y);break;case"video":case"audio":for(C=0;C<ph.length;C++)Xt(ph[C],y);break;case"source":Xt("error",y);break;case"img":case"image":case"link":Xt("error",y),Xt("load",y);break;case"details":Xt("toggle",y);break;case"input":Ke(y,B),Xt("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!B.multiple},Xt("invalid",y);break;case"textarea":Ge(y,B),Xt("invalid",y)}ut(f,B),C=null;for(var U in B)if(B.hasOwnProperty(U)){var q=B[U];U==="children"?typeof q=="string"?y.textContent!==q&&(B.suppressHydrationWarning!==!0&&Vf(y.textContent,q,a),C=["children",q]):typeof q=="number"&&y.textContent!==""+q&&(B.suppressHydrationWarning!==!0&&Vf(y.textContent,q,a),C=["children",""+q]):i.hasOwnProperty(U)&&q!=null&&U==="onScroll"&&Xt("scroll",y)}switch(f){case"input":se(y),k(y,B,!0);break;case"textarea":se(y),je(y);break;case"select":case"option":break;default:typeof B.onClick=="function"&&(y.onclick=jf)}y=C,c.updateQueue=y,y!==null&&(c.flags|=4)}else{U=C.nodeType===9?C:C.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=Ve(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=U.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof y.is=="string"?a=U.createElement(f,{is:y.is}):(a=U.createElement(f),f==="select"&&(U=a,y.multiple?U.multiple=!0:y.size&&(U.size=y.size))):a=U.createElementNS(a,f),a[as]=c,a[mh]=y,f3(a,c,!1,!1),c.stateNode=a;e:{switch(U=G(f,y),f){case"dialog":Xt("cancel",a),Xt("close",a),C=y;break;case"iframe":case"object":case"embed":Xt("load",a),C=y;break;case"video":case"audio":for(C=0;C<ph.length;C++)Xt(ph[C],a);C=y;break;case"source":Xt("error",a),C=y;break;case"img":case"image":case"link":Xt("error",a),Xt("load",a),C=y;break;case"details":Xt("toggle",a),C=y;break;case"input":Ke(a,y),C=ht(a,y),Xt("invalid",a);break;case"option":C=y;break;case"select":a._wrapperState={wasMultiple:!!y.multiple},C=Q({},y,{value:void 0}),Xt("invalid",a);break;case"textarea":Ge(a,y),C=ye(a,y),Xt("invalid",a);break;default:C=y}ut(f,C),q=C;for(B in q)if(q.hasOwnProperty(B)){var J=q[B];B==="style"?dt(a,J):B==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&De(a,J)):B==="children"?typeof J=="string"?(f!=="textarea"||J!=="")&&Be(a,J):typeof J=="number"&&Be(a,""+J):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(i.hasOwnProperty(B)?J!=null&&B==="onScroll"&&Xt("scroll",a):J!=null&&x(a,B,J,U))}switch(f){case"input":se(a),k(a,y,!1);break;case"textarea":se(a),je(a);break;case"option":y.value!=null&&a.setAttribute("value",""+Ee(y.value));break;case"select":a.multiple=!!y.multiple,B=y.value,B!=null?me(a,!!y.multiple,B,!1):y.defaultValue!=null&&me(a,!!y.multiple,y.defaultValue,!0);break;default:typeof C.onClick=="function"&&(a.onclick=jf)}switch(f){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return an(c),null;case 6:if(a&&c.stateNode!=null)A3(a,c,a.memoizedProps,y);else{if(typeof y!="string"&&c.stateNode===null)throw Error(t(166));if(f=zo(xh.current),zo(os.current),Zf(c)){if(y=c.stateNode,f=c.memoizedProps,y[as]=c,(B=y.nodeValue!==f)&&(a=ti,a!==null))switch(a.tag){case 3:Vf(y.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Vf(y.nodeValue,f,(a.mode&1)!==0)}B&&(c.flags|=4)}else y=(f.nodeType===9?f:f.ownerDocument).createTextNode(y),y[as]=c,c.stateNode=y}return an(c),null;case 13:if(Kt(ar),y=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(tr&&ri!==null&&c.mode&1&&!(c.flags&128))mM(),Cc(),c.flags|=98560,B=!1;else if(B=Zf(c),y!==null&&y.dehydrated!==null){if(a===null){if(!B)throw Error(t(318));if(B=c.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(t(317));B[as]=c}else Cc(),!(c.flags&128)&&(c.memoizedState=null),c.flags|=4;an(c),B=!1}else Qi!==null&&(U1(Qi),Qi=null),B=!0;if(!B)return c.flags&65536?c:null}return c.flags&128?(c.lanes=f,c):(y=y!==null,y!==(a!==null&&a.memoizedState!==null)&&y&&(c.child.flags|=8192,c.mode&1&&(a===null||ar.current&1?Ur===0&&(Ur=3):Q1())),c.updateQueue!==null&&(c.flags|=4),an(c),null);case 4:return Bc(),I1(a,c),a===null&&Ah(c.stateNode.containerInfo),an(c),null;case 10:return Z0(c.type._context),an(c),null;case 17:return Pn(c.type)&&Yf(),an(c),null;case 19:if(Kt(ar),B=c.memoizedState,B===null)return an(c),null;if(y=(c.flags&128)!==0,U=B.rendering,U===null)if(y)Sh(B,!1);else{if(Ur!==0||a!==null&&a.flags&128)for(a=c.child;a!==null;){if(U=sp(a),U!==null){for(c.flags|=128,Sh(B,!1),y=U.updateQueue,y!==null&&(c.updateQueue=y,c.flags|=4),c.subtreeFlags=0,y=f,f=c.child;f!==null;)B=f,a=y,B.flags&=14680066,U=B.alternate,U===null?(B.childLanes=0,B.lanes=a,B.child=null,B.subtreeFlags=0,B.memoizedProps=null,B.memoizedState=null,B.updateQueue=null,B.dependencies=null,B.stateNode=null):(B.childLanes=U.childLanes,B.lanes=U.lanes,B.child=U.child,B.subtreeFlags=0,B.deletions=null,B.memoizedProps=U.memoizedProps,B.memoizedState=U.memoizedState,B.updateQueue=U.updateQueue,B.type=U.type,a=U.dependencies,B.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return Wt(ar,ar.current&1|2),c.child}a=a.sibling}B.tail!==null&&Xe()>Lc&&(c.flags|=128,y=!0,Sh(B,!1),c.lanes=4194304)}else{if(!y)if(a=sp(U),a!==null){if(c.flags|=128,y=!0,f=a.updateQueue,f!==null&&(c.updateQueue=f,c.flags|=4),Sh(B,!0),B.tail===null&&B.tailMode==="hidden"&&!U.alternate&&!tr)return an(c),null}else 2*Xe()-B.renderingStartTime>Lc&&f!==1073741824&&(c.flags|=128,y=!0,Sh(B,!1),c.lanes=4194304);B.isBackwards?(U.sibling=c.child,c.child=U):(f=B.last,f!==null?f.sibling=U:c.child=U,B.last=U)}return B.tail!==null?(c=B.tail,B.rendering=c,B.tail=c.sibling,B.renderingStartTime=Xe(),c.sibling=null,f=ar.current,Wt(ar,y?f&1|2:f&1),c):(an(c),null);case 22:case 23:return k1(),y=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==y&&(c.flags|=8192),y&&c.mode&1?ni&1073741824&&(an(c),c.subtreeFlags&6&&(c.flags|=8192)):an(c),null;case 24:return null;case 25:return null}throw Error(t(156,c.tag))}function BQ(a,c){switch(W0(c),c.tag){case 1:return Pn(c.type)&&Yf(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return Bc(),Kt(Un),Kt(nn),o1(),a=c.flags,a&65536&&!(a&128)?(c.flags=a&-65537|128,c):null;case 5:return s1(c),null;case 13:if(Kt(ar),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(t(340));Cc()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return Kt(ar),null;case 4:return Bc(),null;case 10:return Z0(c.type._context),null;case 22:case 23:return k1(),null;case 24:return null;default:return null}}var fp=!1,on=!1,bQ=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Rc(a,c){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(y){pr(a,c,y)}else f.current=null}function C1(a,c,f){try{f()}catch(y){pr(a,c,y)}}var g3=!1;function RQ(a,c){if(k0=Lf,a=YC(),B0(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var C=y.anchorOffset,B=y.focusNode;y=y.focusOffset;try{f.nodeType,B.nodeType}catch{f=null;break e}var U=0,q=-1,J=-1,ce=0,we=0,Ce=a,xe=null;t:for(;;){for(var ke;Ce!==f||C!==0&&Ce.nodeType!==3||(q=U+C),Ce!==B||y!==0&&Ce.nodeType!==3||(J=U+y),Ce.nodeType===3&&(U+=Ce.nodeValue.length),(ke=Ce.firstChild)!==null;)xe=Ce,Ce=ke;for(;;){if(Ce===a)break t;if(xe===f&&++ce===C&&(q=U),xe===B&&++we===y&&(J=U),(ke=Ce.nextSibling)!==null)break;Ce=xe,xe=Ce.parentNode}Ce=ke}f=q===-1||J===-1?null:{start:q,end:J}}else f=null}f=f||{start:0,end:0}}else f=null;for(Q0={focusedElem:a,selectionRange:f},Lf=!1,Oe=c;Oe!==null;)if(c=Oe,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,Oe=a;else for(;Oe!==null;){c=Oe;try{var ze=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(ze!==null){var We=ze.memoizedProps,wr=ze.memoizedState,ie=c.stateNode,$=ie.getSnapshotBeforeUpdate(c.elementType===c.type?We:Oi(c.type,We),wr);ie.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var ae=c.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Te){pr(c,c.return,Te)}if(a=c.sibling,a!==null){a.return=c.return,Oe=a;break}Oe=c.return}return ze=g3,g3=!1,ze}function Th(a,c,f){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var C=y=y.next;do{if((C.tag&a)===a){var B=C.destroy;C.destroy=void 0,B!==void 0&&C1(c,f,B)}C=C.next}while(C!==y)}}function pp(a,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&a)===a){var y=f.create;f.destroy=y()}f=f.next}while(f!==c)}}function M1(a){var c=a.ref;if(c!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof c=="function"?c(a):c.current=a}}function m3(a){var c=a.alternate;c!==null&&(a.alternate=null,m3(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[as],delete c[mh],delete c[H0],delete c[fQ],delete c[pQ])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function v3(a){return a.tag===5||a.tag===3||a.tag===4}function _3(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||v3(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function S1(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?f.nodeType===8?f.parentNode.insertBefore(a,c):f.insertBefore(a,c):(f.nodeType===8?(c=f.parentNode,c.insertBefore(a,f)):(c=f,c.appendChild(a)),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=jf));else if(y!==4&&(a=a.child,a!==null))for(S1(a,c,f),a=a.sibling;a!==null;)S1(a,c,f),a=a.sibling}function T1(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?f.insertBefore(a,c):f.appendChild(a);else if(y!==4&&(a=a.child,a!==null))for(T1(a,c,f),a=a.sibling;a!==null;)T1(a,c,f),a=a.sibling}var Kr=null,Fi=!1;function Oa(a,c,f){for(f=f.child;f!==null;)y3(a,c,f),f=f.sibling}function y3(a,c,f){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(jt,f)}catch{}switch(f.tag){case 5:on||Rc(f,c);case 6:var y=Kr,C=Fi;Kr=null,Oa(a,c,f),Kr=y,Fi=C,Kr!==null&&(Fi?(a=Kr,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):Kr.removeChild(f.stateNode));break;case 18:Kr!==null&&(Fi?(a=Kr,f=f.stateNode,a.nodeType===8?z0(a.parentNode,f):a.nodeType===1&&z0(a,f),ah(a)):z0(Kr,f.stateNode));break;case 4:y=Kr,C=Fi,Kr=f.stateNode.containerInfo,Fi=!0,Oa(a,c,f),Kr=y,Fi=C;break;case 0:case 11:case 14:case 15:if(!on&&(y=f.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){C=y=y.next;do{var B=C,U=B.destroy;B=B.tag,U!==void 0&&(B&2||B&4)&&C1(f,c,U),C=C.next}while(C!==y)}Oa(a,c,f);break;case 1:if(!on&&(Rc(f,c),y=f.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=f.memoizedProps,y.state=f.memoizedState,y.componentWillUnmount()}catch(q){pr(f,c,q)}Oa(a,c,f);break;case 21:Oa(a,c,f);break;case 22:f.mode&1?(on=(y=on)||f.memoizedState!==null,Oa(a,c,f),on=y):Oa(a,c,f);break;default:Oa(a,c,f)}}function E3(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new bQ),c.forEach(function(y){var C=FQ.bind(null,a,y);f.has(y)||(f.add(y),y.then(C,C))})}}function zi(a,c){var f=c.deletions;if(f!==null)for(var y=0;y<f.length;y++){var C=f[y];try{var B=a,U=c,q=U;e:for(;q!==null;){switch(q.tag){case 5:Kr=q.stateNode,Fi=!1;break e;case 3:Kr=q.stateNode.containerInfo,Fi=!0;break e;case 4:Kr=q.stateNode.containerInfo,Fi=!0;break e}q=q.return}if(Kr===null)throw Error(t(160));y3(B,U,C),Kr=null,Fi=!1;var J=C.alternate;J!==null&&(J.return=null),C.return=null}catch(ce){pr(C,c,ce)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)x3(c,a),c=c.sibling}function x3(a,c){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(zi(c,a),cs(a),y&4){try{Th(3,a,a.return),pp(3,a)}catch(We){pr(a,a.return,We)}try{Th(5,a,a.return)}catch(We){pr(a,a.return,We)}}break;case 1:zi(c,a),cs(a),y&512&&f!==null&&Rc(f,f.return);break;case 5:if(zi(c,a),cs(a),y&512&&f!==null&&Rc(f,f.return),a.flags&32){var C=a.stateNode;try{Be(C,"")}catch(We){pr(a,a.return,We)}}if(y&4&&(C=a.stateNode,C!=null)){var B=a.memoizedProps,U=f!==null?f.memoizedProps:B,q=a.type,J=a.updateQueue;if(a.updateQueue=null,J!==null)try{q==="input"&&B.type==="radio"&&B.name!=null&&pt(C,B),G(q,U);var ce=G(q,B);for(U=0;U<J.length;U+=2){var we=J[U],Ce=J[U+1];we==="style"?dt(C,Ce):we==="dangerouslySetInnerHTML"?De(C,Ce):we==="children"?Be(C,Ce):x(C,we,Ce,ce)}switch(q){case"input":Y(C,B);break;case"textarea":Ie(C,B);break;case"select":var xe=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!B.multiple;var ke=B.value;ke!=null?me(C,!!B.multiple,ke,!1):xe!==!!B.multiple&&(B.defaultValue!=null?me(C,!!B.multiple,B.defaultValue,!0):me(C,!!B.multiple,B.multiple?[]:"",!1))}C[mh]=B}catch(We){pr(a,a.return,We)}}break;case 6:if(zi(c,a),cs(a),y&4){if(a.stateNode===null)throw Error(t(162));C=a.stateNode,B=a.memoizedProps;try{C.nodeValue=B}catch(We){pr(a,a.return,We)}}break;case 3:if(zi(c,a),cs(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{ah(c.containerInfo)}catch(We){pr(a,a.return,We)}break;case 4:zi(c,a),cs(a);break;case 13:zi(c,a),cs(a),C=a.child,C.flags&8192&&(B=C.memoizedState!==null,C.stateNode.isHidden=B,!B||C.alternate!==null&&C.alternate.memoizedState!==null||(R1=Xe())),y&4&&E3(a);break;case 22:if(we=f!==null&&f.memoizedState!==null,a.mode&1?(on=(ce=on)||we,zi(c,a),on=ce):zi(c,a),cs(a),y&8192){if(ce=a.memoizedState!==null,(a.stateNode.isHidden=ce)&&!we&&a.mode&1)for(Oe=a,we=a.child;we!==null;){for(Ce=Oe=we;Oe!==null;){switch(xe=Oe,ke=xe.child,xe.tag){case 0:case 11:case 14:case 15:Th(4,xe,xe.return);break;case 1:Rc(xe,xe.return);var ze=xe.stateNode;if(typeof ze.componentWillUnmount=="function"){y=xe,f=xe.return;try{c=y,ze.props=c.memoizedProps,ze.state=c.memoizedState,ze.componentWillUnmount()}catch(We){pr(y,f,We)}}break;case 5:Rc(xe,xe.return);break;case 22:if(xe.memoizedState!==null){C3(Ce);continue}}ke!==null?(ke.return=xe,Oe=ke):C3(Ce)}we=we.sibling}e:for(we=null,Ce=a;;){if(Ce.tag===5){if(we===null){we=Ce;try{C=Ce.stateNode,ce?(B=C.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none"):(q=Ce.stateNode,J=Ce.memoizedProps.style,U=J!=null&&J.hasOwnProperty("display")?J.display:null,q.style.display=lt("display",U))}catch(We){pr(a,a.return,We)}}}else if(Ce.tag===6){if(we===null)try{Ce.stateNode.nodeValue=ce?"":Ce.memoizedProps}catch(We){pr(a,a.return,We)}}else if((Ce.tag!==22&&Ce.tag!==23||Ce.memoizedState===null||Ce===a)&&Ce.child!==null){Ce.child.return=Ce,Ce=Ce.child;continue}if(Ce===a)break e;for(;Ce.sibling===null;){if(Ce.return===null||Ce.return===a)break e;we===Ce&&(we=null),Ce=Ce.return}we===Ce&&(we=null),Ce.sibling.return=Ce.return,Ce=Ce.sibling}}break;case 19:zi(c,a),cs(a),y&4&&E3(a);break;case 21:break;default:zi(c,a),cs(a)}}function cs(a){var c=a.flags;if(c&2){try{e:{for(var f=a.return;f!==null;){if(v3(f)){var y=f;break e}f=f.return}throw Error(t(160))}switch(y.tag){case 5:var C=y.stateNode;y.flags&32&&(Be(C,""),y.flags&=-33);var B=_3(a);T1(a,B,C);break;case 3:case 4:var U=y.stateNode.containerInfo,q=_3(a);S1(a,q,U);break;default:throw Error(t(161))}}catch(J){pr(a,a.return,J)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function DQ(a,c,f){Oe=a,w3(a)}function w3(a,c,f){for(var y=(a.mode&1)!==0;Oe!==null;){var C=Oe,B=C.child;if(C.tag===22&&y){var U=C.memoizedState!==null||fp;if(!U){var q=C.alternate,J=q!==null&&q.memoizedState!==null||on;q=fp;var ce=on;if(fp=U,(on=J)&&!ce)for(Oe=C;Oe!==null;)U=Oe,J=U.child,U.tag===22&&U.memoizedState!==null?M3(C):J!==null?(J.return=U,Oe=J):M3(C);for(;B!==null;)Oe=B,w3(B),B=B.sibling;Oe=C,fp=q,on=ce}I3(a)}else C.subtreeFlags&8772&&B!==null?(B.return=C,Oe=B):I3(a)}}function I3(a){for(;Oe!==null;){var c=Oe;if(c.flags&8772){var f=c.alternate;try{if(c.flags&8772)switch(c.tag){case 0:case 11:case 15:on||pp(5,c);break;case 1:var y=c.stateNode;if(c.flags&4&&!on)if(f===null)y.componentDidMount();else{var C=c.elementType===c.type?f.memoizedProps:Oi(c.type,f.memoizedProps);y.componentDidUpdate(C,f.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var B=c.updateQueue;B!==null&&EM(c,B,y);break;case 3:var U=c.updateQueue;if(U!==null){if(f=null,c.child!==null)switch(c.child.tag){case 5:f=c.child.stateNode;break;case 1:f=c.child.stateNode}EM(c,U,f)}break;case 5:var q=c.stateNode;if(f===null&&c.flags&4){f=q;var J=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&f.focus();break;case"img":J.src&&(f.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var ce=c.alternate;if(ce!==null){var we=ce.memoizedState;if(we!==null){var Ce=we.dehydrated;Ce!==null&&ah(Ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}on||c.flags&512&&M1(c)}catch(xe){pr(c,c.return,xe)}}if(c===a){Oe=null;break}if(f=c.sibling,f!==null){f.return=c.return,Oe=f;break}Oe=c.return}}function C3(a){for(;Oe!==null;){var c=Oe;if(c===a){Oe=null;break}var f=c.sibling;if(f!==null){f.return=c.return,Oe=f;break}Oe=c.return}}function M3(a){for(;Oe!==null;){var c=Oe;try{switch(c.tag){case 0:case 11:case 15:var f=c.return;try{pp(4,c)}catch(J){pr(c,f,J)}break;case 1:var y=c.stateNode;if(typeof y.componentDidMount=="function"){var C=c.return;try{y.componentDidMount()}catch(J){pr(c,C,J)}}var B=c.return;try{M1(c)}catch(J){pr(c,B,J)}break;case 5:var U=c.return;try{M1(c)}catch(J){pr(c,U,J)}}}catch(J){pr(c,c.return,J)}if(c===a){Oe=null;break}var q=c.sibling;if(q!==null){q.return=c.return,Oe=q;break}Oe=c.return}}var LQ=Math.ceil,Ap=I.ReactCurrentDispatcher,B1=I.ReactCurrentOwner,yi=I.ReactCurrentBatchConfig,St=0,Wr=null,Tr=null,Jr=0,ni=0,Dc=Na(0),Ur=0,Bh=null,Go=0,gp=0,b1=0,bh=null,Qn=null,R1=0,Lc=1/0,Ws=null,mp=!1,D1=null,Fa=null,vp=!1,za=null,_p=0,Rh=0,L1=null,yp=-1,Ep=0;function yn(){return St&6?Xe():yp!==-1?yp:yp=Xe()}function Ha(a){return a.mode&1?St&2&&Jr!==0?Jr&-Jr:gQ.transition!==null?(Ep===0&&(Ep=eh()),Ep):(a=kt,a!==0||(a=window.event,a=a===void 0?16:SC(a.type)),a):1}function Hi(a,c,f,y){if(50<Rh)throw Rh=0,L1=null,Error(t(185));th(a,f,y),(!(St&2)||a!==Wr)&&(a===Wr&&(!(St&2)&&(gp|=f),Ur===4&&Ga(a,Jr)),On(a,y),f===1&&St===0&&!(c.mode&1)&&(Lc=Xe()+500,Xf&&Pa()))}function On(a,c){var f=a.callbackNode;Zu(a,c);var y=Ma(a,a===Wr?Jr:0);if(y===0)f!==null&&Je(f),a.callbackNode=null,a.callbackPriority=0;else if(c=y&-y,a.callbackPriority!==c){if(f!=null&&Je(f),c===1)a.tag===0?AQ(T3.bind(null,a)):dM(T3.bind(null,a)),hQ(function(){!(St&6)&&Pa()}),f=null;else{switch(_C(y)){case 1:f=ft;break;case 4:f=Lr;break;case 16:f=er;break;case 536870912:f=Ai;break;default:f=er}f=P3(f,S3.bind(null,a))}a.callbackPriority=c,a.callbackNode=f}}function S3(a,c){if(yp=-1,Ep=0,St&6)throw Error(t(327));var f=a.callbackNode;if(Nc()&&a.callbackNode!==f)return null;var y=Ma(a,a===Wr?Jr:0);if(y===0)return null;if(y&30||y&a.expiredLanes||c)c=xp(a,y);else{c=y;var C=St;St|=2;var B=b3();(Wr!==a||Jr!==c)&&(Ws=null,Lc=Xe()+500,jo(a,c));do try{PQ();break}catch(q){B3(a,q)}while(1);J0(),Ap.current=B,St=C,Tr!==null?c=0:(Wr=null,Jr=0,c=Ur)}if(c!==0){if(c===2&&(C=$u(a),C!==0&&(y=C,c=N1(a,C))),c===1)throw f=Bh,jo(a,0),Ga(a,y),On(a,Xe()),f;if(c===6)Ga(a,y);else{if(C=a.current.alternate,!(y&30)&&!NQ(C)&&(c=xp(a,y),c===2&&(B=$u(a),B!==0&&(y=B,c=N1(a,B))),c===1))throw f=Bh,jo(a,0),Ga(a,y),On(a,Xe()),f;switch(a.finishedWork=C,a.finishedLanes=y,c){case 0:case 1:throw Error(t(345));case 2:Wo(a,Qn,Ws);break;case 3:if(Ga(a,y),(y&130023424)===y&&(c=R1+500-Xe(),10<c)){if(Ma(a,0)!==0)break;if(C=a.suspendedLanes,(C&y)!==y){yn(),a.pingedLanes|=a.suspendedLanes&C;break}a.timeoutHandle=F0(Wo.bind(null,a,Qn,Ws),c);break}Wo(a,Qn,Ws);break;case 4:if(Ga(a,y),(y&4194240)===y)break;for(c=a.eventTimes,C=-1;0<y;){var U=31-vn(y);B=1<<U,U=c[U],U>C&&(C=U),y&=~B}if(y=C,y=Xe()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*LQ(y/1960))-y,10<y){a.timeoutHandle=F0(Wo.bind(null,a,Qn,Ws),y);break}Wo(a,Qn,Ws);break;case 5:Wo(a,Qn,Ws);break;default:throw Error(t(329))}}}return On(a,Xe()),a.callbackNode===f?S3.bind(null,a):null}function N1(a,c){var f=bh;return a.current.memoizedState.isDehydrated&&(jo(a,c).flags|=256),a=xp(a,c),a!==2&&(c=Qn,Qn=f,c!==null&&U1(c)),a}function U1(a){Qn===null?Qn=a:Qn.push.apply(Qn,a)}function NQ(a){for(var c=a;;){if(c.flags&16384){var f=c.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var y=0;y<f.length;y++){var C=f[y],B=C.getSnapshot;C=C.value;try{if(!ki(B(),C))return!1}catch{return!1}}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Ga(a,c){for(c&=~b1,c&=~gp,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var f=31-vn(c),y=1<<f;a[f]=-1,c&=~y}}function T3(a){if(St&6)throw Error(t(327));Nc();var c=Ma(a,0);if(!(c&1))return On(a,Xe()),null;var f=xp(a,c);if(a.tag!==0&&f===2){var y=$u(a);y!==0&&(c=y,f=N1(a,y))}if(f===1)throw f=Bh,jo(a,0),Ga(a,c),On(a,Xe()),f;if(f===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,Wo(a,Qn,Ws),On(a,Xe()),null}function P1(a,c){var f=St;St|=1;try{return a(c)}finally{St=f,St===0&&(Lc=Xe()+500,Xf&&Pa())}}function Vo(a){za!==null&&za.tag===0&&!(St&6)&&Nc();var c=St;St|=1;var f=yi.transition,y=kt;try{if(yi.transition=null,kt=1,a)return a()}finally{kt=y,yi.transition=f,St=c,!(St&6)&&Pa()}}function k1(){ni=Dc.current,Kt(Dc)}function jo(a,c){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,uQ(f)),Tr!==null)for(f=Tr.return;f!==null;){var y=f;switch(W0(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Yf();break;case 3:Bc(),Kt(Un),Kt(nn),o1();break;case 5:s1(y);break;case 4:Bc();break;case 13:Kt(ar);break;case 19:Kt(ar);break;case 10:Z0(y.type._context);break;case 22:case 23:k1()}f=f.return}if(Wr=a,Tr=a=Va(a.current,null),Jr=ni=c,Ur=0,Bh=null,b1=gp=Go=0,Qn=bh=null,Fo!==null){for(c=0;c<Fo.length;c++)if(f=Fo[c],y=f.interleaved,y!==null){f.interleaved=null;var C=y.next,B=f.pending;if(B!==null){var U=B.next;B.next=C,y.next=U}f.pending=y}Fo=null}return a}function B3(a,c){do{var f=Tr;try{if(J0(),ap.current=up,op){for(var y=or.memoizedState;y!==null;){var C=y.queue;C!==null&&(C.pending=null),y=y.next}op=!1}if(Ho=0,jr=Nr=or=null,wh=!1,Ih=0,B1.current=null,f===null||f.return===null){Ur=1,Bh=c,Tr=null;break}e:{var B=a,U=f.return,q=f,J=c;if(c=Jr,q.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var ce=J,we=q,Ce=we.tag;if(!(we.mode&1)&&(Ce===0||Ce===11||Ce===15)){var xe=we.alternate;xe?(we.updateQueue=xe.updateQueue,we.memoizedState=xe.memoizedState,we.lanes=xe.lanes):(we.updateQueue=null,we.memoizedState=null)}var ke=e3(U);if(ke!==null){ke.flags&=-257,t3(ke,U,q,B,c),ke.mode&1&&$M(B,ce,c),c=ke,J=ce;var ze=c.updateQueue;if(ze===null){var We=new Set;We.add(J),c.updateQueue=We}else ze.add(J);break e}else{if(!(c&1)){$M(B,ce,c),Q1();break e}J=Error(t(426))}}else if(tr&&q.mode&1){var wr=e3(U);if(wr!==null){!(wr.flags&65536)&&(wr.flags|=256),t3(wr,U,q,B,c),X0(bc(J,q));break e}}B=J=bc(J,q),Ur!==4&&(Ur=2),bh===null?bh=[B]:bh.push(B),B=U;do{switch(B.tag){case 3:B.flags|=65536,c&=-c,B.lanes|=c;var ie=JM(B,J,c);yM(B,ie);break e;case 1:q=J;var $=B.type,ae=B.stateNode;if(!(B.flags&128)&&(typeof $.getDerivedStateFromError=="function"||ae!==null&&typeof ae.componentDidCatch=="function"&&(Fa===null||!Fa.has(ae)))){B.flags|=65536,c&=-c,B.lanes|=c;var Te=ZM(B,q,c);yM(B,Te);break e}}B=B.return}while(B!==null)}D3(f)}catch(qe){c=qe,Tr===f&&f!==null&&(Tr=f=f.return);continue}break}while(1)}function b3(){var a=Ap.current;return Ap.current=up,a===null?up:a}function Q1(){(Ur===0||Ur===3||Ur===2)&&(Ur=4),Wr===null||!(Go&268435455)&&!(gp&268435455)||Ga(Wr,Jr)}function xp(a,c){var f=St;St|=2;var y=b3();(Wr!==a||Jr!==c)&&(Ws=null,jo(a,c));do try{UQ();break}catch(C){B3(a,C)}while(1);if(J0(),St=f,Ap.current=y,Tr!==null)throw Error(t(261));return Wr=null,Jr=0,Ur}function UQ(){for(;Tr!==null;)R3(Tr)}function PQ(){for(;Tr!==null&&!it();)R3(Tr)}function R3(a){var c=U3(a.alternate,a,ni);a.memoizedProps=a.pendingProps,c===null?D3(a):Tr=c,B1.current=null}function D3(a){var c=a;do{var f=c.alternate;if(a=c.return,c.flags&32768){if(f=BQ(f,c),f!==null){f.flags&=32767,Tr=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Ur=6,Tr=null;return}}else if(f=TQ(f,c,ni),f!==null){Tr=f;return}if(c=c.sibling,c!==null){Tr=c;return}Tr=c=a}while(c!==null);Ur===0&&(Ur=5)}function Wo(a,c,f){var y=kt,C=yi.transition;try{yi.transition=null,kt=1,kQ(a,c,f,y)}finally{yi.transition=C,kt=y}return null}function kQ(a,c,f,y){do Nc();while(za!==null);if(St&6)throw Error(t(327));f=a.finishedWork;var C=a.finishedLanes;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(t(177));a.callbackNode=null,a.callbackPriority=0;var B=f.lanes|f.childLanes;if(mk(a,B),a===Wr&&(Tr=Wr=null,Jr=0),!(f.subtreeFlags&2064)&&!(f.flags&2064)||vp||(vp=!0,P3(er,function(){return Nc(),null})),B=(f.flags&15990)!==0,f.subtreeFlags&15990||B){B=yi.transition,yi.transition=null;var U=kt;kt=1;var q=St;St|=4,B1.current=null,RQ(a,f),x3(f,a),nQ(Q0),Lf=!!k0,Q0=k0=null,a.current=f,DQ(f),at(),St=q,kt=U,yi.transition=B}else a.current=f;if(vp&&(vp=!1,za=a,_p=C),B=a.pendingLanes,B===0&&(Fa=null),Ju(f.stateNode),On(a,Xe()),c!==null)for(y=a.onRecoverableError,f=0;f<c.length;f++)C=c[f],y(C.value,{componentStack:C.stack,digest:C.digest});if(mp)throw mp=!1,a=D1,D1=null,a;return _p&1&&a.tag!==0&&Nc(),B=a.pendingLanes,B&1?a===L1?Rh++:(Rh=0,L1=a):Rh=0,Pa(),null}function Nc(){if(za!==null){var a=_C(_p),c=yi.transition,f=kt;try{if(yi.transition=null,kt=16>a?16:a,za===null)var y=!1;else{if(a=za,za=null,_p=0,St&6)throw Error(t(331));var C=St;for(St|=4,Oe=a.current;Oe!==null;){var B=Oe,U=B.child;if(Oe.flags&16){var q=B.deletions;if(q!==null){for(var J=0;J<q.length;J++){var ce=q[J];for(Oe=ce;Oe!==null;){var we=Oe;switch(we.tag){case 0:case 11:case 15:Th(8,we,B)}var Ce=we.child;if(Ce!==null)Ce.return=we,Oe=Ce;else for(;Oe!==null;){we=Oe;var xe=we.sibling,ke=we.return;if(m3(we),we===ce){Oe=null;break}if(xe!==null){xe.return=ke,Oe=xe;break}Oe=ke}}}var ze=B.alternate;if(ze!==null){var We=ze.child;if(We!==null){ze.child=null;do{var wr=We.sibling;We.sibling=null,We=wr}while(We!==null)}}Oe=B}}if(B.subtreeFlags&2064&&U!==null)U.return=B,Oe=U;else e:for(;Oe!==null;){if(B=Oe,B.flags&2048)switch(B.tag){case 0:case 11:case 15:Th(9,B,B.return)}var ie=B.sibling;if(ie!==null){ie.return=B.return,Oe=ie;break e}Oe=B.return}}var $=a.current;for(Oe=$;Oe!==null;){U=Oe;var ae=U.child;if(U.subtreeFlags&2064&&ae!==null)ae.return=U,Oe=ae;else e:for(U=$;Oe!==null;){if(q=Oe,q.flags&2048)try{switch(q.tag){case 0:case 11:case 15:pp(9,q)}}catch(qe){pr(q,q.return,qe)}if(q===U){Oe=null;break e}var Te=q.sibling;if(Te!==null){Te.return=q.return,Oe=Te;break e}Oe=q.return}}if(St=C,Pa(),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(jt,a)}catch{}y=!0}return y}finally{kt=f,yi.transition=c}}return!1}function L3(a,c,f){c=bc(f,c),c=JM(a,c,1),a=Qa(a,c,1),c=yn(),a!==null&&(th(a,1,c),On(a,c))}function pr(a,c,f){if(a.tag===3)L3(a,a,f);else for(;c!==null;){if(c.tag===3){L3(c,a,f);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Fa===null||!Fa.has(y))){a=bc(f,a),a=ZM(c,a,1),c=Qa(c,a,1),a=yn(),c!==null&&(th(c,1,a),On(c,a));break}}c=c.return}}function QQ(a,c,f){var y=a.pingCache;y!==null&&y.delete(c),c=yn(),a.pingedLanes|=a.suspendedLanes&f,Wr===a&&(Jr&f)===f&&(Ur===4||Ur===3&&(Jr&130023424)===Jr&&500>Xe()-R1?jo(a,0):b1|=f),On(a,c)}function N3(a,c){c===0&&(a.mode&1?(c=xr,xr<<=1,!(xr&130023424)&&(xr=4194304)):c=1);var f=yn();a=Gs(a,c),a!==null&&(th(a,c,f),On(a,f))}function OQ(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),N3(a,f)}function FQ(a,c){var f=0;switch(a.tag){case 13:var y=a.stateNode,C=a.memoizedState;C!==null&&(f=C.retryLane);break;case 19:y=a.stateNode;break;default:throw Error(t(314))}y!==null&&y.delete(c),N3(a,f)}var U3;U3=function(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps||Un.current)kn=!0;else{if(!(a.lanes&f)&&!(c.flags&128))return kn=!1,SQ(a,c,f);kn=!!(a.flags&131072)}else kn=!1,tr&&c.flags&1048576&&fM(c,Jf,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;dp(a,c),a=c.pendingProps;var C=xc(c,nn.current);Sc(c,f),C=u1(null,c,y,a,C,f);var B=h1();return c.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Pn(y)?(B=!0,qf(c)):B=!1,c.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,t1(c),C.updater=np,c.stateNode=C,C._reactInternals=c,n1(c,y,a,f),c=_1(null,c,y,!0,B,f)):(c.tag=0,tr&&B&&j0(c),_n(null,c,C,f),c=c.child),c;case 16:y=c.elementType;e:{switch(dp(a,c),a=c.pendingProps,C=y._init,y=C(y._payload),c.type=y,C=c.tag=HQ(y),a=Oi(y,a),C){case 0:c=v1(null,c,y,a,f);break e;case 1:c=o3(null,c,y,a,f);break e;case 11:c=r3(null,c,y,a,f);break e;case 14:c=n3(null,c,y,Oi(y.type,a),f);break e}throw Error(t(306,y,""))}return c;case 0:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),v1(a,c,y,C,f);case 1:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),o3(a,c,y,C,f);case 3:e:{if(l3(c),a===null)throw Error(t(387));y=c.pendingProps,B=c.memoizedState,C=B.element,_M(a,c),rp(c,y,null,f);var U=c.memoizedState;if(y=U.element,B.isDehydrated)if(B={element:y,isDehydrated:!1,cache:U.cache,pendingSuspenseBoundaries:U.pendingSuspenseBoundaries,transitions:U.transitions},c.updateQueue.baseState=B,c.memoizedState=B,c.flags&256){C=bc(Error(t(423)),c),c=c3(a,c,y,f,C);break e}else if(y!==C){C=bc(Error(t(424)),c),c=c3(a,c,y,f,C);break e}else for(ri=La(c.stateNode.containerInfo.firstChild),ti=c,tr=!0,Qi=null,f=TM(c,null,y,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Cc(),y===C){c=js(a,c,f);break e}_n(a,c,y,f)}c=c.child}return c;case 5:return BM(c),a===null&&q0(c),y=c.type,C=c.pendingProps,B=a!==null?a.memoizedProps:null,U=C.children,O0(y,C)?U=null:B!==null&&O0(y,B)&&(c.flags|=32),a3(a,c),_n(a,c,U,f),c.child;case 6:return a===null&&q0(c),null;case 13:return u3(a,c,f);case 4:return i1(c,c.stateNode.containerInfo),y=c.pendingProps,a===null?c.child=Tc(c,null,y,f):_n(a,c,y,f),c.child;case 11:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),r3(a,c,y,C,f);case 7:return _n(a,c,c.pendingProps,f),c.child;case 8:return _n(a,c,c.pendingProps.children,f),c.child;case 12:return _n(a,c,c.pendingProps.children,f),c.child;case 10:e:{if(y=c.type._context,C=c.pendingProps,B=c.memoizedProps,U=C.value,Wt($f,y._currentValue),y._currentValue=U,B!==null)if(ki(B.value,U)){if(B.children===C.children&&!Un.current){c=js(a,c,f);break e}}else for(B=c.child,B!==null&&(B.return=c);B!==null;){var q=B.dependencies;if(q!==null){U=B.child;for(var J=q.firstContext;J!==null;){if(J.context===y){if(B.tag===1){J=Vs(-1,f&-f),J.tag=2;var ce=B.updateQueue;if(ce!==null){ce=ce.shared;var we=ce.pending;we===null?J.next=J:(J.next=we.next,we.next=J),ce.pending=J}}B.lanes|=f,J=B.alternate,J!==null&&(J.lanes|=f),$0(B.return,f,c),q.lanes|=f;break}J=J.next}}else if(B.tag===10)U=B.type===c.type?null:B.child;else if(B.tag===18){if(U=B.return,U===null)throw Error(t(341));U.lanes|=f,q=U.alternate,q!==null&&(q.lanes|=f),$0(U,f,c),U=B.sibling}else U=B.child;if(U!==null)U.return=B;else for(U=B;U!==null;){if(U===c){U=null;break}if(B=U.sibling,B!==null){B.return=U.return,U=B;break}U=U.return}B=U}_n(a,c,C.children,f),c=c.child}return c;case 9:return C=c.type,y=c.pendingProps.children,Sc(c,f),C=vi(C),y=y(C),c.flags|=1,_n(a,c,y,f),c.child;case 14:return y=c.type,C=Oi(y,c.pendingProps),C=Oi(y.type,C),n3(a,c,y,C,f);case 15:return i3(a,c,c.type,c.pendingProps,f);case 17:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:Oi(y,C),dp(a,c),c.tag=1,Pn(y)?(a=!0,qf(c)):a=!1,Sc(c,f),IM(c,y,C),n1(c,y,C,f),_1(null,c,y,!0,a,f);case 19:return d3(a,c,f);case 22:return s3(a,c,f)}throw Error(t(156,c.tag))};function P3(a,c){return Re(a,c)}function zQ(a,c,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ei(a,c,f,y){return new zQ(a,c,f,y)}function O1(a){return a=a.prototype,!(!a||!a.isReactComponent)}function HQ(a){if(typeof a=="function")return O1(a)?1:0;if(a!=null){if(a=a.$$typeof,a===P)return 11;if(a===X)return 14}return 2}function Va(a,c){var f=a.alternate;return f===null?(f=Ei(a.tag,c,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=c,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,c=a.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function wp(a,c,f,y,C,B){var U=2;if(y=a,typeof a=="function")O1(a)&&(U=1);else if(typeof a=="string")U=5;else e:switch(a){case T:return Yo(f.children,C,B,c);case D:U=8,C|=8;break;case b:return a=Ei(12,f,c,C|2),a.elementType=b,a.lanes=B,a;case N:return a=Ei(13,f,c,C),a.elementType=N,a.lanes=B,a;case W:return a=Ei(19,f,c,C),a.elementType=W,a.lanes=B,a;case te:return Ip(f,C,B,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case M:U=10;break e;case L:U=9;break e;case P:U=11;break e;case X:U=14;break e;case K:U=16,y=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return c=Ei(U,f,c,C),c.elementType=a,c.type=y,c.lanes=B,c}function Yo(a,c,f,y){return a=Ei(7,a,y,c),a.lanes=f,a}function Ip(a,c,f,y){return a=Ei(22,a,y,c),a.elementType=te,a.lanes=f,a.stateNode={isHidden:!1},a}function F1(a,c,f){return a=Ei(6,a,null,c),a.lanes=f,a}function z1(a,c,f){return c=Ei(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function GQ(a,c,f,y,C){this.tag=c,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=p0(0),this.expirationTimes=p0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=p0(0),this.identifierPrefix=y,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function H1(a,c,f,y,C,B,U,q,J){return a=new GQ(a,c,f,q,J),c===1?(c=1,B===!0&&(c|=8)):c=0,B=Ei(3,null,null,c),a.current=B,B.stateNode=a,B.memoizedState={element:y,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},t1(B),a}function VQ(a,c,f){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:y==null?null:""+y,children:a,containerInfo:c,implementation:f}}function k3(a){if(!a)return Ua;a=a._reactInternals;e:{if(ks(a)!==a||a.tag!==1)throw Error(t(170));var c=a;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Pn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(t(171))}if(a.tag===1){var f=a.type;if(Pn(f))return uM(a,f,c)}return c}function Q3(a,c,f,y,C,B,U,q,J){return a=H1(f,y,!0,a,C,B,U,q,J),a.context=k3(null),f=a.current,y=yn(),C=Ha(f),B=Vs(y,C),B.callback=c??null,Qa(f,B,C),a.current.lanes=C,th(a,C,y),On(a,y),a}function Cp(a,c,f,y){var C=c.current,B=yn(),U=Ha(C);return f=k3(f),c.context===null?c.context=f:c.pendingContext=f,c=Vs(B,U),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=Qa(C,c,U),a!==null&&(Hi(a,C,U,B),tp(a,C,U)),U}function Mp(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function O3(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function G1(a,c){O3(a,c),(a=a.alternate)&&O3(a,c)}function jQ(){return null}var F3=typeof reportError=="function"?reportError:function(a){console.error(a)};function V1(a){this._internalRoot=a}Sp.prototype.render=V1.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(t(409));Cp(a,c,null,null)},Sp.prototype.unmount=V1.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;Vo(function(){Cp(null,a,null,null)}),c[Os]=null}};function Sp(a){this._internalRoot=a}Sp.prototype.unstable_scheduleHydration=function(a){if(a){var c=xC();a={blockedOn:null,target:a,priority:c};for(var f=0;f<ba.length&&c!==0&&c<ba[f].priority;f++);ba.splice(f,0,a),f===0&&CC(a)}};function j1(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Tp(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function z3(){}function WQ(a,c,f,y,C){if(C){if(typeof y=="function"){var B=y;y=function(){var ce=Mp(U);B.call(ce)}}var U=Q3(c,y,a,0,null,!1,!1,"",z3);return a._reactRootContainer=U,a[Os]=U.current,Ah(a.nodeType===8?a.parentNode:a),Vo(),U}for(;C=a.lastChild;)a.removeChild(C);if(typeof y=="function"){var q=y;y=function(){var ce=Mp(J);q.call(ce)}}var J=H1(a,0,!1,null,null,!1,!1,"",z3);return a._reactRootContainer=J,a[Os]=J.current,Ah(a.nodeType===8?a.parentNode:a),Vo(function(){Cp(c,J,f,y)}),J}function Bp(a,c,f,y,C){var B=f._reactRootContainer;if(B){var U=B;if(typeof C=="function"){var q=C;C=function(){var J=Mp(U);q.call(J)}}Cp(c,U,a,C)}else U=WQ(f,c,a,C,y);return Mp(U)}yC=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var f=Ln(c.pendingLanes);f!==0&&(A0(c,f|1),On(c,Xe()),!(St&6)&&(Lc=Xe()+500,Pa()))}break;case 13:Vo(function(){var y=Gs(a,1);if(y!==null){var C=yn();Hi(y,a,1,C)}}),G1(a,1)}},g0=function(a){if(a.tag===13){var c=Gs(a,134217728);if(c!==null){var f=yn();Hi(c,a,134217728,f)}G1(a,134217728)}},EC=function(a){if(a.tag===13){var c=Ha(a),f=Gs(a,c);if(f!==null){var y=yn();Hi(f,a,c,y)}G1(a,c)}},xC=function(){return kt},wC=function(a,c){var f=kt;try{return kt=a,c()}finally{kt=f}},ve=function(a,c,f){switch(c){case"input":if(Y(a,f),c=f.name,f.type==="radio"&&c!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<f.length;c++){var y=f[c];if(y!==a&&y.form===a.form){var C=Wf(y);if(!C)throw Error(t(90));et(y),Y(y,C)}}}break;case"textarea":Ie(a,f);break;case"select":c=f.value,c!=null&&me(a,!!f.multiple,c,!1)}},Bt=P1,_t=Vo;var YQ={usingClientEntryPoint:!1,Events:[vh,yc,Wf,Lt,Nt,P1]},Dh={findFiberByHostInstance:Po,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},qQ={bundleType:Dh.bundleType,version:Dh.version,rendererPackageName:Dh.rendererPackageName,rendererConfig:Dh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=he(a),a===null?null:a.stateNode},findFiberByHostInstance:Dh.findFiberByHostInstance||jQ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bp.isDisabled&&bp.supportsFiber)try{jt=bp.inject(qQ),tt=bp}catch{}}return bn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YQ,bn.createPortal=function(a,c){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!j1(c))throw Error(t(200));return VQ(a,c,null,f)},bn.createRoot=function(a,c){if(!j1(a))throw Error(t(299));var f=!1,y="",C=F3;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(C=c.onRecoverableError)),c=H1(a,1,!1,null,null,f,!1,y,C),a[Os]=c.current,Ah(a.nodeType===8?a.parentNode:a),new V1(c)},bn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(t(188)):(a=Object.keys(a).join(","),Error(t(268,a)));return a=he(c),a=a===null?null:a.stateNode,a},bn.flushSync=function(a){return Vo(a)},bn.hydrate=function(a,c,f){if(!Tp(c))throw Error(t(200));return Bp(null,a,c,!0,f)},bn.hydrateRoot=function(a,c,f){if(!j1(a))throw Error(t(405));var y=f!=null&&f.hydratedSources||null,C=!1,B="",U=F3;if(f!=null&&(f.unstable_strictMode===!0&&(C=!0),f.identifierPrefix!==void 0&&(B=f.identifierPrefix),f.onRecoverableError!==void 0&&(U=f.onRecoverableError)),c=Q3(c,null,a,1,f??null,C,!1,B,U),a[Os]=c.current,Ah(a),y)for(a=0;a<y.length;a++)f=y[a],C=f._getVersion,C=C(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,C]:c.mutableSourceEagerHydrationData.push(f,C);return new Sp(c)},bn.render=function(a,c,f){if(!Tp(c))throw Error(t(200));return Bp(null,a,c,!1,f)},bn.unmountComponentAtNode=function(a){if(!Tp(a))throw Error(t(40));return a._reactRootContainer?(Vo(function(){Bp(null,null,a,!1,function(){a._reactRootContainer=null,a[Os]=null})}),!0):!1},bn.unstable_batchedUpdates=P1,bn.unstable_renderSubtreeIntoContainer=function(a,c,f,y){if(!Tp(f))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Bp(a,c,f,!1,y)},bn.version="18.2.0-next-9e3b772b8-20220608",bn}function iC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iC)}catch(r){console.error(r)}}iC(),eC.exports=Z7();var $7=eC.exports,sC=$7;a0.createRoot=sC.createRoot,a0.hydrateRoot=sC.hydrateRoot;class ek{constructor({apiService:e,events:t}){Rt(this,"targetElement");Rt(this,"apiService");Rt(this,"events");Rt(this,"htmlTarget");this.apiService=e,this.events=t}mount(e,t){if(!this.targetElement){const n=t.customId??"dita-3dconfig-element",i=document.getElementById(n);if(!i)throw new Error(`Element not found with id => '${n}' `);this.htmlTarget=i,this.htmlTarget.style.height="100%",this.htmlTarget.style.width="100%",this.targetElement=a0.createRoot(document.getElementById(n))}this.targetElement.render(Lh.createElement(X7,{apiService:this.apiService,events:this.events,sku:e,viewerOnly:t.viewerOnly}))}unmount(){this.targetElement&&(this.targetElement.unmount(),this.targetElement=void 0,this.htmlTarget&&(this.htmlTarget.style.height="0px",this.htmlTarget.style.width="auto"))}}var c0={exports:{}},hc=typeof Reflect=="object"?Reflect:null,aC=hc&&typeof hc.apply=="function"?hc.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Sf;hc&&typeof hc.ownKeys=="function"?Sf=hc.ownKeys:Object.getOwnPropertySymbols?Sf=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Sf=function(e){return Object.getOwnPropertyNames(e)};function tk(r){console&&console.warn&&console.warn(r)}var oC=Number.isNaN||function(e){return e!==e};function Ot(){Ot.init.call(this)}c0.exports=Ot,c0.exports.once=sk,Ot.EventEmitter=Ot,Ot.prototype._events=void 0,Ot.prototype._eventsCount=0,Ot.prototype._maxListeners=void 0;var lC=10;function Tf(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Ot,"defaultMaxListeners",{enumerable:!0,get:function(){return lC},set:function(r){if(typeof r!="number"||r<0||oC(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");lC=r}}),Ot.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ot.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||oC(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function cC(r){return r._maxListeners===void 0?Ot.defaultMaxListeners:r._maxListeners}Ot.prototype.getMaxListeners=function(){return cC(this)},Ot.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var h=s[e];if(h===void 0)return!1;if(typeof h=="function")aC(h,this,t);else for(var u=h.length,d=pC(h,u),n=0;n<u;++n)aC(d[n],this,t);return!0};function uC(r,e,t,n){var i,s,o;if(Tf(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),o=s[e]),o===void 0)o=s[e]=t,++r._eventsCount;else if(typeof o=="function"?o=s[e]=n?[t,o]:[o,t]:n?o.unshift(t):o.push(t),i=cC(r),i>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=r,l.type=e,l.count=o.length,tk(l)}return r}Ot.prototype.addListener=function(e,t){return uC(this,e,t,!1)},Ot.prototype.on=Ot.prototype.addListener,Ot.prototype.prependListener=function(e,t){return uC(this,e,t,!0)};function rk(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function hC(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=rk.bind(n);return i.listener=t,n.wrapFn=i,i}Ot.prototype.once=function(e,t){return Tf(t),this.on(e,hC(this,e,t)),this},Ot.prototype.prependOnceListener=function(e,t){return Tf(t),this.prependListener(e,hC(this,e,t)),this},Ot.prototype.removeListener=function(e,t){var n,i,s,o,l;if(Tf(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():nk(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this},Ot.prototype.off=Ot.prototype.removeListener,Ot.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function dC(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?ik(i):pC(i,i.length)}Ot.prototype.listeners=function(e){return dC(this,e,!0)},Ot.prototype.rawListeners=function(e){return dC(this,e,!1)},Ot.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):fC.call(r,e)},Ot.prototype.listenerCount=fC;function fC(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Ot.prototype.eventNames=function(){return this._eventsCount>0?Sf(this._events):[]};function pC(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function nk(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function ik(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function sk(r,e){return new Promise(function(t,n){function i(o){r.removeListener(e,s),n(o)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}AC(r,e,s,{once:!0}),e!=="error"&&ak(r,i,{once:!0})})}function ak(r,e,t){typeof r.on=="function"&&AC(r,"error",e,t)}function AC(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var ok=c0.exports;const Ku=class Ku extends ok.EventEmitter{emitEvent(e,t){Object.keys(Ku.EVENTS).includes(e)&&this.emit(Ku.EVENTS[e],t)}};Rt(Ku,"EVENTS",{onAddToCart:"add-to-cart"});let u0=Ku;const lk={getCartUrl:((mC=window.Shopify)==null?void 0:mC.routes.root)+"cart.js",addToCartUrl:((vC=window.Shopify)==null?void 0:vC.routes.root)+"cart/add.js"},gC=Object.freeze(lk);class ck{constructor(e){Rt(this,"config");this.config=e}RequestOptions(e,t){return{method:e,headers:{Accept:"application/json","Content-Type":"application/json"},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(){return(await fetch(this.config.getCartUrl,this.RequestOptions("GET"))).json()}async Post(e){return(await fetch(this.config.addToCartUrl,this.RequestOptions("POST",e||{}))).json()}}const{log:uk,error:hk}=console,dk=(...r)=>{hk("❌ Sprie Error:",...r)},fk="&ui_animations=0&ui_infos=0&ui_stop=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_ar=0&ui_help=0&ui_settings=0&ui_vr=0&ui_fullscreen=0&ui_annotations=0&ui_start=0&",pk={HOST:hs.host,STORE_PREFIX:hs.storePrefix},Ak={addToCartUrl:gC.addToCartUrl,getCartUrl:gC.getCartUrl};let h0=!1;class gk{constructor(){Rt(this,"sdkService");Rt(this,"apiService");Rt(this,"uiService");Rt(this,"events");this.events=new u0,this.apiService=new V3(new Wa(pk),new ck(Ak)),this.uiService=new ek({apiService:this.apiService,events:this.events});const e={apiService:this.apiService,config:hs,log:uk,logErr:dk,metaData:{appVersion:H3,previewUrlPrams:fk,targetClassName:"sprie-embed-element"}};this.sdkService=new j3(e),this.sdkService.Init().then(t=>{h0=t})}isReadyToLoad(){return h0}load(e,t){h0?this.loadOnAuth(e,t):this.waitForAllReady(this.isReadyToLoad,()=>this.loadOnAuth(e,t),e,t)}loadOnAuth(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!1,customId:t})}loadViewerOnly(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!0,customId:t})}unload(){this.uiService.unmount()}waitForAllReady(e,t,n,i){e()?t(n,i):setTimeout(()=>{this.waitForAllReady(e,t,n,i)},200)}}window.ditaConfigurator=new gk})();