@perceptimagery/dita-configurator-staging 1.3.14 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -14
- 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;top:0;left:0;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-loadingFrame--viewerOverlay{z-index:10000}.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:90%;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 Yk=Object.defineProperty;var qk=($s,gi,mi)=>gi in $s?Yk($s,gi,{enumerable:!0,configurable:!0,writable:!0,value:mi}):$s[gi]=mi;var Rt=($s,gi,mi)=>(qk($s,typeof gi!="symbol"?gi+"":gi,mi),mi);(function(){var Km,Zm;"use strict";class $s{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 gi={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"sprie-embed-",host:"https://api.sprie.io"},mi=Object.freeze(gi),yy="1.3.
|
|
3
|
+
var Yk=Object.defineProperty;var qk=($s,gi,mi)=>gi in $s?Yk($s,gi,{enumerable:!0,configurable:!0,writable:!0,value:mi}):$s[gi]=mi;var Rt=($s,gi,mi)=>(qk($s,typeof gi!="symbol"?gi+"":gi,mi),mi);(function(){var Km,Zm;"use strict";class $s{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 gi={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"sprie-embed-",host:"https://api.sprie.io"},mi=Object.freeze(gi),yy="1.3.15";function Ey(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 xy{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=`/v2/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="/v2/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,n){const i=`/v2/widget/list-customisation?search=type:${e},org:${this.fetcher.config.ORGID},usage:${n}&limit=100`,s=await this.fetcher.Get(i),o=s.data.findIndex(u=>u.sku.includes(`${e.toLowerCase()}-default`)),l=s.data[o];return!t&&o>-1&&s.data.splice(o,1),{...s,data:t&&l?Ey(s.data,l):s.data}}async DownloadMA(e){try{const t=`/v2/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="/v2/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 Gu=(r=>(r.Init="init",r.Preparing="preparing",r.Authenticating="authenticating",r.Fetching="fetching",r.Loading="loading",r.Done="done",r))(Gu||{}),Ja=(r=>(r.Customizer="customizer",r.Lancier="lancier",r.RxViewer="rxviewer",r))(Ja||{});class wy{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=Gu.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=Gu.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 Cy(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var d6={exports:{}},H1={},f6={exports:{}},xt={};/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react.production.min.js
|
|
6
6
|
*
|
|
@@ -8,7 +8,7 @@ var Yk=Object.defineProperty;var qk=($s,gi,mi)=>gi in $s?Yk($s,gi,{enumerable:!0
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var p6;function Iy(){if(p6)return xt;p6=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),A=Symbol.iterator;function p(P){return P===null||typeof P!="object"?null:(P=A&&P[A]||P["@@iterator"],typeof P=="function"?P:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function m(P,V,ee){this.props=P,this.context=V,this.refs=E,this.updater=ee||g}m.prototype.isReactComponent={},m.prototype.setState=function(P,V){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,V,"setState")},m.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function v(){}v.prototype=m.prototype;function w(P,V,ee){this.props=P,this.context=V,this.refs=E,this.updater=ee||g}var x=w.prototype=new v;x.constructor=w,_(x,m.prototype),x.isPureReactComponent=!0;var C=Array.isArray,B=Object.prototype.hasOwnProperty,T={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function D(P,V,ee){var O,ce={},fe=null,Ae=null;if(V!=null)for(O in V.ref!==void 0&&(Ae=V.ref),V.key!==void 0&&(fe=""+V.key),V)B.call(V,O)&&!M.hasOwnProperty(O)&&(ce[O]=V[O]);var pe=arguments.length-2;if(pe===1)ce.children=ee;else if(1<pe){for(var
|
|
11
|
+
*/var p6;function Iy(){if(p6)return xt;p6=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),A=Symbol.iterator;function p(P){return P===null||typeof P!="object"?null:(P=A&&P[A]||P["@@iterator"],typeof P=="function"?P:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function m(P,V,ee){this.props=P,this.context=V,this.refs=E,this.updater=ee||g}m.prototype.isReactComponent={},m.prototype.setState=function(P,V){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,V,"setState")},m.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function v(){}v.prototype=m.prototype;function w(P,V,ee){this.props=P,this.context=V,this.refs=E,this.updater=ee||g}var x=w.prototype=new v;x.constructor=w,_(x,m.prototype),x.isPureReactComponent=!0;var C=Array.isArray,B=Object.prototype.hasOwnProperty,T={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function D(P,V,ee){var O,ce={},fe=null,Ae=null;if(V!=null)for(O in V.ref!==void 0&&(Ae=V.ref),V.key!==void 0&&(fe=""+V.key),V)B.call(V,O)&&!M.hasOwnProperty(O)&&(ce[O]=V[O]);var pe=arguments.length-2;if(pe===1)ce.children=ee;else if(1<pe){for(var Re=Array(pe),ke=0;ke<pe;ke++)Re[ke]=arguments[ke+2];ce.children=Re}if(P&&P.defaultProps)for(O in pe=P.defaultProps,pe)ce[O]===void 0&&(ce[O]=pe[O]);return{$$typeof:r,type:P,key:fe,ref:Ae,props:ce,_owner:T.current}}function R(P,V){return{$$typeof:r,type:P.type,key:V,ref:P.ref,props:P.props,_owner:P._owner}}function S(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}function L(P){var V={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ee){return V[ee]})}var k=/\/+/g;function Q(P,V){return typeof P=="object"&&P!==null&&P.key!=null?L(""+P.key):V.toString(36)}function W(P,V,ee,O,ce){var fe=typeof P;(fe==="undefined"||fe==="boolean")&&(P=null);var Ae=!1;if(P===null)Ae=!0;else switch(fe){case"string":case"number":Ae=!0;break;case"object":switch(P.$$typeof){case r:case e:Ae=!0}}if(Ae)return Ae=P,ce=ce(Ae),P=O===""?"."+Q(Ae,0):O,C(ce)?(ee="",P!=null&&(ee=P.replace(k,"$&/")+"/"),W(ce,V,ee,"",function(ke){return ke})):ce!=null&&(S(ce)&&(ce=R(ce,ee+(!ce.key||Ae&&Ae.key===ce.key?"":(""+ce.key).replace(k,"$&/")+"/")+P)),V.push(ce)),1;if(Ae=0,O=O===""?".":O+":",C(P))for(var pe=0;pe<P.length;pe++){fe=P[pe];var Re=O+Q(fe,pe);Ae+=W(fe,V,ee,Re,ce)}else if(Re=p(P),typeof Re=="function")for(P=Re.call(P),pe=0;!(fe=P.next()).done;)fe=fe.value,Re=O+Q(fe,pe++),Ae+=W(fe,V,ee,Re,ce);else if(fe==="object")throw V=String(P),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return Ae}function J(P,V,ee){if(P==null)return P;var O=[],ce=0;return W(P,O,"","",function(fe){return V.call(ee,fe,ce++)}),O}function q(P){if(P._status===-1){var V=P._result;V=V(),V.then(function(ee){(P._status===0||P._status===-1)&&(P._status=1,P._result=ee)},function(ee){(P._status===0||P._status===-1)&&(P._status=2,P._result=ee)}),P._status===-1&&(P._status=0,P._result=V)}if(P._status===1)return P._result.default;throw P._result}var re={current:null},H={transition:null},j={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:H,ReactCurrentOwner:T};function $(){throw Error("act(...) is not supported in production builds of React.")}return xt.Children={map:J,forEach:function(P,V,ee){J(P,function(){V.apply(this,arguments)},ee)},count:function(P){var V=0;return J(P,function(){V++}),V},toArray:function(P){return J(P,function(V){return V})||[]},only:function(P){if(!S(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},xt.Component=m,xt.Fragment=t,xt.Profiler=i,xt.PureComponent=w,xt.StrictMode=n,xt.Suspense=h,xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,xt.act=$,xt.cloneElement=function(P,V,ee){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var O=_({},P.props),ce=P.key,fe=P.ref,Ae=P._owner;if(V!=null){if(V.ref!==void 0&&(fe=V.ref,Ae=T.current),V.key!==void 0&&(ce=""+V.key),P.type&&P.type.defaultProps)var pe=P.type.defaultProps;for(Re in V)B.call(V,Re)&&!M.hasOwnProperty(Re)&&(O[Re]=V[Re]===void 0&&pe!==void 0?pe[Re]:V[Re])}var Re=arguments.length-2;if(Re===1)O.children=ee;else if(1<Re){pe=Array(Re);for(var ke=0;ke<Re;ke++)pe[ke]=arguments[ke+2];O.children=pe}return{$$typeof:r,type:P.type,key:ce,ref:fe,props:O,_owner:Ae}},xt.createContext=function(P){return P={$$typeof:o,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:s,_context:P},P.Consumer=P},xt.createElement=D,xt.createFactory=function(P){var V=D.bind(null,P);return V.type=P,V},xt.createRef=function(){return{current:null}},xt.forwardRef=function(P){return{$$typeof:l,render:P}},xt.isValidElement=S,xt.lazy=function(P){return{$$typeof:d,_payload:{_status:-1,_result:P},_init:q}},xt.memo=function(P,V){return{$$typeof:u,type:P,compare:V===void 0?null:V}},xt.startTransition=function(P){var V=H.transition;H.transition={};try{P()}finally{H.transition=V}},xt.unstable_act=$,xt.useCallback=function(P,V){return re.current.useCallback(P,V)},xt.useContext=function(P){return re.current.useContext(P)},xt.useDebugValue=function(){},xt.useDeferredValue=function(P){return re.current.useDeferredValue(P)},xt.useEffect=function(P,V){return re.current.useEffect(P,V)},xt.useId=function(){return re.current.useId()},xt.useImperativeHandle=function(P,V,ee){return re.current.useImperativeHandle(P,V,ee)},xt.useInsertionEffect=function(P,V){return re.current.useInsertionEffect(P,V)},xt.useLayoutEffect=function(P,V){return re.current.useLayoutEffect(P,V)},xt.useMemo=function(P,V){return re.current.useMemo(P,V)},xt.useReducer=function(P,V,ee){return re.current.useReducer(P,V,ee)},xt.useRef=function(P){return re.current.useRef(P)},xt.useState=function(P){return re.current.useState(P)},xt.useSyncExternalStore=function(P,V,ee){return re.current.useSyncExternalStore(P,V,ee)},xt.useTransition=function(){return re.current.useTransition()},xt.version="18.3.1",xt}f6.exports=Iy();var Fe=f6.exports;const O2=Cy(Fe);/**
|
|
12
12
|
* @license React
|
|
13
13
|
* react-jsx-runtime.production.min.js
|
|
14
14
|
*
|
|
@@ -16,7 +16,7 @@ var Yk=Object.defineProperty;var qk=($s,gi,mi)=>gi in $s?Yk($s,gi,{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 A6;function My(){if(A6)return H1;A6=1;var r=Fe,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 H1.Fragment=t,H1.jsx=o,H1.jsxs=o,H1}d6.exports=My();var
|
|
19
|
+
*/var A6;function My(){if(A6)return H1;A6=1;var r=Fe,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 H1.Fragment=t,H1.jsx=o,H1.jsxs=o,H1}d6.exports=My();var Te=d6.exports;const Xk="";var Sy=Object.defineProperty,Ty=(r,e,t)=>e in r?Sy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,me=(r,e,t)=>(Ty(r,typeof e!="symbol"?e+"":e,t),t);const By={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"3d-configurator-",host:{}.VITE_API_HOST||"https://api.sprie.io"},g6=Object.freeze(By);class by{constructor(e){me(this,"baseURL"),me(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 Ka=new by({baseURL:g6.host});function Ry(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 Dy{constructor(){}async AuthServiceApi(e){const t=`/v2/widget/auth?api=${e}`,n=await Ka.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");return n}async FetchAssetBySKUOrBarcode(e){let t="/v2/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 Ka.Get(t)}async FetchCustomisationList(){const e="/v2/widget/list-customisation?search=type:Lens,usage:customizer&limit=50",t=await Ka.Get(e),n=t.data.find(i=>i.sku==="lens-default");return{...t,data:Ry(t.data,n)}}async DownloadMA(e){try{const t=`/v2/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await Ka.Get(t);if(!n||!n.fileUrl)throw new Error("Failed to download ,response or fileUrl missing.");const i=n.fileUrl;return{asset:n,decryptionKey:i}}catch{throw new Error("Failed to download model asset.")}}async triggerUsageEvent(e,t){try{const n={org:e,asset:t,timestamp:new Date().toISOString()},i="/v2/analytics/trigger";await Ka.Post(i,n)}catch{throw new Error("Failed to trigger usage event.")}}}const z2=new Dy;class Ly{constructor(e){me(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 V1=new Ly(g6.storePrefix);class Ny{constructor(){me(this,"authPayload"),me(this,"apiKey"),me(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 z2.AuthServiceApi(this.apiKey);this.setAuthConfig({EXPIRES:e.expires,JWT:e.access,ORGID:e.orgId})}setAuthConfig(e){e.JWT&&(V1.setItem("jwtToken",e.JWT),this.authPayload.JWT=e.JWT),e.EXPIRES&&(V1.setItem("expires",e.EXPIRES),this.authPayload.EXPIRES=e.EXPIRES),e.ORGID&&(V1.setItem("orgId",e.ORGID),this.authPayload.ORGID=e.ORGID)}LoadConfig(){const e=V1.getItem("jwtToken");e&&(this.authPayload.JWT=e);const t=V1.getItem("orgId");t&&(this.authPayload.ORGID=t);const n=localStorage.getItem("expires");return n&&(this.authPayload.EXPIRES=n),this.authPayload}}/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2010-2025 Three.js Authors
|
|
22
22
|
* SPDX-License-Identifier: MIT
|
|
@@ -3589,7 +3589,7 @@ void main() {
|
|
|
3589
3589
|
#include <tonemapping_fragment>
|
|
3590
3590
|
#include <colorspace_fragment>
|
|
3591
3591
|
#include <fog_fragment>
|
|
3592
|
-
}`,vt={alphahash_fragment:ow,alphahash_pars_fragment:lw,alphamap_fragment:cw,alphamap_pars_fragment:uw,alphatest_fragment:hw,alphatest_pars_fragment:dw,aomap_fragment:fw,aomap_pars_fragment:pw,batching_pars_vertex:Aw,batching_vertex:gw,begin_vertex:mw,beginnormal_vertex:vw,bsdfs:_w,iridescence_fragment:yw,bumpmap_pars_fragment:Ew,clipping_planes_fragment:xw,clipping_planes_pars_fragment:ww,clipping_planes_pars_vertex:Cw,clipping_planes_vertex:Iw,color_fragment:Mw,color_pars_fragment:Sw,color_pars_vertex:Tw,color_vertex:Bw,common:bw,cube_uv_reflection_fragment:Rw,defaultnormal_vertex:Dw,displacementmap_pars_vertex:Lw,displacementmap_vertex:Nw,emissivemap_fragment:Pw,emissivemap_pars_fragment:Uw,colorspace_fragment:kw,colorspace_pars_fragment:Qw,envmap_fragment:Fw,envmap_common_pars_fragment:Ow,envmap_pars_fragment:zw,envmap_pars_vertex:Gw,envmap_physical_pars_fragment:$w,envmap_vertex:Hw,fog_vertex:Vw,fog_pars_vertex:jw,fog_fragment:Ww,fog_pars_fragment:Yw,gradientmap_pars_fragment:qw,lightmap_pars_fragment:Xw,lights_lambert_fragment:Jw,lights_lambert_pars_fragment:Kw,lights_pars_begin:Zw,lights_toon_fragment:eC,lights_toon_pars_fragment:tC,lights_phong_fragment:rC,lights_phong_pars_fragment:nC,lights_physical_fragment:iC,lights_physical_pars_fragment:sC,lights_fragment_begin:aC,lights_fragment_maps:oC,lights_fragment_end:lC,logdepthbuf_fragment:cC,logdepthbuf_pars_fragment:uC,logdepthbuf_pars_vertex:hC,logdepthbuf_vertex:dC,map_fragment:fC,map_pars_fragment:pC,map_particle_fragment:AC,map_particle_pars_fragment:gC,metalnessmap_fragment:mC,metalnessmap_pars_fragment:vC,morphinstance_vertex:_C,morphcolor_vertex:yC,morphnormal_vertex:EC,morphtarget_pars_vertex:xC,morphtarget_vertex:wC,normal_fragment_begin:CC,normal_fragment_maps:IC,normal_pars_fragment:MC,normal_pars_vertex:SC,normal_vertex:TC,normalmap_pars_fragment:BC,clearcoat_normal_fragment_begin:bC,clearcoat_normal_fragment_maps:RC,clearcoat_pars_fragment:DC,iridescence_pars_fragment:LC,opaque_fragment:NC,packing:PC,premultiplied_alpha_fragment:UC,project_vertex:kC,dithering_fragment:QC,dithering_pars_fragment:FC,roughnessmap_fragment:OC,roughnessmap_pars_fragment:zC,shadowmap_pars_fragment:GC,shadowmap_pars_vertex:HC,shadowmap_vertex:VC,shadowmask_pars_fragment:jC,skinbase_vertex:WC,skinning_pars_vertex:YC,skinning_vertex:qC,skinnormal_vertex:XC,specularmap_fragment:JC,specularmap_pars_fragment:KC,tonemapping_fragment:ZC,tonemapping_pars_fragment:$C,transmission_fragment:eI,transmission_pars_fragment:tI,uv_pars_fragment:rI,uv_pars_vertex:nI,uv_vertex:iI,worldpos_vertex:sI,background_vert:aI,background_frag:oI,backgroundCube_vert:lI,backgroundCube_frag:cI,cube_vert:uI,cube_frag:hI,depth_vert:dI,depth_frag:fI,distanceRGBA_vert:pI,distanceRGBA_frag:AI,equirect_vert:gI,equirect_frag:mI,linedashed_vert:vI,linedashed_frag:_I,meshbasic_vert:yI,meshbasic_frag:EI,meshlambert_vert:xI,meshlambert_frag:wI,meshmatcap_vert:CI,meshmatcap_frag:II,meshnormal_vert:MI,meshnormal_frag:SI,meshphong_vert:TI,meshphong_frag:BI,meshphysical_vert:bI,meshphysical_frag:RI,meshtoon_vert:DI,meshtoon_frag:LI,points_vert:NI,points_frag:PI,shadow_vert:UI,shadow_frag:kI,sprite_vert:QI,sprite_frag:FI},Ue={common:{diffuse:{value:new We(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new mt},alphaMap:{value:null},alphaMapTransform:{value:new mt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new mt}},envmap:{envMap:{value:null},envMapRotation:{value:new mt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new mt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new mt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new mt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new mt},normalScale:{value:new Ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new mt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new mt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new mt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new mt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new We(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new We(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new mt},alphaTest:{value:0},uvTransform:{value:new mt}},sprite:{diffuse:{value:new We(16777215)},opacity:{value:1},center:{value:new Ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new mt},alphaMap:{value:null},alphaMapTransform:{value:new mt},alphaTest:{value:0}}},ei={basic:{uniforms:mr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.fog]),vertexShader:vt.meshbasic_vert,fragmentShader:vt.meshbasic_frag},lambert:{uniforms:mr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)}}]),vertexShader:vt.meshlambert_vert,fragmentShader:vt.meshlambert_frag},phong:{uniforms:mr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)},specular:{value:new We(1118481)},shininess:{value:30}}]),vertexShader:vt.meshphong_vert,fragmentShader:vt.meshphong_frag},standard:{uniforms:mr([Ue.common,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.roughnessmap,Ue.metalnessmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag},toon:{uniforms:mr([Ue.common,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.gradientmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)}}]),vertexShader:vt.meshtoon_vert,fragmentShader:vt.meshtoon_frag},matcap:{uniforms:mr([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,{matcap:{value:null}}]),vertexShader:vt.meshmatcap_vert,fragmentShader:vt.meshmatcap_frag},points:{uniforms:mr([Ue.points,Ue.fog]),vertexShader:vt.points_vert,fragmentShader:vt.points_frag},dashed:{uniforms:mr([Ue.common,Ue.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vt.linedashed_vert,fragmentShader:vt.linedashed_frag},depth:{uniforms:mr([Ue.common,Ue.displacementmap]),vertexShader:vt.depth_vert,fragmentShader:vt.depth_frag},normal:{uniforms:mr([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,{opacity:{value:1}}]),vertexShader:vt.meshnormal_vert,fragmentShader:vt.meshnormal_frag},sprite:{uniforms:mr([Ue.sprite,Ue.fog]),vertexShader:vt.sprite_vert,fragmentShader:vt.sprite_frag},background:{uniforms:{uvTransform:{value:new mt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vt.background_vert,fragmentShader:vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new mt}},vertexShader:vt.backgroundCube_vert,fragmentShader:vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vt.cube_vert,fragmentShader:vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vt.equirect_vert,fragmentShader:vt.equirect_frag},distanceRGBA:{uniforms:mr([Ue.common,Ue.displacementmap,{referencePosition:{value:new G},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vt.distanceRGBA_vert,fragmentShader:vt.distanceRGBA_frag},shadow:{uniforms:mr([Ue.lights,Ue.fog,{color:{value:new We(0)},opacity:{value:1}}]),vertexShader:vt.shadow_vert,fragmentShader:vt.shadow_frag}};ei.physical={uniforms:mr([ei.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new mt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new mt},clearcoatNormalScale:{value:new Ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new mt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new mt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new mt},sheen:{value:0},sheenColor:{value:new We(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new mt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new mt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new mt},transmissionSamplerSize:{value:new Ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new mt},attenuationDistance:{value:0},attenuationColor:{value:new We(0)},specularColor:{value:new We(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new mt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new mt},anisotropyVector:{value:new Ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new mt}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag};const N9={r:0,b:0,g:0},la=new Xn,OI=new ot;function zI(r,e,t,n,i,s,o){const l=new We(0);let h=s===!0?0:1,u,d,A=null,p=0,g=null;function _(x){let C=x.isScene===!0?x.background:null;return C&&C.isTexture&&(C=(x.backgroundBlurriness>0?t:e).get(C)),C}function E(x){let C=!1;const B=_(x);B===null?v(l,h):B&&B.isColor&&(v(B,1),C=!0);const T=r.xr.getEnvironmentBlendMode();T==="additive"?n.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(r.autoClear||C)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil))}function m(x,C){const B=_(C);B&&(B.isCubeTexture||B.mapping===V2)?(d===void 0&&(d=new S0(new ol(1,1,1),new T0({name:"BackgroundCubeMaterial",uniforms:Mo(ei.backgroundCube.uniforms),vertexShader:ei.backgroundCube.vertexShader,fragmentShader:ei.backgroundCube.fragmentShader,side:G0,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(T,M,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),la.copy(C.backgroundRotation),la.x*=-1,la.y*=-1,la.z*=-1,B.isCubeTexture&&B.isRenderTargetTexture===!1&&(la.y*=-1,la.z*=-1),d.material.uniforms.envMap.value=B,d.material.uniforms.flipEnvMap.value=B.isCubeTexture&&B.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=C.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=C.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(OI.makeRotationFromEuler(la)),d.material.toneMapped=Mt.getTransfer(B.colorSpace)!==Ft,(A!==B||p!==B.version||g!==r.toneMapping)&&(d.material.needsUpdate=!0,A=B,p=B.version,g=r.toneMapping),d.layers.enableAll(),x.unshift(d,d.geometry,d.material,0,0,null)):B&&B.isTexture&&(u===void 0&&(u=new S0(new dl(2,2),new T0({name:"BackgroundMaterial",uniforms:Mo(ei.background.uniforms),vertexShader:ei.background.vertexShader,fragmentShader:ei.background.fragmentShader,side:Rn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=B,u.material.uniforms.backgroundIntensity.value=C.backgroundIntensity,u.material.toneMapped=Mt.getTransfer(B.colorSpace)!==Ft,B.matrixAutoUpdate===!0&&B.updateMatrix(),u.material.uniforms.uvTransform.value.copy(B.matrix),(A!==B||p!==B.version||g!==r.toneMapping)&&(u.material.needsUpdate=!0,A=B,p=B.version,g=r.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null))}function v(x,C){x.getRGB(N9,dd(r)),n.buffers.color.setClear(N9.r,N9.g,N9.b,C,o)}function w(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0)}return{getClearColor:function(){return l},setClearColor:function(x,C=1){l.set(x),h=C,v(l,h)},getClearAlpha:function(){return h},setClearAlpha:function(x){h=x,v(l,h)},render:E,addToRenderList:m,dispose:w}}function GI(r,e){const t=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=p(null);let s=i,o=!1;function l(S,L,k,Q,W){let J=!1;const q=A(Q,k,L);s!==q&&(s=q,u(s.object)),J=g(S,Q,k,W),J&&_(S,Q,k,W),W!==null&&e.update(W,r.ELEMENT_ARRAY_BUFFER),(J||o)&&(o=!1,C(S,L,k,Q),W!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e.get(W).buffer))}function h(){return r.createVertexArray()}function u(S){return r.bindVertexArray(S)}function d(S){return r.deleteVertexArray(S)}function A(S,L,k){const Q=k.wireframe===!0;let W=n[S.id];W===void 0&&(W={},n[S.id]=W);let J=W[L.id];J===void 0&&(J={},W[L.id]=J);let q=J[Q];return q===void 0&&(q=p(h()),J[Q]=q),q}function p(S){const L=[],k=[],Q=[];for(let W=0;W<t;W++)L[W]=0,k[W]=0,Q[W]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:k,attributeDivisors:Q,object:S,attributes:{},index:null}}function g(S,L,k,Q){const W=s.attributes,J=L.attributes;let q=0;const re=k.getAttributes();for(const H in re)if(re[H].location>=0){const j=W[H];let $=J[H];if($===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&($=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&($=S.instanceColor)),j===void 0||j.attribute!==$||$&&j.data!==$.data)return!0;q++}return s.attributesNum!==q||s.index!==Q}function _(S,L,k,Q){const W={},J=L.attributes;let q=0;const re=k.getAttributes();for(const H in re)if(re[H].location>=0){let j=J[H];j===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&(j=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&(j=S.instanceColor));const $={};$.attribute=j,j&&j.data&&($.data=j.data),W[H]=$,q++}s.attributes=W,s.attributesNum=q,s.index=Q}function E(){const S=s.newAttributes;for(let L=0,k=S.length;L<k;L++)S[L]=0}function m(S){v(S,0)}function v(S,L){const k=s.newAttributes,Q=s.enabledAttributes,W=s.attributeDivisors;k[S]=1,Q[S]===0&&(r.enableVertexAttribArray(S),Q[S]=1),W[S]!==L&&(r.vertexAttribDivisor(S,L),W[S]=L)}function w(){const S=s.newAttributes,L=s.enabledAttributes;for(let k=0,Q=L.length;k<Q;k++)L[k]!==S[k]&&(r.disableVertexAttribArray(k),L[k]=0)}function x(S,L,k,Q,W,J,q){q===!0?r.vertexAttribIPointer(S,L,k,W,J):r.vertexAttribPointer(S,L,k,Q,W,J)}function C(S,L,k,Q){E();const W=Q.attributes,J=k.getAttributes(),q=L.defaultAttributeValues;for(const re in J){const H=J[re];if(H.location>=0){let j=W[re];if(j===void 0&&(re==="instanceMatrix"&&S.instanceMatrix&&(j=S.instanceMatrix),re==="instanceColor"&&S.instanceColor&&(j=S.instanceColor)),j!==void 0){const $=j.normalized,P=j.itemSize,V=e.get(j);if(V===void 0)continue;const ee=V.buffer,O=V.type,ce=V.bytesPerElement,fe=O===r.INT||O===r.UNSIGNED_INT||j.gpuType===so;if(j.isInterleavedBufferAttribute){const Ae=j.data,pe=Ae.stride,De=j.offset;if(Ae.isInstancedInterleavedBuffer){for(let Qe=0;Qe<H.locationSize;Qe++)v(H.location+Qe,Ae.meshPerAttribute);S.isInstancedMesh!==!0&&Q._maxInstanceCount===void 0&&(Q._maxInstanceCount=Ae.meshPerAttribute*Ae.count)}else for(let Qe=0;Qe<H.locationSize;Qe++)m(H.location+Qe);r.bindBuffer(r.ARRAY_BUFFER,ee);for(let Qe=0;Qe<H.locationSize;Qe++)x(H.location+Qe,P/H.locationSize,O,$,pe*ce,(De+P/H.locationSize*Qe)*ce,fe)}else{if(j.isInstancedBufferAttribute){for(let Ae=0;Ae<H.locationSize;Ae++)v(H.location+Ae,j.meshPerAttribute);S.isInstancedMesh!==!0&&Q._maxInstanceCount===void 0&&(Q._maxInstanceCount=j.meshPerAttribute*j.count)}else for(let Ae=0;Ae<H.locationSize;Ae++)m(H.location+Ae);r.bindBuffer(r.ARRAY_BUFFER,ee);for(let Ae=0;Ae<H.locationSize;Ae++)x(H.location+Ae,P/H.locationSize,O,$,P*ce,P/H.locationSize*Ae*ce,fe)}}else if(q!==void 0){const $=q[re];if($!==void 0)switch($.length){case 2:r.vertexAttrib2fv(H.location,$);break;case 3:r.vertexAttrib3fv(H.location,$);break;case 4:r.vertexAttrib4fv(H.location,$);break;default:r.vertexAttrib1fv(H.location,$)}}}}w()}function B(){D();for(const S in n){const L=n[S];for(const k in L){const Q=L[k];for(const W in Q)d(Q[W].object),delete Q[W];delete L[k]}delete n[S]}}function T(S){if(n[S.id]===void 0)return;const L=n[S.id];for(const k in L){const Q=L[k];for(const W in Q)d(Q[W].object),delete Q[W];delete L[k]}delete n[S.id]}function M(S){for(const L in n){const k=n[L];if(k[S.id]===void 0)continue;const Q=k[S.id];for(const W in Q)d(Q[W].object),delete Q[W];delete k[S.id]}}function D(){R(),o=!0,s!==i&&(s=i,u(s.object))}function R(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:l,reset:D,resetDefaultState:R,dispose:B,releaseStatesOfGeometry:T,releaseStatesOfProgram:M,initAttributes:E,enableAttribute:m,disableUnusedAttributes:w}}function HI(r,e,t){let n;function i(u){n=u}function s(u,d){r.drawArrays(n,u,d),t.update(d,n,1)}function o(u,d,A){A!==0&&(r.drawArraysInstanced(n,u,d,A),t.update(d,n,A))}function l(u,d,A){if(A===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,u,0,d,0,A);let p=0;for(let g=0;g<A;g++)p+=d[g];t.update(p,n,1)}function h(u,d,A,p){if(A===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let _=0;_<u.length;_++)o(u[_],d[_],p[_]);else{g.multiDrawArraysInstancedWEBGL(n,u,0,d,0,p,0,A);let _=0;for(let E=0;E<A;E++)_+=d[E]*p[E];t.update(_,n,1)}}this.setMode=i,this.render=s,this.renderInstances=o,this.renderMultiDraw=l,this.renderMultiDrawInstances=h}function VI(r,e,t,n){let i;function s(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const M=e.get("EXT_texture_filter_anisotropic");i=r.getParameter(M.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(M){return!(M!==Kt&&n.convert(M)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT))}function l(M){const D=M===f0&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(M!==x0&&n.convert(M)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)&&M!==Jt&&!D)}function h(M){if(M==="highp"){if(r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let u=t.precision!==void 0?t.precision:"highp";const d=h(u);d!==u&&(console.warn("THREE.WebGLRenderer:",u,"not supported, using",d,"instead."),u=d);const A=t.logarithmicDepthBuffer===!0,p=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),g=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),_=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),E=r.getParameter(r.MAX_TEXTURE_SIZE),m=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),v=r.getParameter(r.MAX_VERTEX_ATTRIBS),w=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),x=r.getParameter(r.MAX_VARYING_VECTORS),C=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),B=_>0,T=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:h,textureFormatReadable:o,textureTypeReadable:l,precision:u,logarithmicDepthBuffer:A,reverseDepthBuffer:p,maxTextures:g,maxVertexTextures:_,maxTextureSize:E,maxCubemapSize:m,maxAttributes:v,maxVertexUniforms:w,maxVaryings:x,maxFragmentUniforms:C,vertexTextures:B,maxSamples:T}}function jI(r){const e=this;let t=null,n=0,i=!1,s=!1;const o=new Zn,l=new mt,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(A,p){const g=A.length!==0||p||n!==0||i;return i=p,n=A.length,g},this.beginShadows=function(){s=!0,d(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(A,p){t=d(A,p,0)},this.setState=function(A,p,g){const _=A.clippingPlanes,E=A.clipIntersection,m=A.clipShadows,v=r.get(A);if(!i||_===null||_.length===0||s&&!m)s?d(null):u();else{const w=s?0:n,x=w*4;let C=v.clippingState||null;h.value=C,C=d(_,p,x,g);for(let B=0;B!==x;++B)C[B]=t[B];v.clippingState=C,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=w}};function u(){h.value!==t&&(h.value=t,h.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(A,p,g,_){const E=A!==null?A.length:0;let m=null;if(E!==0){if(m=h.value,_!==!0||m===null){const v=g+E*4,w=p.matrixWorldInverse;l.getNormalMatrix(w),(m===null||m.length<v)&&(m=new Float32Array(v));for(let x=0,C=g;x!==E;++x,C+=4)o.copy(A[x]).applyMatrix4(w,l),o.normal.toArray(m,C),m[C+3]=o.constant}h.value=m,h.needsUpdate=!0}return e.numPlanes=E,e.numIntersection=0,m}}function WI(r){let e=new WeakMap;function t(o,l){return l===H2?o.mapping=ta:l===t3&&(o.mapping=no),o}function n(o){if(o&&o.isTexture){const l=o.mapping;if(l===H2||l===t3)if(e.has(o)){const h=e.get(o).texture;return t(h,o.mapping)}else{const h=o.image;if(h&&h.height>0){const u=new ox(h.height);return u.fromEquirectangularTexture(r,o),e.set(o,u),o.addEventListener("dispose",i),t(u.texture,o.mapping)}else return null}}return o}function i(o){const l=o.target;l.removeEventListener("dispose",i);const h=e.get(l);h!==void 0&&(e.delete(l),h.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}const Uo=4,Zd=[.125,.215,.35,.446,.526,.582],ca=20,h4=new gl,$d=new We;let d4=null,f4=0,p4=0,A4=!1;const ua=(1+Math.sqrt(5))/2,ko=1/ua,e7=[new G(-ua,ko,0),new G(ua,ko,0),new G(-ko,0,ua),new G(ko,0,ua),new G(0,ua,-ko),new G(0,ua,ko),new G(-1,1,-1),new G(1,1,-1),new G(-1,1,1),new G(1,1,1)],YI=new G;class t7{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100,s={}){const{size:o=256,position:l=YI}=s;d4=this._renderer.getRenderTarget(),f4=this._renderer.getActiveCubeFace(),p4=this._renderer.getActiveMipmapLevel(),A4=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const h=this._allocateTargets();return h.depthBuffer=!0,this._sceneToCubeUV(e,n,i,h,l),t>0&&this._blur(h,0,0,t),this._applyPMREM(h),this._cleanup(h),h}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=i7(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=n7(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(d4,f4,p4),this._renderer.xr.enabled=A4,e.scissorTest=!1,P9(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===ta||e.mapping===no?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),d4=this._renderer.getRenderTarget(),f4=this._renderer.getActiveCubeFace(),p4=this._renderer.getActiveMipmapLevel(),A4=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Gt,minFilter:Gt,generateMipmaps:!1,type:f0,format:Kt,colorSpace:H0,depthBuffer:!1},i=r7(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=r7(e,t,n);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=qI(s)),this._blurMaterial=XI(s,e,t)}return i}_compileMaterial(e){const t=new S0(this._lodPlanes[0],e);this._renderer.compile(t,h4)}_sceneToCubeUV(e,t,n,i,s){const o=new lr(90,1,t,n),l=[1,-1,1,1,1,1],h=[1,1,1,-1,-1,-1],u=this._renderer,d=u.autoClear,A=u.toneMapping;u.getClearColor($d),u.toneMapping=es,u.autoClear=!1;const p=new Kn({name:"PMREM.Background",side:G0,depthWrite:!1,depthTest:!1}),g=new S0(new ol,p);let _=!1;const E=e.background;E?E.isColor&&(p.color.copy(E),e.background=null,_=!0):(p.color.copy($d),_=!0);for(let m=0;m<6;m++){const v=m%3;v===0?(o.up.set(0,l[m],0),o.position.set(s.x,s.y,s.z),o.lookAt(s.x+h[m],s.y,s.z)):v===1?(o.up.set(0,0,l[m]),o.position.set(s.x,s.y,s.z),o.lookAt(s.x,s.y+h[m],s.z)):(o.up.set(0,l[m],0),o.position.set(s.x,s.y,s.z),o.lookAt(s.x,s.y,s.z+h[m]));const w=this._cubeSize;P9(i,v*w,m>2?w:0,w,w),u.setRenderTarget(i),_&&u.render(g,o),u.render(e,o)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=A,u.autoClear=d,e.background=E}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===ta||e.mapping===no;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=i7()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=n7());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new S0(this._lodPlanes[0],s),l=s.uniforms;l.envMap.value=e;const h=this._cubeSize;P9(t,0,0,3*h,2*h),n.setRenderTarget(t),n.render(o,h4)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;s<i;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),l=e7[(i-s-1)%e7.length];this._blur(e,s-1,s,o,l)}t.autoClear=n}_blur(e,t,n,i,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",s),this._halfBlur(o,e,n,n,i,"longitudinal",s)}_halfBlur(e,t,n,i,s,o,l){const h=this._renderer,u=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,A=new S0(this._lodPlanes[i],u),p=u.uniforms,g=this._sizeLods[n]-1,_=isFinite(s)?Math.PI/(2*g):2*Math.PI/(2*ca-1),E=s/_,m=isFinite(s)?1+Math.floor(d*E):ca;m>ca&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${ca}`);const v=[];let w=0;for(let M=0;M<ca;++M){const D=M/E,R=Math.exp(-D*D/2);v.push(R),M===0?w+=R:M<m&&(w+=2*R)}for(let M=0;M<v.length;M++)v[M]=v[M]/w;p.envMap.value=e.texture,p.samples.value=m,p.weights.value=v,p.latitudinal.value=o==="latitudinal",l&&(p.poleAxis.value=l);const{_lodMax:x}=this;p.dTheta.value=_,p.mipInt.value=x-n;const C=this._sizeLods[i],B=3*C*(i>x-Uo?i-x+Uo:0),T=4*(this._cubeSize-C);P9(t,B,T,3*C,2*C),h.setRenderTarget(t),h.render(A,h4)}}function qI(r){const e=[],t=[],n=[];let i=r;const s=r-Uo+1+Zd.length;for(let o=0;o<s;o++){const l=Math.pow(2,i);t.push(l);let h=1/l;o>r-Uo?h=Zd[o-r+Uo-1]:o===0&&(h=0),n.push(h);const u=1/(l-2),d=-u,A=1+u,p=[d,d,A,d,A,A,d,d,A,A,d,A],g=6,_=6,E=3,m=2,v=1,w=new Float32Array(E*_*g),x=new Float32Array(m*_*g),C=new Float32Array(v*_*g);for(let T=0;T<g;T++){const M=T%3*2/3-1,D=T>2?0:-1,R=[M,D,0,M+2/3,D,0,M+2/3,D+1,0,M,D,0,M+2/3,D+1,0,M,D+1,0];w.set(R,E*_*T),x.set(p,m*_*T);const S=[T,T,T,T,T,T];C.set(S,v*_*T)}const B=new pn;B.setAttribute("position",new M0(w,E)),B.setAttribute("uv",new M0(x,m)),B.setAttribute("faceIndex",new M0(C,v)),e.push(B),i>Uo&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function r7(r,e,t){const n=new Br(r,e,t);return n.texture.mapping=V2,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function P9(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function XI(r,e,t){const n=new Float32Array(ca),i=new G(0,1,0);return new T0({name:"SphericalGaussianBlur",defines:{n:ca,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:g4(),fragmentShader:`
|
|
3592
|
+
}`,vt={alphahash_fragment:ow,alphahash_pars_fragment:lw,alphamap_fragment:cw,alphamap_pars_fragment:uw,alphatest_fragment:hw,alphatest_pars_fragment:dw,aomap_fragment:fw,aomap_pars_fragment:pw,batching_pars_vertex:Aw,batching_vertex:gw,begin_vertex:mw,beginnormal_vertex:vw,bsdfs:_w,iridescence_fragment:yw,bumpmap_pars_fragment:Ew,clipping_planes_fragment:xw,clipping_planes_pars_fragment:ww,clipping_planes_pars_vertex:Cw,clipping_planes_vertex:Iw,color_fragment:Mw,color_pars_fragment:Sw,color_pars_vertex:Tw,color_vertex:Bw,common:bw,cube_uv_reflection_fragment:Rw,defaultnormal_vertex:Dw,displacementmap_pars_vertex:Lw,displacementmap_vertex:Nw,emissivemap_fragment:Pw,emissivemap_pars_fragment:Uw,colorspace_fragment:kw,colorspace_pars_fragment:Qw,envmap_fragment:Fw,envmap_common_pars_fragment:Ow,envmap_pars_fragment:zw,envmap_pars_vertex:Gw,envmap_physical_pars_fragment:$w,envmap_vertex:Hw,fog_vertex:Vw,fog_pars_vertex:jw,fog_fragment:Ww,fog_pars_fragment:Yw,gradientmap_pars_fragment:qw,lightmap_pars_fragment:Xw,lights_lambert_fragment:Jw,lights_lambert_pars_fragment:Kw,lights_pars_begin:Zw,lights_toon_fragment:eC,lights_toon_pars_fragment:tC,lights_phong_fragment:rC,lights_phong_pars_fragment:nC,lights_physical_fragment:iC,lights_physical_pars_fragment:sC,lights_fragment_begin:aC,lights_fragment_maps:oC,lights_fragment_end:lC,logdepthbuf_fragment:cC,logdepthbuf_pars_fragment:uC,logdepthbuf_pars_vertex:hC,logdepthbuf_vertex:dC,map_fragment:fC,map_pars_fragment:pC,map_particle_fragment:AC,map_particle_pars_fragment:gC,metalnessmap_fragment:mC,metalnessmap_pars_fragment:vC,morphinstance_vertex:_C,morphcolor_vertex:yC,morphnormal_vertex:EC,morphtarget_pars_vertex:xC,morphtarget_vertex:wC,normal_fragment_begin:CC,normal_fragment_maps:IC,normal_pars_fragment:MC,normal_pars_vertex:SC,normal_vertex:TC,normalmap_pars_fragment:BC,clearcoat_normal_fragment_begin:bC,clearcoat_normal_fragment_maps:RC,clearcoat_pars_fragment:DC,iridescence_pars_fragment:LC,opaque_fragment:NC,packing:PC,premultiplied_alpha_fragment:UC,project_vertex:kC,dithering_fragment:QC,dithering_pars_fragment:FC,roughnessmap_fragment:OC,roughnessmap_pars_fragment:zC,shadowmap_pars_fragment:GC,shadowmap_pars_vertex:HC,shadowmap_vertex:VC,shadowmask_pars_fragment:jC,skinbase_vertex:WC,skinning_pars_vertex:YC,skinning_vertex:qC,skinnormal_vertex:XC,specularmap_fragment:JC,specularmap_pars_fragment:KC,tonemapping_fragment:ZC,tonemapping_pars_fragment:$C,transmission_fragment:eI,transmission_pars_fragment:tI,uv_pars_fragment:rI,uv_pars_vertex:nI,uv_vertex:iI,worldpos_vertex:sI,background_vert:aI,background_frag:oI,backgroundCube_vert:lI,backgroundCube_frag:cI,cube_vert:uI,cube_frag:hI,depth_vert:dI,depth_frag:fI,distanceRGBA_vert:pI,distanceRGBA_frag:AI,equirect_vert:gI,equirect_frag:mI,linedashed_vert:vI,linedashed_frag:_I,meshbasic_vert:yI,meshbasic_frag:EI,meshlambert_vert:xI,meshlambert_frag:wI,meshmatcap_vert:CI,meshmatcap_frag:II,meshnormal_vert:MI,meshnormal_frag:SI,meshphong_vert:TI,meshphong_frag:BI,meshphysical_vert:bI,meshphysical_frag:RI,meshtoon_vert:DI,meshtoon_frag:LI,points_vert:NI,points_frag:PI,shadow_vert:UI,shadow_frag:kI,sprite_vert:QI,sprite_frag:FI},Ue={common:{diffuse:{value:new We(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new mt},alphaMap:{value:null},alphaMapTransform:{value:new mt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new mt}},envmap:{envMap:{value:null},envMapRotation:{value:new mt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new mt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new mt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new mt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new mt},normalScale:{value:new Ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new mt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new mt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new mt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new mt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new We(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new We(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new mt},alphaTest:{value:0},uvTransform:{value:new mt}},sprite:{diffuse:{value:new We(16777215)},opacity:{value:1},center:{value:new Ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new mt},alphaMap:{value:null},alphaMapTransform:{value:new mt},alphaTest:{value:0}}},ei={basic:{uniforms:mr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.fog]),vertexShader:vt.meshbasic_vert,fragmentShader:vt.meshbasic_frag},lambert:{uniforms:mr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)}}]),vertexShader:vt.meshlambert_vert,fragmentShader:vt.meshlambert_frag},phong:{uniforms:mr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)},specular:{value:new We(1118481)},shininess:{value:30}}]),vertexShader:vt.meshphong_vert,fragmentShader:vt.meshphong_frag},standard:{uniforms:mr([Ue.common,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.roughnessmap,Ue.metalnessmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag},toon:{uniforms:mr([Ue.common,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.gradientmap,Ue.fog,Ue.lights,{emissive:{value:new We(0)}}]),vertexShader:vt.meshtoon_vert,fragmentShader:vt.meshtoon_frag},matcap:{uniforms:mr([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,{matcap:{value:null}}]),vertexShader:vt.meshmatcap_vert,fragmentShader:vt.meshmatcap_frag},points:{uniforms:mr([Ue.points,Ue.fog]),vertexShader:vt.points_vert,fragmentShader:vt.points_frag},dashed:{uniforms:mr([Ue.common,Ue.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vt.linedashed_vert,fragmentShader:vt.linedashed_frag},depth:{uniforms:mr([Ue.common,Ue.displacementmap]),vertexShader:vt.depth_vert,fragmentShader:vt.depth_frag},normal:{uniforms:mr([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,{opacity:{value:1}}]),vertexShader:vt.meshnormal_vert,fragmentShader:vt.meshnormal_frag},sprite:{uniforms:mr([Ue.sprite,Ue.fog]),vertexShader:vt.sprite_vert,fragmentShader:vt.sprite_frag},background:{uniforms:{uvTransform:{value:new mt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vt.background_vert,fragmentShader:vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new mt}},vertexShader:vt.backgroundCube_vert,fragmentShader:vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vt.cube_vert,fragmentShader:vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vt.equirect_vert,fragmentShader:vt.equirect_frag},distanceRGBA:{uniforms:mr([Ue.common,Ue.displacementmap,{referencePosition:{value:new G},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vt.distanceRGBA_vert,fragmentShader:vt.distanceRGBA_frag},shadow:{uniforms:mr([Ue.lights,Ue.fog,{color:{value:new We(0)},opacity:{value:1}}]),vertexShader:vt.shadow_vert,fragmentShader:vt.shadow_frag}};ei.physical={uniforms:mr([ei.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new mt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new mt},clearcoatNormalScale:{value:new Ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new mt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new mt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new mt},sheen:{value:0},sheenColor:{value:new We(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new mt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new mt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new mt},transmissionSamplerSize:{value:new Ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new mt},attenuationDistance:{value:0},attenuationColor:{value:new We(0)},specularColor:{value:new We(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new mt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new mt},anisotropyVector:{value:new Ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new mt}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag};const N9={r:0,b:0,g:0},la=new Xn,OI=new ot;function zI(r,e,t,n,i,s,o){const l=new We(0);let h=s===!0?0:1,u,d,A=null,p=0,g=null;function _(x){let C=x.isScene===!0?x.background:null;return C&&C.isTexture&&(C=(x.backgroundBlurriness>0?t:e).get(C)),C}function E(x){let C=!1;const B=_(x);B===null?v(l,h):B&&B.isColor&&(v(B,1),C=!0);const T=r.xr.getEnvironmentBlendMode();T==="additive"?n.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(r.autoClear||C)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil))}function m(x,C){const B=_(C);B&&(B.isCubeTexture||B.mapping===V2)?(d===void 0&&(d=new S0(new ol(1,1,1),new T0({name:"BackgroundCubeMaterial",uniforms:Mo(ei.backgroundCube.uniforms),vertexShader:ei.backgroundCube.vertexShader,fragmentShader:ei.backgroundCube.fragmentShader,side:G0,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(T,M,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),la.copy(C.backgroundRotation),la.x*=-1,la.y*=-1,la.z*=-1,B.isCubeTexture&&B.isRenderTargetTexture===!1&&(la.y*=-1,la.z*=-1),d.material.uniforms.envMap.value=B,d.material.uniforms.flipEnvMap.value=B.isCubeTexture&&B.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=C.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=C.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(OI.makeRotationFromEuler(la)),d.material.toneMapped=Mt.getTransfer(B.colorSpace)!==Ft,(A!==B||p!==B.version||g!==r.toneMapping)&&(d.material.needsUpdate=!0,A=B,p=B.version,g=r.toneMapping),d.layers.enableAll(),x.unshift(d,d.geometry,d.material,0,0,null)):B&&B.isTexture&&(u===void 0&&(u=new S0(new dl(2,2),new T0({name:"BackgroundMaterial",uniforms:Mo(ei.background.uniforms),vertexShader:ei.background.vertexShader,fragmentShader:ei.background.fragmentShader,side:Rn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=B,u.material.uniforms.backgroundIntensity.value=C.backgroundIntensity,u.material.toneMapped=Mt.getTransfer(B.colorSpace)!==Ft,B.matrixAutoUpdate===!0&&B.updateMatrix(),u.material.uniforms.uvTransform.value.copy(B.matrix),(A!==B||p!==B.version||g!==r.toneMapping)&&(u.material.needsUpdate=!0,A=B,p=B.version,g=r.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null))}function v(x,C){x.getRGB(N9,dd(r)),n.buffers.color.setClear(N9.r,N9.g,N9.b,C,o)}function w(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0)}return{getClearColor:function(){return l},setClearColor:function(x,C=1){l.set(x),h=C,v(l,h)},getClearAlpha:function(){return h},setClearAlpha:function(x){h=x,v(l,h)},render:E,addToRenderList:m,dispose:w}}function GI(r,e){const t=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=p(null);let s=i,o=!1;function l(S,L,k,Q,W){let J=!1;const q=A(Q,k,L);s!==q&&(s=q,u(s.object)),J=g(S,Q,k,W),J&&_(S,Q,k,W),W!==null&&e.update(W,r.ELEMENT_ARRAY_BUFFER),(J||o)&&(o=!1,C(S,L,k,Q),W!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e.get(W).buffer))}function h(){return r.createVertexArray()}function u(S){return r.bindVertexArray(S)}function d(S){return r.deleteVertexArray(S)}function A(S,L,k){const Q=k.wireframe===!0;let W=n[S.id];W===void 0&&(W={},n[S.id]=W);let J=W[L.id];J===void 0&&(J={},W[L.id]=J);let q=J[Q];return q===void 0&&(q=p(h()),J[Q]=q),q}function p(S){const L=[],k=[],Q=[];for(let W=0;W<t;W++)L[W]=0,k[W]=0,Q[W]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:k,attributeDivisors:Q,object:S,attributes:{},index:null}}function g(S,L,k,Q){const W=s.attributes,J=L.attributes;let q=0;const re=k.getAttributes();for(const H in re)if(re[H].location>=0){const j=W[H];let $=J[H];if($===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&($=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&($=S.instanceColor)),j===void 0||j.attribute!==$||$&&j.data!==$.data)return!0;q++}return s.attributesNum!==q||s.index!==Q}function _(S,L,k,Q){const W={},J=L.attributes;let q=0;const re=k.getAttributes();for(const H in re)if(re[H].location>=0){let j=J[H];j===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&(j=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&(j=S.instanceColor));const $={};$.attribute=j,j&&j.data&&($.data=j.data),W[H]=$,q++}s.attributes=W,s.attributesNum=q,s.index=Q}function E(){const S=s.newAttributes;for(let L=0,k=S.length;L<k;L++)S[L]=0}function m(S){v(S,0)}function v(S,L){const k=s.newAttributes,Q=s.enabledAttributes,W=s.attributeDivisors;k[S]=1,Q[S]===0&&(r.enableVertexAttribArray(S),Q[S]=1),W[S]!==L&&(r.vertexAttribDivisor(S,L),W[S]=L)}function w(){const S=s.newAttributes,L=s.enabledAttributes;for(let k=0,Q=L.length;k<Q;k++)L[k]!==S[k]&&(r.disableVertexAttribArray(k),L[k]=0)}function x(S,L,k,Q,W,J,q){q===!0?r.vertexAttribIPointer(S,L,k,W,J):r.vertexAttribPointer(S,L,k,Q,W,J)}function C(S,L,k,Q){E();const W=Q.attributes,J=k.getAttributes(),q=L.defaultAttributeValues;for(const re in J){const H=J[re];if(H.location>=0){let j=W[re];if(j===void 0&&(re==="instanceMatrix"&&S.instanceMatrix&&(j=S.instanceMatrix),re==="instanceColor"&&S.instanceColor&&(j=S.instanceColor)),j!==void 0){const $=j.normalized,P=j.itemSize,V=e.get(j);if(V===void 0)continue;const ee=V.buffer,O=V.type,ce=V.bytesPerElement,fe=O===r.INT||O===r.UNSIGNED_INT||j.gpuType===so;if(j.isInterleavedBufferAttribute){const Ae=j.data,pe=Ae.stride,Re=j.offset;if(Ae.isInstancedInterleavedBuffer){for(let ke=0;ke<H.locationSize;ke++)v(H.location+ke,Ae.meshPerAttribute);S.isInstancedMesh!==!0&&Q._maxInstanceCount===void 0&&(Q._maxInstanceCount=Ae.meshPerAttribute*Ae.count)}else for(let ke=0;ke<H.locationSize;ke++)m(H.location+ke);r.bindBuffer(r.ARRAY_BUFFER,ee);for(let ke=0;ke<H.locationSize;ke++)x(H.location+ke,P/H.locationSize,O,$,pe*ce,(Re+P/H.locationSize*ke)*ce,fe)}else{if(j.isInstancedBufferAttribute){for(let Ae=0;Ae<H.locationSize;Ae++)v(H.location+Ae,j.meshPerAttribute);S.isInstancedMesh!==!0&&Q._maxInstanceCount===void 0&&(Q._maxInstanceCount=j.meshPerAttribute*j.count)}else for(let Ae=0;Ae<H.locationSize;Ae++)m(H.location+Ae);r.bindBuffer(r.ARRAY_BUFFER,ee);for(let Ae=0;Ae<H.locationSize;Ae++)x(H.location+Ae,P/H.locationSize,O,$,P*ce,P/H.locationSize*Ae*ce,fe)}}else if(q!==void 0){const $=q[re];if($!==void 0)switch($.length){case 2:r.vertexAttrib2fv(H.location,$);break;case 3:r.vertexAttrib3fv(H.location,$);break;case 4:r.vertexAttrib4fv(H.location,$);break;default:r.vertexAttrib1fv(H.location,$)}}}}w()}function B(){D();for(const S in n){const L=n[S];for(const k in L){const Q=L[k];for(const W in Q)d(Q[W].object),delete Q[W];delete L[k]}delete n[S]}}function T(S){if(n[S.id]===void 0)return;const L=n[S.id];for(const k in L){const Q=L[k];for(const W in Q)d(Q[W].object),delete Q[W];delete L[k]}delete n[S.id]}function M(S){for(const L in n){const k=n[L];if(k[S.id]===void 0)continue;const Q=k[S.id];for(const W in Q)d(Q[W].object),delete Q[W];delete k[S.id]}}function D(){R(),o=!0,s!==i&&(s=i,u(s.object))}function R(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:l,reset:D,resetDefaultState:R,dispose:B,releaseStatesOfGeometry:T,releaseStatesOfProgram:M,initAttributes:E,enableAttribute:m,disableUnusedAttributes:w}}function HI(r,e,t){let n;function i(u){n=u}function s(u,d){r.drawArrays(n,u,d),t.update(d,n,1)}function o(u,d,A){A!==0&&(r.drawArraysInstanced(n,u,d,A),t.update(d,n,A))}function l(u,d,A){if(A===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,u,0,d,0,A);let p=0;for(let g=0;g<A;g++)p+=d[g];t.update(p,n,1)}function h(u,d,A,p){if(A===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let _=0;_<u.length;_++)o(u[_],d[_],p[_]);else{g.multiDrawArraysInstancedWEBGL(n,u,0,d,0,p,0,A);let _=0;for(let E=0;E<A;E++)_+=d[E]*p[E];t.update(_,n,1)}}this.setMode=i,this.render=s,this.renderInstances=o,this.renderMultiDraw=l,this.renderMultiDrawInstances=h}function VI(r,e,t,n){let i;function s(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const M=e.get("EXT_texture_filter_anisotropic");i=r.getParameter(M.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(M){return!(M!==Kt&&n.convert(M)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT))}function l(M){const D=M===f0&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(M!==x0&&n.convert(M)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)&&M!==Jt&&!D)}function h(M){if(M==="highp"){if(r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let u=t.precision!==void 0?t.precision:"highp";const d=h(u);d!==u&&(console.warn("THREE.WebGLRenderer:",u,"not supported, using",d,"instead."),u=d);const A=t.logarithmicDepthBuffer===!0,p=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),g=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),_=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),E=r.getParameter(r.MAX_TEXTURE_SIZE),m=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),v=r.getParameter(r.MAX_VERTEX_ATTRIBS),w=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),x=r.getParameter(r.MAX_VARYING_VECTORS),C=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),B=_>0,T=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:h,textureFormatReadable:o,textureTypeReadable:l,precision:u,logarithmicDepthBuffer:A,reverseDepthBuffer:p,maxTextures:g,maxVertexTextures:_,maxTextureSize:E,maxCubemapSize:m,maxAttributes:v,maxVertexUniforms:w,maxVaryings:x,maxFragmentUniforms:C,vertexTextures:B,maxSamples:T}}function jI(r){const e=this;let t=null,n=0,i=!1,s=!1;const o=new Zn,l=new mt,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(A,p){const g=A.length!==0||p||n!==0||i;return i=p,n=A.length,g},this.beginShadows=function(){s=!0,d(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(A,p){t=d(A,p,0)},this.setState=function(A,p,g){const _=A.clippingPlanes,E=A.clipIntersection,m=A.clipShadows,v=r.get(A);if(!i||_===null||_.length===0||s&&!m)s?d(null):u();else{const w=s?0:n,x=w*4;let C=v.clippingState||null;h.value=C,C=d(_,p,x,g);for(let B=0;B!==x;++B)C[B]=t[B];v.clippingState=C,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=w}};function u(){h.value!==t&&(h.value=t,h.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(A,p,g,_){const E=A!==null?A.length:0;let m=null;if(E!==0){if(m=h.value,_!==!0||m===null){const v=g+E*4,w=p.matrixWorldInverse;l.getNormalMatrix(w),(m===null||m.length<v)&&(m=new Float32Array(v));for(let x=0,C=g;x!==E;++x,C+=4)o.copy(A[x]).applyMatrix4(w,l),o.normal.toArray(m,C),m[C+3]=o.constant}h.value=m,h.needsUpdate=!0}return e.numPlanes=E,e.numIntersection=0,m}}function WI(r){let e=new WeakMap;function t(o,l){return l===H2?o.mapping=ta:l===t3&&(o.mapping=no),o}function n(o){if(o&&o.isTexture){const l=o.mapping;if(l===H2||l===t3)if(e.has(o)){const h=e.get(o).texture;return t(h,o.mapping)}else{const h=o.image;if(h&&h.height>0){const u=new ox(h.height);return u.fromEquirectangularTexture(r,o),e.set(o,u),o.addEventListener("dispose",i),t(u.texture,o.mapping)}else return null}}return o}function i(o){const l=o.target;l.removeEventListener("dispose",i);const h=e.get(l);h!==void 0&&(e.delete(l),h.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}const Uo=4,Zd=[.125,.215,.35,.446,.526,.582],ca=20,h4=new gl,$d=new We;let d4=null,f4=0,p4=0,A4=!1;const ua=(1+Math.sqrt(5))/2,ko=1/ua,e7=[new G(-ua,ko,0),new G(ua,ko,0),new G(-ko,0,ua),new G(ko,0,ua),new G(0,ua,-ko),new G(0,ua,ko),new G(-1,1,-1),new G(1,1,-1),new G(-1,1,1),new G(1,1,1)],YI=new G;class t7{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100,s={}){const{size:o=256,position:l=YI}=s;d4=this._renderer.getRenderTarget(),f4=this._renderer.getActiveCubeFace(),p4=this._renderer.getActiveMipmapLevel(),A4=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const h=this._allocateTargets();return h.depthBuffer=!0,this._sceneToCubeUV(e,n,i,h,l),t>0&&this._blur(h,0,0,t),this._applyPMREM(h),this._cleanup(h),h}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=i7(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=n7(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(d4,f4,p4),this._renderer.xr.enabled=A4,e.scissorTest=!1,P9(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===ta||e.mapping===no?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),d4=this._renderer.getRenderTarget(),f4=this._renderer.getActiveCubeFace(),p4=this._renderer.getActiveMipmapLevel(),A4=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Gt,minFilter:Gt,generateMipmaps:!1,type:f0,format:Kt,colorSpace:H0,depthBuffer:!1},i=r7(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=r7(e,t,n);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=qI(s)),this._blurMaterial=XI(s,e,t)}return i}_compileMaterial(e){const t=new S0(this._lodPlanes[0],e);this._renderer.compile(t,h4)}_sceneToCubeUV(e,t,n,i,s){const o=new lr(90,1,t,n),l=[1,-1,1,1,1,1],h=[1,1,1,-1,-1,-1],u=this._renderer,d=u.autoClear,A=u.toneMapping;u.getClearColor($d),u.toneMapping=es,u.autoClear=!1;const p=new Kn({name:"PMREM.Background",side:G0,depthWrite:!1,depthTest:!1}),g=new S0(new ol,p);let _=!1;const E=e.background;E?E.isColor&&(p.color.copy(E),e.background=null,_=!0):(p.color.copy($d),_=!0);for(let m=0;m<6;m++){const v=m%3;v===0?(o.up.set(0,l[m],0),o.position.set(s.x,s.y,s.z),o.lookAt(s.x+h[m],s.y,s.z)):v===1?(o.up.set(0,0,l[m]),o.position.set(s.x,s.y,s.z),o.lookAt(s.x,s.y+h[m],s.z)):(o.up.set(0,l[m],0),o.position.set(s.x,s.y,s.z),o.lookAt(s.x,s.y,s.z+h[m]));const w=this._cubeSize;P9(i,v*w,m>2?w:0,w,w),u.setRenderTarget(i),_&&u.render(g,o),u.render(e,o)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=A,u.autoClear=d,e.background=E}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===ta||e.mapping===no;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=i7()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=n7());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new S0(this._lodPlanes[0],s),l=s.uniforms;l.envMap.value=e;const h=this._cubeSize;P9(t,0,0,3*h,2*h),n.setRenderTarget(t),n.render(o,h4)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;s<i;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),l=e7[(i-s-1)%e7.length];this._blur(e,s-1,s,o,l)}t.autoClear=n}_blur(e,t,n,i,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",s),this._halfBlur(o,e,n,n,i,"longitudinal",s)}_halfBlur(e,t,n,i,s,o,l){const h=this._renderer,u=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,A=new S0(this._lodPlanes[i],u),p=u.uniforms,g=this._sizeLods[n]-1,_=isFinite(s)?Math.PI/(2*g):2*Math.PI/(2*ca-1),E=s/_,m=isFinite(s)?1+Math.floor(d*E):ca;m>ca&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${ca}`);const v=[];let w=0;for(let M=0;M<ca;++M){const D=M/E,R=Math.exp(-D*D/2);v.push(R),M===0?w+=R:M<m&&(w+=2*R)}for(let M=0;M<v.length;M++)v[M]=v[M]/w;p.envMap.value=e.texture,p.samples.value=m,p.weights.value=v,p.latitudinal.value=o==="latitudinal",l&&(p.poleAxis.value=l);const{_lodMax:x}=this;p.dTheta.value=_,p.mipInt.value=x-n;const C=this._sizeLods[i],B=3*C*(i>x-Uo?i-x+Uo:0),T=4*(this._cubeSize-C);P9(t,B,T,3*C,2*C),h.setRenderTarget(t),h.render(A,h4)}}function qI(r){const e=[],t=[],n=[];let i=r;const s=r-Uo+1+Zd.length;for(let o=0;o<s;o++){const l=Math.pow(2,i);t.push(l);let h=1/l;o>r-Uo?h=Zd[o-r+Uo-1]:o===0&&(h=0),n.push(h);const u=1/(l-2),d=-u,A=1+u,p=[d,d,A,d,A,A,d,d,A,A,d,A],g=6,_=6,E=3,m=2,v=1,w=new Float32Array(E*_*g),x=new Float32Array(m*_*g),C=new Float32Array(v*_*g);for(let T=0;T<g;T++){const M=T%3*2/3-1,D=T>2?0:-1,R=[M,D,0,M+2/3,D,0,M+2/3,D+1,0,M,D,0,M+2/3,D+1,0,M,D+1,0];w.set(R,E*_*T),x.set(p,m*_*T);const S=[T,T,T,T,T,T];C.set(S,v*_*T)}const B=new pn;B.setAttribute("position",new M0(w,E)),B.setAttribute("uv",new M0(x,m)),B.setAttribute("faceIndex",new M0(C,v)),e.push(B),i>Uo&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function r7(r,e,t){const n=new Br(r,e,t);return n.texture.mapping=V2,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function P9(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function XI(r,e,t){const n=new Float32Array(ca),i=new G(0,1,0);return new T0({name:"SphericalGaussianBlur",defines:{n:ca,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:g4(),fragmentShader:`
|
|
3593
3593
|
|
|
3594
3594
|
precision mediump float;
|
|
3595
3595
|
precision mediump int;
|
|
@@ -3790,7 +3790,7 @@ Material Type: `+L.type+`
|
|
|
3790
3790
|
|
|
3791
3791
|
Program Info Log: `+k+`
|
|
3792
3792
|
`+re+`
|
|
3793
|
-
`+H)}else k!==""?console.warn("THREE.WebGLProgram: Program Info Log:",k):(Q===""||W==="")&&(q=!1);q&&(L.diagnostics={runnable:J,programLog:k,vertexShader:{log:Q,prefix:m},fragmentShader:{log:W,prefix:v}})}i.deleteShader(B),i.deleteShader(T),D=new k9(i,E),R=rS(i,E)}let D;this.getUniforms=function(){return D===void 0&&M(this),D};let R;this.getAttributes=function(){return R===void 0&&M(this),R};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=i.getProgramParameter(E,YM)),S},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(E),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=qM++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=B,this.fragmentShader=T,this}let pS=0;class AS{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 gS(e),t.set(e,n)),n}}class gS{constructor(e){this.id=pS++,this.code=e,this.usedTimes=0}}function mS(r,e,t,n,i,s,o){const l=new h9,h=new AS,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(R){return u.add(R),R===0?"uv":`uv${R}`}function m(R,S,L,k,Q){const W=k.fog,J=Q.geometry,q=R.isMeshStandardMaterial?k.environment:null,re=(R.isMeshStandardMaterial?t:e).get(R.envMap||q),H=re&&re.mapping===V2?re.image.height:null,j=_[R.type];R.precision!==null&&(g=i.getMaxPrecision(R.precision),g!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",g,"instead."));const $=J.morphAttributes.position||J.morphAttributes.normal||J.morphAttributes.color,P=$!==void 0?$.length:0;let V=0;J.morphAttributes.position!==void 0&&(V=1),J.morphAttributes.normal!==void 0&&(V=2),J.morphAttributes.color!==void 0&&(V=3);let ee,O,ce,fe;if(j){const bt=ei[j];ee=bt.vertexShader,O=bt.fragmentShader}else ee=R.vertexShader,O=R.fragmentShader,h.update(R),ce=h.getVertexShaderID(R),fe=h.getFragmentShaderID(R);const Ae=r.getRenderTarget(),pe=r.state.buffers.depth.getReversed(),De=Q.isInstancedMesh===!0,Qe=Q.isBatchedMesh===!0,wt=!!R.map,ut=!!R.matcap,ht=!!re,X=!!R.aoMap,u0=!!R.lightMap,dt=!!R.bumpMap,ft=!!R.normalMap,qe=!!R.displacementMap,It=!!R.emissiveMap,je=!!R.metalnessMap,z=!!R.roughnessMap,U=R.anisotropy>0,se=R.clearcoat>0,_e=R.dispersion>0,Ee=R.iridescence>0,ve=R.sheen>0,Ye=R.transmission>0,Pe=U&&!!R.anisotropyMap,Ge=se&&!!R.clearcoatMap,pt=se&&!!R.clearcoatNormalMap,we=se&&!!R.clearcoatRoughnessMap,ke=Ee&&!!R.iridescenceMap,ge=Ee&&!!R.iridescenceThicknessMap,Le=ve&&!!R.sheenColorMap,Te=ve&&!!R.sheenRoughnessMap,nt=!!R.specularMap,et=!!R.specularColorMap,At=!!R.specularIntensityMap,Z=Ye&&!!R.transmissionMap,Re=Ye&&!!R.thicknessMap,de=!!R.gradientMap,ye=!!R.alphaMap,be=R.alphaTest>0,Ne=!!R.alphaHash,Et=!!R.extensions;let jt=es;R.toneMapped&&(Ae===null||Ae.isXRRenderTarget===!0)&&(jt=r.toneMapping);const _0={shaderID:j,shaderType:R.type,shaderName:R.name,vertexShader:ee,fragmentShader:O,defines:R.defines,customVertexShaderID:ce,customFragmentShaderID:fe,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:g,batching:Qe,batchingColor:Qe&&Q._colorsTexture!==null,instancing:De,instancingColor:De&&Q.instanceColor!==null,instancingMorph:De&&Q.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:Ae===null?r.outputColorSpace:Ae.isXRRenderTarget===!0?Ae.texture.colorSpace:H0,alphaToCoverage:!!R.alphaToCoverage,map:wt,matcap:ut,envMap:ht,envMapMode:ht&&re.mapping,envMapCubeUVHeight:H,aoMap:X,lightMap:u0,bumpMap:dt,normalMap:ft,displacementMap:p&&qe,emissiveMap:It,normalMapObjectSpace:ft&&R.normalMapType===uE,normalMapTangentSpace:ft&&R.normalMapType===F6,metalnessMap:je,roughnessMap:z,anisotropy:U,anisotropyMap:Pe,clearcoat:se,clearcoatMap:Ge,clearcoatNormalMap:pt,clearcoatRoughnessMap:we,dispersion:_e,iridescence:Ee,iridescenceMap:ke,iridescenceThicknessMap:ge,sheen:ve,sheenColorMap:Le,sheenRoughnessMap:Te,specularMap:nt,specularColorMap:et,specularIntensityMap:At,transmission:Ye,transmissionMap:Z,thicknessMap:Re,gradientMap:de,opaque:R.transparent===!1&&R.blending===eo&&R.alphaToCoverage===!1,alphaMap:ye,alphaTest:be,alphaHash:Ne,combine:R.combine,mapUv:wt&&E(R.map.channel),aoMapUv:X&&E(R.aoMap.channel),lightMapUv:u0&&E(R.lightMap.channel),bumpMapUv:dt&&E(R.bumpMap.channel),normalMapUv:ft&&E(R.normalMap.channel),displacementMapUv:qe&&E(R.displacementMap.channel),emissiveMapUv:It&&E(R.emissiveMap.channel),metalnessMapUv:je&&E(R.metalnessMap.channel),roughnessMapUv:z&&E(R.roughnessMap.channel),anisotropyMapUv:Pe&&E(R.anisotropyMap.channel),clearcoatMapUv:Ge&&E(R.clearcoatMap.channel),clearcoatNormalMapUv:pt&&E(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:we&&E(R.clearcoatRoughnessMap.channel),iridescenceMapUv:ke&&E(R.iridescenceMap.channel),iridescenceThicknessMapUv:ge&&E(R.iridescenceThicknessMap.channel),sheenColorMapUv:Le&&E(R.sheenColorMap.channel),sheenRoughnessMapUv:Te&&E(R.sheenRoughnessMap.channel),specularMapUv:nt&&E(R.specularMap.channel),specularColorMapUv:et&&E(R.specularColorMap.channel),specularIntensityMapUv:At&&E(R.specularIntensityMap.channel),transmissionMapUv:Z&&E(R.transmissionMap.channel),thicknessMapUv:Re&&E(R.thicknessMap.channel),alphaMapUv:ye&&E(R.alphaMap.channel),vertexTangents:!!J.attributes.tangent&&(ft||U),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!J.attributes.color&&J.attributes.color.itemSize===4,pointsUvs:Q.isPoints===!0&&!!J.attributes.uv&&(wt||ye),fog:!!W,useFog:R.fog===!0,fogExp2:!!W&&W.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:A,reverseDepthBuffer:pe,skinning:Q.isSkinnedMesh===!0,morphTargets:J.morphAttributes.position!==void 0,morphNormals:J.morphAttributes.normal!==void 0,morphColors:J.morphAttributes.color!==void 0,morphTargetsCount:P,morphTextureStride:V,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:R.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:jt,decodeVideoTexture:wt&&R.map.isVideoTexture===!0&&Mt.getTransfer(R.map.colorSpace)===Ft,decodeVideoTextureEmissive:It&&R.emissiveMap.isVideoTexture===!0&&Mt.getTransfer(R.emissiveMap.colorSpace)===Ft,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===un,flipSided:R.side===G0,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionClipCullDistance:Et&&R.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Et&&R.extensions.multiDraw===!0||Qe)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()};return _0.vertexUv1s=u.has(1),_0.vertexUv2s=u.has(2),_0.vertexUv3s=u.has(3),u.clear(),_0}function v(R){const S=[];if(R.shaderID?S.push(R.shaderID):(S.push(R.customVertexShaderID),S.push(R.customFragmentShaderID)),R.defines!==void 0)for(const L in R.defines)S.push(L),S.push(R.defines[L]);return R.isRawShaderMaterial===!1&&(w(S,R),x(S,R),S.push(r.outputColorSpace)),S.push(R.customProgramCacheKey),S.join()}function w(R,S){R.push(S.precision),R.push(S.outputColorSpace),R.push(S.envMapMode),R.push(S.envMapCubeUVHeight),R.push(S.mapUv),R.push(S.alphaMapUv),R.push(S.lightMapUv),R.push(S.aoMapUv),R.push(S.bumpMapUv),R.push(S.normalMapUv),R.push(S.displacementMapUv),R.push(S.emissiveMapUv),R.push(S.metalnessMapUv),R.push(S.roughnessMapUv),R.push(S.anisotropyMapUv),R.push(S.clearcoatMapUv),R.push(S.clearcoatNormalMapUv),R.push(S.clearcoatRoughnessMapUv),R.push(S.iridescenceMapUv),R.push(S.iridescenceThicknessMapUv),R.push(S.sheenColorMapUv),R.push(S.sheenRoughnessMapUv),R.push(S.specularMapUv),R.push(S.specularColorMapUv),R.push(S.specularIntensityMapUv),R.push(S.transmissionMapUv),R.push(S.thicknessMapUv),R.push(S.combine),R.push(S.fogExp2),R.push(S.sizeAttenuation),R.push(S.morphTargetsCount),R.push(S.morphAttributeCount),R.push(S.numDirLights),R.push(S.numPointLights),R.push(S.numSpotLights),R.push(S.numSpotLightMaps),R.push(S.numHemiLights),R.push(S.numRectAreaLights),R.push(S.numDirLightShadows),R.push(S.numPointLightShadows),R.push(S.numSpotLightShadows),R.push(S.numSpotLightShadowsWithMaps),R.push(S.numLightProbes),R.push(S.shadowMapType),R.push(S.toneMapping),R.push(S.numClippingPlanes),R.push(S.numClipIntersection),R.push(S.depthPacking)}function x(R,S){l.disableAll(),S.supportsVertexTextures&&l.enable(0),S.instancing&&l.enable(1),S.instancingColor&&l.enable(2),S.instancingMorph&&l.enable(3),S.matcap&&l.enable(4),S.envMap&&l.enable(5),S.normalMapObjectSpace&&l.enable(6),S.normalMapTangentSpace&&l.enable(7),S.clearcoat&&l.enable(8),S.iridescence&&l.enable(9),S.alphaTest&&l.enable(10),S.vertexColors&&l.enable(11),S.vertexAlphas&&l.enable(12),S.vertexUv1s&&l.enable(13),S.vertexUv2s&&l.enable(14),S.vertexUv3s&&l.enable(15),S.vertexTangents&&l.enable(16),S.anisotropy&&l.enable(17),S.alphaHash&&l.enable(18),S.batching&&l.enable(19),S.dispersion&&l.enable(20),S.batchingColor&&l.enable(21),R.push(l.mask),l.disableAll(),S.fog&&l.enable(0),S.useFog&&l.enable(1),S.flatShading&&l.enable(2),S.logarithmicDepthBuffer&&l.enable(3),S.reverseDepthBuffer&&l.enable(4),S.skinning&&l.enable(5),S.morphTargets&&l.enable(6),S.morphNormals&&l.enable(7),S.morphColors&&l.enable(8),S.premultipliedAlpha&&l.enable(9),S.shadowMapEnabled&&l.enable(10),S.doubleSided&&l.enable(11),S.flipSided&&l.enable(12),S.useDepthPacking&&l.enable(13),S.dithering&&l.enable(14),S.transmission&&l.enable(15),S.sheen&&l.enable(16),S.opaque&&l.enable(17),S.pointsUvs&&l.enable(18),S.decodeVideoTexture&&l.enable(19),S.decodeVideoTextureEmissive&&l.enable(20),S.alphaToCoverage&&l.enable(21),R.push(l.mask)}function C(R){const S=_[R.type];let L;if(S){const k=ei[S];L=ll.clone(k.uniforms)}else L=R.uniforms;return L}function B(R,S){let L;for(let k=0,Q=d.length;k<Q;k++){const W=d[k];if(W.cacheKey===S){L=W,++L.usedTimes;break}}return L===void 0&&(L=new fS(r,S,R,s),d.push(L)),L}function T(R){if(--R.usedTimes===0){const S=d.indexOf(R);d[S]=d[d.length-1],d.pop(),R.destroy()}}function M(R){h.remove(R)}function D(){h.dispose()}return{getParameters:m,getProgramCacheKey:v,getUniforms:C,acquireProgram:B,releaseProgram:T,releaseShaderCache:M,programs:d,dispose:D}}function vS(){let r=new WeakMap;function e(o){return r.has(o)}function t(o){let l=r.get(o);return l===void 0&&(l={},r.set(o,l)),l}function n(o){r.delete(o)}function i(o,l,h){r.get(o)[l]=h}function s(){r=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:s}}function _S(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 w7(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 C7(){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||_S),n.length>1&&n.sort(p||w7),i.length>1&&i.sort(p||w7)}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 yS(){let r=new WeakMap;function e(n,i){const s=r.get(n);let o;return s===void 0?(o=new C7,r.set(n,[o])):i>=s.length?(o=new C7,s.push(o)):o=s[i],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function ES(){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 G,color:new We};break;case"SpotLight":t={position:new G,direction:new G,color:new We,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new G,color:new We,distance:0,decay:0};break;case"HemisphereLight":t={direction:new G,skyColor:new We,groundColor:new We};break;case"RectAreaLight":t={color:new We,position:new G,halfWidth:new G,halfHeight:new G};break}return r[e.id]=t,t}}}function xS(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ve};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ve};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let wS=0;function CS(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function IS(r){const e=new ES,t=xS(),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 G);const i=new G,s=new ot,o=new ot;function l(u){let d=0,A=0,p=0;for(let R=0;R<9;R++)n.probe[R].set(0,0,0);let g=0,_=0,E=0,m=0,v=0,w=0,x=0,C=0,B=0,T=0,M=0;u.sort(CS);for(let R=0,S=u.length;R<S;R++){const L=u[R],k=L.color,Q=L.intensity,W=L.distance,J=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)d+=k.r*Q,A+=k.g*Q,p+=k.b*Q;else if(L.isLightProbe){for(let q=0;q<9;q++)n.probe[q].addScaledVector(L.sh.coefficients[q],Q);M++}else if(L.isDirectionalLight){const q=e.get(L);if(q.color.copy(L.color).multiplyScalar(L.intensity),L.castShadow){const re=L.shadow,H=t.get(L);H.shadowIntensity=re.intensity,H.shadowBias=re.bias,H.shadowNormalBias=re.normalBias,H.shadowRadius=re.radius,H.shadowMapSize=re.mapSize,n.directionalShadow[g]=H,n.directionalShadowMap[g]=J,n.directionalShadowMatrix[g]=L.shadow.matrix,w++}n.directional[g]=q,g++}else if(L.isSpotLight){const q=e.get(L);q.position.setFromMatrixPosition(L.matrixWorld),q.color.copy(k).multiplyScalar(Q),q.distance=W,q.coneCos=Math.cos(L.angle),q.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),q.decay=L.decay,n.spot[E]=q;const re=L.shadow;if(L.map&&(n.spotLightMap[B]=L.map,B++,re.updateMatrices(L),L.castShadow&&T++),n.spotLightMatrix[E]=re.matrix,L.castShadow){const H=t.get(L);H.shadowIntensity=re.intensity,H.shadowBias=re.bias,H.shadowNormalBias=re.normalBias,H.shadowRadius=re.radius,H.shadowMapSize=re.mapSize,n.spotShadow[E]=H,n.spotShadowMap[E]=J,C++}E++}else if(L.isRectAreaLight){const q=e.get(L);q.color.copy(k).multiplyScalar(Q),q.halfWidth.set(L.width*.5,0,0),q.halfHeight.set(0,L.height*.5,0),n.rectArea[m]=q,m++}else if(L.isPointLight){const q=e.get(L);if(q.color.copy(L.color).multiplyScalar(L.intensity),q.distance=L.distance,q.decay=L.decay,L.castShadow){const re=L.shadow,H=t.get(L);H.shadowIntensity=re.intensity,H.shadowBias=re.bias,H.shadowNormalBias=re.normalBias,H.shadowRadius=re.radius,H.shadowMapSize=re.mapSize,H.shadowCameraNear=re.camera.near,H.shadowCameraFar=re.camera.far,n.pointShadow[_]=H,n.pointShadowMap[_]=J,n.pointShadowMatrix[_]=L.shadow.matrix,x++}n.point[_]=q,_++}else if(L.isHemisphereLight){const q=e.get(L);q.skyColor.copy(L.color).multiplyScalar(Q),q.groundColor.copy(L.groundColor).multiplyScalar(Q),n.hemi[v]=q,v++}}m>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ue.LTC_FLOAT_1,n.rectAreaLTC2=Ue.LTC_FLOAT_2):(n.rectAreaLTC1=Ue.LTC_HALF_1,n.rectAreaLTC2=Ue.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=A,n.ambient[2]=p;const D=n.hash;(D.directionalLength!==g||D.pointLength!==_||D.spotLength!==E||D.rectAreaLength!==m||D.hemiLength!==v||D.numDirectionalShadows!==w||D.numPointShadows!==x||D.numSpotShadows!==C||D.numSpotMaps!==B||D.numLightProbes!==M)&&(n.directional.length=g,n.spot.length=E,n.rectArea.length=m,n.point.length=_,n.hemi.length=v,n.directionalShadow.length=w,n.directionalShadowMap.length=w,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=w,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+B-T,n.spotLightMap.length=B,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=M,D.directionalLength=g,D.pointLength=_,D.spotLength=E,D.rectAreaLength=m,D.hemiLength=v,D.numDirectionalShadows=w,D.numPointShadows=x,D.numSpotShadows=C,D.numSpotMaps=B,D.numLightProbes=M,n.version=wS++)}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 C=n.directional[A];C.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),A++}else if(x.isSpotLight){const C=n.spot[g];C.position.setFromMatrixPosition(x.matrixWorld),C.position.applyMatrix4(m),C.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),g++}else if(x.isRectAreaLight){const C=n.rectArea[_];C.position.setFromMatrixPosition(x.matrixWorld),C.position.applyMatrix4(m),o.identity(),s.copy(x.matrixWorld),s.premultiply(m),o.extractRotation(s),C.halfWidth.set(x.width*.5,0,0),C.halfHeight.set(0,x.height*.5,0),C.halfWidth.applyMatrix4(o),C.halfHeight.applyMatrix4(o),_++}else if(x.isPointLight){const C=n.point[p];C.position.setFromMatrixPosition(x.matrixWorld),C.position.applyMatrix4(m),p++}else if(x.isHemisphereLight){const C=n.hemi[E];C.direction.setFromMatrixPosition(x.matrixWorld),C.direction.transformDirection(m),E++}}}return{setup:l,setupView:h,state:n}}function I7(r){const e=new IS(r),t=[],n=[];function i(d){u.camera=d,t.length=0,n.length=0}function s(d){t.push(d)}function o(d){n.push(d)}function l(){e.setup(t)}function h(d){e.setupView(t,d)}const u={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:u,setupLights:l,setupLightsView:h,pushLight:s,pushShadow:o}}function MS(r){let e=new WeakMap;function t(i,s=0){const o=e.get(i);let l;return o===void 0?(l=new I7(r),e.set(i,[l])):s>=o.length?(l=new I7(r),o.push(l)):l=o[s],l}function n(){e=new WeakMap}return{get:t,dispose:n}}const SS=`void main() {
|
|
3793
|
+
`+H)}else k!==""?console.warn("THREE.WebGLProgram: Program Info Log:",k):(Q===""||W==="")&&(q=!1);q&&(L.diagnostics={runnable:J,programLog:k,vertexShader:{log:Q,prefix:m},fragmentShader:{log:W,prefix:v}})}i.deleteShader(B),i.deleteShader(T),D=new k9(i,E),R=rS(i,E)}let D;this.getUniforms=function(){return D===void 0&&M(this),D};let R;this.getAttributes=function(){return R===void 0&&M(this),R};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=i.getProgramParameter(E,YM)),S},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(E),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=qM++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=B,this.fragmentShader=T,this}let pS=0;class AS{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 gS(e),t.set(e,n)),n}}class gS{constructor(e){this.id=pS++,this.code=e,this.usedTimes=0}}function mS(r,e,t,n,i,s,o){const l=new h9,h=new AS,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(R){return u.add(R),R===0?"uv":`uv${R}`}function m(R,S,L,k,Q){const W=k.fog,J=Q.geometry,q=R.isMeshStandardMaterial?k.environment:null,re=(R.isMeshStandardMaterial?t:e).get(R.envMap||q),H=re&&re.mapping===V2?re.image.height:null,j=_[R.type];R.precision!==null&&(g=i.getMaxPrecision(R.precision),g!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",g,"instead."));const $=J.morphAttributes.position||J.morphAttributes.normal||J.morphAttributes.color,P=$!==void 0?$.length:0;let V=0;J.morphAttributes.position!==void 0&&(V=1),J.morphAttributes.normal!==void 0&&(V=2),J.morphAttributes.color!==void 0&&(V=3);let ee,O,ce,fe;if(j){const bt=ei[j];ee=bt.vertexShader,O=bt.fragmentShader}else ee=R.vertexShader,O=R.fragmentShader,h.update(R),ce=h.getVertexShaderID(R),fe=h.getFragmentShaderID(R);const Ae=r.getRenderTarget(),pe=r.state.buffers.depth.getReversed(),Re=Q.isInstancedMesh===!0,ke=Q.isBatchedMesh===!0,wt=!!R.map,ut=!!R.matcap,ht=!!re,X=!!R.aoMap,u0=!!R.lightMap,dt=!!R.bumpMap,ft=!!R.normalMap,qe=!!R.displacementMap,It=!!R.emissiveMap,je=!!R.metalnessMap,z=!!R.roughnessMap,U=R.anisotropy>0,se=R.clearcoat>0,ye=R.dispersion>0,Ee=R.iridescence>0,_e=R.sheen>0,Ye=R.transmission>0,Pe=U&&!!R.anisotropyMap,Ge=se&&!!R.clearcoatMap,pt=se&&!!R.clearcoatNormalMap,we=se&&!!R.clearcoatRoughnessMap,Qe=Ee&&!!R.iridescenceMap,ge=Ee&&!!R.iridescenceThicknessMap,De=_e&&!!R.sheenColorMap,Se=_e&&!!R.sheenRoughnessMap,nt=!!R.specularMap,et=!!R.specularColorMap,At=!!R.specularIntensityMap,Z=Ye&&!!R.transmissionMap,Le=Ye&&!!R.thicknessMap,ue=!!R.gradientMap,ve=!!R.alphaMap,be=R.alphaTest>0,Ne=!!R.alphaHash,Et=!!R.extensions;let jt=es;R.toneMapped&&(Ae===null||Ae.isXRRenderTarget===!0)&&(jt=r.toneMapping);const _0={shaderID:j,shaderType:R.type,shaderName:R.name,vertexShader:ee,fragmentShader:O,defines:R.defines,customVertexShaderID:ce,customFragmentShaderID:fe,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:g,batching:ke,batchingColor:ke&&Q._colorsTexture!==null,instancing:Re,instancingColor:Re&&Q.instanceColor!==null,instancingMorph:Re&&Q.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:Ae===null?r.outputColorSpace:Ae.isXRRenderTarget===!0?Ae.texture.colorSpace:H0,alphaToCoverage:!!R.alphaToCoverage,map:wt,matcap:ut,envMap:ht,envMapMode:ht&&re.mapping,envMapCubeUVHeight:H,aoMap:X,lightMap:u0,bumpMap:dt,normalMap:ft,displacementMap:p&&qe,emissiveMap:It,normalMapObjectSpace:ft&&R.normalMapType===uE,normalMapTangentSpace:ft&&R.normalMapType===F6,metalnessMap:je,roughnessMap:z,anisotropy:U,anisotropyMap:Pe,clearcoat:se,clearcoatMap:Ge,clearcoatNormalMap:pt,clearcoatRoughnessMap:we,dispersion:ye,iridescence:Ee,iridescenceMap:Qe,iridescenceThicknessMap:ge,sheen:_e,sheenColorMap:De,sheenRoughnessMap:Se,specularMap:nt,specularColorMap:et,specularIntensityMap:At,transmission:Ye,transmissionMap:Z,thicknessMap:Le,gradientMap:ue,opaque:R.transparent===!1&&R.blending===eo&&R.alphaToCoverage===!1,alphaMap:ve,alphaTest:be,alphaHash:Ne,combine:R.combine,mapUv:wt&&E(R.map.channel),aoMapUv:X&&E(R.aoMap.channel),lightMapUv:u0&&E(R.lightMap.channel),bumpMapUv:dt&&E(R.bumpMap.channel),normalMapUv:ft&&E(R.normalMap.channel),displacementMapUv:qe&&E(R.displacementMap.channel),emissiveMapUv:It&&E(R.emissiveMap.channel),metalnessMapUv:je&&E(R.metalnessMap.channel),roughnessMapUv:z&&E(R.roughnessMap.channel),anisotropyMapUv:Pe&&E(R.anisotropyMap.channel),clearcoatMapUv:Ge&&E(R.clearcoatMap.channel),clearcoatNormalMapUv:pt&&E(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:we&&E(R.clearcoatRoughnessMap.channel),iridescenceMapUv:Qe&&E(R.iridescenceMap.channel),iridescenceThicknessMapUv:ge&&E(R.iridescenceThicknessMap.channel),sheenColorMapUv:De&&E(R.sheenColorMap.channel),sheenRoughnessMapUv:Se&&E(R.sheenRoughnessMap.channel),specularMapUv:nt&&E(R.specularMap.channel),specularColorMapUv:et&&E(R.specularColorMap.channel),specularIntensityMapUv:At&&E(R.specularIntensityMap.channel),transmissionMapUv:Z&&E(R.transmissionMap.channel),thicknessMapUv:Le&&E(R.thicknessMap.channel),alphaMapUv:ve&&E(R.alphaMap.channel),vertexTangents:!!J.attributes.tangent&&(ft||U),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!J.attributes.color&&J.attributes.color.itemSize===4,pointsUvs:Q.isPoints===!0&&!!J.attributes.uv&&(wt||ve),fog:!!W,useFog:R.fog===!0,fogExp2:!!W&&W.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:A,reverseDepthBuffer:pe,skinning:Q.isSkinnedMesh===!0,morphTargets:J.morphAttributes.position!==void 0,morphNormals:J.morphAttributes.normal!==void 0,morphColors:J.morphAttributes.color!==void 0,morphTargetsCount:P,morphTextureStride:V,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:R.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:jt,decodeVideoTexture:wt&&R.map.isVideoTexture===!0&&Mt.getTransfer(R.map.colorSpace)===Ft,decodeVideoTextureEmissive:It&&R.emissiveMap.isVideoTexture===!0&&Mt.getTransfer(R.emissiveMap.colorSpace)===Ft,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===un,flipSided:R.side===G0,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionClipCullDistance:Et&&R.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Et&&R.extensions.multiDraw===!0||ke)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()};return _0.vertexUv1s=u.has(1),_0.vertexUv2s=u.has(2),_0.vertexUv3s=u.has(3),u.clear(),_0}function v(R){const S=[];if(R.shaderID?S.push(R.shaderID):(S.push(R.customVertexShaderID),S.push(R.customFragmentShaderID)),R.defines!==void 0)for(const L in R.defines)S.push(L),S.push(R.defines[L]);return R.isRawShaderMaterial===!1&&(w(S,R),x(S,R),S.push(r.outputColorSpace)),S.push(R.customProgramCacheKey),S.join()}function w(R,S){R.push(S.precision),R.push(S.outputColorSpace),R.push(S.envMapMode),R.push(S.envMapCubeUVHeight),R.push(S.mapUv),R.push(S.alphaMapUv),R.push(S.lightMapUv),R.push(S.aoMapUv),R.push(S.bumpMapUv),R.push(S.normalMapUv),R.push(S.displacementMapUv),R.push(S.emissiveMapUv),R.push(S.metalnessMapUv),R.push(S.roughnessMapUv),R.push(S.anisotropyMapUv),R.push(S.clearcoatMapUv),R.push(S.clearcoatNormalMapUv),R.push(S.clearcoatRoughnessMapUv),R.push(S.iridescenceMapUv),R.push(S.iridescenceThicknessMapUv),R.push(S.sheenColorMapUv),R.push(S.sheenRoughnessMapUv),R.push(S.specularMapUv),R.push(S.specularColorMapUv),R.push(S.specularIntensityMapUv),R.push(S.transmissionMapUv),R.push(S.thicknessMapUv),R.push(S.combine),R.push(S.fogExp2),R.push(S.sizeAttenuation),R.push(S.morphTargetsCount),R.push(S.morphAttributeCount),R.push(S.numDirLights),R.push(S.numPointLights),R.push(S.numSpotLights),R.push(S.numSpotLightMaps),R.push(S.numHemiLights),R.push(S.numRectAreaLights),R.push(S.numDirLightShadows),R.push(S.numPointLightShadows),R.push(S.numSpotLightShadows),R.push(S.numSpotLightShadowsWithMaps),R.push(S.numLightProbes),R.push(S.shadowMapType),R.push(S.toneMapping),R.push(S.numClippingPlanes),R.push(S.numClipIntersection),R.push(S.depthPacking)}function x(R,S){l.disableAll(),S.supportsVertexTextures&&l.enable(0),S.instancing&&l.enable(1),S.instancingColor&&l.enable(2),S.instancingMorph&&l.enable(3),S.matcap&&l.enable(4),S.envMap&&l.enable(5),S.normalMapObjectSpace&&l.enable(6),S.normalMapTangentSpace&&l.enable(7),S.clearcoat&&l.enable(8),S.iridescence&&l.enable(9),S.alphaTest&&l.enable(10),S.vertexColors&&l.enable(11),S.vertexAlphas&&l.enable(12),S.vertexUv1s&&l.enable(13),S.vertexUv2s&&l.enable(14),S.vertexUv3s&&l.enable(15),S.vertexTangents&&l.enable(16),S.anisotropy&&l.enable(17),S.alphaHash&&l.enable(18),S.batching&&l.enable(19),S.dispersion&&l.enable(20),S.batchingColor&&l.enable(21),R.push(l.mask),l.disableAll(),S.fog&&l.enable(0),S.useFog&&l.enable(1),S.flatShading&&l.enable(2),S.logarithmicDepthBuffer&&l.enable(3),S.reverseDepthBuffer&&l.enable(4),S.skinning&&l.enable(5),S.morphTargets&&l.enable(6),S.morphNormals&&l.enable(7),S.morphColors&&l.enable(8),S.premultipliedAlpha&&l.enable(9),S.shadowMapEnabled&&l.enable(10),S.doubleSided&&l.enable(11),S.flipSided&&l.enable(12),S.useDepthPacking&&l.enable(13),S.dithering&&l.enable(14),S.transmission&&l.enable(15),S.sheen&&l.enable(16),S.opaque&&l.enable(17),S.pointsUvs&&l.enable(18),S.decodeVideoTexture&&l.enable(19),S.decodeVideoTextureEmissive&&l.enable(20),S.alphaToCoverage&&l.enable(21),R.push(l.mask)}function C(R){const S=_[R.type];let L;if(S){const k=ei[S];L=ll.clone(k.uniforms)}else L=R.uniforms;return L}function B(R,S){let L;for(let k=0,Q=d.length;k<Q;k++){const W=d[k];if(W.cacheKey===S){L=W,++L.usedTimes;break}}return L===void 0&&(L=new fS(r,S,R,s),d.push(L)),L}function T(R){if(--R.usedTimes===0){const S=d.indexOf(R);d[S]=d[d.length-1],d.pop(),R.destroy()}}function M(R){h.remove(R)}function D(){h.dispose()}return{getParameters:m,getProgramCacheKey:v,getUniforms:C,acquireProgram:B,releaseProgram:T,releaseShaderCache:M,programs:d,dispose:D}}function vS(){let r=new WeakMap;function e(o){return r.has(o)}function t(o){let l=r.get(o);return l===void 0&&(l={},r.set(o,l)),l}function n(o){r.delete(o)}function i(o,l,h){r.get(o)[l]=h}function s(){r=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:s}}function _S(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 w7(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 C7(){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||_S),n.length>1&&n.sort(p||w7),i.length>1&&i.sort(p||w7)}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 yS(){let r=new WeakMap;function e(n,i){const s=r.get(n);let o;return s===void 0?(o=new C7,r.set(n,[o])):i>=s.length?(o=new C7,s.push(o)):o=s[i],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function ES(){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 G,color:new We};break;case"SpotLight":t={position:new G,direction:new G,color:new We,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new G,color:new We,distance:0,decay:0};break;case"HemisphereLight":t={direction:new G,skyColor:new We,groundColor:new We};break;case"RectAreaLight":t={color:new We,position:new G,halfWidth:new G,halfHeight:new G};break}return r[e.id]=t,t}}}function xS(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ve};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ve};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let wS=0;function CS(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function IS(r){const e=new ES,t=xS(),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 G);const i=new G,s=new ot,o=new ot;function l(u){let d=0,A=0,p=0;for(let R=0;R<9;R++)n.probe[R].set(0,0,0);let g=0,_=0,E=0,m=0,v=0,w=0,x=0,C=0,B=0,T=0,M=0;u.sort(CS);for(let R=0,S=u.length;R<S;R++){const L=u[R],k=L.color,Q=L.intensity,W=L.distance,J=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)d+=k.r*Q,A+=k.g*Q,p+=k.b*Q;else if(L.isLightProbe){for(let q=0;q<9;q++)n.probe[q].addScaledVector(L.sh.coefficients[q],Q);M++}else if(L.isDirectionalLight){const q=e.get(L);if(q.color.copy(L.color).multiplyScalar(L.intensity),L.castShadow){const re=L.shadow,H=t.get(L);H.shadowIntensity=re.intensity,H.shadowBias=re.bias,H.shadowNormalBias=re.normalBias,H.shadowRadius=re.radius,H.shadowMapSize=re.mapSize,n.directionalShadow[g]=H,n.directionalShadowMap[g]=J,n.directionalShadowMatrix[g]=L.shadow.matrix,w++}n.directional[g]=q,g++}else if(L.isSpotLight){const q=e.get(L);q.position.setFromMatrixPosition(L.matrixWorld),q.color.copy(k).multiplyScalar(Q),q.distance=W,q.coneCos=Math.cos(L.angle),q.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),q.decay=L.decay,n.spot[E]=q;const re=L.shadow;if(L.map&&(n.spotLightMap[B]=L.map,B++,re.updateMatrices(L),L.castShadow&&T++),n.spotLightMatrix[E]=re.matrix,L.castShadow){const H=t.get(L);H.shadowIntensity=re.intensity,H.shadowBias=re.bias,H.shadowNormalBias=re.normalBias,H.shadowRadius=re.radius,H.shadowMapSize=re.mapSize,n.spotShadow[E]=H,n.spotShadowMap[E]=J,C++}E++}else if(L.isRectAreaLight){const q=e.get(L);q.color.copy(k).multiplyScalar(Q),q.halfWidth.set(L.width*.5,0,0),q.halfHeight.set(0,L.height*.5,0),n.rectArea[m]=q,m++}else if(L.isPointLight){const q=e.get(L);if(q.color.copy(L.color).multiplyScalar(L.intensity),q.distance=L.distance,q.decay=L.decay,L.castShadow){const re=L.shadow,H=t.get(L);H.shadowIntensity=re.intensity,H.shadowBias=re.bias,H.shadowNormalBias=re.normalBias,H.shadowRadius=re.radius,H.shadowMapSize=re.mapSize,H.shadowCameraNear=re.camera.near,H.shadowCameraFar=re.camera.far,n.pointShadow[_]=H,n.pointShadowMap[_]=J,n.pointShadowMatrix[_]=L.shadow.matrix,x++}n.point[_]=q,_++}else if(L.isHemisphereLight){const q=e.get(L);q.skyColor.copy(L.color).multiplyScalar(Q),q.groundColor.copy(L.groundColor).multiplyScalar(Q),n.hemi[v]=q,v++}}m>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ue.LTC_FLOAT_1,n.rectAreaLTC2=Ue.LTC_FLOAT_2):(n.rectAreaLTC1=Ue.LTC_HALF_1,n.rectAreaLTC2=Ue.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=A,n.ambient[2]=p;const D=n.hash;(D.directionalLength!==g||D.pointLength!==_||D.spotLength!==E||D.rectAreaLength!==m||D.hemiLength!==v||D.numDirectionalShadows!==w||D.numPointShadows!==x||D.numSpotShadows!==C||D.numSpotMaps!==B||D.numLightProbes!==M)&&(n.directional.length=g,n.spot.length=E,n.rectArea.length=m,n.point.length=_,n.hemi.length=v,n.directionalShadow.length=w,n.directionalShadowMap.length=w,n.pointShadow.length=x,n.pointShadowMap.length=x,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=w,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=C+B-T,n.spotLightMap.length=B,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=M,D.directionalLength=g,D.pointLength=_,D.spotLength=E,D.rectAreaLength=m,D.hemiLength=v,D.numDirectionalShadows=w,D.numPointShadows=x,D.numSpotShadows=C,D.numSpotMaps=B,D.numLightProbes=M,n.version=wS++)}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 C=n.directional[A];C.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),A++}else if(x.isSpotLight){const C=n.spot[g];C.position.setFromMatrixPosition(x.matrixWorld),C.position.applyMatrix4(m),C.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),g++}else if(x.isRectAreaLight){const C=n.rectArea[_];C.position.setFromMatrixPosition(x.matrixWorld),C.position.applyMatrix4(m),o.identity(),s.copy(x.matrixWorld),s.premultiply(m),o.extractRotation(s),C.halfWidth.set(x.width*.5,0,0),C.halfHeight.set(0,x.height*.5,0),C.halfWidth.applyMatrix4(o),C.halfHeight.applyMatrix4(o),_++}else if(x.isPointLight){const C=n.point[p];C.position.setFromMatrixPosition(x.matrixWorld),C.position.applyMatrix4(m),p++}else if(x.isHemisphereLight){const C=n.hemi[E];C.direction.setFromMatrixPosition(x.matrixWorld),C.direction.transformDirection(m),E++}}}return{setup:l,setupView:h,state:n}}function I7(r){const e=new IS(r),t=[],n=[];function i(d){u.camera=d,t.length=0,n.length=0}function s(d){t.push(d)}function o(d){n.push(d)}function l(){e.setup(t)}function h(d){e.setupView(t,d)}const u={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:u,setupLights:l,setupLightsView:h,pushLight:s,pushShadow:o}}function MS(r){let e=new WeakMap;function t(i,s=0){const o=e.get(i);let l;return o===void 0?(l=new I7(r),e.set(i,[l])):s>=o.length?(l=new I7(r),o.push(l)):l=o[s],l}function n(){e=new WeakMap}return{get:t,dispose:n}}const SS=`void main() {
|
|
3794
3794
|
gl_Position = vec4( position, 1.0 );
|
|
3795
3795
|
}`,TS=`uniform sampler2D shadow_pass;
|
|
3796
3796
|
uniform vec2 resolution;
|
|
@@ -3818,7 +3818,7 @@ void main() {
|
|
|
3818
3818
|
squared_mean = squared_mean / samples;
|
|
3819
3819
|
float std_dev = sqrt( squared_mean - mean * mean );
|
|
3820
3820
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
|
|
3821
|
-
}`;function BS(r,e,t){let n=new e4;const i=new Ve,s=new Ve,o=new Ut,l=new Pd({depthPacking:cE}),h=new Cx,u={},d=t.maxTextureSize,A={[Rn]:G0,[G0]:Rn,[un]:un},p=new T0({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ve},radius:{value:4}},vertexShader:SS,fragmentShader:TS}),g=p.clone();g.defines.HORIZONTAL_PASS=1;const _=new pn;_.setAttribute("position",new M0(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new S0(_,p),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v6;let v=this.type;this.render=function(T,M,D){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||T.length===0)return;const R=r.getRenderTarget(),S=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),k=r.state;k.setBlending(_i),k.buffers.color.setClear(1,1,1,1),k.buffers.depth.setTest(!0),k.setScissorTest(!1);const Q=v!==vi&&this.type===vi,W=v===vi&&this.type!==vi;for(let J=0,q=T.length;J<q;J++){const re=T[J],H=re.shadow;if(H===void 0){console.warn("THREE.WebGLShadowMap:",re,"has no shadow.");continue}if(H.autoUpdate===!1&&H.needsUpdate===!1)continue;i.copy(H.mapSize);const j=H.getFrameExtents();if(i.multiply(j),s.copy(H.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/j.x),i.x=s.x*j.x,H.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/j.y),i.y=s.y*j.y,H.mapSize.y=s.y)),H.map===null||Q===!0||W===!0){const P=this.type!==vi?{minFilter:$t,magFilter:$t}:{};H.map!==null&&H.map.dispose(),H.map=new Br(i.x,i.y,P),H.map.texture.name=re.name+".shadowMap",H.camera.updateProjectionMatrix()}r.setRenderTarget(H.map),r.clear();const $=H.getViewportCount();for(let P=0;P<$;P++){const V=H.getViewport(P);o.set(s.x*V.x,s.y*V.y,s.x*V.z,s.y*V.w),k.viewport(o),H.updateMatrices(re,P),n=H.getFrustum(),C(M,D,H.camera,re,this.type)}H.isPointLightShadow!==!0&&this.type===vi&&w(H,D),H.needsUpdate=!1}v=this.type,m.needsUpdate=!1,r.setRenderTarget(R,S,L)};function w(T,M){const D=e.update(E);p.defines.VSM_SAMPLES!==T.blurSamples&&(p.defines.VSM_SAMPLES=T.blurSamples,g.defines.VSM_SAMPLES=T.blurSamples,p.needsUpdate=!0,g.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Br(i.x,i.y)),p.uniforms.shadow_pass.value=T.map.texture,p.uniforms.resolution.value=T.mapSize,p.uniforms.radius.value=T.radius,r.setRenderTarget(T.mapPass),r.clear(),r.renderBufferDirect(M,null,D,p,E,null),g.uniforms.shadow_pass.value=T.mapPass.texture,g.uniforms.resolution.value=T.mapSize,g.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(M,null,D,g,E,null)}function x(T,M,D,R){let S=null;const L=D.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(L!==void 0)S=L;else if(S=D.isPointLight===!0?h:l,r.localClippingEnabled&&M.clipShadows===!0&&Array.isArray(M.clippingPlanes)&&M.clippingPlanes.length!==0||M.displacementMap&&M.displacementScale!==0||M.alphaMap&&M.alphaTest>0||M.map&&M.alphaTest>0){const k=S.uuid,Q=M.uuid;let W=u[k];W===void 0&&(W={},u[k]=W);let J=W[Q];J===void 0&&(J=S.clone(),W[Q]=J,M.addEventListener("dispose",B)),S=J}if(S.visible=M.visible,S.wireframe=M.wireframe,R===vi?S.side=M.shadowSide!==null?M.shadowSide:M.side:S.side=M.shadowSide!==null?M.shadowSide:A[M.side],S.alphaMap=M.alphaMap,S.alphaTest=M.alphaTest,S.map=M.map,S.clipShadows=M.clipShadows,S.clippingPlanes=M.clippingPlanes,S.clipIntersection=M.clipIntersection,S.displacementMap=M.displacementMap,S.displacementScale=M.displacementScale,S.displacementBias=M.displacementBias,S.wireframeLinewidth=M.wireframeLinewidth,S.linewidth=M.linewidth,D.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const k=r.properties.get(S);k.light=D}return S}function C(T,M,D,R,S){if(T.visible===!1)return;if(T.layers.test(M.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&S===vi)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,T.matrixWorld);const k=e.update(T),Q=T.material;if(Array.isArray(Q)){const W=k.groups;for(let J=0,q=W.length;J<q;J++){const re=W[J],H=Q[re.materialIndex];if(H&&H.visible){const j=x(T,H,R,S);T.onBeforeShadow(r,T,M,D,k,j,re),r.renderBufferDirect(D,null,k,j,T,re),T.onAfterShadow(r,T,M,D,k,j,re)}}}else if(Q.visible){const W=x(T,Q,R,S);T.onBeforeShadow(r,T,M,D,k,W,null),r.renderBufferDirect(D,null,k,W,T,null),T.onAfterShadow(r,T,M,D,k,W,null)}}const L=T.children;for(let k=0,Q=L.length;k<Q;k++)C(L[k],M,D,R,S)}function B(T){T.target.removeEventListener("dispose",B);for(const M in u){const D=u[M],R=T.target.uuid;R in D&&(D[R].dispose(),delete D[R])}}}const bS={[Yu]:qu,[Xu]:Zu,[Ju]:$u,[to]:Ku,[qu]:Yu,[Zu]:Xu,[$u]:Ju,[Ku]:to};function RS(r,e){function t(){let Z=!1;const Re=new Ut;let de=null;const ye=new Ut(0,0,0,0);return{setMask:function(be){de!==be&&!Z&&(r.colorMask(be,be,be,be),de=be)},setLocked:function(be){Z=be},setClear:function(be,Ne,Et,jt,_0){_0===!0&&(be*=jt,Ne*=jt,Et*=jt),Re.set(be,Ne,Et,jt),ye.equals(Re)===!1&&(r.clearColor(be,Ne,Et,jt),ye.copy(Re))},reset:function(){Z=!1,de=null,ye.set(-1,0,0,0)}}}function n(){let Z=!1,Re=!1,de=null,ye=null,be=null;return{setReversed:function(Ne){if(Re!==Ne){const Et=e.get("EXT_clip_control");Re?Et.clipControlEXT(Et.LOWER_LEFT_EXT,Et.ZERO_TO_ONE_EXT):Et.clipControlEXT(Et.LOWER_LEFT_EXT,Et.NEGATIVE_ONE_TO_ONE_EXT);const jt=be;be=null,this.setClear(jt)}Re=Ne},getReversed:function(){return Re},setTest:function(Ne){Ne?Ae(r.DEPTH_TEST):pe(r.DEPTH_TEST)},setMask:function(Ne){de!==Ne&&!Z&&(r.depthMask(Ne),de=Ne)},setFunc:function(Ne){if(Re&&(Ne=bS[Ne]),ye!==Ne){switch(Ne){case Yu:r.depthFunc(r.NEVER);break;case qu:r.depthFunc(r.ALWAYS);break;case Xu:r.depthFunc(r.LESS);break;case to:r.depthFunc(r.LEQUAL);break;case Ju:r.depthFunc(r.EQUAL);break;case Ku:r.depthFunc(r.GEQUAL);break;case Zu:r.depthFunc(r.GREATER);break;case $u:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}ye=Ne}},setLocked:function(Ne){Z=Ne},setClear:function(Ne){be!==Ne&&(Re&&(Ne=1-Ne),r.clearDepth(Ne),be=Ne)},reset:function(){Z=!1,de=null,ye=null,be=null,Re=!1}}}function i(){let Z=!1,Re=null,de=null,ye=null,be=null,Ne=null,Et=null,jt=null,_0=null;return{setTest:function(bt){Z||(bt?Ae(r.STENCIL_TEST):pe(r.STENCIL_TEST))},setMask:function(bt){Re!==bt&&!Z&&(r.stencilMask(bt),Re=bt)},setFunc:function(bt,rr,nr){(de!==bt||ye!==rr||be!==nr)&&(r.stencilFunc(bt,rr,nr),de=bt,ye=rr,be=nr)},setOp:function(bt,rr,nr){(Ne!==bt||Et!==rr||jt!==nr)&&(r.stencilOp(bt,rr,nr),Ne=bt,Et=rr,jt=nr)},setLocked:function(bt){Z=bt},setClear:function(bt){_0!==bt&&(r.clearStencil(bt),_0=bt)},reset:function(){Z=!1,Re=null,de=null,ye=null,be=null,Ne=null,Et=null,jt=null,_0=null}}}const s=new t,o=new n,l=new i,h=new WeakMap,u=new WeakMap;let d={},A={},p=new WeakMap,g=[],_=null,E=!1,m=null,v=null,w=null,x=null,C=null,B=null,T=null,M=new We(0,0,0),D=0,R=!1,S=null,L=null,k=null,Q=null,W=null;const J=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let q=!1,re=0;const H=r.getParameter(r.VERSION);H.indexOf("WebGL")!==-1?(re=parseFloat(/^WebGL (\d)/.exec(H)[1]),q=re>=1):H.indexOf("OpenGL ES")!==-1&&(re=parseFloat(/^OpenGL ES (\d)/.exec(H)[1]),q=re>=2);let j=null,$={};const P=r.getParameter(r.SCISSOR_BOX),V=r.getParameter(r.VIEWPORT),ee=new Ut().fromArray(P),O=new Ut().fromArray(V);function ce(Z,Re,de,ye){const be=new Uint8Array(4),Ne=r.createTexture();r.bindTexture(Z,Ne),r.texParameteri(Z,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(Z,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let Et=0;Et<de;Et++)Z===r.TEXTURE_3D||Z===r.TEXTURE_2D_ARRAY?r.texImage3D(Re,0,r.RGBA,1,1,ye,0,r.RGBA,r.UNSIGNED_BYTE,be):r.texImage2D(Re+Et,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,be);return Ne}const fe={};fe[r.TEXTURE_2D]=ce(r.TEXTURE_2D,r.TEXTURE_2D,1),fe[r.TEXTURE_CUBE_MAP]=ce(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),fe[r.TEXTURE_2D_ARRAY]=ce(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),fe[r.TEXTURE_3D]=ce(r.TEXTURE_3D,r.TEXTURE_3D,1,1),s.setClear(0,0,0,1),o.setClear(1),l.setClear(0),Ae(r.DEPTH_TEST),o.setFunc(to),dt(!1),ft(m6),Ae(r.CULL_FACE),X(_i);function Ae(Z){d[Z]!==!0&&(r.enable(Z),d[Z]=!0)}function pe(Z){d[Z]!==!1&&(r.disable(Z),d[Z]=!1)}function De(Z,Re){return A[Z]!==Re?(r.bindFramebuffer(Z,Re),A[Z]=Re,Z===r.DRAW_FRAMEBUFFER&&(A[r.FRAMEBUFFER]=Re),Z===r.FRAMEBUFFER&&(A[r.DRAW_FRAMEBUFFER]=Re),!0):!1}function Qe(Z,Re){let de=g,ye=!1;if(Z){de=p.get(Re),de===void 0&&(de=[],p.set(Re,de));const be=Z.textures;if(de.length!==be.length||de[0]!==r.COLOR_ATTACHMENT0){for(let Ne=0,Et=be.length;Ne<Et;Ne++)de[Ne]=r.COLOR_ATTACHMENT0+Ne;de.length=be.length,ye=!0}}else de[0]!==r.BACK&&(de[0]=r.BACK,ye=!0);ye&&r.drawBuffers(de)}function wt(Z){return _!==Z?(r.useProgram(Z),_=Z,!0):!1}const ut={[ea]:r.FUNC_ADD,[Fy]:r.FUNC_SUBTRACT,[Oy]:r.FUNC_REVERSE_SUBTRACT};ut[zy]=r.MIN,ut[Gy]=r.MAX;const ht={[Hy]:r.ZERO,[Vy]:r.ONE,[jy]:r.SRC_COLOR,[ju]:r.SRC_ALPHA,[Ky]:r.SRC_ALPHA_SATURATE,[Xy]:r.DST_COLOR,[Yy]:r.DST_ALPHA,[Wy]:r.ONE_MINUS_SRC_COLOR,[Wu]:r.ONE_MINUS_SRC_ALPHA,[Jy]:r.ONE_MINUS_DST_COLOR,[qy]:r.ONE_MINUS_DST_ALPHA,[Zy]:r.CONSTANT_COLOR,[$y]:r.ONE_MINUS_CONSTANT_COLOR,[eE]:r.CONSTANT_ALPHA,[tE]:r.ONE_MINUS_CONSTANT_ALPHA};function X(Z,Re,de,ye,be,Ne,Et,jt,_0,bt){if(Z===_i){E===!0&&(pe(r.BLEND),E=!1);return}if(E===!1&&(Ae(r.BLEND),E=!0),Z!==Qy){if(Z!==m||bt!==R){if((v!==ea||C!==ea)&&(r.blendEquation(r.FUNC_ADD),v=ea,C=ea),bt)switch(Z){case eo:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Hu:r.blendFunc(r.ONE,r.ONE);break;case _6:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Vu:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Z);break}else switch(Z){case eo:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Hu:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case _6:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Vu:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Z);break}w=null,x=null,B=null,T=null,M.set(0,0,0),D=0,m=Z,R=bt}return}be=be||Re,Ne=Ne||de,Et=Et||ye,(Re!==v||be!==C)&&(r.blendEquationSeparate(ut[Re],ut[be]),v=Re,C=be),(de!==w||ye!==x||Ne!==B||Et!==T)&&(r.blendFuncSeparate(ht[de],ht[ye],ht[Ne],ht[Et]),w=de,x=ye,B=Ne,T=Et),(jt.equals(M)===!1||_0!==D)&&(r.blendColor(jt.r,jt.g,jt.b,_0),M.copy(jt),D=_0),m=Z,R=!1}function u0(Z,Re){Z.side===un?pe(r.CULL_FACE):Ae(r.CULL_FACE);let de=Z.side===G0;Re&&(de=!de),dt(de),Z.blending===eo&&Z.transparent===!1?X(_i):X(Z.blending,Z.blendEquation,Z.blendSrc,Z.blendDst,Z.blendEquationAlpha,Z.blendSrcAlpha,Z.blendDstAlpha,Z.blendColor,Z.blendAlpha,Z.premultipliedAlpha),o.setFunc(Z.depthFunc),o.setTest(Z.depthTest),o.setMask(Z.depthWrite),s.setMask(Z.colorWrite);const ye=Z.stencilWrite;l.setTest(ye),ye&&(l.setMask(Z.stencilWriteMask),l.setFunc(Z.stencilFunc,Z.stencilRef,Z.stencilFuncMask),l.setOp(Z.stencilFail,Z.stencilZFail,Z.stencilZPass)),It(Z.polygonOffset,Z.polygonOffsetFactor,Z.polygonOffsetUnits),Z.alphaToCoverage===!0?Ae(r.SAMPLE_ALPHA_TO_COVERAGE):pe(r.SAMPLE_ALPHA_TO_COVERAGE)}function dt(Z){S!==Z&&(Z?r.frontFace(r.CW):r.frontFace(r.CCW),S=Z)}function ft(Z){Z!==Py?(Ae(r.CULL_FACE),Z!==L&&(Z===m6?r.cullFace(r.BACK):Z===Uy?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):pe(r.CULL_FACE),L=Z}function qe(Z){Z!==k&&(q&&r.lineWidth(Z),k=Z)}function It(Z,Re,de){Z?(Ae(r.POLYGON_OFFSET_FILL),(Q!==Re||W!==de)&&(r.polygonOffset(Re,de),Q=Re,W=de)):pe(r.POLYGON_OFFSET_FILL)}function je(Z){Z?Ae(r.SCISSOR_TEST):pe(r.SCISSOR_TEST)}function z(Z){Z===void 0&&(Z=r.TEXTURE0+J-1),j!==Z&&(r.activeTexture(Z),j=Z)}function U(Z,Re,de){de===void 0&&(j===null?de=r.TEXTURE0+J-1:de=j);let ye=$[de];ye===void 0&&(ye={type:void 0,texture:void 0},$[de]=ye),(ye.type!==Z||ye.texture!==Re)&&(j!==de&&(r.activeTexture(de),j=de),r.bindTexture(Z,Re||fe[Z]),ye.type=Z,ye.texture=Re)}function se(){const Z=$[j];Z!==void 0&&Z.type!==void 0&&(r.bindTexture(Z.type,null),Z.type=void 0,Z.texture=void 0)}function _e(){try{r.compressedTexImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Ee(){try{r.compressedTexImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function ve(){try{r.texSubImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Ye(){try{r.texSubImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Pe(){try{r.compressedTexSubImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Ge(){try{r.compressedTexSubImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function pt(){try{r.texStorage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function we(){try{r.texStorage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function ke(){try{r.texImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function ge(){try{r.texImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Le(Z){ee.equals(Z)===!1&&(r.scissor(Z.x,Z.y,Z.z,Z.w),ee.copy(Z))}function Te(Z){O.equals(Z)===!1&&(r.viewport(Z.x,Z.y,Z.z,Z.w),O.copy(Z))}function nt(Z,Re){let de=u.get(Re);de===void 0&&(de=new WeakMap,u.set(Re,de));let ye=de.get(Z);ye===void 0&&(ye=r.getUniformBlockIndex(Re,Z.name),de.set(Z,ye))}function et(Z,Re){const de=u.get(Re).get(Z);h.get(Re)!==de&&(r.uniformBlockBinding(Re,de,Z.__bindingPointIndex),h.set(Re,de))}function At(){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),o.setReversed(!1),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),d={},j=null,$={},A={},p=new WeakMap,g=[],_=null,E=!1,m=null,v=null,w=null,x=null,C=null,B=null,T=null,M=new We(0,0,0),D=0,R=!1,S=null,L=null,k=null,Q=null,W=null,ee.set(0,0,r.canvas.width,r.canvas.height),O.set(0,0,r.canvas.width,r.canvas.height),s.reset(),o.reset(),l.reset()}return{buffers:{color:s,depth:o,stencil:l},enable:Ae,disable:pe,bindFramebuffer:De,drawBuffers:Qe,useProgram:wt,setBlending:X,setMaterial:u0,setFlipSided:dt,setCullFace:ft,setLineWidth:qe,setPolygonOffset:It,setScissorTest:je,activeTexture:z,bindTexture:U,unbindTexture:se,compressedTexImage2D:_e,compressedTexImage3D:Ee,texImage2D:ke,texImage3D:ge,updateUBOMapping:nt,uniformBlockBinding:et,texStorage2D:pt,texStorage3D:we,texSubImage2D:ve,texSubImage3D:Ye,compressedTexSubImage2D:Pe,compressedTexSubImage3D:Ge,scissor:Le,viewport:Te,reset:At}}function DS(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 Ve,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 _(z,U){return g?new OffscreenCanvas(z,U):rl("canvas")}function E(z,U,se){let _e=1;const Ee=je(z);if((Ee.width>se||Ee.height>se)&&(_e=se/Math.max(Ee.width,Ee.height)),_e<1)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const ve=Math.floor(_e*Ee.width),Ye=Math.floor(_e*Ee.height);A===void 0&&(A=_(ve,Ye));const Pe=U?_(ve,Ye):A;return Pe.width=ve,Pe.height=Ye,Pe.getContext("2d").drawImage(z,0,0,ve,Ye),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ee.width+"x"+Ee.height+") to ("+ve+"x"+Ye+")."),Pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ee.width+"x"+Ee.height+")."),z;return z}function m(z){return z.generateMipmaps}function v(z){r.generateMipmap(z)}function w(z){return z.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:z.isWebGL3DRenderTarget?r.TEXTURE_3D:z.isWebGLArrayRenderTarget||z.isCompressedArrayTexture?r.TEXTURE_2D_ARRAY:r.TEXTURE_2D}function x(z,U,se,_e,Ee=!1){if(z!==null){if(r[z]!==void 0)return r[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let ve=U;if(U===r.RED&&(se===r.FLOAT&&(ve=r.R32F),se===r.HALF_FLOAT&&(ve=r.R16F),se===r.UNSIGNED_BYTE&&(ve=r.R8)),U===r.RED_INTEGER&&(se===r.UNSIGNED_BYTE&&(ve=r.R8UI),se===r.UNSIGNED_SHORT&&(ve=r.R16UI),se===r.UNSIGNED_INT&&(ve=r.R32UI),se===r.BYTE&&(ve=r.R8I),se===r.SHORT&&(ve=r.R16I),se===r.INT&&(ve=r.R32I)),U===r.RG&&(se===r.FLOAT&&(ve=r.RG32F),se===r.HALF_FLOAT&&(ve=r.RG16F),se===r.UNSIGNED_BYTE&&(ve=r.RG8)),U===r.RG_INTEGER&&(se===r.UNSIGNED_BYTE&&(ve=r.RG8UI),se===r.UNSIGNED_SHORT&&(ve=r.RG16UI),se===r.UNSIGNED_INT&&(ve=r.RG32UI),se===r.BYTE&&(ve=r.RG8I),se===r.SHORT&&(ve=r.RG16I),se===r.INT&&(ve=r.RG32I)),U===r.RGB_INTEGER&&(se===r.UNSIGNED_BYTE&&(ve=r.RGB8UI),se===r.UNSIGNED_SHORT&&(ve=r.RGB16UI),se===r.UNSIGNED_INT&&(ve=r.RGB32UI),se===r.BYTE&&(ve=r.RGB8I),se===r.SHORT&&(ve=r.RGB16I),se===r.INT&&(ve=r.RGB32I)),U===r.RGBA_INTEGER&&(se===r.UNSIGNED_BYTE&&(ve=r.RGBA8UI),se===r.UNSIGNED_SHORT&&(ve=r.RGBA16UI),se===r.UNSIGNED_INT&&(ve=r.RGBA32UI),se===r.BYTE&&(ve=r.RGBA8I),se===r.SHORT&&(ve=r.RGBA16I),se===r.INT&&(ve=r.RGBA32I)),U===r.RGB&&se===r.UNSIGNED_INT_5_9_9_9_REV&&(ve=r.RGB9_E5),U===r.RGBA){const Ye=Ee?n9:Mt.getTransfer(_e);se===r.FLOAT&&(ve=r.RGBA32F),se===r.HALF_FLOAT&&(ve=r.RGBA16F),se===r.UNSIGNED_BYTE&&(ve=Ye===Ft?r.SRGB8_ALPHA8:r.RGBA8),se===r.UNSIGNED_SHORT_4_4_4_4&&(ve=r.RGBA4),se===r.UNSIGNED_SHORT_5_5_5_1&&(ve=r.RGB5_A1)}return(ve===r.R16F||ve===r.R32F||ve===r.RG16F||ve===r.RG32F||ve===r.RGBA16F||ve===r.RGBA32F)&&e.get("EXT_color_buffer_float"),ve}function C(z,U){let se;return z?U===null||U===hn||U===ao?se=r.DEPTH24_STENCIL8:U===Jt?se=r.DEPTH32F_STENCIL8:U===io&&(se=r.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):U===null||U===hn||U===ao?se=r.DEPTH_COMPONENT24:U===Jt?se=r.DEPTH_COMPONENT32F:U===io&&(se=r.DEPTH_COMPONENT16),se}function B(z,U){return m(z)===!0||z.isFramebufferTexture&&z.minFilter!==$t&&z.minFilter!==Gt?Math.log2(Math.max(U.width,U.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?U.mipmaps.length:1}function T(z){const U=z.target;U.removeEventListener("dispose",T),D(U),U.isVideoTexture&&d.delete(U)}function M(z){const U=z.target;U.removeEventListener("dispose",M),S(U)}function D(z){const U=n.get(z);if(U.__webglInit===void 0)return;const se=z.source,_e=p.get(se);if(_e){const Ee=_e[U.__cacheKey];Ee.usedTimes--,Ee.usedTimes===0&&R(z),Object.keys(_e).length===0&&p.delete(se)}n.remove(z)}function R(z){const U=n.get(z);r.deleteTexture(U.__webglTexture);const se=z.source,_e=p.get(se);delete _e[U.__cacheKey],o.memory.textures--}function S(z){const U=n.get(z);if(z.depthTexture&&(z.depthTexture.dispose(),n.remove(z.depthTexture)),z.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(U.__webglFramebuffer[_e]))for(let Ee=0;Ee<U.__webglFramebuffer[_e].length;Ee++)r.deleteFramebuffer(U.__webglFramebuffer[_e][Ee]);else r.deleteFramebuffer(U.__webglFramebuffer[_e]);U.__webglDepthbuffer&&r.deleteRenderbuffer(U.__webglDepthbuffer[_e])}else{if(Array.isArray(U.__webglFramebuffer))for(let _e=0;_e<U.__webglFramebuffer.length;_e++)r.deleteFramebuffer(U.__webglFramebuffer[_e]);else r.deleteFramebuffer(U.__webglFramebuffer);if(U.__webglDepthbuffer&&r.deleteRenderbuffer(U.__webglDepthbuffer),U.__webglMultisampledFramebuffer&&r.deleteFramebuffer(U.__webglMultisampledFramebuffer),U.__webglColorRenderbuffer)for(let _e=0;_e<U.__webglColorRenderbuffer.length;_e++)U.__webglColorRenderbuffer[_e]&&r.deleteRenderbuffer(U.__webglColorRenderbuffer[_e]);U.__webglDepthRenderbuffer&&r.deleteRenderbuffer(U.__webglDepthRenderbuffer)}const se=z.textures;for(let _e=0,Ee=se.length;_e<Ee;_e++){const ve=n.get(se[_e]);ve.__webglTexture&&(r.deleteTexture(ve.__webglTexture),o.memory.textures--),n.remove(se[_e])}n.remove(z)}let L=0;function k(){L=0}function Q(){const z=L;return z>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+i.maxTextures),L+=1,z}function W(z){const U=[];return U.push(z.wrapS),U.push(z.wrapT),U.push(z.wrapR||0),U.push(z.magFilter),U.push(z.minFilter),U.push(z.anisotropy),U.push(z.internalFormat),U.push(z.format),U.push(z.type),U.push(z.generateMipmaps),U.push(z.premultiplyAlpha),U.push(z.flipY),U.push(z.unpackAlignment),U.push(z.colorSpace),U.join()}function J(z,U){const se=n.get(z);if(z.isVideoTexture&&qe(z),z.isRenderTargetTexture===!1&&z.version>0&&se.__version!==z.version){const _e=z.image;if(_e===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(_e.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{O(se,z,U);return}}t.bindTexture(r.TEXTURE_2D,se.__webglTexture,r.TEXTURE0+U)}function q(z,U){const se=n.get(z);if(z.version>0&&se.__version!==z.version){O(se,z,U);return}t.bindTexture(r.TEXTURE_2D_ARRAY,se.__webglTexture,r.TEXTURE0+U)}function re(z,U){const se=n.get(z);if(z.version>0&&se.__version!==z.version){O(se,z,U);return}t.bindTexture(r.TEXTURE_3D,se.__webglTexture,r.TEXTURE0+U)}function H(z,U){const se=n.get(z);if(z.version>0&&se.__version!==z.version){ce(se,z,U);return}t.bindTexture(r.TEXTURE_CUBE_MAP,se.__webglTexture,r.TEXTURE0+U)}const j={[ts]:r.REPEAT,[N0]:r.CLAMP_TO_EDGE,[j2]:r.MIRRORED_REPEAT},$={[$t]:r.NEAREST,[T6]:r.NEAREST_MIPMAP_NEAREST,[j1]:r.NEAREST_MIPMAP_LINEAR,[Gt]:r.LINEAR,[W2]:r.LINEAR_MIPMAP_NEAREST,[jr]:r.LINEAR_MIPMAP_LINEAR},P={[hE]:r.NEVER,[mE]:r.ALWAYS,[dE]:r.LESS,[z6]:r.LEQUAL,[fE]:r.EQUAL,[gE]:r.GEQUAL,[pE]:r.GREATER,[AE]:r.NOTEQUAL};function V(z,U){if(U.type===Jt&&e.has("OES_texture_float_linear")===!1&&(U.magFilter===Gt||U.magFilter===W2||U.magFilter===j1||U.magFilter===jr||U.minFilter===Gt||U.minFilter===W2||U.minFilter===j1||U.minFilter===jr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(z,r.TEXTURE_WRAP_S,j[U.wrapS]),r.texParameteri(z,r.TEXTURE_WRAP_T,j[U.wrapT]),(z===r.TEXTURE_3D||z===r.TEXTURE_2D_ARRAY)&&r.texParameteri(z,r.TEXTURE_WRAP_R,j[U.wrapR]),r.texParameteri(z,r.TEXTURE_MAG_FILTER,$[U.magFilter]),r.texParameteri(z,r.TEXTURE_MIN_FILTER,$[U.minFilter]),U.compareFunction&&(r.texParameteri(z,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(z,r.TEXTURE_COMPARE_FUNC,P[U.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(U.magFilter===$t||U.minFilter!==j1&&U.minFilter!==jr||U.type===Jt&&e.has("OES_texture_float_linear")===!1)return;if(U.anisotropy>1||n.get(U).__currentAnisotropy){const se=e.get("EXT_texture_filter_anisotropic");r.texParameterf(z,se.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(U.anisotropy,i.getMaxAnisotropy())),n.get(U).__currentAnisotropy=U.anisotropy}}}function ee(z,U){let se=!1;z.__webglInit===void 0&&(z.__webglInit=!0,U.addEventListener("dispose",T));const _e=U.source;let Ee=p.get(_e);Ee===void 0&&(Ee={},p.set(_e,Ee));const ve=W(U);if(ve!==z.__cacheKey){Ee[ve]===void 0&&(Ee[ve]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,se=!0),Ee[ve].usedTimes++;const Ye=Ee[z.__cacheKey];Ye!==void 0&&(Ee[z.__cacheKey].usedTimes--,Ye.usedTimes===0&&R(U)),z.__cacheKey=ve,z.__webglTexture=Ee[ve].texture}return se}function O(z,U,se){let _e=r.TEXTURE_2D;(U.isDataArrayTexture||U.isCompressedArrayTexture)&&(_e=r.TEXTURE_2D_ARRAY),U.isData3DTexture&&(_e=r.TEXTURE_3D);const Ee=ee(z,U),ve=U.source;t.bindTexture(_e,z.__webglTexture,r.TEXTURE0+se);const Ye=n.get(ve);if(ve.version!==Ye.__version||Ee===!0){t.activeTexture(r.TEXTURE0+se);const Pe=Mt.getPrimaries(Mt.workingColorSpace),Ge=U.colorSpace===Ei?null:Mt.getPrimaries(U.colorSpace),pt=U.colorSpace===Ei||Pe===Ge?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,U.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,U.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);let we=E(U.image,!1,i.maxTextureSize);we=It(U,we);const ke=s.convert(U.format,U.colorSpace),ge=s.convert(U.type);let Le=x(U.internalFormat,ke,ge,U.colorSpace,U.isVideoTexture);V(_e,U);let Te;const nt=U.mipmaps,et=U.isVideoTexture!==!0,At=Ye.__version===void 0||Ee===!0,Z=ve.dataReady,Re=B(U,we);if(U.isDepthTexture)Le=C(U.format===lo,U.type),At&&(et?t.texStorage2D(r.TEXTURE_2D,1,Le,we.width,we.height):t.texImage2D(r.TEXTURE_2D,0,Le,we.width,we.height,0,ke,ge,null));else if(U.isDataTexture)if(nt.length>0){et&&At&&t.texStorage2D(r.TEXTURE_2D,Re,Le,nt[0].width,nt[0].height);for(let de=0,ye=nt.length;de<ye;de++)Te=nt[de],et?Z&&t.texSubImage2D(r.TEXTURE_2D,de,0,0,Te.width,Te.height,ke,ge,Te.data):t.texImage2D(r.TEXTURE_2D,de,Le,Te.width,Te.height,0,ke,ge,Te.data);U.generateMipmaps=!1}else et?(At&&t.texStorage2D(r.TEXTURE_2D,Re,Le,we.width,we.height),Z&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,we.width,we.height,ke,ge,we.data)):t.texImage2D(r.TEXTURE_2D,0,Le,we.width,we.height,0,ke,ge,we.data);else if(U.isCompressedTexture)if(U.isCompressedArrayTexture){et&&At&&t.texStorage3D(r.TEXTURE_2D_ARRAY,Re,Le,nt[0].width,nt[0].height,we.depth);for(let de=0,ye=nt.length;de<ye;de++)if(Te=nt[de],U.format!==Kt)if(ke!==null)if(et){if(Z)if(U.layerUpdates.size>0){const be=Jd(Te.width,Te.height,U.format,U.type);for(const Ne of U.layerUpdates){const Et=Te.data.subarray(Ne*be/Te.data.BYTES_PER_ELEMENT,(Ne+1)*be/Te.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,de,0,0,Ne,Te.width,Te.height,1,ke,Et)}U.clearLayerUpdates()}else t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,de,0,0,0,Te.width,Te.height,we.depth,ke,Te.data)}else t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,de,Le,Te.width,Te.height,we.depth,0,Te.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else et?Z&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,de,0,0,0,Te.width,Te.height,we.depth,ke,ge,Te.data):t.texImage3D(r.TEXTURE_2D_ARRAY,de,Le,Te.width,Te.height,we.depth,0,ke,ge,Te.data)}else{et&&At&&t.texStorage2D(r.TEXTURE_2D,Re,Le,nt[0].width,nt[0].height);for(let de=0,ye=nt.length;de<ye;de++)Te=nt[de],U.format!==Kt?ke!==null?et?Z&&t.compressedTexSubImage2D(r.TEXTURE_2D,de,0,0,Te.width,Te.height,ke,Te.data):t.compressedTexImage2D(r.TEXTURE_2D,de,Le,Te.width,Te.height,0,Te.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):et?Z&&t.texSubImage2D(r.TEXTURE_2D,de,0,0,Te.width,Te.height,ke,ge,Te.data):t.texImage2D(r.TEXTURE_2D,de,Le,Te.width,Te.height,0,ke,ge,Te.data)}else if(U.isDataArrayTexture)if(et){if(At&&t.texStorage3D(r.TEXTURE_2D_ARRAY,Re,Le,we.width,we.height,we.depth),Z)if(U.layerUpdates.size>0){const de=Jd(we.width,we.height,U.format,U.type);for(const ye of U.layerUpdates){const be=we.data.subarray(ye*de/we.data.BYTES_PER_ELEMENT,(ye+1)*de/we.data.BYTES_PER_ELEMENT);t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,ye,we.width,we.height,1,ke,ge,be)}U.clearLayerUpdates()}else t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,we.width,we.height,we.depth,ke,ge,we.data)}else t.texImage3D(r.TEXTURE_2D_ARRAY,0,Le,we.width,we.height,we.depth,0,ke,ge,we.data);else if(U.isData3DTexture)et?(At&&t.texStorage3D(r.TEXTURE_3D,Re,Le,we.width,we.height,we.depth),Z&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,we.width,we.height,we.depth,ke,ge,we.data)):t.texImage3D(r.TEXTURE_3D,0,Le,we.width,we.height,we.depth,0,ke,ge,we.data);else if(U.isFramebufferTexture){if(At)if(et)t.texStorage2D(r.TEXTURE_2D,Re,Le,we.width,we.height);else{let de=we.width,ye=we.height;for(let be=0;be<Re;be++)t.texImage2D(r.TEXTURE_2D,be,Le,de,ye,0,ke,ge,null),de>>=1,ye>>=1}}else if(nt.length>0){if(et&&At){const de=je(nt[0]);t.texStorage2D(r.TEXTURE_2D,Re,Le,de.width,de.height)}for(let de=0,ye=nt.length;de<ye;de++)Te=nt[de],et?Z&&t.texSubImage2D(r.TEXTURE_2D,de,0,0,ke,ge,Te):t.texImage2D(r.TEXTURE_2D,de,Le,ke,ge,Te);U.generateMipmaps=!1}else if(et){if(At){const de=je(we);t.texStorage2D(r.TEXTURE_2D,Re,Le,de.width,de.height)}Z&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,ke,ge,we)}else t.texImage2D(r.TEXTURE_2D,0,Le,ke,ge,we);m(U)&&v(_e),Ye.__version=ve.version,U.onUpdate&&U.onUpdate(U)}z.__version=U.version}function ce(z,U,se){if(U.image.length!==6)return;const _e=ee(z,U),Ee=U.source;t.bindTexture(r.TEXTURE_CUBE_MAP,z.__webglTexture,r.TEXTURE0+se);const ve=n.get(Ee);if(Ee.version!==ve.__version||_e===!0){t.activeTexture(r.TEXTURE0+se);const Ye=Mt.getPrimaries(Mt.workingColorSpace),Pe=U.colorSpace===Ei?null:Mt.getPrimaries(U.colorSpace),Ge=U.colorSpace===Ei||Ye===Pe?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,U.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,U.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ge);const pt=U.isCompressedTexture||U.image[0].isCompressedTexture,we=U.image[0]&&U.image[0].isDataTexture,ke=[];for(let ye=0;ye<6;ye++)!pt&&!we?ke[ye]=E(U.image[ye],!0,i.maxCubemapSize):ke[ye]=we?U.image[ye].image:U.image[ye],ke[ye]=It(U,ke[ye]);const ge=ke[0],Le=s.convert(U.format,U.colorSpace),Te=s.convert(U.type),nt=x(U.internalFormat,Le,Te,U.colorSpace),et=U.isVideoTexture!==!0,At=ve.__version===void 0||_e===!0,Z=Ee.dataReady;let Re=B(U,ge);V(r.TEXTURE_CUBE_MAP,U);let de;if(pt){et&&At&&t.texStorage2D(r.TEXTURE_CUBE_MAP,Re,nt,ge.width,ge.height);for(let ye=0;ye<6;ye++){de=ke[ye].mipmaps;for(let be=0;be<de.length;be++){const Ne=de[be];U.format!==Kt?Le!==null?et?Z&&t.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be,0,0,Ne.width,Ne.height,Le,Ne.data):t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be,nt,Ne.width,Ne.height,0,Ne.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be,0,0,Ne.width,Ne.height,Le,Te,Ne.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be,nt,Ne.width,Ne.height,0,Le,Te,Ne.data)}}}else{if(de=U.mipmaps,et&&At){de.length>0&&Re++;const ye=je(ke[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,Re,nt,ye.width,ye.height)}for(let ye=0;ye<6;ye++)if(we){et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,0,0,0,ke[ye].width,ke[ye].height,Le,Te,ke[ye].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,0,nt,ke[ye].width,ke[ye].height,0,Le,Te,ke[ye].data);for(let be=0;be<de.length;be++){const Ne=de[be].image[ye].image;et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be+1,0,0,Ne.width,Ne.height,Le,Te,Ne.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be+1,nt,Ne.width,Ne.height,0,Le,Te,Ne.data)}}else{et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,0,0,0,Le,Te,ke[ye]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,0,nt,Le,Te,ke[ye]);for(let be=0;be<de.length;be++){const Ne=de[be];et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be+1,0,0,Le,Te,Ne.image[ye]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ye,be+1,nt,Le,Te,Ne.image[ye])}}}m(U)&&v(r.TEXTURE_CUBE_MAP),ve.__version=Ee.version,U.onUpdate&&U.onUpdate(U)}z.__version=U.version}function fe(z,U,se,_e,Ee,ve){const Ye=s.convert(se.format,se.colorSpace),Pe=s.convert(se.type),Ge=x(se.internalFormat,Ye,Pe,se.colorSpace),pt=n.get(U),we=n.get(se);if(we.__renderTarget=U,!pt.__hasExternalTextures){const ke=Math.max(1,U.width>>ve),ge=Math.max(1,U.height>>ve);Ee===r.TEXTURE_3D||Ee===r.TEXTURE_2D_ARRAY?t.texImage3D(Ee,ve,Ge,ke,ge,U.depth,0,Ye,Pe,null):t.texImage2D(Ee,ve,Ge,ke,ge,0,Ye,Pe,null)}t.bindFramebuffer(r.FRAMEBUFFER,z),ft(U)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,_e,Ee,we.__webglTexture,0,dt(U)):(Ee===r.TEXTURE_2D||Ee>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&Ee<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,_e,Ee,we.__webglTexture,ve),t.bindFramebuffer(r.FRAMEBUFFER,null)}function Ae(z,U,se){if(r.bindRenderbuffer(r.RENDERBUFFER,z),U.depthBuffer){const _e=U.depthTexture,Ee=_e&&_e.isDepthTexture?_e.type:null,ve=C(U.stencilBuffer,Ee),Ye=U.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Pe=dt(U);ft(U)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Pe,ve,U.width,U.height):se?r.renderbufferStorageMultisample(r.RENDERBUFFER,Pe,ve,U.width,U.height):r.renderbufferStorage(r.RENDERBUFFER,ve,U.width,U.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,Ye,r.RENDERBUFFER,z)}else{const _e=U.textures;for(let Ee=0;Ee<_e.length;Ee++){const ve=_e[Ee],Ye=s.convert(ve.format,ve.colorSpace),Pe=s.convert(ve.type),Ge=x(ve.internalFormat,Ye,Pe,ve.colorSpace),pt=dt(U);se&&ft(U)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,pt,Ge,U.width,U.height):ft(U)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,pt,Ge,U.width,U.height):r.renderbufferStorage(r.RENDERBUFFER,Ge,U.width,U.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function pe(z,U){if(U&&U.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(r.FRAMEBUFFER,z),!(U.depthTexture&&U.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const se=n.get(U.depthTexture);se.__renderTarget=U,(!se.__webglTexture||U.depthTexture.image.width!==U.width||U.depthTexture.image.height!==U.height)&&(U.depthTexture.image.width=U.width,U.depthTexture.image.height=U.height,U.depthTexture.needsUpdate=!0),J(U.depthTexture,0);const _e=se.__webglTexture,Ee=dt(U);if(U.depthTexture.format===oo)ft(U)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,_e,0,Ee):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,_e,0);else if(U.depthTexture.format===lo)ft(U)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,_e,0,Ee):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,_e,0);else throw new Error("Unknown depthTexture format")}function De(z){const U=n.get(z),se=z.isWebGLCubeRenderTarget===!0;if(U.__boundDepthTexture!==z.depthTexture){const _e=z.depthTexture;if(U.__depthDisposeCallback&&U.__depthDisposeCallback(),_e){const Ee=()=>{delete U.__boundDepthTexture,delete U.__depthDisposeCallback,_e.removeEventListener("dispose",Ee)};_e.addEventListener("dispose",Ee),U.__depthDisposeCallback=Ee}U.__boundDepthTexture=_e}if(z.depthTexture&&!U.__autoAllocateDepthBuffer){if(se)throw new Error("target.depthTexture not supported in Cube render targets");pe(U.__webglFramebuffer,z)}else if(se){U.__webglDepthbuffer=[];for(let _e=0;_e<6;_e++)if(t.bindFramebuffer(r.FRAMEBUFFER,U.__webglFramebuffer[_e]),U.__webglDepthbuffer[_e]===void 0)U.__webglDepthbuffer[_e]=r.createRenderbuffer(),Ae(U.__webglDepthbuffer[_e],z,!1);else{const Ee=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,ve=U.__webglDepthbuffer[_e];r.bindRenderbuffer(r.RENDERBUFFER,ve),r.framebufferRenderbuffer(r.FRAMEBUFFER,Ee,r.RENDERBUFFER,ve)}}else if(t.bindFramebuffer(r.FRAMEBUFFER,U.__webglFramebuffer),U.__webglDepthbuffer===void 0)U.__webglDepthbuffer=r.createRenderbuffer(),Ae(U.__webglDepthbuffer,z,!1);else{const _e=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ee=U.__webglDepthbuffer;r.bindRenderbuffer(r.RENDERBUFFER,Ee),r.framebufferRenderbuffer(r.FRAMEBUFFER,_e,r.RENDERBUFFER,Ee)}t.bindFramebuffer(r.FRAMEBUFFER,null)}function Qe(z,U,se){const _e=n.get(z);U!==void 0&&fe(_e.__webglFramebuffer,z,z.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),se!==void 0&&De(z)}function wt(z){const U=z.texture,se=n.get(z),_e=n.get(U);z.addEventListener("dispose",M);const Ee=z.textures,ve=z.isWebGLCubeRenderTarget===!0,Ye=Ee.length>1;if(Ye||(_e.__webglTexture===void 0&&(_e.__webglTexture=r.createTexture()),_e.__version=U.version,o.memory.textures++),ve){se.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(U.mipmaps&&U.mipmaps.length>0){se.__webglFramebuffer[Pe]=[];for(let Ge=0;Ge<U.mipmaps.length;Ge++)se.__webglFramebuffer[Pe][Ge]=r.createFramebuffer()}else se.__webglFramebuffer[Pe]=r.createFramebuffer()}else{if(U.mipmaps&&U.mipmaps.length>0){se.__webglFramebuffer=[];for(let Pe=0;Pe<U.mipmaps.length;Pe++)se.__webglFramebuffer[Pe]=r.createFramebuffer()}else se.__webglFramebuffer=r.createFramebuffer();if(Ye)for(let Pe=0,Ge=Ee.length;Pe<Ge;Pe++){const pt=n.get(Ee[Pe]);pt.__webglTexture===void 0&&(pt.__webglTexture=r.createTexture(),o.memory.textures++)}if(z.samples>0&&ft(z)===!1){se.__webglMultisampledFramebuffer=r.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Pe=0;Pe<Ee.length;Pe++){const Ge=Ee[Pe];se.__webglColorRenderbuffer[Pe]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,se.__webglColorRenderbuffer[Pe]);const pt=s.convert(Ge.format,Ge.colorSpace),we=s.convert(Ge.type),ke=x(Ge.internalFormat,pt,we,Ge.colorSpace,z.isXRRenderTarget===!0),ge=dt(z);r.renderbufferStorageMultisample(r.RENDERBUFFER,ge,ke,z.width,z.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Pe,r.RENDERBUFFER,se.__webglColorRenderbuffer[Pe])}r.bindRenderbuffer(r.RENDERBUFFER,null),z.depthBuffer&&(se.__webglDepthRenderbuffer=r.createRenderbuffer(),Ae(se.__webglDepthRenderbuffer,z,!0)),t.bindFramebuffer(r.FRAMEBUFFER,null)}}if(ve){t.bindTexture(r.TEXTURE_CUBE_MAP,_e.__webglTexture),V(r.TEXTURE_CUBE_MAP,U);for(let Pe=0;Pe<6;Pe++)if(U.mipmaps&&U.mipmaps.length>0)for(let Ge=0;Ge<U.mipmaps.length;Ge++)fe(se.__webglFramebuffer[Pe][Ge],z,U,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,Ge);else fe(se.__webglFramebuffer[Pe],z,U,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0);m(U)&&v(r.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ye){for(let Pe=0,Ge=Ee.length;Pe<Ge;Pe++){const pt=Ee[Pe],we=n.get(pt);t.bindTexture(r.TEXTURE_2D,we.__webglTexture),V(r.TEXTURE_2D,pt),fe(se.__webglFramebuffer,z,pt,r.COLOR_ATTACHMENT0+Pe,r.TEXTURE_2D,0),m(pt)&&v(r.TEXTURE_2D)}t.unbindTexture()}else{let Pe=r.TEXTURE_2D;if((z.isWebGL3DRenderTarget||z.isWebGLArrayRenderTarget)&&(Pe=z.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),t.bindTexture(Pe,_e.__webglTexture),V(Pe,U),U.mipmaps&&U.mipmaps.length>0)for(let Ge=0;Ge<U.mipmaps.length;Ge++)fe(se.__webglFramebuffer[Ge],z,U,r.COLOR_ATTACHMENT0,Pe,Ge);else fe(se.__webglFramebuffer,z,U,r.COLOR_ATTACHMENT0,Pe,0);m(U)&&v(Pe),t.unbindTexture()}z.depthBuffer&&De(z)}function ut(z){const U=z.textures;for(let se=0,_e=U.length;se<_e;se++){const Ee=U[se];if(m(Ee)){const ve=w(z),Ye=n.get(Ee).__webglTexture;t.bindTexture(ve,Ye),v(ve),t.unbindTexture()}}}const ht=[],X=[];function u0(z){if(z.samples>0){if(ft(z)===!1){const U=z.textures,se=z.width,_e=z.height;let Ee=r.COLOR_BUFFER_BIT;const ve=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ye=n.get(z),Pe=U.length>1;if(Pe)for(let Ge=0;Ge<U.length;Ge++)t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.RENDERBUFFER,null),t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.TEXTURE_2D,null,0);t.bindFramebuffer(r.READ_FRAMEBUFFER,Ye.__webglMultisampledFramebuffer),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ye.__webglFramebuffer);for(let Ge=0;Ge<U.length;Ge++){if(z.resolveDepthBuffer&&(z.depthBuffer&&(Ee|=r.DEPTH_BUFFER_BIT),z.stencilBuffer&&z.resolveStencilBuffer&&(Ee|=r.STENCIL_BUFFER_BIT)),Pe){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,Ye.__webglColorRenderbuffer[Ge]);const pt=n.get(U[Ge]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,pt,0)}r.blitFramebuffer(0,0,se,_e,0,0,se,_e,Ee,r.NEAREST),h===!0&&(ht.length=0,X.length=0,ht.push(r.COLOR_ATTACHMENT0+Ge),z.depthBuffer&&z.resolveDepthBuffer===!1&&(ht.push(ve),X.push(ve),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,X)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,ht))}if(t.bindFramebuffer(r.READ_FRAMEBUFFER,null),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),Pe)for(let Ge=0;Ge<U.length;Ge++){t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.RENDERBUFFER,Ye.__webglColorRenderbuffer[Ge]);const pt=n.get(U[Ge]).__webglTexture;t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.TEXTURE_2D,pt,0)}t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ye.__webglMultisampledFramebuffer)}else if(z.depthBuffer&&z.resolveDepthBuffer===!1&&h){const U=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[U])}}}function dt(z){return Math.min(i.maxSamples,z.samples)}function ft(z){const U=n.get(z);return z.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&U.__useRenderToTexture!==!1}function qe(z){const U=o.render.frame;d.get(z)!==U&&(d.set(z,U),z.update())}function It(z,U){const se=z.colorSpace,_e=z.format,Ee=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||se!==H0&&se!==Ei&&(Mt.getTransfer(se)===Ft?(_e!==Kt||Ee!==x0)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),U}function je(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(u.width=z.naturalWidth||z.width,u.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(u.width=z.displayWidth,u.height=z.displayHeight):(u.width=z.width,u.height=z.height),u}this.allocateTextureUnit=Q,this.resetTextureUnits=k,this.setTexture2D=J,this.setTexture2DArray=q,this.setTexture3D=re,this.setTextureCube=H,this.rebindTextures=Qe,this.setupRenderTarget=wt,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=u0,this.setupDepthRenderbuffer=De,this.setupFrameBufferTexture=fe,this.useMultisampledRTT=ft}function LS(r,e){function t(n,i=Ei){let s;const o=Mt.getTransfer(i);if(n===x0)return r.UNSIGNED_BYTE;if(n===n3)return r.UNSIGNED_SHORT_4_4_4_4;if(n===i3)return r.UNSIGNED_SHORT_5_5_5_1;if(n===B6)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===Y2)return r.BYTE;if(n===r3)return r.SHORT;if(n===io)return r.UNSIGNED_SHORT;if(n===so)return r.INT;if(n===hn)return r.UNSIGNED_INT;if(n===Jt)return r.FLOAT;if(n===f0)return r.HALF_FLOAT;if(n===b6)return r.ALPHA;if(n===R6)return r.RGB;if(n===Kt)return r.RGBA;if(n===D6)return r.LUMINANCE;if(n===L6)return r.LUMINANCE_ALPHA;if(n===oo)return r.DEPTH_COMPONENT;if(n===lo)return r.DEPTH_STENCIL;if(n===yi)return r.RED;if(n===q2)return r.RED_INTEGER;if(n===rs)return r.RG;if(n===W1)return r.RG_INTEGER;if(n===co)return r.RGBA_INTEGER;if(n===X2||n===Y1||n===J2||n===q1)if(o===Ft)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===X2)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Y1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===J2)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===q1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===X2)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Y1)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===J2)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===q1)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===K2||n===s3||n===Z2||n===a3)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===K2)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===s3)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Z2)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===a3)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===$2||n===e9||n===t9)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===$2||n===e9)return o===Ft?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===t9)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===X1||n===o3||n===l3||n===c3||n===J1||n===u3||n===h3||n===d3||n===f3||n===p3||n===A3||n===g3||n===m3||n===v3)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===X1)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===o3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===l3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===c3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===J1)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===u3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===h3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===d3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===f3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===p3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===A3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===g3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===m3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===v3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===K1||n===_3||n===r9)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===K1)return o===Ft?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===_3)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===r9)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===N6||n===y3||n===E3||n===x3)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===K1)return s.COMPRESSED_RED_RGTC1_EXT;if(n===y3)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===E3)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===x3)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===ao?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}const NS=`
|
|
3821
|
+
}`;function BS(r,e,t){let n=new e4;const i=new Ve,s=new Ve,o=new Ut,l=new Pd({depthPacking:cE}),h=new Cx,u={},d=t.maxTextureSize,A={[Rn]:G0,[G0]:Rn,[un]:un},p=new T0({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ve},radius:{value:4}},vertexShader:SS,fragmentShader:TS}),g=p.clone();g.defines.HORIZONTAL_PASS=1;const _=new pn;_.setAttribute("position",new M0(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new S0(_,p),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v6;let v=this.type;this.render=function(T,M,D){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||T.length===0)return;const R=r.getRenderTarget(),S=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),k=r.state;k.setBlending(_i),k.buffers.color.setClear(1,1,1,1),k.buffers.depth.setTest(!0),k.setScissorTest(!1);const Q=v!==vi&&this.type===vi,W=v===vi&&this.type!==vi;for(let J=0,q=T.length;J<q;J++){const re=T[J],H=re.shadow;if(H===void 0){console.warn("THREE.WebGLShadowMap:",re,"has no shadow.");continue}if(H.autoUpdate===!1&&H.needsUpdate===!1)continue;i.copy(H.mapSize);const j=H.getFrameExtents();if(i.multiply(j),s.copy(H.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/j.x),i.x=s.x*j.x,H.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/j.y),i.y=s.y*j.y,H.mapSize.y=s.y)),H.map===null||Q===!0||W===!0){const P=this.type!==vi?{minFilter:$t,magFilter:$t}:{};H.map!==null&&H.map.dispose(),H.map=new Br(i.x,i.y,P),H.map.texture.name=re.name+".shadowMap",H.camera.updateProjectionMatrix()}r.setRenderTarget(H.map),r.clear();const $=H.getViewportCount();for(let P=0;P<$;P++){const V=H.getViewport(P);o.set(s.x*V.x,s.y*V.y,s.x*V.z,s.y*V.w),k.viewport(o),H.updateMatrices(re,P),n=H.getFrustum(),C(M,D,H.camera,re,this.type)}H.isPointLightShadow!==!0&&this.type===vi&&w(H,D),H.needsUpdate=!1}v=this.type,m.needsUpdate=!1,r.setRenderTarget(R,S,L)};function w(T,M){const D=e.update(E);p.defines.VSM_SAMPLES!==T.blurSamples&&(p.defines.VSM_SAMPLES=T.blurSamples,g.defines.VSM_SAMPLES=T.blurSamples,p.needsUpdate=!0,g.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Br(i.x,i.y)),p.uniforms.shadow_pass.value=T.map.texture,p.uniforms.resolution.value=T.mapSize,p.uniforms.radius.value=T.radius,r.setRenderTarget(T.mapPass),r.clear(),r.renderBufferDirect(M,null,D,p,E,null),g.uniforms.shadow_pass.value=T.mapPass.texture,g.uniforms.resolution.value=T.mapSize,g.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(M,null,D,g,E,null)}function x(T,M,D,R){let S=null;const L=D.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(L!==void 0)S=L;else if(S=D.isPointLight===!0?h:l,r.localClippingEnabled&&M.clipShadows===!0&&Array.isArray(M.clippingPlanes)&&M.clippingPlanes.length!==0||M.displacementMap&&M.displacementScale!==0||M.alphaMap&&M.alphaTest>0||M.map&&M.alphaTest>0){const k=S.uuid,Q=M.uuid;let W=u[k];W===void 0&&(W={},u[k]=W);let J=W[Q];J===void 0&&(J=S.clone(),W[Q]=J,M.addEventListener("dispose",B)),S=J}if(S.visible=M.visible,S.wireframe=M.wireframe,R===vi?S.side=M.shadowSide!==null?M.shadowSide:M.side:S.side=M.shadowSide!==null?M.shadowSide:A[M.side],S.alphaMap=M.alphaMap,S.alphaTest=M.alphaTest,S.map=M.map,S.clipShadows=M.clipShadows,S.clippingPlanes=M.clippingPlanes,S.clipIntersection=M.clipIntersection,S.displacementMap=M.displacementMap,S.displacementScale=M.displacementScale,S.displacementBias=M.displacementBias,S.wireframeLinewidth=M.wireframeLinewidth,S.linewidth=M.linewidth,D.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const k=r.properties.get(S);k.light=D}return S}function C(T,M,D,R,S){if(T.visible===!1)return;if(T.layers.test(M.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&S===vi)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,T.matrixWorld);const k=e.update(T),Q=T.material;if(Array.isArray(Q)){const W=k.groups;for(let J=0,q=W.length;J<q;J++){const re=W[J],H=Q[re.materialIndex];if(H&&H.visible){const j=x(T,H,R,S);T.onBeforeShadow(r,T,M,D,k,j,re),r.renderBufferDirect(D,null,k,j,T,re),T.onAfterShadow(r,T,M,D,k,j,re)}}}else if(Q.visible){const W=x(T,Q,R,S);T.onBeforeShadow(r,T,M,D,k,W,null),r.renderBufferDirect(D,null,k,W,T,null),T.onAfterShadow(r,T,M,D,k,W,null)}}const L=T.children;for(let k=0,Q=L.length;k<Q;k++)C(L[k],M,D,R,S)}function B(T){T.target.removeEventListener("dispose",B);for(const M in u){const D=u[M],R=T.target.uuid;R in D&&(D[R].dispose(),delete D[R])}}}const bS={[Yu]:qu,[Xu]:Zu,[Ju]:$u,[to]:Ku,[qu]:Yu,[Zu]:Xu,[$u]:Ju,[Ku]:to};function RS(r,e){function t(){let Z=!1;const Le=new Ut;let ue=null;const ve=new Ut(0,0,0,0);return{setMask:function(be){ue!==be&&!Z&&(r.colorMask(be,be,be,be),ue=be)},setLocked:function(be){Z=be},setClear:function(be,Ne,Et,jt,_0){_0===!0&&(be*=jt,Ne*=jt,Et*=jt),Le.set(be,Ne,Et,jt),ve.equals(Le)===!1&&(r.clearColor(be,Ne,Et,jt),ve.copy(Le))},reset:function(){Z=!1,ue=null,ve.set(-1,0,0,0)}}}function n(){let Z=!1,Le=!1,ue=null,ve=null,be=null;return{setReversed:function(Ne){if(Le!==Ne){const Et=e.get("EXT_clip_control");Le?Et.clipControlEXT(Et.LOWER_LEFT_EXT,Et.ZERO_TO_ONE_EXT):Et.clipControlEXT(Et.LOWER_LEFT_EXT,Et.NEGATIVE_ONE_TO_ONE_EXT);const jt=be;be=null,this.setClear(jt)}Le=Ne},getReversed:function(){return Le},setTest:function(Ne){Ne?Ae(r.DEPTH_TEST):pe(r.DEPTH_TEST)},setMask:function(Ne){ue!==Ne&&!Z&&(r.depthMask(Ne),ue=Ne)},setFunc:function(Ne){if(Le&&(Ne=bS[Ne]),ve!==Ne){switch(Ne){case Yu:r.depthFunc(r.NEVER);break;case qu:r.depthFunc(r.ALWAYS);break;case Xu:r.depthFunc(r.LESS);break;case to:r.depthFunc(r.LEQUAL);break;case Ju:r.depthFunc(r.EQUAL);break;case Ku:r.depthFunc(r.GEQUAL);break;case Zu:r.depthFunc(r.GREATER);break;case $u:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}ve=Ne}},setLocked:function(Ne){Z=Ne},setClear:function(Ne){be!==Ne&&(Le&&(Ne=1-Ne),r.clearDepth(Ne),be=Ne)},reset:function(){Z=!1,ue=null,ve=null,be=null,Le=!1}}}function i(){let Z=!1,Le=null,ue=null,ve=null,be=null,Ne=null,Et=null,jt=null,_0=null;return{setTest:function(bt){Z||(bt?Ae(r.STENCIL_TEST):pe(r.STENCIL_TEST))},setMask:function(bt){Le!==bt&&!Z&&(r.stencilMask(bt),Le=bt)},setFunc:function(bt,rr,nr){(ue!==bt||ve!==rr||be!==nr)&&(r.stencilFunc(bt,rr,nr),ue=bt,ve=rr,be=nr)},setOp:function(bt,rr,nr){(Ne!==bt||Et!==rr||jt!==nr)&&(r.stencilOp(bt,rr,nr),Ne=bt,Et=rr,jt=nr)},setLocked:function(bt){Z=bt},setClear:function(bt){_0!==bt&&(r.clearStencil(bt),_0=bt)},reset:function(){Z=!1,Le=null,ue=null,ve=null,be=null,Ne=null,Et=null,jt=null,_0=null}}}const s=new t,o=new n,l=new i,h=new WeakMap,u=new WeakMap;let d={},A={},p=new WeakMap,g=[],_=null,E=!1,m=null,v=null,w=null,x=null,C=null,B=null,T=null,M=new We(0,0,0),D=0,R=!1,S=null,L=null,k=null,Q=null,W=null;const J=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let q=!1,re=0;const H=r.getParameter(r.VERSION);H.indexOf("WebGL")!==-1?(re=parseFloat(/^WebGL (\d)/.exec(H)[1]),q=re>=1):H.indexOf("OpenGL ES")!==-1&&(re=parseFloat(/^OpenGL ES (\d)/.exec(H)[1]),q=re>=2);let j=null,$={};const P=r.getParameter(r.SCISSOR_BOX),V=r.getParameter(r.VIEWPORT),ee=new Ut().fromArray(P),O=new Ut().fromArray(V);function ce(Z,Le,ue,ve){const be=new Uint8Array(4),Ne=r.createTexture();r.bindTexture(Z,Ne),r.texParameteri(Z,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(Z,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let Et=0;Et<ue;Et++)Z===r.TEXTURE_3D||Z===r.TEXTURE_2D_ARRAY?r.texImage3D(Le,0,r.RGBA,1,1,ve,0,r.RGBA,r.UNSIGNED_BYTE,be):r.texImage2D(Le+Et,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,be);return Ne}const fe={};fe[r.TEXTURE_2D]=ce(r.TEXTURE_2D,r.TEXTURE_2D,1),fe[r.TEXTURE_CUBE_MAP]=ce(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),fe[r.TEXTURE_2D_ARRAY]=ce(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),fe[r.TEXTURE_3D]=ce(r.TEXTURE_3D,r.TEXTURE_3D,1,1),s.setClear(0,0,0,1),o.setClear(1),l.setClear(0),Ae(r.DEPTH_TEST),o.setFunc(to),dt(!1),ft(m6),Ae(r.CULL_FACE),X(_i);function Ae(Z){d[Z]!==!0&&(r.enable(Z),d[Z]=!0)}function pe(Z){d[Z]!==!1&&(r.disable(Z),d[Z]=!1)}function Re(Z,Le){return A[Z]!==Le?(r.bindFramebuffer(Z,Le),A[Z]=Le,Z===r.DRAW_FRAMEBUFFER&&(A[r.FRAMEBUFFER]=Le),Z===r.FRAMEBUFFER&&(A[r.DRAW_FRAMEBUFFER]=Le),!0):!1}function ke(Z,Le){let ue=g,ve=!1;if(Z){ue=p.get(Le),ue===void 0&&(ue=[],p.set(Le,ue));const be=Z.textures;if(ue.length!==be.length||ue[0]!==r.COLOR_ATTACHMENT0){for(let Ne=0,Et=be.length;Ne<Et;Ne++)ue[Ne]=r.COLOR_ATTACHMENT0+Ne;ue.length=be.length,ve=!0}}else ue[0]!==r.BACK&&(ue[0]=r.BACK,ve=!0);ve&&r.drawBuffers(ue)}function wt(Z){return _!==Z?(r.useProgram(Z),_=Z,!0):!1}const ut={[ea]:r.FUNC_ADD,[Fy]:r.FUNC_SUBTRACT,[Oy]:r.FUNC_REVERSE_SUBTRACT};ut[zy]=r.MIN,ut[Gy]=r.MAX;const ht={[Hy]:r.ZERO,[Vy]:r.ONE,[jy]:r.SRC_COLOR,[ju]:r.SRC_ALPHA,[Ky]:r.SRC_ALPHA_SATURATE,[Xy]:r.DST_COLOR,[Yy]:r.DST_ALPHA,[Wy]:r.ONE_MINUS_SRC_COLOR,[Wu]:r.ONE_MINUS_SRC_ALPHA,[Jy]:r.ONE_MINUS_DST_COLOR,[qy]:r.ONE_MINUS_DST_ALPHA,[Zy]:r.CONSTANT_COLOR,[$y]:r.ONE_MINUS_CONSTANT_COLOR,[eE]:r.CONSTANT_ALPHA,[tE]:r.ONE_MINUS_CONSTANT_ALPHA};function X(Z,Le,ue,ve,be,Ne,Et,jt,_0,bt){if(Z===_i){E===!0&&(pe(r.BLEND),E=!1);return}if(E===!1&&(Ae(r.BLEND),E=!0),Z!==Qy){if(Z!==m||bt!==R){if((v!==ea||C!==ea)&&(r.blendEquation(r.FUNC_ADD),v=ea,C=ea),bt)switch(Z){case eo:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Hu:r.blendFunc(r.ONE,r.ONE);break;case _6:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Vu:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Z);break}else switch(Z){case eo:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Hu:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case _6:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Vu:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Z);break}w=null,x=null,B=null,T=null,M.set(0,0,0),D=0,m=Z,R=bt}return}be=be||Le,Ne=Ne||ue,Et=Et||ve,(Le!==v||be!==C)&&(r.blendEquationSeparate(ut[Le],ut[be]),v=Le,C=be),(ue!==w||ve!==x||Ne!==B||Et!==T)&&(r.blendFuncSeparate(ht[ue],ht[ve],ht[Ne],ht[Et]),w=ue,x=ve,B=Ne,T=Et),(jt.equals(M)===!1||_0!==D)&&(r.blendColor(jt.r,jt.g,jt.b,_0),M.copy(jt),D=_0),m=Z,R=!1}function u0(Z,Le){Z.side===un?pe(r.CULL_FACE):Ae(r.CULL_FACE);let ue=Z.side===G0;Le&&(ue=!ue),dt(ue),Z.blending===eo&&Z.transparent===!1?X(_i):X(Z.blending,Z.blendEquation,Z.blendSrc,Z.blendDst,Z.blendEquationAlpha,Z.blendSrcAlpha,Z.blendDstAlpha,Z.blendColor,Z.blendAlpha,Z.premultipliedAlpha),o.setFunc(Z.depthFunc),o.setTest(Z.depthTest),o.setMask(Z.depthWrite),s.setMask(Z.colorWrite);const ve=Z.stencilWrite;l.setTest(ve),ve&&(l.setMask(Z.stencilWriteMask),l.setFunc(Z.stencilFunc,Z.stencilRef,Z.stencilFuncMask),l.setOp(Z.stencilFail,Z.stencilZFail,Z.stencilZPass)),It(Z.polygonOffset,Z.polygonOffsetFactor,Z.polygonOffsetUnits),Z.alphaToCoverage===!0?Ae(r.SAMPLE_ALPHA_TO_COVERAGE):pe(r.SAMPLE_ALPHA_TO_COVERAGE)}function dt(Z){S!==Z&&(Z?r.frontFace(r.CW):r.frontFace(r.CCW),S=Z)}function ft(Z){Z!==Py?(Ae(r.CULL_FACE),Z!==L&&(Z===m6?r.cullFace(r.BACK):Z===Uy?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):pe(r.CULL_FACE),L=Z}function qe(Z){Z!==k&&(q&&r.lineWidth(Z),k=Z)}function It(Z,Le,ue){Z?(Ae(r.POLYGON_OFFSET_FILL),(Q!==Le||W!==ue)&&(r.polygonOffset(Le,ue),Q=Le,W=ue)):pe(r.POLYGON_OFFSET_FILL)}function je(Z){Z?Ae(r.SCISSOR_TEST):pe(r.SCISSOR_TEST)}function z(Z){Z===void 0&&(Z=r.TEXTURE0+J-1),j!==Z&&(r.activeTexture(Z),j=Z)}function U(Z,Le,ue){ue===void 0&&(j===null?ue=r.TEXTURE0+J-1:ue=j);let ve=$[ue];ve===void 0&&(ve={type:void 0,texture:void 0},$[ue]=ve),(ve.type!==Z||ve.texture!==Le)&&(j!==ue&&(r.activeTexture(ue),j=ue),r.bindTexture(Z,Le||fe[Z]),ve.type=Z,ve.texture=Le)}function se(){const Z=$[j];Z!==void 0&&Z.type!==void 0&&(r.bindTexture(Z.type,null),Z.type=void 0,Z.texture=void 0)}function ye(){try{r.compressedTexImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Ee(){try{r.compressedTexImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function _e(){try{r.texSubImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Ye(){try{r.texSubImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Pe(){try{r.compressedTexSubImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Ge(){try{r.compressedTexSubImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function pt(){try{r.texStorage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function we(){try{r.texStorage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function Qe(){try{r.texImage2D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function ge(){try{r.texImage3D(...arguments)}catch(Z){console.error("THREE.WebGLState:",Z)}}function De(Z){ee.equals(Z)===!1&&(r.scissor(Z.x,Z.y,Z.z,Z.w),ee.copy(Z))}function Se(Z){O.equals(Z)===!1&&(r.viewport(Z.x,Z.y,Z.z,Z.w),O.copy(Z))}function nt(Z,Le){let ue=u.get(Le);ue===void 0&&(ue=new WeakMap,u.set(Le,ue));let ve=ue.get(Z);ve===void 0&&(ve=r.getUniformBlockIndex(Le,Z.name),ue.set(Z,ve))}function et(Z,Le){const ue=u.get(Le).get(Z);h.get(Le)!==ue&&(r.uniformBlockBinding(Le,ue,Z.__bindingPointIndex),h.set(Le,ue))}function At(){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),o.setReversed(!1),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),d={},j=null,$={},A={},p=new WeakMap,g=[],_=null,E=!1,m=null,v=null,w=null,x=null,C=null,B=null,T=null,M=new We(0,0,0),D=0,R=!1,S=null,L=null,k=null,Q=null,W=null,ee.set(0,0,r.canvas.width,r.canvas.height),O.set(0,0,r.canvas.width,r.canvas.height),s.reset(),o.reset(),l.reset()}return{buffers:{color:s,depth:o,stencil:l},enable:Ae,disable:pe,bindFramebuffer:Re,drawBuffers:ke,useProgram:wt,setBlending:X,setMaterial:u0,setFlipSided:dt,setCullFace:ft,setLineWidth:qe,setPolygonOffset:It,setScissorTest:je,activeTexture:z,bindTexture:U,unbindTexture:se,compressedTexImage2D:ye,compressedTexImage3D:Ee,texImage2D:Qe,texImage3D:ge,updateUBOMapping:nt,uniformBlockBinding:et,texStorage2D:pt,texStorage3D:we,texSubImage2D:_e,texSubImage3D:Ye,compressedTexSubImage2D:Pe,compressedTexSubImage3D:Ge,scissor:De,viewport:Se,reset:At}}function DS(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 Ve,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 _(z,U){return g?new OffscreenCanvas(z,U):rl("canvas")}function E(z,U,se){let ye=1;const Ee=je(z);if((Ee.width>se||Ee.height>se)&&(ye=se/Math.max(Ee.width,Ee.height)),ye<1)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const _e=Math.floor(ye*Ee.width),Ye=Math.floor(ye*Ee.height);A===void 0&&(A=_(_e,Ye));const Pe=U?_(_e,Ye):A;return Pe.width=_e,Pe.height=Ye,Pe.getContext("2d").drawImage(z,0,0,_e,Ye),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ee.width+"x"+Ee.height+") to ("+_e+"x"+Ye+")."),Pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ee.width+"x"+Ee.height+")."),z;return z}function m(z){return z.generateMipmaps}function v(z){r.generateMipmap(z)}function w(z){return z.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:z.isWebGL3DRenderTarget?r.TEXTURE_3D:z.isWebGLArrayRenderTarget||z.isCompressedArrayTexture?r.TEXTURE_2D_ARRAY:r.TEXTURE_2D}function x(z,U,se,ye,Ee=!1){if(z!==null){if(r[z]!==void 0)return r[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let _e=U;if(U===r.RED&&(se===r.FLOAT&&(_e=r.R32F),se===r.HALF_FLOAT&&(_e=r.R16F),se===r.UNSIGNED_BYTE&&(_e=r.R8)),U===r.RED_INTEGER&&(se===r.UNSIGNED_BYTE&&(_e=r.R8UI),se===r.UNSIGNED_SHORT&&(_e=r.R16UI),se===r.UNSIGNED_INT&&(_e=r.R32UI),se===r.BYTE&&(_e=r.R8I),se===r.SHORT&&(_e=r.R16I),se===r.INT&&(_e=r.R32I)),U===r.RG&&(se===r.FLOAT&&(_e=r.RG32F),se===r.HALF_FLOAT&&(_e=r.RG16F),se===r.UNSIGNED_BYTE&&(_e=r.RG8)),U===r.RG_INTEGER&&(se===r.UNSIGNED_BYTE&&(_e=r.RG8UI),se===r.UNSIGNED_SHORT&&(_e=r.RG16UI),se===r.UNSIGNED_INT&&(_e=r.RG32UI),se===r.BYTE&&(_e=r.RG8I),se===r.SHORT&&(_e=r.RG16I),se===r.INT&&(_e=r.RG32I)),U===r.RGB_INTEGER&&(se===r.UNSIGNED_BYTE&&(_e=r.RGB8UI),se===r.UNSIGNED_SHORT&&(_e=r.RGB16UI),se===r.UNSIGNED_INT&&(_e=r.RGB32UI),se===r.BYTE&&(_e=r.RGB8I),se===r.SHORT&&(_e=r.RGB16I),se===r.INT&&(_e=r.RGB32I)),U===r.RGBA_INTEGER&&(se===r.UNSIGNED_BYTE&&(_e=r.RGBA8UI),se===r.UNSIGNED_SHORT&&(_e=r.RGBA16UI),se===r.UNSIGNED_INT&&(_e=r.RGBA32UI),se===r.BYTE&&(_e=r.RGBA8I),se===r.SHORT&&(_e=r.RGBA16I),se===r.INT&&(_e=r.RGBA32I)),U===r.RGB&&se===r.UNSIGNED_INT_5_9_9_9_REV&&(_e=r.RGB9_E5),U===r.RGBA){const Ye=Ee?n9:Mt.getTransfer(ye);se===r.FLOAT&&(_e=r.RGBA32F),se===r.HALF_FLOAT&&(_e=r.RGBA16F),se===r.UNSIGNED_BYTE&&(_e=Ye===Ft?r.SRGB8_ALPHA8:r.RGBA8),se===r.UNSIGNED_SHORT_4_4_4_4&&(_e=r.RGBA4),se===r.UNSIGNED_SHORT_5_5_5_1&&(_e=r.RGB5_A1)}return(_e===r.R16F||_e===r.R32F||_e===r.RG16F||_e===r.RG32F||_e===r.RGBA16F||_e===r.RGBA32F)&&e.get("EXT_color_buffer_float"),_e}function C(z,U){let se;return z?U===null||U===hn||U===ao?se=r.DEPTH24_STENCIL8:U===Jt?se=r.DEPTH32F_STENCIL8:U===io&&(se=r.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):U===null||U===hn||U===ao?se=r.DEPTH_COMPONENT24:U===Jt?se=r.DEPTH_COMPONENT32F:U===io&&(se=r.DEPTH_COMPONENT16),se}function B(z,U){return m(z)===!0||z.isFramebufferTexture&&z.minFilter!==$t&&z.minFilter!==Gt?Math.log2(Math.max(U.width,U.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?U.mipmaps.length:1}function T(z){const U=z.target;U.removeEventListener("dispose",T),D(U),U.isVideoTexture&&d.delete(U)}function M(z){const U=z.target;U.removeEventListener("dispose",M),S(U)}function D(z){const U=n.get(z);if(U.__webglInit===void 0)return;const se=z.source,ye=p.get(se);if(ye){const Ee=ye[U.__cacheKey];Ee.usedTimes--,Ee.usedTimes===0&&R(z),Object.keys(ye).length===0&&p.delete(se)}n.remove(z)}function R(z){const U=n.get(z);r.deleteTexture(U.__webglTexture);const se=z.source,ye=p.get(se);delete ye[U.__cacheKey],o.memory.textures--}function S(z){const U=n.get(z);if(z.depthTexture&&(z.depthTexture.dispose(),n.remove(z.depthTexture)),z.isWebGLCubeRenderTarget)for(let ye=0;ye<6;ye++){if(Array.isArray(U.__webglFramebuffer[ye]))for(let Ee=0;Ee<U.__webglFramebuffer[ye].length;Ee++)r.deleteFramebuffer(U.__webglFramebuffer[ye][Ee]);else r.deleteFramebuffer(U.__webglFramebuffer[ye]);U.__webglDepthbuffer&&r.deleteRenderbuffer(U.__webglDepthbuffer[ye])}else{if(Array.isArray(U.__webglFramebuffer))for(let ye=0;ye<U.__webglFramebuffer.length;ye++)r.deleteFramebuffer(U.__webglFramebuffer[ye]);else r.deleteFramebuffer(U.__webglFramebuffer);if(U.__webglDepthbuffer&&r.deleteRenderbuffer(U.__webglDepthbuffer),U.__webglMultisampledFramebuffer&&r.deleteFramebuffer(U.__webglMultisampledFramebuffer),U.__webglColorRenderbuffer)for(let ye=0;ye<U.__webglColorRenderbuffer.length;ye++)U.__webglColorRenderbuffer[ye]&&r.deleteRenderbuffer(U.__webglColorRenderbuffer[ye]);U.__webglDepthRenderbuffer&&r.deleteRenderbuffer(U.__webglDepthRenderbuffer)}const se=z.textures;for(let ye=0,Ee=se.length;ye<Ee;ye++){const _e=n.get(se[ye]);_e.__webglTexture&&(r.deleteTexture(_e.__webglTexture),o.memory.textures--),n.remove(se[ye])}n.remove(z)}let L=0;function k(){L=0}function Q(){const z=L;return z>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+i.maxTextures),L+=1,z}function W(z){const U=[];return U.push(z.wrapS),U.push(z.wrapT),U.push(z.wrapR||0),U.push(z.magFilter),U.push(z.minFilter),U.push(z.anisotropy),U.push(z.internalFormat),U.push(z.format),U.push(z.type),U.push(z.generateMipmaps),U.push(z.premultiplyAlpha),U.push(z.flipY),U.push(z.unpackAlignment),U.push(z.colorSpace),U.join()}function J(z,U){const se=n.get(z);if(z.isVideoTexture&&qe(z),z.isRenderTargetTexture===!1&&z.version>0&&se.__version!==z.version){const ye=z.image;if(ye===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ye.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{O(se,z,U);return}}t.bindTexture(r.TEXTURE_2D,se.__webglTexture,r.TEXTURE0+U)}function q(z,U){const se=n.get(z);if(z.version>0&&se.__version!==z.version){O(se,z,U);return}t.bindTexture(r.TEXTURE_2D_ARRAY,se.__webglTexture,r.TEXTURE0+U)}function re(z,U){const se=n.get(z);if(z.version>0&&se.__version!==z.version){O(se,z,U);return}t.bindTexture(r.TEXTURE_3D,se.__webglTexture,r.TEXTURE0+U)}function H(z,U){const se=n.get(z);if(z.version>0&&se.__version!==z.version){ce(se,z,U);return}t.bindTexture(r.TEXTURE_CUBE_MAP,se.__webglTexture,r.TEXTURE0+U)}const j={[ts]:r.REPEAT,[N0]:r.CLAMP_TO_EDGE,[j2]:r.MIRRORED_REPEAT},$={[$t]:r.NEAREST,[T6]:r.NEAREST_MIPMAP_NEAREST,[j1]:r.NEAREST_MIPMAP_LINEAR,[Gt]:r.LINEAR,[W2]:r.LINEAR_MIPMAP_NEAREST,[jr]:r.LINEAR_MIPMAP_LINEAR},P={[hE]:r.NEVER,[mE]:r.ALWAYS,[dE]:r.LESS,[z6]:r.LEQUAL,[fE]:r.EQUAL,[gE]:r.GEQUAL,[pE]:r.GREATER,[AE]:r.NOTEQUAL};function V(z,U){if(U.type===Jt&&e.has("OES_texture_float_linear")===!1&&(U.magFilter===Gt||U.magFilter===W2||U.magFilter===j1||U.magFilter===jr||U.minFilter===Gt||U.minFilter===W2||U.minFilter===j1||U.minFilter===jr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(z,r.TEXTURE_WRAP_S,j[U.wrapS]),r.texParameteri(z,r.TEXTURE_WRAP_T,j[U.wrapT]),(z===r.TEXTURE_3D||z===r.TEXTURE_2D_ARRAY)&&r.texParameteri(z,r.TEXTURE_WRAP_R,j[U.wrapR]),r.texParameteri(z,r.TEXTURE_MAG_FILTER,$[U.magFilter]),r.texParameteri(z,r.TEXTURE_MIN_FILTER,$[U.minFilter]),U.compareFunction&&(r.texParameteri(z,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(z,r.TEXTURE_COMPARE_FUNC,P[U.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(U.magFilter===$t||U.minFilter!==j1&&U.minFilter!==jr||U.type===Jt&&e.has("OES_texture_float_linear")===!1)return;if(U.anisotropy>1||n.get(U).__currentAnisotropy){const se=e.get("EXT_texture_filter_anisotropic");r.texParameterf(z,se.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(U.anisotropy,i.getMaxAnisotropy())),n.get(U).__currentAnisotropy=U.anisotropy}}}function ee(z,U){let se=!1;z.__webglInit===void 0&&(z.__webglInit=!0,U.addEventListener("dispose",T));const ye=U.source;let Ee=p.get(ye);Ee===void 0&&(Ee={},p.set(ye,Ee));const _e=W(U);if(_e!==z.__cacheKey){Ee[_e]===void 0&&(Ee[_e]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,se=!0),Ee[_e].usedTimes++;const Ye=Ee[z.__cacheKey];Ye!==void 0&&(Ee[z.__cacheKey].usedTimes--,Ye.usedTimes===0&&R(U)),z.__cacheKey=_e,z.__webglTexture=Ee[_e].texture}return se}function O(z,U,se){let ye=r.TEXTURE_2D;(U.isDataArrayTexture||U.isCompressedArrayTexture)&&(ye=r.TEXTURE_2D_ARRAY),U.isData3DTexture&&(ye=r.TEXTURE_3D);const Ee=ee(z,U),_e=U.source;t.bindTexture(ye,z.__webglTexture,r.TEXTURE0+se);const Ye=n.get(_e);if(_e.version!==Ye.__version||Ee===!0){t.activeTexture(r.TEXTURE0+se);const Pe=Mt.getPrimaries(Mt.workingColorSpace),Ge=U.colorSpace===Ei?null:Mt.getPrimaries(U.colorSpace),pt=U.colorSpace===Ei||Pe===Ge?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,U.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,U.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);let we=E(U.image,!1,i.maxTextureSize);we=It(U,we);const Qe=s.convert(U.format,U.colorSpace),ge=s.convert(U.type);let De=x(U.internalFormat,Qe,ge,U.colorSpace,U.isVideoTexture);V(ye,U);let Se;const nt=U.mipmaps,et=U.isVideoTexture!==!0,At=Ye.__version===void 0||Ee===!0,Z=_e.dataReady,Le=B(U,we);if(U.isDepthTexture)De=C(U.format===lo,U.type),At&&(et?t.texStorage2D(r.TEXTURE_2D,1,De,we.width,we.height):t.texImage2D(r.TEXTURE_2D,0,De,we.width,we.height,0,Qe,ge,null));else if(U.isDataTexture)if(nt.length>0){et&&At&&t.texStorage2D(r.TEXTURE_2D,Le,De,nt[0].width,nt[0].height);for(let ue=0,ve=nt.length;ue<ve;ue++)Se=nt[ue],et?Z&&t.texSubImage2D(r.TEXTURE_2D,ue,0,0,Se.width,Se.height,Qe,ge,Se.data):t.texImage2D(r.TEXTURE_2D,ue,De,Se.width,Se.height,0,Qe,ge,Se.data);U.generateMipmaps=!1}else et?(At&&t.texStorage2D(r.TEXTURE_2D,Le,De,we.width,we.height),Z&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,we.width,we.height,Qe,ge,we.data)):t.texImage2D(r.TEXTURE_2D,0,De,we.width,we.height,0,Qe,ge,we.data);else if(U.isCompressedTexture)if(U.isCompressedArrayTexture){et&&At&&t.texStorage3D(r.TEXTURE_2D_ARRAY,Le,De,nt[0].width,nt[0].height,we.depth);for(let ue=0,ve=nt.length;ue<ve;ue++)if(Se=nt[ue],U.format!==Kt)if(Qe!==null)if(et){if(Z)if(U.layerUpdates.size>0){const be=Jd(Se.width,Se.height,U.format,U.type);for(const Ne of U.layerUpdates){const Et=Se.data.subarray(Ne*be/Se.data.BYTES_PER_ELEMENT,(Ne+1)*be/Se.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,ue,0,0,Ne,Se.width,Se.height,1,Qe,Et)}U.clearLayerUpdates()}else t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,ue,0,0,0,Se.width,Se.height,we.depth,Qe,Se.data)}else t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,ue,De,Se.width,Se.height,we.depth,0,Se.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else et?Z&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,ue,0,0,0,Se.width,Se.height,we.depth,Qe,ge,Se.data):t.texImage3D(r.TEXTURE_2D_ARRAY,ue,De,Se.width,Se.height,we.depth,0,Qe,ge,Se.data)}else{et&&At&&t.texStorage2D(r.TEXTURE_2D,Le,De,nt[0].width,nt[0].height);for(let ue=0,ve=nt.length;ue<ve;ue++)Se=nt[ue],U.format!==Kt?Qe!==null?et?Z&&t.compressedTexSubImage2D(r.TEXTURE_2D,ue,0,0,Se.width,Se.height,Qe,Se.data):t.compressedTexImage2D(r.TEXTURE_2D,ue,De,Se.width,Se.height,0,Se.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):et?Z&&t.texSubImage2D(r.TEXTURE_2D,ue,0,0,Se.width,Se.height,Qe,ge,Se.data):t.texImage2D(r.TEXTURE_2D,ue,De,Se.width,Se.height,0,Qe,ge,Se.data)}else if(U.isDataArrayTexture)if(et){if(At&&t.texStorage3D(r.TEXTURE_2D_ARRAY,Le,De,we.width,we.height,we.depth),Z)if(U.layerUpdates.size>0){const ue=Jd(we.width,we.height,U.format,U.type);for(const ve of U.layerUpdates){const be=we.data.subarray(ve*ue/we.data.BYTES_PER_ELEMENT,(ve+1)*ue/we.data.BYTES_PER_ELEMENT);t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,ve,we.width,we.height,1,Qe,ge,be)}U.clearLayerUpdates()}else t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,we.width,we.height,we.depth,Qe,ge,we.data)}else t.texImage3D(r.TEXTURE_2D_ARRAY,0,De,we.width,we.height,we.depth,0,Qe,ge,we.data);else if(U.isData3DTexture)et?(At&&t.texStorage3D(r.TEXTURE_3D,Le,De,we.width,we.height,we.depth),Z&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,we.width,we.height,we.depth,Qe,ge,we.data)):t.texImage3D(r.TEXTURE_3D,0,De,we.width,we.height,we.depth,0,Qe,ge,we.data);else if(U.isFramebufferTexture){if(At)if(et)t.texStorage2D(r.TEXTURE_2D,Le,De,we.width,we.height);else{let ue=we.width,ve=we.height;for(let be=0;be<Le;be++)t.texImage2D(r.TEXTURE_2D,be,De,ue,ve,0,Qe,ge,null),ue>>=1,ve>>=1}}else if(nt.length>0){if(et&&At){const ue=je(nt[0]);t.texStorage2D(r.TEXTURE_2D,Le,De,ue.width,ue.height)}for(let ue=0,ve=nt.length;ue<ve;ue++)Se=nt[ue],et?Z&&t.texSubImage2D(r.TEXTURE_2D,ue,0,0,Qe,ge,Se):t.texImage2D(r.TEXTURE_2D,ue,De,Qe,ge,Se);U.generateMipmaps=!1}else if(et){if(At){const ue=je(we);t.texStorage2D(r.TEXTURE_2D,Le,De,ue.width,ue.height)}Z&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,Qe,ge,we)}else t.texImage2D(r.TEXTURE_2D,0,De,Qe,ge,we);m(U)&&v(ye),Ye.__version=_e.version,U.onUpdate&&U.onUpdate(U)}z.__version=U.version}function ce(z,U,se){if(U.image.length!==6)return;const ye=ee(z,U),Ee=U.source;t.bindTexture(r.TEXTURE_CUBE_MAP,z.__webglTexture,r.TEXTURE0+se);const _e=n.get(Ee);if(Ee.version!==_e.__version||ye===!0){t.activeTexture(r.TEXTURE0+se);const Ye=Mt.getPrimaries(Mt.workingColorSpace),Pe=U.colorSpace===Ei?null:Mt.getPrimaries(U.colorSpace),Ge=U.colorSpace===Ei||Ye===Pe?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,U.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,U.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ge);const pt=U.isCompressedTexture||U.image[0].isCompressedTexture,we=U.image[0]&&U.image[0].isDataTexture,Qe=[];for(let ve=0;ve<6;ve++)!pt&&!we?Qe[ve]=E(U.image[ve],!0,i.maxCubemapSize):Qe[ve]=we?U.image[ve].image:U.image[ve],Qe[ve]=It(U,Qe[ve]);const ge=Qe[0],De=s.convert(U.format,U.colorSpace),Se=s.convert(U.type),nt=x(U.internalFormat,De,Se,U.colorSpace),et=U.isVideoTexture!==!0,At=_e.__version===void 0||ye===!0,Z=Ee.dataReady;let Le=B(U,ge);V(r.TEXTURE_CUBE_MAP,U);let ue;if(pt){et&&At&&t.texStorage2D(r.TEXTURE_CUBE_MAP,Le,nt,ge.width,ge.height);for(let ve=0;ve<6;ve++){ue=Qe[ve].mipmaps;for(let be=0;be<ue.length;be++){const Ne=ue[be];U.format!==Kt?De!==null?et?Z&&t.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be,0,0,Ne.width,Ne.height,De,Ne.data):t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be,nt,Ne.width,Ne.height,0,Ne.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be,0,0,Ne.width,Ne.height,De,Se,Ne.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be,nt,Ne.width,Ne.height,0,De,Se,Ne.data)}}}else{if(ue=U.mipmaps,et&&At){ue.length>0&&Le++;const ve=je(Qe[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,Le,nt,ve.width,ve.height)}for(let ve=0;ve<6;ve++)if(we){et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,0,0,Qe[ve].width,Qe[ve].height,De,Se,Qe[ve].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,nt,Qe[ve].width,Qe[ve].height,0,De,Se,Qe[ve].data);for(let be=0;be<ue.length;be++){const Ne=ue[be].image[ve].image;et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be+1,0,0,Ne.width,Ne.height,De,Se,Ne.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be+1,nt,Ne.width,Ne.height,0,De,Se,Ne.data)}}else{et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,0,0,De,Se,Qe[ve]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,nt,De,Se,Qe[ve]);for(let be=0;be<ue.length;be++){const Ne=ue[be];et?Z&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be+1,0,0,De,Se,Ne.image[ve]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ve,be+1,nt,De,Se,Ne.image[ve])}}}m(U)&&v(r.TEXTURE_CUBE_MAP),_e.__version=Ee.version,U.onUpdate&&U.onUpdate(U)}z.__version=U.version}function fe(z,U,se,ye,Ee,_e){const Ye=s.convert(se.format,se.colorSpace),Pe=s.convert(se.type),Ge=x(se.internalFormat,Ye,Pe,se.colorSpace),pt=n.get(U),we=n.get(se);if(we.__renderTarget=U,!pt.__hasExternalTextures){const Qe=Math.max(1,U.width>>_e),ge=Math.max(1,U.height>>_e);Ee===r.TEXTURE_3D||Ee===r.TEXTURE_2D_ARRAY?t.texImage3D(Ee,_e,Ge,Qe,ge,U.depth,0,Ye,Pe,null):t.texImage2D(Ee,_e,Ge,Qe,ge,0,Ye,Pe,null)}t.bindFramebuffer(r.FRAMEBUFFER,z),ft(U)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,ye,Ee,we.__webglTexture,0,dt(U)):(Ee===r.TEXTURE_2D||Ee>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&Ee<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,ye,Ee,we.__webglTexture,_e),t.bindFramebuffer(r.FRAMEBUFFER,null)}function Ae(z,U,se){if(r.bindRenderbuffer(r.RENDERBUFFER,z),U.depthBuffer){const ye=U.depthTexture,Ee=ye&&ye.isDepthTexture?ye.type:null,_e=C(U.stencilBuffer,Ee),Ye=U.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Pe=dt(U);ft(U)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Pe,_e,U.width,U.height):se?r.renderbufferStorageMultisample(r.RENDERBUFFER,Pe,_e,U.width,U.height):r.renderbufferStorage(r.RENDERBUFFER,_e,U.width,U.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,Ye,r.RENDERBUFFER,z)}else{const ye=U.textures;for(let Ee=0;Ee<ye.length;Ee++){const _e=ye[Ee],Ye=s.convert(_e.format,_e.colorSpace),Pe=s.convert(_e.type),Ge=x(_e.internalFormat,Ye,Pe,_e.colorSpace),pt=dt(U);se&&ft(U)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,pt,Ge,U.width,U.height):ft(U)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,pt,Ge,U.width,U.height):r.renderbufferStorage(r.RENDERBUFFER,Ge,U.width,U.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function pe(z,U){if(U&&U.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(r.FRAMEBUFFER,z),!(U.depthTexture&&U.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const se=n.get(U.depthTexture);se.__renderTarget=U,(!se.__webglTexture||U.depthTexture.image.width!==U.width||U.depthTexture.image.height!==U.height)&&(U.depthTexture.image.width=U.width,U.depthTexture.image.height=U.height,U.depthTexture.needsUpdate=!0),J(U.depthTexture,0);const ye=se.__webglTexture,Ee=dt(U);if(U.depthTexture.format===oo)ft(U)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,ye,0,Ee):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,ye,0);else if(U.depthTexture.format===lo)ft(U)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,ye,0,Ee):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,ye,0);else throw new Error("Unknown depthTexture format")}function Re(z){const U=n.get(z),se=z.isWebGLCubeRenderTarget===!0;if(U.__boundDepthTexture!==z.depthTexture){const ye=z.depthTexture;if(U.__depthDisposeCallback&&U.__depthDisposeCallback(),ye){const Ee=()=>{delete U.__boundDepthTexture,delete U.__depthDisposeCallback,ye.removeEventListener("dispose",Ee)};ye.addEventListener("dispose",Ee),U.__depthDisposeCallback=Ee}U.__boundDepthTexture=ye}if(z.depthTexture&&!U.__autoAllocateDepthBuffer){if(se)throw new Error("target.depthTexture not supported in Cube render targets");pe(U.__webglFramebuffer,z)}else if(se){U.__webglDepthbuffer=[];for(let ye=0;ye<6;ye++)if(t.bindFramebuffer(r.FRAMEBUFFER,U.__webglFramebuffer[ye]),U.__webglDepthbuffer[ye]===void 0)U.__webglDepthbuffer[ye]=r.createRenderbuffer(),Ae(U.__webglDepthbuffer[ye],z,!1);else{const Ee=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,_e=U.__webglDepthbuffer[ye];r.bindRenderbuffer(r.RENDERBUFFER,_e),r.framebufferRenderbuffer(r.FRAMEBUFFER,Ee,r.RENDERBUFFER,_e)}}else if(t.bindFramebuffer(r.FRAMEBUFFER,U.__webglFramebuffer),U.__webglDepthbuffer===void 0)U.__webglDepthbuffer=r.createRenderbuffer(),Ae(U.__webglDepthbuffer,z,!1);else{const ye=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ee=U.__webglDepthbuffer;r.bindRenderbuffer(r.RENDERBUFFER,Ee),r.framebufferRenderbuffer(r.FRAMEBUFFER,ye,r.RENDERBUFFER,Ee)}t.bindFramebuffer(r.FRAMEBUFFER,null)}function ke(z,U,se){const ye=n.get(z);U!==void 0&&fe(ye.__webglFramebuffer,z,z.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),se!==void 0&&Re(z)}function wt(z){const U=z.texture,se=n.get(z),ye=n.get(U);z.addEventListener("dispose",M);const Ee=z.textures,_e=z.isWebGLCubeRenderTarget===!0,Ye=Ee.length>1;if(Ye||(ye.__webglTexture===void 0&&(ye.__webglTexture=r.createTexture()),ye.__version=U.version,o.memory.textures++),_e){se.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(U.mipmaps&&U.mipmaps.length>0){se.__webglFramebuffer[Pe]=[];for(let Ge=0;Ge<U.mipmaps.length;Ge++)se.__webglFramebuffer[Pe][Ge]=r.createFramebuffer()}else se.__webglFramebuffer[Pe]=r.createFramebuffer()}else{if(U.mipmaps&&U.mipmaps.length>0){se.__webglFramebuffer=[];for(let Pe=0;Pe<U.mipmaps.length;Pe++)se.__webglFramebuffer[Pe]=r.createFramebuffer()}else se.__webglFramebuffer=r.createFramebuffer();if(Ye)for(let Pe=0,Ge=Ee.length;Pe<Ge;Pe++){const pt=n.get(Ee[Pe]);pt.__webglTexture===void 0&&(pt.__webglTexture=r.createTexture(),o.memory.textures++)}if(z.samples>0&&ft(z)===!1){se.__webglMultisampledFramebuffer=r.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Pe=0;Pe<Ee.length;Pe++){const Ge=Ee[Pe];se.__webglColorRenderbuffer[Pe]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,se.__webglColorRenderbuffer[Pe]);const pt=s.convert(Ge.format,Ge.colorSpace),we=s.convert(Ge.type),Qe=x(Ge.internalFormat,pt,we,Ge.colorSpace,z.isXRRenderTarget===!0),ge=dt(z);r.renderbufferStorageMultisample(r.RENDERBUFFER,ge,Qe,z.width,z.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Pe,r.RENDERBUFFER,se.__webglColorRenderbuffer[Pe])}r.bindRenderbuffer(r.RENDERBUFFER,null),z.depthBuffer&&(se.__webglDepthRenderbuffer=r.createRenderbuffer(),Ae(se.__webglDepthRenderbuffer,z,!0)),t.bindFramebuffer(r.FRAMEBUFFER,null)}}if(_e){t.bindTexture(r.TEXTURE_CUBE_MAP,ye.__webglTexture),V(r.TEXTURE_CUBE_MAP,U);for(let Pe=0;Pe<6;Pe++)if(U.mipmaps&&U.mipmaps.length>0)for(let Ge=0;Ge<U.mipmaps.length;Ge++)fe(se.__webglFramebuffer[Pe][Ge],z,U,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,Ge);else fe(se.__webglFramebuffer[Pe],z,U,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0);m(U)&&v(r.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ye){for(let Pe=0,Ge=Ee.length;Pe<Ge;Pe++){const pt=Ee[Pe],we=n.get(pt);t.bindTexture(r.TEXTURE_2D,we.__webglTexture),V(r.TEXTURE_2D,pt),fe(se.__webglFramebuffer,z,pt,r.COLOR_ATTACHMENT0+Pe,r.TEXTURE_2D,0),m(pt)&&v(r.TEXTURE_2D)}t.unbindTexture()}else{let Pe=r.TEXTURE_2D;if((z.isWebGL3DRenderTarget||z.isWebGLArrayRenderTarget)&&(Pe=z.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),t.bindTexture(Pe,ye.__webglTexture),V(Pe,U),U.mipmaps&&U.mipmaps.length>0)for(let Ge=0;Ge<U.mipmaps.length;Ge++)fe(se.__webglFramebuffer[Ge],z,U,r.COLOR_ATTACHMENT0,Pe,Ge);else fe(se.__webglFramebuffer,z,U,r.COLOR_ATTACHMENT0,Pe,0);m(U)&&v(Pe),t.unbindTexture()}z.depthBuffer&&Re(z)}function ut(z){const U=z.textures;for(let se=0,ye=U.length;se<ye;se++){const Ee=U[se];if(m(Ee)){const _e=w(z),Ye=n.get(Ee).__webglTexture;t.bindTexture(_e,Ye),v(_e),t.unbindTexture()}}}const ht=[],X=[];function u0(z){if(z.samples>0){if(ft(z)===!1){const U=z.textures,se=z.width,ye=z.height;let Ee=r.COLOR_BUFFER_BIT;const _e=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ye=n.get(z),Pe=U.length>1;if(Pe)for(let Ge=0;Ge<U.length;Ge++)t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.RENDERBUFFER,null),t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.TEXTURE_2D,null,0);t.bindFramebuffer(r.READ_FRAMEBUFFER,Ye.__webglMultisampledFramebuffer),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ye.__webglFramebuffer);for(let Ge=0;Ge<U.length;Ge++){if(z.resolveDepthBuffer&&(z.depthBuffer&&(Ee|=r.DEPTH_BUFFER_BIT),z.stencilBuffer&&z.resolveStencilBuffer&&(Ee|=r.STENCIL_BUFFER_BIT)),Pe){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,Ye.__webglColorRenderbuffer[Ge]);const pt=n.get(U[Ge]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,pt,0)}r.blitFramebuffer(0,0,se,ye,0,0,se,ye,Ee,r.NEAREST),h===!0&&(ht.length=0,X.length=0,ht.push(r.COLOR_ATTACHMENT0+Ge),z.depthBuffer&&z.resolveDepthBuffer===!1&&(ht.push(_e),X.push(_e),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,X)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,ht))}if(t.bindFramebuffer(r.READ_FRAMEBUFFER,null),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),Pe)for(let Ge=0;Ge<U.length;Ge++){t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.RENDERBUFFER,Ye.__webglColorRenderbuffer[Ge]);const pt=n.get(U[Ge]).__webglTexture;t.bindFramebuffer(r.FRAMEBUFFER,Ye.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ge,r.TEXTURE_2D,pt,0)}t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ye.__webglMultisampledFramebuffer)}else if(z.depthBuffer&&z.resolveDepthBuffer===!1&&h){const U=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[U])}}}function dt(z){return Math.min(i.maxSamples,z.samples)}function ft(z){const U=n.get(z);return z.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&U.__useRenderToTexture!==!1}function qe(z){const U=o.render.frame;d.get(z)!==U&&(d.set(z,U),z.update())}function It(z,U){const se=z.colorSpace,ye=z.format,Ee=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||se!==H0&&se!==Ei&&(Mt.getTransfer(se)===Ft?(ye!==Kt||Ee!==x0)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),U}function je(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(u.width=z.naturalWidth||z.width,u.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(u.width=z.displayWidth,u.height=z.displayHeight):(u.width=z.width,u.height=z.height),u}this.allocateTextureUnit=Q,this.resetTextureUnits=k,this.setTexture2D=J,this.setTexture2DArray=q,this.setTexture3D=re,this.setTextureCube=H,this.rebindTextures=ke,this.setupRenderTarget=wt,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=u0,this.setupDepthRenderbuffer=Re,this.setupFrameBufferTexture=fe,this.useMultisampledRTT=ft}function LS(r,e){function t(n,i=Ei){let s;const o=Mt.getTransfer(i);if(n===x0)return r.UNSIGNED_BYTE;if(n===n3)return r.UNSIGNED_SHORT_4_4_4_4;if(n===i3)return r.UNSIGNED_SHORT_5_5_5_1;if(n===B6)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===Y2)return r.BYTE;if(n===r3)return r.SHORT;if(n===io)return r.UNSIGNED_SHORT;if(n===so)return r.INT;if(n===hn)return r.UNSIGNED_INT;if(n===Jt)return r.FLOAT;if(n===f0)return r.HALF_FLOAT;if(n===b6)return r.ALPHA;if(n===R6)return r.RGB;if(n===Kt)return r.RGBA;if(n===D6)return r.LUMINANCE;if(n===L6)return r.LUMINANCE_ALPHA;if(n===oo)return r.DEPTH_COMPONENT;if(n===lo)return r.DEPTH_STENCIL;if(n===yi)return r.RED;if(n===q2)return r.RED_INTEGER;if(n===rs)return r.RG;if(n===W1)return r.RG_INTEGER;if(n===co)return r.RGBA_INTEGER;if(n===X2||n===Y1||n===J2||n===q1)if(o===Ft)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===X2)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Y1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===J2)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===q1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===X2)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Y1)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===J2)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===q1)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===K2||n===s3||n===Z2||n===a3)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===K2)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===s3)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Z2)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===a3)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===$2||n===e9||n===t9)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===$2||n===e9)return o===Ft?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===t9)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===X1||n===o3||n===l3||n===c3||n===J1||n===u3||n===h3||n===d3||n===f3||n===p3||n===A3||n===g3||n===m3||n===v3)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===X1)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===o3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===l3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===c3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===J1)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===u3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===h3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===d3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===f3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===p3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===A3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===g3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===m3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===v3)return o===Ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===K1||n===_3||n===r9)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===K1)return o===Ft?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===_3)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===r9)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===N6||n===y3||n===E3||n===x3)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===K1)return s.COMPRESSED_RED_RGTC1_EXT;if(n===y3)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===E3)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===x3)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===ao?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}const NS=`
|
|
3822
3822
|
void main() {
|
|
3823
3823
|
|
|
3824
3824
|
gl_Position = vec4( position, 1.0 );
|
|
@@ -3842,7 +3842,7 @@ void main() {
|
|
|
3842
3842
|
|
|
3843
3843
|
}
|
|
3844
3844
|
|
|
3845
|
-
}`;class US{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new P0,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}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new T0({vertexShader:NS,fragmentShader:PS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new S0(new dl(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class kS extends ra{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 US,m=t.getContextAttributes();let v=null,w=null;const x=[],C=[],B=new Ve;let T=null;const M=new lr;M.viewport=new Ut;const D=new lr;D.viewport=new Ut;const R=[M,D],S=new Wx;let L=null,k=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(O){let ce=x[O];return ce===void 0&&(ce=new Y3,x[O]=ce),ce.getTargetRaySpace()},this.getControllerGrip=function(O){let ce=x[O];return ce===void 0&&(ce=new Y3,x[O]=ce),ce.getGripSpace()},this.getHand=function(O){let ce=x[O];return ce===void 0&&(ce=new Y3,x[O]=ce),ce.getHandSpace()};function Q(O){const ce=C.indexOf(O.inputSource);if(ce===-1)return;const fe=x[ce];fe!==void 0&&(fe.update(O.inputSource,O.frame,u||o),fe.dispatchEvent({type:O.type,data:O.inputSource}))}function W(){i.removeEventListener("select",Q),i.removeEventListener("selectstart",Q),i.removeEventListener("selectend",Q),i.removeEventListener("squeeze",Q),i.removeEventListener("squeezestart",Q),i.removeEventListener("squeezeend",Q),i.removeEventListener("end",W),i.removeEventListener("inputsourceschange",J);for(let O=0;O<x.length;O++){const ce=C[O];ce!==null&&(C[O]=null,x[O].disconnect(ce))}L=null,k=null,E.reset(),e.setRenderTarget(v),g=null,p=null,A=null,i=null,w=null,ee.stop(),n.isPresenting=!1,e.setPixelRatio(T),e.setSize(B.width,B.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(O){s=O,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(O){l=O,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(O){u=O},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(O){if(i=O,i!==null){if(v=e.getRenderTarget(),i.addEventListener("select",Q),i.addEventListener("selectstart",Q),i.addEventListener("selectend",Q),i.addEventListener("squeeze",Q),i.addEventListener("squeezestart",Q),i.addEventListener("squeezeend",Q),i.addEventListener("end",W),i.addEventListener("inputsourceschange",J),m.xrCompatible!==!0&&await t.makeXRCompatible(),T=e.getPixelRatio(),e.getSize(B),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ce=null,fe=null,Ae=null;m.depth&&(Ae=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ce=m.stencil?lo:oo,fe=m.stencil?ao:hn);const pe={colorFormat:t.RGBA8,depthFormat:Ae,scaleFactor:s};A=new XRWebGLBinding(i,t),p=A.createProjectionLayer(pe),i.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),w=new Br(p.textureWidth,p.textureHeight,{format:Kt,type:x0,depthTexture:new Nd(p.textureWidth,p.textureHeight,fe,void 0,void 0,void 0,void 0,void 0,void 0,ce),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1,resolveStencilBuffer:p.ignoreDepthValues===!1})}else{const ce={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(i,t,ce),i.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),w=new Br(g.framebufferWidth,g.framebufferHeight,{format:Kt,type:x0,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil,resolveDepthBuffer:g.ignoreDepthValues===!1,resolveStencilBuffer:g.ignoreDepthValues===!1})}w.isXRRenderTarget=!0,this.setFoveation(h),u=null,o=await i.requestReferenceSpace(l),ee.setContext(i),ee.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return E.getDepthTexture()};function J(O){for(let ce=0;ce<O.removed.length;ce++){const fe=O.removed[ce],Ae=C.indexOf(fe);Ae>=0&&(C[Ae]=null,x[Ae].disconnect(fe))}for(let ce=0;ce<O.added.length;ce++){const fe=O.added[ce];let Ae=C.indexOf(fe);if(Ae===-1){for(let De=0;De<x.length;De++)if(De>=C.length){C.push(fe),Ae=De;break}else if(C[De]===null){C[De]=fe,Ae=De;break}if(Ae===-1)break}const pe=x[Ae];pe&&pe.connect(fe)}}const q=new G,re=new G;function H(O,ce,fe){q.setFromMatrixPosition(ce.matrixWorld),re.setFromMatrixPosition(fe.matrixWorld);const Ae=q.distanceTo(re),pe=ce.projectionMatrix.elements,De=fe.projectionMatrix.elements,Qe=pe[14]/(pe[10]-1),wt=pe[14]/(pe[10]+1),ut=(pe[9]+1)/pe[5],ht=(pe[9]-1)/pe[5],X=(pe[8]-1)/pe[0],u0=(De[8]+1)/De[0],dt=Qe*X,ft=Qe*u0,qe=Ae/(-X+u0),It=qe*-X;if(ce.matrixWorld.decompose(O.position,O.quaternion,O.scale),O.translateX(It),O.translateZ(qe),O.matrixWorld.compose(O.position,O.quaternion,O.scale),O.matrixWorldInverse.copy(O.matrixWorld).invert(),pe[10]===-1)O.projectionMatrix.copy(ce.projectionMatrix),O.projectionMatrixInverse.copy(ce.projectionMatrixInverse);else{const je=Qe+qe,z=wt+qe,U=dt-It,se=ft+(Ae-It),_e=ut*wt/z*je,Ee=ht*wt/z*je;O.projectionMatrix.makePerspective(U,se,_e,Ee,je,z),O.projectionMatrixInverse.copy(O.projectionMatrix).invert()}}function j(O,ce){ce===null?O.matrixWorld.copy(O.matrix):O.matrixWorld.multiplyMatrices(ce.matrixWorld,O.matrix),O.matrixWorldInverse.copy(O.matrixWorld).invert()}this.updateCamera=function(O){if(i===null)return;let ce=O.near,fe=O.far;E.texture!==null&&(E.depthNear>0&&(ce=E.depthNear),E.depthFar>0&&(fe=E.depthFar)),S.near=D.near=M.near=ce,S.far=D.far=M.far=fe,(L!==S.near||k!==S.far)&&(i.updateRenderState({depthNear:S.near,depthFar:S.far}),L=S.near,k=S.far),M.layers.mask=O.layers.mask|2,D.layers.mask=O.layers.mask|4,S.layers.mask=M.layers.mask|D.layers.mask;const Ae=O.parent,pe=S.cameras;j(S,Ae);for(let De=0;De<pe.length;De++)j(pe[De],Ae);pe.length===2?H(S,M,D):S.projectionMatrix.copy(M.projectionMatrix),$(O,S,Ae)};function $(O,ce,fe){fe===null?O.matrix.copy(ce.matrixWorld):(O.matrix.copy(fe.matrixWorld),O.matrix.invert(),O.matrix.multiply(ce.matrixWorld)),O.matrix.decompose(O.position,O.quaternion,O.scale),O.updateMatrixWorld(!0),O.projectionMatrix.copy(ce.projectionMatrix),O.projectionMatrixInverse.copy(ce.projectionMatrixInverse),O.isPerspectiveCamera&&(O.fov=ho*2*Math.atan(1/O.projectionMatrix.elements[5]),O.zoom=1)}this.getCamera=function(){return S},this.getFoveation=function(){if(!(p===null&&g===null))return h},this.setFoveation=function(O){h=O,p!==null&&(p.fixedFoveation=O),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=O)},this.hasDepthSensing=function(){return E.texture!==null},this.getDepthSensingMesh=function(){return E.getMesh(S)};let P=null;function V(O,ce){if(d=ce.getViewerPose(u||o),_=ce,d!==null){const fe=d.views;g!==null&&(e.setRenderTargetFramebuffer(w,g.framebuffer),e.setRenderTarget(w));let Ae=!1;fe.length!==S.cameras.length&&(S.cameras.length=0,Ae=!0);for(let De=0;De<fe.length;De++){const Qe=fe[De];let wt=null;if(g!==null)wt=g.getViewport(Qe);else{const ht=A.getViewSubImage(p,Qe);wt=ht.viewport,De===0&&(e.setRenderTargetTextures(w,ht.colorTexture,p.ignoreDepthValues?void 0:ht.depthStencilTexture),e.setRenderTarget(w))}let ut=R[De];ut===void 0&&(ut=new lr,ut.layers.enable(De),ut.viewport=new Ut,R[De]=ut),ut.matrix.fromArray(Qe.transform.matrix),ut.matrix.decompose(ut.position,ut.quaternion,ut.scale),ut.projectionMatrix.fromArray(Qe.projectionMatrix),ut.projectionMatrixInverse.copy(ut.projectionMatrix).invert(),ut.viewport.set(wt.x,wt.y,wt.width,wt.height),De===0&&(S.matrix.copy(ut.matrix),S.matrix.decompose(S.position,S.quaternion,S.scale)),Ae===!0&&S.cameras.push(ut)}const pe=i.enabledFeatures;if(pe&&pe.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&A){const De=A.getDepthInformation(fe[0]);De&&De.isValid&&De.texture&&E.init(e,De,i.renderState)}}for(let fe=0;fe<x.length;fe++){const Ae=C[fe],pe=x[fe];Ae!==null&&pe!==void 0&&pe.update(Ae,ce,u||o)}P&&P(O,ce),ce.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ce}),_=null}const ee=new Kd;ee.setAnimationLoop(V),this.setAnimationLoop=function(O){P=O},this.dispose=function(){}}}const ha=new Xn,QS=new ot;function FS(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,dd(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,C){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,C)):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===G0&&(m.bumpScale.value*=-1)),v.normalMap&&(m.normalMap.value=v.normalMap,t(v.normalMap,m.normalMapTransform),m.normalScale.value.copy(v.normalScale),v.side===G0&&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,C=w.envMapRotation;x&&(m.envMap.value=x,ha.copy(C),ha.x*=-1,ha.y*=-1,ha.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(ha.y*=-1,ha.z*=-1),m.envMapRotation.value.setFromMatrix4(QS.makeRotationFromEuler(ha)),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,m.lightMapIntensity.value=v.lightMapIntensity,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===G0&&m.clearcoatNormalScale.value.negate())),v.dispersion>0&&(m.dispersion.value=v.dispersion),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 OS(r,e,t,n){let i={},s={},o=[];const l=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function h(w,x){const C=x.program;n.uniformBlockBinding(w,C)}function u(w,x){let C=i[w.id];C===void 0&&(_(w),C=d(w),i[w.id]=C,w.addEventListener("dispose",m));const B=x.program;n.updateUBOMapping(w,B);const T=e.render.frame;s[w.id]!==T&&(p(w),s[w.id]=T)}function d(w){const x=A();w.__bindingPointIndex=x;const C=r.createBuffer(),B=w.__size,T=w.usage;return r.bindBuffer(r.UNIFORM_BUFFER,C),r.bufferData(r.UNIFORM_BUFFER,B,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,x,C),C}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],C=w.uniforms,B=w.__cache;r.bindBuffer(r.UNIFORM_BUFFER,x);for(let T=0,M=C.length;T<M;T++){const D=Array.isArray(C[T])?C[T]:[C[T]];for(let R=0,S=D.length;R<S;R++){const L=D[R];if(g(L,T,R,B)===!0){const k=L.__offset,Q=Array.isArray(L.value)?L.value:[L.value];let W=0;for(let J=0;J<Q.length;J++){const q=Q[J],re=E(q);typeof q=="number"||typeof q=="boolean"?(L.__data[0]=q,r.bufferSubData(r.UNIFORM_BUFFER,k+W,L.__data)):q.isMatrix3?(L.__data[0]=q.elements[0],L.__data[1]=q.elements[1],L.__data[2]=q.elements[2],L.__data[3]=0,L.__data[4]=q.elements[3],L.__data[5]=q.elements[4],L.__data[6]=q.elements[5],L.__data[7]=0,L.__data[8]=q.elements[6],L.__data[9]=q.elements[7],L.__data[10]=q.elements[8],L.__data[11]=0):(q.toArray(L.__data,W),W+=re.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,k,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function g(w,x,C,B){const T=w.value,M=x+"_"+C;if(B[M]===void 0)return typeof T=="number"||typeof T=="boolean"?B[M]=T:B[M]=T.clone(),!0;{const D=B[M];if(typeof T=="number"||typeof T=="boolean"){if(D!==T)return B[M]=T,!0}else if(D.equals(T)===!1)return D.copy(T),!0}return!1}function _(w){const x=w.uniforms;let C=0;const B=16;for(let M=0,D=x.length;M<D;M++){const R=Array.isArray(x[M])?x[M]:[x[M]];for(let S=0,L=R.length;S<L;S++){const k=R[S],Q=Array.isArray(k.value)?k.value:[k.value];for(let W=0,J=Q.length;W<J;W++){const q=Q[W],re=E(q),H=C%B,j=H%re.boundary,$=H+j;C+=j,$!==0&&B-$<re.storage&&(C+=B-$),k.__data=new Float32Array(re.storage/Float32Array.BYTES_PER_ELEMENT),k.__offset=C,C+=re.storage}}}const T=C%B;return T>0&&(C+=B-T),w.__size=C,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 C=o.indexOf(x.__bindingPointIndex);o.splice(C,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 zS{constructor(e={}){const{canvas:t=NE(),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,reverseDepthBuffer:p=!1}=e;this.isWebGLRenderer=!0;let g;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=n.getContextAttributes().alpha}else g=o;const _=new Uint32Array(4),E=new Int32Array(4);let m=null,v=null;const w=[],x=[];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=w0,this.toneMapping=es,this.toneMappingExposure=1;const C=this;let B=!1,T=0,M=0,D=null,R=-1,S=null;const L=new Ut,k=new Ut;let Q=null;const W=new We(0);let J=0,q=t.width,re=t.height,H=1,j=null,$=null;const P=new Ut(0,0,q,re),V=new Ut(0,0,q,re);let ee=!1;const O=new e4;let ce=!1,fe=!1;this.transmissionResolutionScale=1;const Ae=new ot,pe=new ot,De=new G,Qe=new Ut,wt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ut=!1;function ht(){return D===null?H:1}let X=n;function u0(F,ie){return t.getContext(F,ie)}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${G2}`),t.addEventListener("webglcontextlost",ye,!1),t.addEventListener("webglcontextrestored",be,!1),t.addEventListener("webglcontextcreationerror",Ne,!1),X===null){const ie="webgl2";if(X=u0(ie,F),X===null)throw u0(ie)?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 dt,ft,qe,It,je,z,U,se,_e,Ee,ve,Ye,Pe,Ge,pt,we,ke,ge,Le,Te,nt,et,At,Z;function Re(){dt=new KI(X),dt.init(),et=new LS(X,dt),ft=new VI(X,dt,e,et),qe=new RS(X,dt),ft.reverseDepthBuffer&&p&&qe.buffers.depth.setReversed(!0),It=new eM(X),je=new vS,z=new DS(X,dt,qe,je,ft,et,It),U=new WI(C),se=new JI(C),_e=new aw(X),At=new GI(X,_e),Ee=new ZI(X,_e,It,At),ve=new rM(X,Ee,_e,It),Le=new tM(X,ft,z),we=new jI(je),Ye=new mS(C,U,se,dt,ft,At,we),Pe=new FS(C,je),Ge=new yS,pt=new MS(dt),ge=new zI(C,U,se,qe,ve,g,h),ke=new BS(C,ve,ft),Z=new OS(X,It,ft,qe),Te=new HI(X,dt,It),nt=new $I(X,dt,It),It.programs=Ye.programs,C.capabilities=ft,C.extensions=dt,C.properties=je,C.renderLists=Ge,C.shadowMap=ke,C.state=qe,C.info=It}Re();const de=new kS(C,X);this.xr=de,this.getContext=function(){return X},this.getContextAttributes=function(){return X.getContextAttributes()},this.forceContextLoss=function(){const F=dt.get("WEBGL_lose_context");F&&F.loseContext()},this.forceContextRestore=function(){const F=dt.get("WEBGL_lose_context");F&&F.restoreContext()},this.getPixelRatio=function(){return H},this.setPixelRatio=function(F){F!==void 0&&(H=F,this.setSize(q,re,!1))},this.getSize=function(F){return F.set(q,re)},this.setSize=function(F,ie,ue=!0){if(de.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}q=F,re=ie,t.width=Math.floor(F*H),t.height=Math.floor(ie*H),ue===!0&&(t.style.width=F+"px",t.style.height=ie+"px"),this.setViewport(0,0,F,ie)},this.getDrawingBufferSize=function(F){return F.set(q*H,re*H).floor()},this.setDrawingBufferSize=function(F,ie,ue){q=F,re=ie,H=ue,t.width=Math.floor(F*ue),t.height=Math.floor(ie*ue),this.setViewport(0,0,F,ie)},this.getCurrentViewport=function(F){return F.copy(L)},this.getViewport=function(F){return F.copy(P)},this.setViewport=function(F,ie,ue,oe){F.isVector4?P.set(F.x,F.y,F.z,F.w):P.set(F,ie,ue,oe),qe.viewport(L.copy(P).multiplyScalar(H).round())},this.getScissor=function(F){return F.copy(V)},this.setScissor=function(F,ie,ue,oe){F.isVector4?V.set(F.x,F.y,F.z,F.w):V.set(F,ie,ue,oe),qe.scissor(k.copy(V).multiplyScalar(H).round())},this.getScissorTest=function(){return ee},this.setScissorTest=function(F){qe.setScissorTest(ee=F)},this.setOpaqueSort=function(F){j=F},this.setTransparentSort=function(F){$=F},this.getClearColor=function(F){return F.copy(ge.getClearColor())},this.setClearColor=function(){ge.setClearColor(...arguments)},this.getClearAlpha=function(){return ge.getClearAlpha()},this.setClearAlpha=function(){ge.setClearAlpha(...arguments)},this.clear=function(F=!0,ie=!0,ue=!0){let oe=0;if(F){let ne=!1;if(D!==null){const Ce=D.texture.format;ne=Ce===co||Ce===W1||Ce===q2}if(ne){const Ce=D.texture.type,ze=Ce===x0||Ce===hn||Ce===io||Ce===ao||Ce===n3||Ce===i3,Oe=ge.getClearColor(),Ze=ge.getClearAlpha(),lt=Oe.r,at=Oe.g,rt=Oe.b;ze?(_[0]=lt,_[1]=at,_[2]=rt,_[3]=Ze,X.clearBufferuiv(X.COLOR,0,_)):(E[0]=lt,E[1]=at,E[2]=rt,E[3]=Ze,X.clearBufferiv(X.COLOR,0,E))}else oe|=X.COLOR_BUFFER_BIT}ie&&(oe|=X.DEPTH_BUFFER_BIT),ue&&(oe|=X.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),X.clear(oe)},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",ye,!1),t.removeEventListener("webglcontextrestored",be,!1),t.removeEventListener("webglcontextcreationerror",Ne,!1),ge.dispose(),Ge.dispose(),pt.dispose(),je.dispose(),U.dispose(),se.dispose(),ve.dispose(),At.dispose(),Z.dispose(),Ye.dispose(),de.dispose(),de.removeEventListener("sessionstart",Hi),de.removeEventListener("sessionend",g0),q0.stop()};function ye(F){F.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),B=!0}function be(){console.log("THREE.WebGLRenderer: Context Restored."),B=!1;const F=It.autoReset,ie=ke.enabled,ue=ke.autoUpdate,oe=ke.needsUpdate,ne=ke.type;Re(),It.autoReset=F,ke.enabled=ie,ke.autoUpdate=ue,ke.needsUpdate=oe,ke.type=ne}function Ne(F){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",F.statusMessage)}function Et(F){const ie=F.target;ie.removeEventListener("dispose",Et),jt(ie)}function jt(F){_0(F),je.remove(F)}function _0(F){const ie=je.get(F).programs;ie!==void 0&&(ie.forEach(function(ue){Ye.releaseProgram(ue)}),F.isShaderMaterial&&Ye.releaseShaderCache(F))}this.renderBufferDirect=function(F,ie,ue,oe,ne,Ce){ie===null&&(ie=wt);const ze=ne.isMesh&&ne.matrixWorld.determinant()<0,Oe=kc(F,ie,ue,oe,ne);qe.setMaterial(oe,ze);let Ze=ue.index,lt=1;if(oe.wireframe===!0){if(Ze=Ee.getWireframeAttribute(ue),Ze===void 0)return;lt=2}const at=ue.drawRange,rt=ue.attributes.position;let Dt=at.start*lt,_t=(at.start+at.count)*lt;Ce!==null&&(Dt=Math.max(Dt,Ce.start*lt),_t=Math.min(_t,(Ce.start+Ce.count)*lt)),Ze!==null?(Dt=Math.max(Dt,0),_t=Math.min(_t,Ze.count)):rt!=null&&(Dt=Math.max(Dt,0),_t=Math.min(_t,rt.count));const y0=_t-Dt;if(y0<0||y0===1/0)return;At.setup(ne,oe,Oe,ue,Ze);let Qt,Wt=Te;if(Ze!==null&&(Qt=_e.get(Ze),Wt=nt,Wt.setIndex(Qt)),ne.isMesh)oe.wireframe===!0?(qe.setLineWidth(oe.wireframeLinewidth*ht()),Wt.setMode(X.LINES)):Wt.setMode(X.TRIANGLES);else if(ne.isLine){let tt=oe.linewidth;tt===void 0&&(tt=1),qe.setLineWidth(tt*ht()),ne.isLineSegments?Wt.setMode(X.LINES):ne.isLineLoop?Wt.setMode(X.LINE_LOOP):Wt.setMode(X.LINE_STRIP)}else ne.isPoints?Wt.setMode(X.POINTS):ne.isSprite&&Wt.setMode(X.TRIANGLES);if(ne.isBatchedMesh)if(ne._multiDrawInstances!==null)na("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Wt.renderMultiDrawInstances(ne._multiDrawStarts,ne._multiDrawCounts,ne._multiDrawCount,ne._multiDrawInstances);else if(dt.get("WEBGL_multi_draw"))Wt.renderMultiDraw(ne._multiDrawStarts,ne._multiDrawCounts,ne._multiDrawCount);else{const tt=ne._multiDrawStarts,D0=ne._multiDrawCounts,sn=ne._multiDrawCount,hr=Ze?_e.get(Ze).bytesPerElement:1,Ls=je.get(oe).currentProgram.getUniforms();for(let Ir=0;Ir<sn;Ir++)Ls.setValue(X,"_gl_DrawID",Ir),Wt.render(tt[Ir]/hr,D0[Ir])}else if(ne.isInstancedMesh)Wt.renderInstances(Dt,y0,ne.count);else if(ue.isInstancedBufferGeometry){const tt=ue._maxInstanceCount!==void 0?ue._maxInstanceCount:1/0,D0=Math.min(ue.instanceCount,tt);Wt.renderInstances(Dt,y0,D0)}else Wt.render(Dt,y0)};function bt(F,ie,ue){F.transparent===!0&&F.side===un&&F.forceSinglePass===!1?(F.side=G0,F.needsUpdate=!0,y1(F,ie,ue),F.side=Rn,F.needsUpdate=!0,y1(F,ie,ue),F.side=un):y1(F,ie,ue)}this.compile=function(F,ie,ue=null){ue===null&&(ue=F),v=pt.get(ue),v.init(ie),x.push(v),ue.traverseVisible(function(ne){ne.isLight&&ne.layers.test(ie.layers)&&(v.pushLight(ne),ne.castShadow&&v.pushShadow(ne))}),F!==ue&&F.traverseVisible(function(ne){ne.isLight&&ne.layers.test(ie.layers)&&(v.pushLight(ne),ne.castShadow&&v.pushShadow(ne))}),v.setupLights();const oe=new Set;return F.traverse(function(ne){if(!(ne.isMesh||ne.isPoints||ne.isLine||ne.isSprite))return;const Ce=ne.material;if(Ce)if(Array.isArray(Ce))for(let ze=0;ze<Ce.length;ze++){const Oe=Ce[ze];bt(Oe,ue,ne),oe.add(Oe)}else bt(Ce,ue,ne),oe.add(Ce)}),v=x.pop(),oe},this.compileAsync=function(F,ie,ue=null){const oe=this.compile(F,ie,ue);return new Promise(ne=>{function Ce(){if(oe.forEach(function(ze){je.get(ze).currentProgram.isReady()&&oe.delete(ze)}),oe.size===0){ne(F);return}setTimeout(Ce,10)}dt.get("KHR_parallel_shader_compile")!==null?Ce():setTimeout(Ce,10)})};let rr=null;function nr(F){rr&&rr(F)}function Hi(){q0.stop()}function g0(){q0.start()}const q0=new Kd;q0.setAnimationLoop(nr),typeof self<"u"&&q0.setContext(self),this.setAnimationLoop=function(F){rr=F,de.setAnimationLoop(F),F===null?q0.stop():q0.start()},de.addEventListener("sessionstart",Hi),de.addEventListener("sessionend",g0),this.render=function(F,ie){if(ie!==void 0&&ie.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(B===!0)return;if(F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),ie.parent===null&&ie.matrixWorldAutoUpdate===!0&&ie.updateMatrixWorld(),de.enabled===!0&&de.isPresenting===!0&&(de.cameraAutoUpdate===!0&&de.updateCamera(ie),ie=de.getCamera()),F.isScene===!0&&F.onBeforeRender(C,F,ie,D),v=pt.get(F,x.length),v.init(ie),x.push(v),pe.multiplyMatrices(ie.projectionMatrix,ie.matrixWorldInverse),O.setFromProjectionMatrix(pe),fe=this.localClippingEnabled,ce=we.init(this.clippingPlanes,fe),m=Ge.get(F,w.length),m.init(),w.push(m),de.enabled===!0&&de.isPresenting===!0){const Ce=C.xr.getDepthSensingMesh();Ce!==null&&Cn(Ce,ie,-1/0,C.sortObjects)}Cn(F,ie,0,C.sortObjects),m.finish(),C.sortObjects===!0&&m.sort(j,$),ut=de.enabled===!1||de.isPresenting===!1||de.hasDepthSensing()===!1,ut&&ge.addToRenderList(m,F),this.info.render.frame++,ce===!0&&we.beginShadows();const ue=v.state.shadowsArray;ke.render(ue,F,ie),ce===!0&&we.endShadows(),this.info.autoReset===!0&&this.info.reset();const oe=m.opaque,ne=m.transmissive;if(v.setupLights(),ie.isArrayCamera){const Ce=ie.cameras;if(ne.length>0)for(let ze=0,Oe=Ce.length;ze<Oe;ze++){const Ze=Ce[ze];ka(oe,ne,F,Ze)}ut&&ge.render(F);for(let ze=0,Oe=Ce.length;ze<Oe;ze++){const Ze=Ce[ze];Vi(m,F,Ze,Ze.viewport)}}else ne.length>0&&ka(oe,ne,F,ie),ut&&ge.render(F),Vi(m,F,ie);D!==null&&M===0&&(z.updateMultisampleRenderTarget(D),z.updateRenderTargetMipmap(D)),F.isScene===!0&&F.onAfterRender(C,F,ie),At.resetDefaultState(),R=-1,S=null,x.pop(),x.length>0?(v=x[x.length-1],ce===!0&&we.setGlobalState(C.clippingPlanes,v.state.camera)):v=null,w.pop(),w.length>0?m=w[w.length-1]:m=null};function Cn(F,ie,ue,oe){if(F.visible===!1)return;if(F.layers.test(ie.layers)){if(F.isGroup)ue=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(ie);else if(F.isLight)v.pushLight(F),F.castShadow&&v.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||O.intersectsSprite(F)){oe&&Qe.setFromMatrixPosition(F.matrixWorld).applyMatrix4(pe);const Ce=ve.update(F),ze=F.material;ze.visible&&m.push(F,Ce,ze,ue,Qe.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||O.intersectsObject(F))){const Ce=ve.update(F),ze=F.material;if(oe&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),Qe.copy(F.boundingSphere.center)):(Ce.boundingSphere===null&&Ce.computeBoundingSphere(),Qe.copy(Ce.boundingSphere.center)),Qe.applyMatrix4(F.matrixWorld).applyMatrix4(pe)),Array.isArray(ze)){const Oe=Ce.groups;for(let Ze=0,lt=Oe.length;Ze<lt;Ze++){const at=Oe[Ze],rt=ze[at.materialIndex];rt&&rt.visible&&m.push(F,Ce,rt,ue,Qe.z,at)}}else ze.visible&&m.push(F,Ce,ze,ue,Qe.z,null)}}const ne=F.children;for(let Ce=0,ze=ne.length;Ce<ze;Ce++)Cn(ne[Ce],ie,ue,oe)}function Vi(F,ie,ue,oe){const ne=F.opaque,Ce=F.transmissive,ze=F.transparent;v.setupLightsView(ue),ce===!0&&we.setGlobalState(C.clippingPlanes,ue),oe&&qe.viewport(L.copy(oe)),ne.length>0&&Ds(ne,ie,ue),Ce.length>0&&Ds(Ce,ie,ue),ze.length>0&&Ds(ze,ie,ue),qe.buffers.depth.setTest(!0),qe.buffers.depth.setMask(!0),qe.buffers.color.setMask(!0),qe.setPolygonOffset(!1)}function ka(F,ie,ue,oe){if((ue.isScene===!0?ue.overrideMaterial:null)!==null)return;v.state.transmissionRenderTarget[oe.id]===void 0&&(v.state.transmissionRenderTarget[oe.id]=new Br(1,1,{generateMipmaps:!0,type:dt.has("EXT_color_buffer_half_float")||dt.has("EXT_color_buffer_float")?f0:x0,minFilter:jr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Mt.workingColorSpace}));const ne=v.state.transmissionRenderTarget[oe.id],Ce=oe.viewport||L;ne.setSize(Ce.z*C.transmissionResolutionScale,Ce.w*C.transmissionResolutionScale);const ze=C.getRenderTarget();C.setRenderTarget(ne),C.getClearColor(W),J=C.getClearAlpha(),J<1&&C.setClearColor(16777215,.5),C.clear(),ut&&ge.render(ue);const Oe=C.toneMapping;C.toneMapping=es;const Ze=oe.viewport;if(oe.viewport!==void 0&&(oe.viewport=void 0),v.setupLightsView(oe),ce===!0&&we.setGlobalState(C.clippingPlanes,oe),Ds(F,ue,oe),z.updateMultisampleRenderTarget(ne),z.updateRenderTargetMipmap(ne),dt.has("WEBGL_multisampled_render_to_texture")===!1){let lt=!1;for(let at=0,rt=ie.length;at<rt;at++){const Dt=ie[at],_t=Dt.object,y0=Dt.geometry,Qt=Dt.material,Wt=Dt.group;if(Qt.side===un&&_t.layers.test(oe.layers)){const tt=Qt.side;Qt.side=G0,Qt.needsUpdate=!0,Pc(_t,ue,oe,y0,Qt,Wt),Qt.side=tt,Qt.needsUpdate=!0,lt=!0}}lt===!0&&(z.updateMultisampleRenderTarget(ne),z.updateRenderTargetMipmap(ne))}C.setRenderTarget(ze),C.setClearColor(W,J),Ze!==void 0&&(oe.viewport=Ze),C.toneMapping=Oe}function Ds(F,ie,ue){const oe=ie.isScene===!0?ie.overrideMaterial:null;for(let ne=0,Ce=F.length;ne<Ce;ne++){const ze=F[ne],Oe=ze.object,Ze=ze.geometry,lt=oe===null?ze.material:oe,at=ze.group;Oe.layers.test(ue.layers)&&Pc(Oe,ie,ue,Ze,lt,at)}}function Pc(F,ie,ue,oe,ne,Ce){F.onBeforeRender(C,ie,ue,oe,ne,Ce),F.modelViewMatrix.multiplyMatrices(ue.matrixWorldInverse,F.matrixWorld),F.normalMatrix.getNormalMatrix(F.modelViewMatrix),ne.onBeforeRender(C,ie,ue,oe,F,Ce),ne.transparent===!0&&ne.side===un&&ne.forceSinglePass===!1?(ne.side=G0,ne.needsUpdate=!0,C.renderBufferDirect(ue,ie,oe,ne,F,Ce),ne.side=Rn,ne.needsUpdate=!0,C.renderBufferDirect(ue,ie,oe,ne,F,Ce),ne.side=un):C.renderBufferDirect(ue,ie,oe,ne,F,Ce),F.onAfterRender(C,ie,ue,oe,ne,Ce)}function y1(F,ie,ue){ie.isScene!==!0&&(ie=wt);const oe=je.get(F),ne=v.state.lights,Ce=v.state.shadowsArray,ze=ne.state.version,Oe=Ye.getParameters(F,ne.state,Ce,ie,ue),Ze=Ye.getProgramCacheKey(Oe);let lt=oe.programs;oe.environment=F.isMeshStandardMaterial?ie.environment:null,oe.fog=ie.fog,oe.envMap=(F.isMeshStandardMaterial?se:U).get(F.envMap||oe.environment),oe.envMapRotation=oe.environment!==null&&F.envMap===null?ie.environmentRotation:F.envMapRotation,lt===void 0&&(F.addEventListener("dispose",Et),lt=new Map,oe.programs=lt);let at=lt.get(Ze);if(at!==void 0){if(oe.currentProgram===at&&oe.lightsStateVersion===ze)return ui(F,Oe),at}else Oe.uniforms=Ye.getUniforms(F),F.onBeforeCompile(Oe,C),at=Ye.acquireProgram(Oe,Ze),lt.set(Ze,at),oe.uniforms=Oe.uniforms;const rt=oe.uniforms;return(!F.isShaderMaterial&&!F.isRawShaderMaterial||F.clipping===!0)&&(rt.clippingPlanes=we.uniform),ui(F,Oe),oe.needsLights=Ph(F),oe.lightsStateVersion=ze,oe.needsLights&&(rt.ambientLightColor.value=ne.state.ambient,rt.lightProbe.value=ne.state.probe,rt.directionalLights.value=ne.state.directional,rt.directionalLightShadows.value=ne.state.directionalShadow,rt.spotLights.value=ne.state.spot,rt.spotLightShadows.value=ne.state.spotShadow,rt.rectAreaLights.value=ne.state.rectArea,rt.ltc_1.value=ne.state.rectAreaLTC1,rt.ltc_2.value=ne.state.rectAreaLTC2,rt.pointLights.value=ne.state.point,rt.pointLightShadows.value=ne.state.pointShadow,rt.hemisphereLights.value=ne.state.hemi,rt.directionalShadowMap.value=ne.state.directionalShadowMap,rt.directionalShadowMatrix.value=ne.state.directionalShadowMatrix,rt.spotShadowMap.value=ne.state.spotShadowMap,rt.spotLightMatrix.value=ne.state.spotLightMatrix,rt.spotLightMap.value=ne.state.spotLightMap,rt.pointShadowMap.value=ne.state.pointShadowMap,rt.pointShadowMatrix.value=ne.state.pointShadowMatrix),oe.currentProgram=at,oe.uniformsList=null,at}function Uc(F){if(F.uniformsList===null){const ie=F.currentProgram.getUniforms();F.uniformsList=k9.seqWithValue(ie.seq,F.uniforms)}return F.uniformsList}function ui(F,ie){const ue=je.get(F);ue.outputColorSpace=ie.outputColorSpace,ue.batching=ie.batching,ue.batchingColor=ie.batchingColor,ue.instancing=ie.instancing,ue.instancingColor=ie.instancingColor,ue.instancingMorph=ie.instancingMorph,ue.skinning=ie.skinning,ue.morphTargets=ie.morphTargets,ue.morphNormals=ie.morphNormals,ue.morphColors=ie.morphColors,ue.morphTargetsCount=ie.morphTargetsCount,ue.numClippingPlanes=ie.numClippingPlanes,ue.numIntersection=ie.numClipIntersection,ue.vertexAlphas=ie.vertexAlphas,ue.vertexTangents=ie.vertexTangents,ue.toneMapping=ie.toneMapping}function kc(F,ie,ue,oe,ne){ie.isScene!==!0&&(ie=wt),z.resetTextureUnits();const Ce=ie.fog,ze=oe.isMeshStandardMaterial?ie.environment:null,Oe=D===null?C.outputColorSpace:D.isXRRenderTarget===!0?D.texture.colorSpace:H0,Ze=(oe.isMeshStandardMaterial?se:U).get(oe.envMap||ze),lt=oe.vertexColors===!0&&!!ue.attributes.color&&ue.attributes.color.itemSize===4,at=!!ue.attributes.tangent&&(!!oe.normalMap||oe.anisotropy>0),rt=!!ue.morphAttributes.position,Dt=!!ue.morphAttributes.normal,_t=!!ue.morphAttributes.color;let y0=es;oe.toneMapped&&(D===null||D.isXRRenderTarget===!0)&&(y0=C.toneMapping);const Qt=ue.morphAttributes.position||ue.morphAttributes.normal||ue.morphAttributes.color,Wt=Qt!==void 0?Qt.length:0,tt=je.get(oe),D0=v.state.lights;if(ce===!0&&(fe===!0||F!==S)){const F0=F===S&&oe.id===R;we.setState(oe,F,F0)}let sn=!1;oe.version===tt.__version?(tt.needsLights&&tt.lightsStateVersion!==D0.state.version||tt.outputColorSpace!==Oe||ne.isBatchedMesh&&tt.batching===!1||!ne.isBatchedMesh&&tt.batching===!0||ne.isBatchedMesh&&tt.batchingColor===!0&&ne.colorTexture===null||ne.isBatchedMesh&&tt.batchingColor===!1&&ne.colorTexture!==null||ne.isInstancedMesh&&tt.instancing===!1||!ne.isInstancedMesh&&tt.instancing===!0||ne.isSkinnedMesh&&tt.skinning===!1||!ne.isSkinnedMesh&&tt.skinning===!0||ne.isInstancedMesh&&tt.instancingColor===!0&&ne.instanceColor===null||ne.isInstancedMesh&&tt.instancingColor===!1&&ne.instanceColor!==null||ne.isInstancedMesh&&tt.instancingMorph===!0&&ne.morphTexture===null||ne.isInstancedMesh&&tt.instancingMorph===!1&&ne.morphTexture!==null||tt.envMap!==Ze||oe.fog===!0&&tt.fog!==Ce||tt.numClippingPlanes!==void 0&&(tt.numClippingPlanes!==we.numPlanes||tt.numIntersection!==we.numIntersection)||tt.vertexAlphas!==lt||tt.vertexTangents!==at||tt.morphTargets!==rt||tt.morphNormals!==Dt||tt.morphColors!==_t||tt.toneMapping!==y0||tt.morphTargetsCount!==Wt)&&(sn=!0):(sn=!0,tt.__version=oe.version);let hr=tt.currentProgram;sn===!0&&(hr=y1(oe,ie,ne));let Ls=!1,Ir=!1,ji=!1;const Xt=hr.getUniforms(),dr=tt.uniforms;if(qe.useProgram(hr.program)&&(Ls=!0,Ir=!0,ji=!0),oe.id!==R&&(R=oe.id,Ir=!0),Ls||S!==F){qe.buffers.depth.getReversed()?(Ae.copy(F.projectionMatrix),UE(Ae),kE(Ae),Xt.setValue(X,"projectionMatrix",Ae)):Xt.setValue(X,"projectionMatrix",F.projectionMatrix),Xt.setValue(X,"viewMatrix",F.matrixWorldInverse);const F0=Xt.map.cameraPosition;F0!==void 0&&F0.setValue(X,De.setFromMatrixPosition(F.matrixWorld)),ft.logarithmicDepthBuffer&&Xt.setValue(X,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(oe.isMeshPhongMaterial||oe.isMeshToonMaterial||oe.isMeshLambertMaterial||oe.isMeshBasicMaterial||oe.isMeshStandardMaterial||oe.isShaderMaterial)&&Xt.setValue(X,"isOrthographic",F.isOrthographicCamera===!0),S!==F&&(S=F,Ir=!0,ji=!0)}if(ne.isSkinnedMesh){Xt.setOptional(X,ne,"bindMatrix"),Xt.setOptional(X,ne,"bindMatrixInverse");const F0=ne.skeleton;F0&&(F0.boneTexture===null&&F0.computeBoneTexture(),Xt.setValue(X,"boneTexture",F0.boneTexture,z))}ne.isBatchedMesh&&(Xt.setOptional(X,ne,"batchingTexture"),Xt.setValue(X,"batchingTexture",ne._matricesTexture,z),Xt.setOptional(X,ne,"batchingIdTexture"),Xt.setValue(X,"batchingIdTexture",ne._indirectTexture,z),Xt.setOptional(X,ne,"batchingColorTexture"),ne._colorsTexture!==null&&Xt.setValue(X,"batchingColorTexture",ne._colorsTexture,z));const X0=ue.morphAttributes;if((X0.position!==void 0||X0.normal!==void 0||X0.color!==void 0)&&Le.update(ne,ue,hr),(Ir||tt.receiveShadow!==ne.receiveShadow)&&(tt.receiveShadow=ne.receiveShadow,Xt.setValue(X,"receiveShadow",ne.receiveShadow)),oe.isMeshGouraudMaterial&&oe.envMap!==null&&(dr.envMap.value=Ze,dr.flipEnvMap.value=Ze.isCubeTexture&&Ze.isRenderTargetTexture===!1?-1:1),oe.isMeshStandardMaterial&&oe.envMap===null&&ie.environment!==null&&(dr.envMapIntensity.value=ie.environmentIntensity),Ir&&(Xt.setValue(X,"toneMappingExposure",C.toneMappingExposure),tt.needsLights&&Qc(dr,ji),Ce&&oe.fog===!0&&Pe.refreshFogUniforms(dr,Ce),Pe.refreshMaterialUniforms(dr,oe,H,re,v.state.transmissionRenderTarget[F.id]),k9.upload(X,Uc(tt),dr,z)),oe.isShaderMaterial&&oe.uniformsNeedUpdate===!0&&(k9.upload(X,Uc(tt),dr,z),oe.uniformsNeedUpdate=!1),oe.isSpriteMaterial&&Xt.setValue(X,"center",ne.center),Xt.setValue(X,"modelViewMatrix",ne.modelViewMatrix),Xt.setValue(X,"normalMatrix",ne.normalMatrix),Xt.setValue(X,"modelMatrix",ne.matrixWorld),oe.isShaderMaterial||oe.isRawShaderMaterial){const F0=oe.uniformsGroups;for(let Mr=0,Lt=F0.length;Mr<Lt;Mr++){const hi=F0[Mr];Z.update(hi,hr),Z.bind(hi,hr)}}return hr}function Qc(F,ie){F.ambientLightColor.needsUpdate=ie,F.lightProbe.needsUpdate=ie,F.directionalLights.needsUpdate=ie,F.directionalLightShadows.needsUpdate=ie,F.pointLights.needsUpdate=ie,F.pointLightShadows.needsUpdate=ie,F.spotLights.needsUpdate=ie,F.spotLightShadows.needsUpdate=ie,F.rectAreaLights.needsUpdate=ie,F.hemisphereLights.needsUpdate=ie}function Ph(F){return F.isMeshLambertMaterial||F.isMeshToonMaterial||F.isMeshPhongMaterial||F.isMeshStandardMaterial||F.isShadowMaterial||F.isShaderMaterial&&F.lights===!0}this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return D},this.setRenderTargetTextures=function(F,ie,ue){je.get(F.texture).__webglTexture=ie,je.get(F.depthTexture).__webglTexture=ue;const oe=je.get(F);oe.__hasExternalTextures=!0,oe.__autoAllocateDepthBuffer=ue===void 0,oe.__autoAllocateDepthBuffer||dt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),oe.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,ie){const ue=je.get(F);ue.__webglFramebuffer=ie,ue.__useDefaultFramebuffer=ie===void 0};const Fc=X.createFramebuffer();this.setRenderTarget=function(F,ie=0,ue=0){D=F,T=ie,M=ue;let oe=!0,ne=null,Ce=!1,ze=!1;if(F){const Oe=je.get(F);if(Oe.__useDefaultFramebuffer!==void 0)qe.bindFramebuffer(X.FRAMEBUFFER,null),oe=!1;else if(Oe.__webglFramebuffer===void 0)z.setupRenderTarget(F);else if(Oe.__hasExternalTextures)z.rebindTextures(F,je.get(F.texture).__webglTexture,je.get(F.depthTexture).__webglTexture);else if(F.depthBuffer){const at=F.depthTexture;if(Oe.__boundDepthTexture!==at){if(at!==null&&je.has(at)&&(F.width!==at.image.width||F.height!==at.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");z.setupDepthRenderbuffer(F)}}const Ze=F.texture;(Ze.isData3DTexture||Ze.isDataArrayTexture||Ze.isCompressedArrayTexture)&&(ze=!0);const lt=je.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(Array.isArray(lt[ie])?ne=lt[ie][ue]:ne=lt[ie],Ce=!0):F.samples>0&&z.useMultisampledRTT(F)===!1?ne=je.get(F).__webglMultisampledFramebuffer:Array.isArray(lt)?ne=lt[ue]:ne=lt,L.copy(F.viewport),k.copy(F.scissor),Q=F.scissorTest}else L.copy(P).multiplyScalar(H).floor(),k.copy(V).multiplyScalar(H).floor(),Q=ee;if(ue!==0&&(ne=Fc),qe.bindFramebuffer(X.FRAMEBUFFER,ne)&&oe&&qe.drawBuffers(F,ne),qe.viewport(L),qe.scissor(k),qe.setScissorTest(Q),Ce){const Oe=je.get(F.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_CUBE_MAP_POSITIVE_X+ie,Oe.__webglTexture,ue)}else if(ze){const Oe=je.get(F.texture),Ze=ie;X.framebufferTextureLayer(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,Oe.__webglTexture,ue,Ze)}else if(F!==null&&ue!==0){const Oe=je.get(F.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,Oe.__webglTexture,ue)}R=-1},this.readRenderTargetPixels=function(F,ie,ue,oe,ne,Ce,ze){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Oe=je.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&ze!==void 0&&(Oe=Oe[ze]),Oe){qe.bindFramebuffer(X.FRAMEBUFFER,Oe);try{const Ze=F.texture,lt=Ze.format,at=Ze.type;if(!ft.textureFormatReadable(lt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ft.textureTypeReadable(at)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ie>=0&&ie<=F.width-oe&&ue>=0&&ue<=F.height-ne&&X.readPixels(ie,ue,oe,ne,et.convert(lt),et.convert(at),Ce)}finally{const Ze=D!==null?je.get(D).__webglFramebuffer:null;qe.bindFramebuffer(X.FRAMEBUFFER,Ze)}}},this.readRenderTargetPixelsAsync=async function(F,ie,ue,oe,ne,Ce,ze){if(!(F&&F.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Oe=je.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&ze!==void 0&&(Oe=Oe[ze]),Oe){const Ze=F.texture,lt=Ze.format,at=Ze.type;if(!ft.textureFormatReadable(lt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ft.textureTypeReadable(at))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ie>=0&&ie<=F.width-oe&&ue>=0&&ue<=F.height-ne){qe.bindFramebuffer(X.FRAMEBUFFER,Oe);const rt=X.createBuffer();X.bindBuffer(X.PIXEL_PACK_BUFFER,rt),X.bufferData(X.PIXEL_PACK_BUFFER,Ce.byteLength,X.STREAM_READ),X.readPixels(ie,ue,oe,ne,et.convert(lt),et.convert(at),0);const Dt=D!==null?je.get(D).__webglFramebuffer:null;qe.bindFramebuffer(X.FRAMEBUFFER,Dt);const _t=X.fenceSync(X.SYNC_GPU_COMMANDS_COMPLETE,0);return X.flush(),await PE(X,_t,4),X.bindBuffer(X.PIXEL_PACK_BUFFER,rt),X.getBufferSubData(X.PIXEL_PACK_BUFFER,0,Ce),X.deleteBuffer(rt),X.deleteSync(_t),Ce}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(F,ie=null,ue=0){F.isTexture!==!0&&(na("WebGLRenderer: copyFramebufferToTexture function signature has changed."),ie=arguments[0]||null,F=arguments[1]);const oe=Math.pow(2,-ue),ne=Math.floor(F.image.width*oe),Ce=Math.floor(F.image.height*oe),ze=ie!==null?ie.x:0,Oe=ie!==null?ie.y:0;z.setTexture2D(F,0),X.copyTexSubImage2D(X.TEXTURE_2D,ue,0,0,ze,Oe,ne,Ce),qe.unbindTexture()};const Oc=X.createFramebuffer(),zc=X.createFramebuffer();this.copyTextureToTexture=function(F,ie,ue=null,oe=null,ne=0,Ce=null){F.isTexture!==!0&&(na("WebGLRenderer: copyTextureToTexture function signature has changed."),oe=arguments[0]||null,F=arguments[1],ie=arguments[2],Ce=arguments[3]||0,ue=null),Ce===null&&(ne!==0?(na("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Ce=ne,ne=0):Ce=0);let ze,Oe,Ze,lt,at,rt,Dt,_t,y0;const Qt=F.isCompressedTexture?F.mipmaps[Ce]:F.image;if(ue!==null)ze=ue.max.x-ue.min.x,Oe=ue.max.y-ue.min.y,Ze=ue.isBox3?ue.max.z-ue.min.z:1,lt=ue.min.x,at=ue.min.y,rt=ue.isBox3?ue.min.z:0;else{const X0=Math.pow(2,-ne);ze=Math.floor(Qt.width*X0),Oe=Math.floor(Qt.height*X0),F.isDataArrayTexture?Ze=Qt.depth:F.isData3DTexture?Ze=Math.floor(Qt.depth*X0):Ze=1,lt=0,at=0,rt=0}oe!==null?(Dt=oe.x,_t=oe.y,y0=oe.z):(Dt=0,_t=0,y0=0);const Wt=et.convert(ie.format),tt=et.convert(ie.type);let D0;ie.isData3DTexture?(z.setTexture3D(ie,0),D0=X.TEXTURE_3D):ie.isDataArrayTexture||ie.isCompressedArrayTexture?(z.setTexture2DArray(ie,0),D0=X.TEXTURE_2D_ARRAY):(z.setTexture2D(ie,0),D0=X.TEXTURE_2D),X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL,ie.flipY),X.pixelStorei(X.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),X.pixelStorei(X.UNPACK_ALIGNMENT,ie.unpackAlignment);const sn=X.getParameter(X.UNPACK_ROW_LENGTH),hr=X.getParameter(X.UNPACK_IMAGE_HEIGHT),Ls=X.getParameter(X.UNPACK_SKIP_PIXELS),Ir=X.getParameter(X.UNPACK_SKIP_ROWS),ji=X.getParameter(X.UNPACK_SKIP_IMAGES);X.pixelStorei(X.UNPACK_ROW_LENGTH,Qt.width),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,Qt.height),X.pixelStorei(X.UNPACK_SKIP_PIXELS,lt),X.pixelStorei(X.UNPACK_SKIP_ROWS,at),X.pixelStorei(X.UNPACK_SKIP_IMAGES,rt);const Xt=F.isDataArrayTexture||F.isData3DTexture,dr=ie.isDataArrayTexture||ie.isData3DTexture;if(F.isDepthTexture){const X0=je.get(F),F0=je.get(ie),Mr=je.get(X0.__renderTarget),Lt=je.get(F0.__renderTarget);qe.bindFramebuffer(X.READ_FRAMEBUFFER,Mr.__webglFramebuffer),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,Lt.__webglFramebuffer);for(let hi=0;hi<Ze;hi++)Xt&&(X.framebufferTextureLayer(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,je.get(F).__webglTexture,ne,rt+hi),X.framebufferTextureLayer(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,je.get(ie).__webglTexture,Ce,y0+hi)),X.blitFramebuffer(lt,at,ze,Oe,Dt,_t,ze,Oe,X.DEPTH_BUFFER_BIT,X.NEAREST);qe.bindFramebuffer(X.READ_FRAMEBUFFER,null),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,null)}else if(ne!==0||F.isRenderTargetTexture||je.has(F)){const X0=je.get(F),F0=je.get(ie);qe.bindFramebuffer(X.READ_FRAMEBUFFER,Oc),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,zc);for(let Mr=0;Mr<Ze;Mr++)Xt?X.framebufferTextureLayer(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X0.__webglTexture,ne,rt+Mr):X.framebufferTexture2D(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,X0.__webglTexture,ne),dr?X.framebufferTextureLayer(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,F0.__webglTexture,Ce,y0+Mr):X.framebufferTexture2D(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,F0.__webglTexture,Ce),ne!==0?X.blitFramebuffer(lt,at,ze,Oe,Dt,_t,ze,Oe,X.COLOR_BUFFER_BIT,X.NEAREST):dr?X.copyTexSubImage3D(D0,Ce,Dt,_t,y0+Mr,lt,at,ze,Oe):X.copyTexSubImage2D(D0,Ce,Dt,_t,lt,at,ze,Oe);qe.bindFramebuffer(X.READ_FRAMEBUFFER,null),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,null)}else dr?F.isDataTexture||F.isData3DTexture?X.texSubImage3D(D0,Ce,Dt,_t,y0,ze,Oe,Ze,Wt,tt,Qt.data):ie.isCompressedArrayTexture?X.compressedTexSubImage3D(D0,Ce,Dt,_t,y0,ze,Oe,Ze,Wt,Qt.data):X.texSubImage3D(D0,Ce,Dt,_t,y0,ze,Oe,Ze,Wt,tt,Qt):F.isDataTexture?X.texSubImage2D(X.TEXTURE_2D,Ce,Dt,_t,ze,Oe,Wt,tt,Qt.data):F.isCompressedTexture?X.compressedTexSubImage2D(X.TEXTURE_2D,Ce,Dt,_t,Qt.width,Qt.height,Wt,Qt.data):X.texSubImage2D(X.TEXTURE_2D,Ce,Dt,_t,ze,Oe,Wt,tt,Qt);X.pixelStorei(X.UNPACK_ROW_LENGTH,sn),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,hr),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Ls),X.pixelStorei(X.UNPACK_SKIP_ROWS,Ir),X.pixelStorei(X.UNPACK_SKIP_IMAGES,ji),Ce===0&&ie.generateMipmaps&&X.generateMipmap(D0),qe.unbindTexture()},this.copyTextureToTexture3D=function(F,ie,ue=null,oe=null,ne=0){return F.isTexture!==!0&&(na("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ue=arguments[0]||null,oe=arguments[1]||null,F=arguments[2],ie=arguments[3],ne=arguments[4]||0),na('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(F,ie,ue,oe,ne)},this.initRenderTarget=function(F){je.get(F).__webglFramebuffer===void 0&&z.setupRenderTarget(F)},this.initTexture=function(F){F.isCubeTexture?z.setTextureCube(F,0):F.isData3DTexture?z.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?z.setTexture2DArray(F,0):z.setTexture2D(F,0),qe.unbindTexture()},this.resetState=function(){T=0,M=0,D=null,qe.reset(),At.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorspace=Mt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Mt._getUnpackColorSpace()}}const M7={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
|
|
3845
|
+
}`;class US{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new P0,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}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new T0({vertexShader:NS,fragmentShader:PS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new S0(new dl(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class kS extends ra{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 US,m=t.getContextAttributes();let v=null,w=null;const x=[],C=[],B=new Ve;let T=null;const M=new lr;M.viewport=new Ut;const D=new lr;D.viewport=new Ut;const R=[M,D],S=new Wx;let L=null,k=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(O){let ce=x[O];return ce===void 0&&(ce=new Y3,x[O]=ce),ce.getTargetRaySpace()},this.getControllerGrip=function(O){let ce=x[O];return ce===void 0&&(ce=new Y3,x[O]=ce),ce.getGripSpace()},this.getHand=function(O){let ce=x[O];return ce===void 0&&(ce=new Y3,x[O]=ce),ce.getHandSpace()};function Q(O){const ce=C.indexOf(O.inputSource);if(ce===-1)return;const fe=x[ce];fe!==void 0&&(fe.update(O.inputSource,O.frame,u||o),fe.dispatchEvent({type:O.type,data:O.inputSource}))}function W(){i.removeEventListener("select",Q),i.removeEventListener("selectstart",Q),i.removeEventListener("selectend",Q),i.removeEventListener("squeeze",Q),i.removeEventListener("squeezestart",Q),i.removeEventListener("squeezeend",Q),i.removeEventListener("end",W),i.removeEventListener("inputsourceschange",J);for(let O=0;O<x.length;O++){const ce=C[O];ce!==null&&(C[O]=null,x[O].disconnect(ce))}L=null,k=null,E.reset(),e.setRenderTarget(v),g=null,p=null,A=null,i=null,w=null,ee.stop(),n.isPresenting=!1,e.setPixelRatio(T),e.setSize(B.width,B.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(O){s=O,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(O){l=O,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(O){u=O},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(O){if(i=O,i!==null){if(v=e.getRenderTarget(),i.addEventListener("select",Q),i.addEventListener("selectstart",Q),i.addEventListener("selectend",Q),i.addEventListener("squeeze",Q),i.addEventListener("squeezestart",Q),i.addEventListener("squeezeend",Q),i.addEventListener("end",W),i.addEventListener("inputsourceschange",J),m.xrCompatible!==!0&&await t.makeXRCompatible(),T=e.getPixelRatio(),e.getSize(B),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ce=null,fe=null,Ae=null;m.depth&&(Ae=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ce=m.stencil?lo:oo,fe=m.stencil?ao:hn);const pe={colorFormat:t.RGBA8,depthFormat:Ae,scaleFactor:s};A=new XRWebGLBinding(i,t),p=A.createProjectionLayer(pe),i.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),w=new Br(p.textureWidth,p.textureHeight,{format:Kt,type:x0,depthTexture:new Nd(p.textureWidth,p.textureHeight,fe,void 0,void 0,void 0,void 0,void 0,void 0,ce),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1,resolveStencilBuffer:p.ignoreDepthValues===!1})}else{const ce={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(i,t,ce),i.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),w=new Br(g.framebufferWidth,g.framebufferHeight,{format:Kt,type:x0,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil,resolveDepthBuffer:g.ignoreDepthValues===!1,resolveStencilBuffer:g.ignoreDepthValues===!1})}w.isXRRenderTarget=!0,this.setFoveation(h),u=null,o=await i.requestReferenceSpace(l),ee.setContext(i),ee.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return E.getDepthTexture()};function J(O){for(let ce=0;ce<O.removed.length;ce++){const fe=O.removed[ce],Ae=C.indexOf(fe);Ae>=0&&(C[Ae]=null,x[Ae].disconnect(fe))}for(let ce=0;ce<O.added.length;ce++){const fe=O.added[ce];let Ae=C.indexOf(fe);if(Ae===-1){for(let Re=0;Re<x.length;Re++)if(Re>=C.length){C.push(fe),Ae=Re;break}else if(C[Re]===null){C[Re]=fe,Ae=Re;break}if(Ae===-1)break}const pe=x[Ae];pe&&pe.connect(fe)}}const q=new G,re=new G;function H(O,ce,fe){q.setFromMatrixPosition(ce.matrixWorld),re.setFromMatrixPosition(fe.matrixWorld);const Ae=q.distanceTo(re),pe=ce.projectionMatrix.elements,Re=fe.projectionMatrix.elements,ke=pe[14]/(pe[10]-1),wt=pe[14]/(pe[10]+1),ut=(pe[9]+1)/pe[5],ht=(pe[9]-1)/pe[5],X=(pe[8]-1)/pe[0],u0=(Re[8]+1)/Re[0],dt=ke*X,ft=ke*u0,qe=Ae/(-X+u0),It=qe*-X;if(ce.matrixWorld.decompose(O.position,O.quaternion,O.scale),O.translateX(It),O.translateZ(qe),O.matrixWorld.compose(O.position,O.quaternion,O.scale),O.matrixWorldInverse.copy(O.matrixWorld).invert(),pe[10]===-1)O.projectionMatrix.copy(ce.projectionMatrix),O.projectionMatrixInverse.copy(ce.projectionMatrixInverse);else{const je=ke+qe,z=wt+qe,U=dt-It,se=ft+(Ae-It),ye=ut*wt/z*je,Ee=ht*wt/z*je;O.projectionMatrix.makePerspective(U,se,ye,Ee,je,z),O.projectionMatrixInverse.copy(O.projectionMatrix).invert()}}function j(O,ce){ce===null?O.matrixWorld.copy(O.matrix):O.matrixWorld.multiplyMatrices(ce.matrixWorld,O.matrix),O.matrixWorldInverse.copy(O.matrixWorld).invert()}this.updateCamera=function(O){if(i===null)return;let ce=O.near,fe=O.far;E.texture!==null&&(E.depthNear>0&&(ce=E.depthNear),E.depthFar>0&&(fe=E.depthFar)),S.near=D.near=M.near=ce,S.far=D.far=M.far=fe,(L!==S.near||k!==S.far)&&(i.updateRenderState({depthNear:S.near,depthFar:S.far}),L=S.near,k=S.far),M.layers.mask=O.layers.mask|2,D.layers.mask=O.layers.mask|4,S.layers.mask=M.layers.mask|D.layers.mask;const Ae=O.parent,pe=S.cameras;j(S,Ae);for(let Re=0;Re<pe.length;Re++)j(pe[Re],Ae);pe.length===2?H(S,M,D):S.projectionMatrix.copy(M.projectionMatrix),$(O,S,Ae)};function $(O,ce,fe){fe===null?O.matrix.copy(ce.matrixWorld):(O.matrix.copy(fe.matrixWorld),O.matrix.invert(),O.matrix.multiply(ce.matrixWorld)),O.matrix.decompose(O.position,O.quaternion,O.scale),O.updateMatrixWorld(!0),O.projectionMatrix.copy(ce.projectionMatrix),O.projectionMatrixInverse.copy(ce.projectionMatrixInverse),O.isPerspectiveCamera&&(O.fov=ho*2*Math.atan(1/O.projectionMatrix.elements[5]),O.zoom=1)}this.getCamera=function(){return S},this.getFoveation=function(){if(!(p===null&&g===null))return h},this.setFoveation=function(O){h=O,p!==null&&(p.fixedFoveation=O),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=O)},this.hasDepthSensing=function(){return E.texture!==null},this.getDepthSensingMesh=function(){return E.getMesh(S)};let P=null;function V(O,ce){if(d=ce.getViewerPose(u||o),_=ce,d!==null){const fe=d.views;g!==null&&(e.setRenderTargetFramebuffer(w,g.framebuffer),e.setRenderTarget(w));let Ae=!1;fe.length!==S.cameras.length&&(S.cameras.length=0,Ae=!0);for(let Re=0;Re<fe.length;Re++){const ke=fe[Re];let wt=null;if(g!==null)wt=g.getViewport(ke);else{const ht=A.getViewSubImage(p,ke);wt=ht.viewport,Re===0&&(e.setRenderTargetTextures(w,ht.colorTexture,p.ignoreDepthValues?void 0:ht.depthStencilTexture),e.setRenderTarget(w))}let ut=R[Re];ut===void 0&&(ut=new lr,ut.layers.enable(Re),ut.viewport=new Ut,R[Re]=ut),ut.matrix.fromArray(ke.transform.matrix),ut.matrix.decompose(ut.position,ut.quaternion,ut.scale),ut.projectionMatrix.fromArray(ke.projectionMatrix),ut.projectionMatrixInverse.copy(ut.projectionMatrix).invert(),ut.viewport.set(wt.x,wt.y,wt.width,wt.height),Re===0&&(S.matrix.copy(ut.matrix),S.matrix.decompose(S.position,S.quaternion,S.scale)),Ae===!0&&S.cameras.push(ut)}const pe=i.enabledFeatures;if(pe&&pe.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&A){const Re=A.getDepthInformation(fe[0]);Re&&Re.isValid&&Re.texture&&E.init(e,Re,i.renderState)}}for(let fe=0;fe<x.length;fe++){const Ae=C[fe],pe=x[fe];Ae!==null&&pe!==void 0&&pe.update(Ae,ce,u||o)}P&&P(O,ce),ce.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ce}),_=null}const ee=new Kd;ee.setAnimationLoop(V),this.setAnimationLoop=function(O){P=O},this.dispose=function(){}}}const ha=new Xn,QS=new ot;function FS(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,dd(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,C){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,C)):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===G0&&(m.bumpScale.value*=-1)),v.normalMap&&(m.normalMap.value=v.normalMap,t(v.normalMap,m.normalMapTransform),m.normalScale.value.copy(v.normalScale),v.side===G0&&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,C=w.envMapRotation;x&&(m.envMap.value=x,ha.copy(C),ha.x*=-1,ha.y*=-1,ha.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(ha.y*=-1,ha.z*=-1),m.envMapRotation.value.setFromMatrix4(QS.makeRotationFromEuler(ha)),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,m.lightMapIntensity.value=v.lightMapIntensity,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===G0&&m.clearcoatNormalScale.value.negate())),v.dispersion>0&&(m.dispersion.value=v.dispersion),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 OS(r,e,t,n){let i={},s={},o=[];const l=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function h(w,x){const C=x.program;n.uniformBlockBinding(w,C)}function u(w,x){let C=i[w.id];C===void 0&&(_(w),C=d(w),i[w.id]=C,w.addEventListener("dispose",m));const B=x.program;n.updateUBOMapping(w,B);const T=e.render.frame;s[w.id]!==T&&(p(w),s[w.id]=T)}function d(w){const x=A();w.__bindingPointIndex=x;const C=r.createBuffer(),B=w.__size,T=w.usage;return r.bindBuffer(r.UNIFORM_BUFFER,C),r.bufferData(r.UNIFORM_BUFFER,B,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,x,C),C}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],C=w.uniforms,B=w.__cache;r.bindBuffer(r.UNIFORM_BUFFER,x);for(let T=0,M=C.length;T<M;T++){const D=Array.isArray(C[T])?C[T]:[C[T]];for(let R=0,S=D.length;R<S;R++){const L=D[R];if(g(L,T,R,B)===!0){const k=L.__offset,Q=Array.isArray(L.value)?L.value:[L.value];let W=0;for(let J=0;J<Q.length;J++){const q=Q[J],re=E(q);typeof q=="number"||typeof q=="boolean"?(L.__data[0]=q,r.bufferSubData(r.UNIFORM_BUFFER,k+W,L.__data)):q.isMatrix3?(L.__data[0]=q.elements[0],L.__data[1]=q.elements[1],L.__data[2]=q.elements[2],L.__data[3]=0,L.__data[4]=q.elements[3],L.__data[5]=q.elements[4],L.__data[6]=q.elements[5],L.__data[7]=0,L.__data[8]=q.elements[6],L.__data[9]=q.elements[7],L.__data[10]=q.elements[8],L.__data[11]=0):(q.toArray(L.__data,W),W+=re.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,k,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function g(w,x,C,B){const T=w.value,M=x+"_"+C;if(B[M]===void 0)return typeof T=="number"||typeof T=="boolean"?B[M]=T:B[M]=T.clone(),!0;{const D=B[M];if(typeof T=="number"||typeof T=="boolean"){if(D!==T)return B[M]=T,!0}else if(D.equals(T)===!1)return D.copy(T),!0}return!1}function _(w){const x=w.uniforms;let C=0;const B=16;for(let M=0,D=x.length;M<D;M++){const R=Array.isArray(x[M])?x[M]:[x[M]];for(let S=0,L=R.length;S<L;S++){const k=R[S],Q=Array.isArray(k.value)?k.value:[k.value];for(let W=0,J=Q.length;W<J;W++){const q=Q[W],re=E(q),H=C%B,j=H%re.boundary,$=H+j;C+=j,$!==0&&B-$<re.storage&&(C+=B-$),k.__data=new Float32Array(re.storage/Float32Array.BYTES_PER_ELEMENT),k.__offset=C,C+=re.storage}}}const T=C%B;return T>0&&(C+=B-T),w.__size=C,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 C=o.indexOf(x.__bindingPointIndex);o.splice(C,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 zS{constructor(e={}){const{canvas:t=NE(),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,reverseDepthBuffer:p=!1}=e;this.isWebGLRenderer=!0;let g;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=n.getContextAttributes().alpha}else g=o;const _=new Uint32Array(4),E=new Int32Array(4);let m=null,v=null;const w=[],x=[];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=w0,this.toneMapping=es,this.toneMappingExposure=1;const C=this;let B=!1,T=0,M=0,D=null,R=-1,S=null;const L=new Ut,k=new Ut;let Q=null;const W=new We(0);let J=0,q=t.width,re=t.height,H=1,j=null,$=null;const P=new Ut(0,0,q,re),V=new Ut(0,0,q,re);let ee=!1;const O=new e4;let ce=!1,fe=!1;this.transmissionResolutionScale=1;const Ae=new ot,pe=new ot,Re=new G,ke=new Ut,wt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ut=!1;function ht(){return D===null?H:1}let X=n;function u0(F,ie){return t.getContext(F,ie)}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${G2}`),t.addEventListener("webglcontextlost",ve,!1),t.addEventListener("webglcontextrestored",be,!1),t.addEventListener("webglcontextcreationerror",Ne,!1),X===null){const ie="webgl2";if(X=u0(ie,F),X===null)throw u0(ie)?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 dt,ft,qe,It,je,z,U,se,ye,Ee,_e,Ye,Pe,Ge,pt,we,Qe,ge,De,Se,nt,et,At,Z;function Le(){dt=new KI(X),dt.init(),et=new LS(X,dt),ft=new VI(X,dt,e,et),qe=new RS(X,dt),ft.reverseDepthBuffer&&p&&qe.buffers.depth.setReversed(!0),It=new eM(X),je=new vS,z=new DS(X,dt,qe,je,ft,et,It),U=new WI(C),se=new JI(C),ye=new aw(X),At=new GI(X,ye),Ee=new ZI(X,ye,It,At),_e=new rM(X,Ee,ye,It),De=new tM(X,ft,z),we=new jI(je),Ye=new mS(C,U,se,dt,ft,At,we),Pe=new FS(C,je),Ge=new yS,pt=new MS(dt),ge=new zI(C,U,se,qe,_e,g,h),Qe=new BS(C,_e,ft),Z=new OS(X,It,ft,qe),Se=new HI(X,dt,It),nt=new $I(X,dt,It),It.programs=Ye.programs,C.capabilities=ft,C.extensions=dt,C.properties=je,C.renderLists=Ge,C.shadowMap=Qe,C.state=qe,C.info=It}Le();const ue=new kS(C,X);this.xr=ue,this.getContext=function(){return X},this.getContextAttributes=function(){return X.getContextAttributes()},this.forceContextLoss=function(){const F=dt.get("WEBGL_lose_context");F&&F.loseContext()},this.forceContextRestore=function(){const F=dt.get("WEBGL_lose_context");F&&F.restoreContext()},this.getPixelRatio=function(){return H},this.setPixelRatio=function(F){F!==void 0&&(H=F,this.setSize(q,re,!1))},this.getSize=function(F){return F.set(q,re)},this.setSize=function(F,ie,he=!0){if(ue.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}q=F,re=ie,t.width=Math.floor(F*H),t.height=Math.floor(ie*H),he===!0&&(t.style.width=F+"px",t.style.height=ie+"px"),this.setViewport(0,0,F,ie)},this.getDrawingBufferSize=function(F){return F.set(q*H,re*H).floor()},this.setDrawingBufferSize=function(F,ie,he){q=F,re=ie,H=he,t.width=Math.floor(F*he),t.height=Math.floor(ie*he),this.setViewport(0,0,F,ie)},this.getCurrentViewport=function(F){return F.copy(L)},this.getViewport=function(F){return F.copy(P)},this.setViewport=function(F,ie,he,oe){F.isVector4?P.set(F.x,F.y,F.z,F.w):P.set(F,ie,he,oe),qe.viewport(L.copy(P).multiplyScalar(H).round())},this.getScissor=function(F){return F.copy(V)},this.setScissor=function(F,ie,he,oe){F.isVector4?V.set(F.x,F.y,F.z,F.w):V.set(F,ie,he,oe),qe.scissor(k.copy(V).multiplyScalar(H).round())},this.getScissorTest=function(){return ee},this.setScissorTest=function(F){qe.setScissorTest(ee=F)},this.setOpaqueSort=function(F){j=F},this.setTransparentSort=function(F){$=F},this.getClearColor=function(F){return F.copy(ge.getClearColor())},this.setClearColor=function(){ge.setClearColor(...arguments)},this.getClearAlpha=function(){return ge.getClearAlpha()},this.setClearAlpha=function(){ge.setClearAlpha(...arguments)},this.clear=function(F=!0,ie=!0,he=!0){let oe=0;if(F){let ne=!1;if(D!==null){const Ce=D.texture.format;ne=Ce===co||Ce===W1||Ce===q2}if(ne){const Ce=D.texture.type,ze=Ce===x0||Ce===hn||Ce===io||Ce===ao||Ce===n3||Ce===i3,Oe=ge.getClearColor(),Ze=ge.getClearAlpha(),lt=Oe.r,at=Oe.g,rt=Oe.b;ze?(_[0]=lt,_[1]=at,_[2]=rt,_[3]=Ze,X.clearBufferuiv(X.COLOR,0,_)):(E[0]=lt,E[1]=at,E[2]=rt,E[3]=Ze,X.clearBufferiv(X.COLOR,0,E))}else oe|=X.COLOR_BUFFER_BIT}ie&&(oe|=X.DEPTH_BUFFER_BIT),he&&(oe|=X.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),X.clear(oe)},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",ve,!1),t.removeEventListener("webglcontextrestored",be,!1),t.removeEventListener("webglcontextcreationerror",Ne,!1),ge.dispose(),Ge.dispose(),pt.dispose(),je.dispose(),U.dispose(),se.dispose(),_e.dispose(),At.dispose(),Z.dispose(),Ye.dispose(),ue.dispose(),ue.removeEventListener("sessionstart",Hi),ue.removeEventListener("sessionend",g0),q0.stop()};function ve(F){F.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),B=!0}function be(){console.log("THREE.WebGLRenderer: Context Restored."),B=!1;const F=It.autoReset,ie=Qe.enabled,he=Qe.autoUpdate,oe=Qe.needsUpdate,ne=Qe.type;Le(),It.autoReset=F,Qe.enabled=ie,Qe.autoUpdate=he,Qe.needsUpdate=oe,Qe.type=ne}function Ne(F){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",F.statusMessage)}function Et(F){const ie=F.target;ie.removeEventListener("dispose",Et),jt(ie)}function jt(F){_0(F),je.remove(F)}function _0(F){const ie=je.get(F).programs;ie!==void 0&&(ie.forEach(function(he){Ye.releaseProgram(he)}),F.isShaderMaterial&&Ye.releaseShaderCache(F))}this.renderBufferDirect=function(F,ie,he,oe,ne,Ce){ie===null&&(ie=wt);const ze=ne.isMesh&&ne.matrixWorld.determinant()<0,Oe=kc(F,ie,he,oe,ne);qe.setMaterial(oe,ze);let Ze=he.index,lt=1;if(oe.wireframe===!0){if(Ze=Ee.getWireframeAttribute(he),Ze===void 0)return;lt=2}const at=he.drawRange,rt=he.attributes.position;let Dt=at.start*lt,_t=(at.start+at.count)*lt;Ce!==null&&(Dt=Math.max(Dt,Ce.start*lt),_t=Math.min(_t,(Ce.start+Ce.count)*lt)),Ze!==null?(Dt=Math.max(Dt,0),_t=Math.min(_t,Ze.count)):rt!=null&&(Dt=Math.max(Dt,0),_t=Math.min(_t,rt.count));const y0=_t-Dt;if(y0<0||y0===1/0)return;At.setup(ne,oe,Oe,he,Ze);let Qt,Wt=Se;if(Ze!==null&&(Qt=ye.get(Ze),Wt=nt,Wt.setIndex(Qt)),ne.isMesh)oe.wireframe===!0?(qe.setLineWidth(oe.wireframeLinewidth*ht()),Wt.setMode(X.LINES)):Wt.setMode(X.TRIANGLES);else if(ne.isLine){let tt=oe.linewidth;tt===void 0&&(tt=1),qe.setLineWidth(tt*ht()),ne.isLineSegments?Wt.setMode(X.LINES):ne.isLineLoop?Wt.setMode(X.LINE_LOOP):Wt.setMode(X.LINE_STRIP)}else ne.isPoints?Wt.setMode(X.POINTS):ne.isSprite&&Wt.setMode(X.TRIANGLES);if(ne.isBatchedMesh)if(ne._multiDrawInstances!==null)na("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Wt.renderMultiDrawInstances(ne._multiDrawStarts,ne._multiDrawCounts,ne._multiDrawCount,ne._multiDrawInstances);else if(dt.get("WEBGL_multi_draw"))Wt.renderMultiDraw(ne._multiDrawStarts,ne._multiDrawCounts,ne._multiDrawCount);else{const tt=ne._multiDrawStarts,D0=ne._multiDrawCounts,sn=ne._multiDrawCount,hr=Ze?ye.get(Ze).bytesPerElement:1,Ls=je.get(oe).currentProgram.getUniforms();for(let Ir=0;Ir<sn;Ir++)Ls.setValue(X,"_gl_DrawID",Ir),Wt.render(tt[Ir]/hr,D0[Ir])}else if(ne.isInstancedMesh)Wt.renderInstances(Dt,y0,ne.count);else if(he.isInstancedBufferGeometry){const tt=he._maxInstanceCount!==void 0?he._maxInstanceCount:1/0,D0=Math.min(he.instanceCount,tt);Wt.renderInstances(Dt,y0,D0)}else Wt.render(Dt,y0)};function bt(F,ie,he){F.transparent===!0&&F.side===un&&F.forceSinglePass===!1?(F.side=G0,F.needsUpdate=!0,y1(F,ie,he),F.side=Rn,F.needsUpdate=!0,y1(F,ie,he),F.side=un):y1(F,ie,he)}this.compile=function(F,ie,he=null){he===null&&(he=F),v=pt.get(he),v.init(ie),x.push(v),he.traverseVisible(function(ne){ne.isLight&&ne.layers.test(ie.layers)&&(v.pushLight(ne),ne.castShadow&&v.pushShadow(ne))}),F!==he&&F.traverseVisible(function(ne){ne.isLight&&ne.layers.test(ie.layers)&&(v.pushLight(ne),ne.castShadow&&v.pushShadow(ne))}),v.setupLights();const oe=new Set;return F.traverse(function(ne){if(!(ne.isMesh||ne.isPoints||ne.isLine||ne.isSprite))return;const Ce=ne.material;if(Ce)if(Array.isArray(Ce))for(let ze=0;ze<Ce.length;ze++){const Oe=Ce[ze];bt(Oe,he,ne),oe.add(Oe)}else bt(Ce,he,ne),oe.add(Ce)}),v=x.pop(),oe},this.compileAsync=function(F,ie,he=null){const oe=this.compile(F,ie,he);return new Promise(ne=>{function Ce(){if(oe.forEach(function(ze){je.get(ze).currentProgram.isReady()&&oe.delete(ze)}),oe.size===0){ne(F);return}setTimeout(Ce,10)}dt.get("KHR_parallel_shader_compile")!==null?Ce():setTimeout(Ce,10)})};let rr=null;function nr(F){rr&&rr(F)}function Hi(){q0.stop()}function g0(){q0.start()}const q0=new Kd;q0.setAnimationLoop(nr),typeof self<"u"&&q0.setContext(self),this.setAnimationLoop=function(F){rr=F,ue.setAnimationLoop(F),F===null?q0.stop():q0.start()},ue.addEventListener("sessionstart",Hi),ue.addEventListener("sessionend",g0),this.render=function(F,ie){if(ie!==void 0&&ie.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(B===!0)return;if(F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),ie.parent===null&&ie.matrixWorldAutoUpdate===!0&&ie.updateMatrixWorld(),ue.enabled===!0&&ue.isPresenting===!0&&(ue.cameraAutoUpdate===!0&&ue.updateCamera(ie),ie=ue.getCamera()),F.isScene===!0&&F.onBeforeRender(C,F,ie,D),v=pt.get(F,x.length),v.init(ie),x.push(v),pe.multiplyMatrices(ie.projectionMatrix,ie.matrixWorldInverse),O.setFromProjectionMatrix(pe),fe=this.localClippingEnabled,ce=we.init(this.clippingPlanes,fe),m=Ge.get(F,w.length),m.init(),w.push(m),ue.enabled===!0&&ue.isPresenting===!0){const Ce=C.xr.getDepthSensingMesh();Ce!==null&&Cn(Ce,ie,-1/0,C.sortObjects)}Cn(F,ie,0,C.sortObjects),m.finish(),C.sortObjects===!0&&m.sort(j,$),ut=ue.enabled===!1||ue.isPresenting===!1||ue.hasDepthSensing()===!1,ut&&ge.addToRenderList(m,F),this.info.render.frame++,ce===!0&&we.beginShadows();const he=v.state.shadowsArray;Qe.render(he,F,ie),ce===!0&&we.endShadows(),this.info.autoReset===!0&&this.info.reset();const oe=m.opaque,ne=m.transmissive;if(v.setupLights(),ie.isArrayCamera){const Ce=ie.cameras;if(ne.length>0)for(let ze=0,Oe=Ce.length;ze<Oe;ze++){const Ze=Ce[ze];ka(oe,ne,F,Ze)}ut&&ge.render(F);for(let ze=0,Oe=Ce.length;ze<Oe;ze++){const Ze=Ce[ze];Vi(m,F,Ze,Ze.viewport)}}else ne.length>0&&ka(oe,ne,F,ie),ut&&ge.render(F),Vi(m,F,ie);D!==null&&M===0&&(z.updateMultisampleRenderTarget(D),z.updateRenderTargetMipmap(D)),F.isScene===!0&&F.onAfterRender(C,F,ie),At.resetDefaultState(),R=-1,S=null,x.pop(),x.length>0?(v=x[x.length-1],ce===!0&&we.setGlobalState(C.clippingPlanes,v.state.camera)):v=null,w.pop(),w.length>0?m=w[w.length-1]:m=null};function Cn(F,ie,he,oe){if(F.visible===!1)return;if(F.layers.test(ie.layers)){if(F.isGroup)he=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(ie);else if(F.isLight)v.pushLight(F),F.castShadow&&v.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||O.intersectsSprite(F)){oe&&ke.setFromMatrixPosition(F.matrixWorld).applyMatrix4(pe);const Ce=_e.update(F),ze=F.material;ze.visible&&m.push(F,Ce,ze,he,ke.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||O.intersectsObject(F))){const Ce=_e.update(F),ze=F.material;if(oe&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),ke.copy(F.boundingSphere.center)):(Ce.boundingSphere===null&&Ce.computeBoundingSphere(),ke.copy(Ce.boundingSphere.center)),ke.applyMatrix4(F.matrixWorld).applyMatrix4(pe)),Array.isArray(ze)){const Oe=Ce.groups;for(let Ze=0,lt=Oe.length;Ze<lt;Ze++){const at=Oe[Ze],rt=ze[at.materialIndex];rt&&rt.visible&&m.push(F,Ce,rt,he,ke.z,at)}}else ze.visible&&m.push(F,Ce,ze,he,ke.z,null)}}const ne=F.children;for(let Ce=0,ze=ne.length;Ce<ze;Ce++)Cn(ne[Ce],ie,he,oe)}function Vi(F,ie,he,oe){const ne=F.opaque,Ce=F.transmissive,ze=F.transparent;v.setupLightsView(he),ce===!0&&we.setGlobalState(C.clippingPlanes,he),oe&&qe.viewport(L.copy(oe)),ne.length>0&&Ds(ne,ie,he),Ce.length>0&&Ds(Ce,ie,he),ze.length>0&&Ds(ze,ie,he),qe.buffers.depth.setTest(!0),qe.buffers.depth.setMask(!0),qe.buffers.color.setMask(!0),qe.setPolygonOffset(!1)}function ka(F,ie,he,oe){if((he.isScene===!0?he.overrideMaterial:null)!==null)return;v.state.transmissionRenderTarget[oe.id]===void 0&&(v.state.transmissionRenderTarget[oe.id]=new Br(1,1,{generateMipmaps:!0,type:dt.has("EXT_color_buffer_half_float")||dt.has("EXT_color_buffer_float")?f0:x0,minFilter:jr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Mt.workingColorSpace}));const ne=v.state.transmissionRenderTarget[oe.id],Ce=oe.viewport||L;ne.setSize(Ce.z*C.transmissionResolutionScale,Ce.w*C.transmissionResolutionScale);const ze=C.getRenderTarget();C.setRenderTarget(ne),C.getClearColor(W),J=C.getClearAlpha(),J<1&&C.setClearColor(16777215,.5),C.clear(),ut&&ge.render(he);const Oe=C.toneMapping;C.toneMapping=es;const Ze=oe.viewport;if(oe.viewport!==void 0&&(oe.viewport=void 0),v.setupLightsView(oe),ce===!0&&we.setGlobalState(C.clippingPlanes,oe),Ds(F,he,oe),z.updateMultisampleRenderTarget(ne),z.updateRenderTargetMipmap(ne),dt.has("WEBGL_multisampled_render_to_texture")===!1){let lt=!1;for(let at=0,rt=ie.length;at<rt;at++){const Dt=ie[at],_t=Dt.object,y0=Dt.geometry,Qt=Dt.material,Wt=Dt.group;if(Qt.side===un&&_t.layers.test(oe.layers)){const tt=Qt.side;Qt.side=G0,Qt.needsUpdate=!0,Pc(_t,he,oe,y0,Qt,Wt),Qt.side=tt,Qt.needsUpdate=!0,lt=!0}}lt===!0&&(z.updateMultisampleRenderTarget(ne),z.updateRenderTargetMipmap(ne))}C.setRenderTarget(ze),C.setClearColor(W,J),Ze!==void 0&&(oe.viewport=Ze),C.toneMapping=Oe}function Ds(F,ie,he){const oe=ie.isScene===!0?ie.overrideMaterial:null;for(let ne=0,Ce=F.length;ne<Ce;ne++){const ze=F[ne],Oe=ze.object,Ze=ze.geometry,lt=oe===null?ze.material:oe,at=ze.group;Oe.layers.test(he.layers)&&Pc(Oe,ie,he,Ze,lt,at)}}function Pc(F,ie,he,oe,ne,Ce){F.onBeforeRender(C,ie,he,oe,ne,Ce),F.modelViewMatrix.multiplyMatrices(he.matrixWorldInverse,F.matrixWorld),F.normalMatrix.getNormalMatrix(F.modelViewMatrix),ne.onBeforeRender(C,ie,he,oe,F,Ce),ne.transparent===!0&&ne.side===un&&ne.forceSinglePass===!1?(ne.side=G0,ne.needsUpdate=!0,C.renderBufferDirect(he,ie,oe,ne,F,Ce),ne.side=Rn,ne.needsUpdate=!0,C.renderBufferDirect(he,ie,oe,ne,F,Ce),ne.side=un):C.renderBufferDirect(he,ie,oe,ne,F,Ce),F.onAfterRender(C,ie,he,oe,ne,Ce)}function y1(F,ie,he){ie.isScene!==!0&&(ie=wt);const oe=je.get(F),ne=v.state.lights,Ce=v.state.shadowsArray,ze=ne.state.version,Oe=Ye.getParameters(F,ne.state,Ce,ie,he),Ze=Ye.getProgramCacheKey(Oe);let lt=oe.programs;oe.environment=F.isMeshStandardMaterial?ie.environment:null,oe.fog=ie.fog,oe.envMap=(F.isMeshStandardMaterial?se:U).get(F.envMap||oe.environment),oe.envMapRotation=oe.environment!==null&&F.envMap===null?ie.environmentRotation:F.envMapRotation,lt===void 0&&(F.addEventListener("dispose",Et),lt=new Map,oe.programs=lt);let at=lt.get(Ze);if(at!==void 0){if(oe.currentProgram===at&&oe.lightsStateVersion===ze)return ui(F,Oe),at}else Oe.uniforms=Ye.getUniforms(F),F.onBeforeCompile(Oe,C),at=Ye.acquireProgram(Oe,Ze),lt.set(Ze,at),oe.uniforms=Oe.uniforms;const rt=oe.uniforms;return(!F.isShaderMaterial&&!F.isRawShaderMaterial||F.clipping===!0)&&(rt.clippingPlanes=we.uniform),ui(F,Oe),oe.needsLights=Ph(F),oe.lightsStateVersion=ze,oe.needsLights&&(rt.ambientLightColor.value=ne.state.ambient,rt.lightProbe.value=ne.state.probe,rt.directionalLights.value=ne.state.directional,rt.directionalLightShadows.value=ne.state.directionalShadow,rt.spotLights.value=ne.state.spot,rt.spotLightShadows.value=ne.state.spotShadow,rt.rectAreaLights.value=ne.state.rectArea,rt.ltc_1.value=ne.state.rectAreaLTC1,rt.ltc_2.value=ne.state.rectAreaLTC2,rt.pointLights.value=ne.state.point,rt.pointLightShadows.value=ne.state.pointShadow,rt.hemisphereLights.value=ne.state.hemi,rt.directionalShadowMap.value=ne.state.directionalShadowMap,rt.directionalShadowMatrix.value=ne.state.directionalShadowMatrix,rt.spotShadowMap.value=ne.state.spotShadowMap,rt.spotLightMatrix.value=ne.state.spotLightMatrix,rt.spotLightMap.value=ne.state.spotLightMap,rt.pointShadowMap.value=ne.state.pointShadowMap,rt.pointShadowMatrix.value=ne.state.pointShadowMatrix),oe.currentProgram=at,oe.uniformsList=null,at}function Uc(F){if(F.uniformsList===null){const ie=F.currentProgram.getUniforms();F.uniformsList=k9.seqWithValue(ie.seq,F.uniforms)}return F.uniformsList}function ui(F,ie){const he=je.get(F);he.outputColorSpace=ie.outputColorSpace,he.batching=ie.batching,he.batchingColor=ie.batchingColor,he.instancing=ie.instancing,he.instancingColor=ie.instancingColor,he.instancingMorph=ie.instancingMorph,he.skinning=ie.skinning,he.morphTargets=ie.morphTargets,he.morphNormals=ie.morphNormals,he.morphColors=ie.morphColors,he.morphTargetsCount=ie.morphTargetsCount,he.numClippingPlanes=ie.numClippingPlanes,he.numIntersection=ie.numClipIntersection,he.vertexAlphas=ie.vertexAlphas,he.vertexTangents=ie.vertexTangents,he.toneMapping=ie.toneMapping}function kc(F,ie,he,oe,ne){ie.isScene!==!0&&(ie=wt),z.resetTextureUnits();const Ce=ie.fog,ze=oe.isMeshStandardMaterial?ie.environment:null,Oe=D===null?C.outputColorSpace:D.isXRRenderTarget===!0?D.texture.colorSpace:H0,Ze=(oe.isMeshStandardMaterial?se:U).get(oe.envMap||ze),lt=oe.vertexColors===!0&&!!he.attributes.color&&he.attributes.color.itemSize===4,at=!!he.attributes.tangent&&(!!oe.normalMap||oe.anisotropy>0),rt=!!he.morphAttributes.position,Dt=!!he.morphAttributes.normal,_t=!!he.morphAttributes.color;let y0=es;oe.toneMapped&&(D===null||D.isXRRenderTarget===!0)&&(y0=C.toneMapping);const Qt=he.morphAttributes.position||he.morphAttributes.normal||he.morphAttributes.color,Wt=Qt!==void 0?Qt.length:0,tt=je.get(oe),D0=v.state.lights;if(ce===!0&&(fe===!0||F!==S)){const F0=F===S&&oe.id===R;we.setState(oe,F,F0)}let sn=!1;oe.version===tt.__version?(tt.needsLights&&tt.lightsStateVersion!==D0.state.version||tt.outputColorSpace!==Oe||ne.isBatchedMesh&&tt.batching===!1||!ne.isBatchedMesh&&tt.batching===!0||ne.isBatchedMesh&&tt.batchingColor===!0&&ne.colorTexture===null||ne.isBatchedMesh&&tt.batchingColor===!1&&ne.colorTexture!==null||ne.isInstancedMesh&&tt.instancing===!1||!ne.isInstancedMesh&&tt.instancing===!0||ne.isSkinnedMesh&&tt.skinning===!1||!ne.isSkinnedMesh&&tt.skinning===!0||ne.isInstancedMesh&&tt.instancingColor===!0&&ne.instanceColor===null||ne.isInstancedMesh&&tt.instancingColor===!1&&ne.instanceColor!==null||ne.isInstancedMesh&&tt.instancingMorph===!0&&ne.morphTexture===null||ne.isInstancedMesh&&tt.instancingMorph===!1&&ne.morphTexture!==null||tt.envMap!==Ze||oe.fog===!0&&tt.fog!==Ce||tt.numClippingPlanes!==void 0&&(tt.numClippingPlanes!==we.numPlanes||tt.numIntersection!==we.numIntersection)||tt.vertexAlphas!==lt||tt.vertexTangents!==at||tt.morphTargets!==rt||tt.morphNormals!==Dt||tt.morphColors!==_t||tt.toneMapping!==y0||tt.morphTargetsCount!==Wt)&&(sn=!0):(sn=!0,tt.__version=oe.version);let hr=tt.currentProgram;sn===!0&&(hr=y1(oe,ie,ne));let Ls=!1,Ir=!1,ji=!1;const Xt=hr.getUniforms(),dr=tt.uniforms;if(qe.useProgram(hr.program)&&(Ls=!0,Ir=!0,ji=!0),oe.id!==R&&(R=oe.id,Ir=!0),Ls||S!==F){qe.buffers.depth.getReversed()?(Ae.copy(F.projectionMatrix),UE(Ae),kE(Ae),Xt.setValue(X,"projectionMatrix",Ae)):Xt.setValue(X,"projectionMatrix",F.projectionMatrix),Xt.setValue(X,"viewMatrix",F.matrixWorldInverse);const F0=Xt.map.cameraPosition;F0!==void 0&&F0.setValue(X,Re.setFromMatrixPosition(F.matrixWorld)),ft.logarithmicDepthBuffer&&Xt.setValue(X,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(oe.isMeshPhongMaterial||oe.isMeshToonMaterial||oe.isMeshLambertMaterial||oe.isMeshBasicMaterial||oe.isMeshStandardMaterial||oe.isShaderMaterial)&&Xt.setValue(X,"isOrthographic",F.isOrthographicCamera===!0),S!==F&&(S=F,Ir=!0,ji=!0)}if(ne.isSkinnedMesh){Xt.setOptional(X,ne,"bindMatrix"),Xt.setOptional(X,ne,"bindMatrixInverse");const F0=ne.skeleton;F0&&(F0.boneTexture===null&&F0.computeBoneTexture(),Xt.setValue(X,"boneTexture",F0.boneTexture,z))}ne.isBatchedMesh&&(Xt.setOptional(X,ne,"batchingTexture"),Xt.setValue(X,"batchingTexture",ne._matricesTexture,z),Xt.setOptional(X,ne,"batchingIdTexture"),Xt.setValue(X,"batchingIdTexture",ne._indirectTexture,z),Xt.setOptional(X,ne,"batchingColorTexture"),ne._colorsTexture!==null&&Xt.setValue(X,"batchingColorTexture",ne._colorsTexture,z));const X0=he.morphAttributes;if((X0.position!==void 0||X0.normal!==void 0||X0.color!==void 0)&&De.update(ne,he,hr),(Ir||tt.receiveShadow!==ne.receiveShadow)&&(tt.receiveShadow=ne.receiveShadow,Xt.setValue(X,"receiveShadow",ne.receiveShadow)),oe.isMeshGouraudMaterial&&oe.envMap!==null&&(dr.envMap.value=Ze,dr.flipEnvMap.value=Ze.isCubeTexture&&Ze.isRenderTargetTexture===!1?-1:1),oe.isMeshStandardMaterial&&oe.envMap===null&&ie.environment!==null&&(dr.envMapIntensity.value=ie.environmentIntensity),Ir&&(Xt.setValue(X,"toneMappingExposure",C.toneMappingExposure),tt.needsLights&&Qc(dr,ji),Ce&&oe.fog===!0&&Pe.refreshFogUniforms(dr,Ce),Pe.refreshMaterialUniforms(dr,oe,H,re,v.state.transmissionRenderTarget[F.id]),k9.upload(X,Uc(tt),dr,z)),oe.isShaderMaterial&&oe.uniformsNeedUpdate===!0&&(k9.upload(X,Uc(tt),dr,z),oe.uniformsNeedUpdate=!1),oe.isSpriteMaterial&&Xt.setValue(X,"center",ne.center),Xt.setValue(X,"modelViewMatrix",ne.modelViewMatrix),Xt.setValue(X,"normalMatrix",ne.normalMatrix),Xt.setValue(X,"modelMatrix",ne.matrixWorld),oe.isShaderMaterial||oe.isRawShaderMaterial){const F0=oe.uniformsGroups;for(let Mr=0,Lt=F0.length;Mr<Lt;Mr++){const hi=F0[Mr];Z.update(hi,hr),Z.bind(hi,hr)}}return hr}function Qc(F,ie){F.ambientLightColor.needsUpdate=ie,F.lightProbe.needsUpdate=ie,F.directionalLights.needsUpdate=ie,F.directionalLightShadows.needsUpdate=ie,F.pointLights.needsUpdate=ie,F.pointLightShadows.needsUpdate=ie,F.spotLights.needsUpdate=ie,F.spotLightShadows.needsUpdate=ie,F.rectAreaLights.needsUpdate=ie,F.hemisphereLights.needsUpdate=ie}function Ph(F){return F.isMeshLambertMaterial||F.isMeshToonMaterial||F.isMeshPhongMaterial||F.isMeshStandardMaterial||F.isShadowMaterial||F.isShaderMaterial&&F.lights===!0}this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return D},this.setRenderTargetTextures=function(F,ie,he){je.get(F.texture).__webglTexture=ie,je.get(F.depthTexture).__webglTexture=he;const oe=je.get(F);oe.__hasExternalTextures=!0,oe.__autoAllocateDepthBuffer=he===void 0,oe.__autoAllocateDepthBuffer||dt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),oe.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,ie){const he=je.get(F);he.__webglFramebuffer=ie,he.__useDefaultFramebuffer=ie===void 0};const Fc=X.createFramebuffer();this.setRenderTarget=function(F,ie=0,he=0){D=F,T=ie,M=he;let oe=!0,ne=null,Ce=!1,ze=!1;if(F){const Oe=je.get(F);if(Oe.__useDefaultFramebuffer!==void 0)qe.bindFramebuffer(X.FRAMEBUFFER,null),oe=!1;else if(Oe.__webglFramebuffer===void 0)z.setupRenderTarget(F);else if(Oe.__hasExternalTextures)z.rebindTextures(F,je.get(F.texture).__webglTexture,je.get(F.depthTexture).__webglTexture);else if(F.depthBuffer){const at=F.depthTexture;if(Oe.__boundDepthTexture!==at){if(at!==null&&je.has(at)&&(F.width!==at.image.width||F.height!==at.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");z.setupDepthRenderbuffer(F)}}const Ze=F.texture;(Ze.isData3DTexture||Ze.isDataArrayTexture||Ze.isCompressedArrayTexture)&&(ze=!0);const lt=je.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(Array.isArray(lt[ie])?ne=lt[ie][he]:ne=lt[ie],Ce=!0):F.samples>0&&z.useMultisampledRTT(F)===!1?ne=je.get(F).__webglMultisampledFramebuffer:Array.isArray(lt)?ne=lt[he]:ne=lt,L.copy(F.viewport),k.copy(F.scissor),Q=F.scissorTest}else L.copy(P).multiplyScalar(H).floor(),k.copy(V).multiplyScalar(H).floor(),Q=ee;if(he!==0&&(ne=Fc),qe.bindFramebuffer(X.FRAMEBUFFER,ne)&&oe&&qe.drawBuffers(F,ne),qe.viewport(L),qe.scissor(k),qe.setScissorTest(Q),Ce){const Oe=je.get(F.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_CUBE_MAP_POSITIVE_X+ie,Oe.__webglTexture,he)}else if(ze){const Oe=je.get(F.texture),Ze=ie;X.framebufferTextureLayer(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,Oe.__webglTexture,he,Ze)}else if(F!==null&&he!==0){const Oe=je.get(F.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,Oe.__webglTexture,he)}R=-1},this.readRenderTargetPixels=function(F,ie,he,oe,ne,Ce,ze){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Oe=je.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&ze!==void 0&&(Oe=Oe[ze]),Oe){qe.bindFramebuffer(X.FRAMEBUFFER,Oe);try{const Ze=F.texture,lt=Ze.format,at=Ze.type;if(!ft.textureFormatReadable(lt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ft.textureTypeReadable(at)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ie>=0&&ie<=F.width-oe&&he>=0&&he<=F.height-ne&&X.readPixels(ie,he,oe,ne,et.convert(lt),et.convert(at),Ce)}finally{const Ze=D!==null?je.get(D).__webglFramebuffer:null;qe.bindFramebuffer(X.FRAMEBUFFER,Ze)}}},this.readRenderTargetPixelsAsync=async function(F,ie,he,oe,ne,Ce,ze){if(!(F&&F.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Oe=je.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&ze!==void 0&&(Oe=Oe[ze]),Oe){const Ze=F.texture,lt=Ze.format,at=Ze.type;if(!ft.textureFormatReadable(lt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ft.textureTypeReadable(at))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ie>=0&&ie<=F.width-oe&&he>=0&&he<=F.height-ne){qe.bindFramebuffer(X.FRAMEBUFFER,Oe);const rt=X.createBuffer();X.bindBuffer(X.PIXEL_PACK_BUFFER,rt),X.bufferData(X.PIXEL_PACK_BUFFER,Ce.byteLength,X.STREAM_READ),X.readPixels(ie,he,oe,ne,et.convert(lt),et.convert(at),0);const Dt=D!==null?je.get(D).__webglFramebuffer:null;qe.bindFramebuffer(X.FRAMEBUFFER,Dt);const _t=X.fenceSync(X.SYNC_GPU_COMMANDS_COMPLETE,0);return X.flush(),await PE(X,_t,4),X.bindBuffer(X.PIXEL_PACK_BUFFER,rt),X.getBufferSubData(X.PIXEL_PACK_BUFFER,0,Ce),X.deleteBuffer(rt),X.deleteSync(_t),Ce}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(F,ie=null,he=0){F.isTexture!==!0&&(na("WebGLRenderer: copyFramebufferToTexture function signature has changed."),ie=arguments[0]||null,F=arguments[1]);const oe=Math.pow(2,-he),ne=Math.floor(F.image.width*oe),Ce=Math.floor(F.image.height*oe),ze=ie!==null?ie.x:0,Oe=ie!==null?ie.y:0;z.setTexture2D(F,0),X.copyTexSubImage2D(X.TEXTURE_2D,he,0,0,ze,Oe,ne,Ce),qe.unbindTexture()};const Oc=X.createFramebuffer(),zc=X.createFramebuffer();this.copyTextureToTexture=function(F,ie,he=null,oe=null,ne=0,Ce=null){F.isTexture!==!0&&(na("WebGLRenderer: copyTextureToTexture function signature has changed."),oe=arguments[0]||null,F=arguments[1],ie=arguments[2],Ce=arguments[3]||0,he=null),Ce===null&&(ne!==0?(na("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Ce=ne,ne=0):Ce=0);let ze,Oe,Ze,lt,at,rt,Dt,_t,y0;const Qt=F.isCompressedTexture?F.mipmaps[Ce]:F.image;if(he!==null)ze=he.max.x-he.min.x,Oe=he.max.y-he.min.y,Ze=he.isBox3?he.max.z-he.min.z:1,lt=he.min.x,at=he.min.y,rt=he.isBox3?he.min.z:0;else{const X0=Math.pow(2,-ne);ze=Math.floor(Qt.width*X0),Oe=Math.floor(Qt.height*X0),F.isDataArrayTexture?Ze=Qt.depth:F.isData3DTexture?Ze=Math.floor(Qt.depth*X0):Ze=1,lt=0,at=0,rt=0}oe!==null?(Dt=oe.x,_t=oe.y,y0=oe.z):(Dt=0,_t=0,y0=0);const Wt=et.convert(ie.format),tt=et.convert(ie.type);let D0;ie.isData3DTexture?(z.setTexture3D(ie,0),D0=X.TEXTURE_3D):ie.isDataArrayTexture||ie.isCompressedArrayTexture?(z.setTexture2DArray(ie,0),D0=X.TEXTURE_2D_ARRAY):(z.setTexture2D(ie,0),D0=X.TEXTURE_2D),X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL,ie.flipY),X.pixelStorei(X.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),X.pixelStorei(X.UNPACK_ALIGNMENT,ie.unpackAlignment);const sn=X.getParameter(X.UNPACK_ROW_LENGTH),hr=X.getParameter(X.UNPACK_IMAGE_HEIGHT),Ls=X.getParameter(X.UNPACK_SKIP_PIXELS),Ir=X.getParameter(X.UNPACK_SKIP_ROWS),ji=X.getParameter(X.UNPACK_SKIP_IMAGES);X.pixelStorei(X.UNPACK_ROW_LENGTH,Qt.width),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,Qt.height),X.pixelStorei(X.UNPACK_SKIP_PIXELS,lt),X.pixelStorei(X.UNPACK_SKIP_ROWS,at),X.pixelStorei(X.UNPACK_SKIP_IMAGES,rt);const Xt=F.isDataArrayTexture||F.isData3DTexture,dr=ie.isDataArrayTexture||ie.isData3DTexture;if(F.isDepthTexture){const X0=je.get(F),F0=je.get(ie),Mr=je.get(X0.__renderTarget),Lt=je.get(F0.__renderTarget);qe.bindFramebuffer(X.READ_FRAMEBUFFER,Mr.__webglFramebuffer),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,Lt.__webglFramebuffer);for(let hi=0;hi<Ze;hi++)Xt&&(X.framebufferTextureLayer(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,je.get(F).__webglTexture,ne,rt+hi),X.framebufferTextureLayer(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,je.get(ie).__webglTexture,Ce,y0+hi)),X.blitFramebuffer(lt,at,ze,Oe,Dt,_t,ze,Oe,X.DEPTH_BUFFER_BIT,X.NEAREST);qe.bindFramebuffer(X.READ_FRAMEBUFFER,null),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,null)}else if(ne!==0||F.isRenderTargetTexture||je.has(F)){const X0=je.get(F),F0=je.get(ie);qe.bindFramebuffer(X.READ_FRAMEBUFFER,Oc),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,zc);for(let Mr=0;Mr<Ze;Mr++)Xt?X.framebufferTextureLayer(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X0.__webglTexture,ne,rt+Mr):X.framebufferTexture2D(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,X0.__webglTexture,ne),dr?X.framebufferTextureLayer(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,F0.__webglTexture,Ce,y0+Mr):X.framebufferTexture2D(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,F0.__webglTexture,Ce),ne!==0?X.blitFramebuffer(lt,at,ze,Oe,Dt,_t,ze,Oe,X.COLOR_BUFFER_BIT,X.NEAREST):dr?X.copyTexSubImage3D(D0,Ce,Dt,_t,y0+Mr,lt,at,ze,Oe):X.copyTexSubImage2D(D0,Ce,Dt,_t,lt,at,ze,Oe);qe.bindFramebuffer(X.READ_FRAMEBUFFER,null),qe.bindFramebuffer(X.DRAW_FRAMEBUFFER,null)}else dr?F.isDataTexture||F.isData3DTexture?X.texSubImage3D(D0,Ce,Dt,_t,y0,ze,Oe,Ze,Wt,tt,Qt.data):ie.isCompressedArrayTexture?X.compressedTexSubImage3D(D0,Ce,Dt,_t,y0,ze,Oe,Ze,Wt,Qt.data):X.texSubImage3D(D0,Ce,Dt,_t,y0,ze,Oe,Ze,Wt,tt,Qt):F.isDataTexture?X.texSubImage2D(X.TEXTURE_2D,Ce,Dt,_t,ze,Oe,Wt,tt,Qt.data):F.isCompressedTexture?X.compressedTexSubImage2D(X.TEXTURE_2D,Ce,Dt,_t,Qt.width,Qt.height,Wt,Qt.data):X.texSubImage2D(X.TEXTURE_2D,Ce,Dt,_t,ze,Oe,Wt,tt,Qt);X.pixelStorei(X.UNPACK_ROW_LENGTH,sn),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,hr),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Ls),X.pixelStorei(X.UNPACK_SKIP_ROWS,Ir),X.pixelStorei(X.UNPACK_SKIP_IMAGES,ji),Ce===0&&ie.generateMipmaps&&X.generateMipmap(D0),qe.unbindTexture()},this.copyTextureToTexture3D=function(F,ie,he=null,oe=null,ne=0){return F.isTexture!==!0&&(na("WebGLRenderer: copyTextureToTexture3D function signature has changed."),he=arguments[0]||null,oe=arguments[1]||null,F=arguments[2],ie=arguments[3],ne=arguments[4]||0),na('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(F,ie,he,oe,ne)},this.initRenderTarget=function(F){je.get(F).__webglFramebuffer===void 0&&z.setupRenderTarget(F)},this.initTexture=function(F){F.isCubeTexture?z.setTextureCube(F,0):F.isData3DTexture?z.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?z.setTexture2DArray(F,0):z.setTexture2D(F,0),qe.unbindTexture()},this.resetState=function(){T=0,M=0,D=null,qe.reset(),At.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorspace=Mt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Mt._getUnpackColorSpace()}}const M7={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
|
|
3846
3846
|
|
|
3847
3847
|
varying vec2 vUv;
|
|
3848
3848
|
|
|
@@ -3957,7 +3957,7 @@ void main() {
|
|
|
3957
3957
|
`,i=function(v,w,x){w=w||1024;let C=v.pos,B=-1,T=0,M="",D=String.fromCharCode.apply(null,new Uint16Array(v.subarray(C,C+128)));for(;0>(B=D.indexOf(n))&&T<w&&C<v.byteLength;)M+=D,T+=D.length,C+=128,D+=String.fromCharCode.apply(null,new Uint16Array(v.subarray(C,C+128)));return-1<B?(x!==!1&&(v.pos+=T+B+1),M+D.slice(0,B)):!1},s=function(v){const w=/^#\?(\S+)/,x=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,C=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,B=/^\s*FORMAT=(\S+)\s*$/,T=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,M={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let D,R;for((v.pos>=v.byteLength||!(D=i(v)))&&t(1,"no header found"),(R=D.match(w))||t(3,"bad initial token"),M.valid|=1,M.programtype=R[1],M.string+=D+`
|
|
3958
3958
|
`;D=i(v),D!==!1;){if(M.string+=D+`
|
|
3959
3959
|
`,D.charAt(0)==="#"){M.comments+=D+`
|
|
3960
|
-
`;continue}if((R=D.match(x))&&(M.gamma=parseFloat(R[1])),(R=D.match(C))&&(M.exposure=parseFloat(R[1])),(R=D.match(B))&&(M.valid|=2,M.format=R[1]),(R=D.match(T))&&(M.valid|=4,M.height=parseInt(R[1],10),M.width=parseInt(R[2],10)),M.valid&2&&M.valid&4)break}return M.valid&2||t(3,"missing format specifier"),M.valid&4||t(3,"missing image size specifier"),M},o=function(v,w,x){const C=w;if(C<8||C>32767||v[0]!==2||v[1]!==2||v[2]&128)return new Uint8Array(v);C!==(v[2]<<8|v[3])&&t(3,"wrong scanline width");const B=new Uint8Array(4*w*x);B.length||t(4,"unable to allocate buffer space");let T=0,M=0;const D=4*C,R=new Uint8Array(4),S=new Uint8Array(D);let L=x;for(;L>0&&M<v.byteLength;){M+4>v.byteLength&&t(1),R[0]=v[M++],R[1]=v[M++],R[2]=v[M++],R[3]=v[M++],(R[0]!=2||R[1]!=2||(R[2]<<8|R[3])!=C)&&t(3,"bad rgbe scanline format");let k=0,Q;for(;k<D&&M<v.byteLength;){Q=v[M++];const J=Q>128;if(J&&(Q-=128),(Q===0||k+Q>D)&&t(3,"bad scanline data"),J){const q=v[M++];for(let re=0;re<Q;re++)S[k++]=q}else S.set(v.subarray(M,M+Q),k),k+=Q,M+=Q}const W=C;for(let J=0;J<W;J++){let q=0;B[T]=S[J+q],q+=C,B[T+1]=S[J+q],q+=C,B[T+2]=S[J+q],q+=C,B[T+3]=S[J+q],T+=4}L--}return B},l=function(v,w,x,C){const B=v[w+3],T=Math.pow(2,B-128)/255;x[C+0]=v[w+0]*T,x[C+1]=v[w+1]*T,x[C+2]=v[w+2]*T,x[C+3]=1},h=function(v,w,x,C){const B=v[w+3],T=Math.pow(2,B-128)/255;x[C+0]=Co.toHalfFloat(Math.min(v[w+0]*T,65504)),x[C+1]=Co.toHalfFloat(Math.min(v[w+1]*T,65504)),x[C+2]=Co.toHalfFloat(Math.min(v[w+2]*T,65504)),x[C+3]=Co.toHalfFloat(1)},u=new Uint8Array(e);u.pos=0;const d=s(u),A=d.width,p=d.height,g=o(u.subarray(u.pos),A,p);let _,E,m;switch(this.type){case Jt:m=g.length/4;const v=new Float32Array(m*4);for(let x=0;x<m;x++)l(g,x*4,v,x*4);_=v,E=Jt;break;case f0:m=g.length/4;const w=new Uint16Array(m*4);for(let x=0;x<m;x++)h(g,x*4,w,x*4);_=w,E=f0;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:A,height:p,data:_,header:d.string,gamma:d.gamma,exposure:d.exposure,type:E}}setDataType(e){return this.type=e,this}load(e,t,n,i){function s(o,l){switch(o.type){case Jt:case f0:o.colorSpace=H0,o.minFilter=Gt,o.magFilter=Gt,o.generateMipmaps=!1,o.flipY=!0;break}t&&t(o,l)}return super.load(e,s,n,i)}}var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yb(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Eb(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 Ep={exports:{}};function xb(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 xp={exports:{}};const wb={},Cb=Object.freeze(Object.defineProperty({__proto__:null,default:wb},Symbol.toStringTag,{value:"Module"})),Ib=Eb(Cb);var wp;function Tt(){return wp||(wp=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 xb=="function")try{s=Ib}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 C;return w.prototype=x,C=new w,w.prototype=null,C}}(),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,C=w.words,B=this.sigBytes,T=w.sigBytes;if(this.clamp(),B%4)for(var M=0;M<T;M++){var D=C[M>>>2]>>>24-M%4*8&255;x[B+M>>>2]|=D<<24-(B+M)%4*8}else for(var R=0;R<T;R+=4)x[B+R>>>2]=C[R>>>2];return this.sigBytes+=T,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=[],C=0;C<w;C+=4)x.push(o());return new A.init(x,w)}}),p=h.enc={},g=p.Hex={stringify:function(w){for(var x=w.words,C=w.sigBytes,B=[],T=0;T<C;T++){var M=x[T>>>2]>>>24-T%4*8&255;B.push((M>>>4).toString(16)),B.push((M&15).toString(16))}return B.join("")},parse:function(w){for(var x=w.length,C=[],B=0;B<x;B+=2)C[B>>>3]|=parseInt(w.substr(B,2),16)<<24-B%8*4;return new A.init(C,x/2)}},_=p.Latin1={stringify:function(w){for(var x=w.words,C=w.sigBytes,B=[],T=0;T<C;T++){var M=x[T>>>2]>>>24-T%4*8&255;B.push(String.fromCharCode(M))}return B.join("")},parse:function(w){for(var x=w.length,C=[],B=0;B<x;B++)C[B>>>2]|=(w.charCodeAt(B)&255)<<24-B%4*8;return new A.init(C,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,C=this._data,B=C.words,T=C.sigBytes,M=this.blockSize,D=M*4,R=T/D;w?R=n.ceil(R):R=n.max((R|0)-this._minBufferSize,0);var S=R*M,L=n.min(S*4,T);if(S){for(var k=0;k<S;k+=M)this._doProcessBlock(B,k);x=B.splice(0,S),C.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,C){return new w.init(C).finalize(x)}},_createHmacHelper:function(w){return function(x,C){return new v.HMAC.init(w,C).finalize(x)}}});var v=h.algo={};return h}(Math);return t})}(xp)),xp.exports}var Cp={exports:{}},Ip;function tc(){return Ip||(Ip=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(Cp)),Cp.exports}var Mp={exports:{}},Sp;function Mb(){return Sp||(Sp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(Mp)),Mp.exports}var Tp={exports:{}},Bp;function Sb(){return Bp||(Bp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(Tp)),Tp.exports}var bp={exports:{}},Rp;function wa(){return Rp||(Rp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(bp)),bp.exports}var Dp={exports:{}},Lp;function Tb(){return Lp||(Lp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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 C=p.charAt(64);if(C)for(;g.length%4;)g.push(C);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})}(Dp)),Dp.exports}var Np={exports:{}},Pp;function Ca(){return Pp||(Pp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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 C=this._hash.words,B=E[m+0],T=E[m+1],M=E[m+2],D=E[m+3],R=E[m+4],S=E[m+5],L=E[m+6],k=E[m+7],Q=E[m+8],W=E[m+9],J=E[m+10],q=E[m+11],re=E[m+12],H=E[m+13],j=E[m+14],$=E[m+15],P=C[0],V=C[1],ee=C[2],O=C[3];P=A(P,V,ee,O,B,7,u[0]),O=A(O,P,V,ee,T,12,u[1]),ee=A(ee,O,P,V,M,17,u[2]),V=A(V,ee,O,P,D,22,u[3]),P=A(P,V,ee,O,R,7,u[4]),O=A(O,P,V,ee,S,12,u[5]),ee=A(ee,O,P,V,L,17,u[6]),V=A(V,ee,O,P,k,22,u[7]),P=A(P,V,ee,O,Q,7,u[8]),O=A(O,P,V,ee,W,12,u[9]),ee=A(ee,O,P,V,J,17,u[10]),V=A(V,ee,O,P,q,22,u[11]),P=A(P,V,ee,O,re,7,u[12]),O=A(O,P,V,ee,H,12,u[13]),ee=A(ee,O,P,V,j,17,u[14]),V=A(V,ee,O,P,$,22,u[15]),P=p(P,V,ee,O,T,5,u[16]),O=p(O,P,V,ee,L,9,u[17]),ee=p(ee,O,P,V,q,14,u[18]),V=p(V,ee,O,P,B,20,u[19]),P=p(P,V,ee,O,S,5,u[20]),O=p(O,P,V,ee,J,9,u[21]),ee=p(ee,O,P,V,$,14,u[22]),V=p(V,ee,O,P,R,20,u[23]),P=p(P,V,ee,O,W,5,u[24]),O=p(O,P,V,ee,j,9,u[25]),ee=p(ee,O,P,V,D,14,u[26]),V=p(V,ee,O,P,Q,20,u[27]),P=p(P,V,ee,O,H,5,u[28]),O=p(O,P,V,ee,M,9,u[29]),ee=p(ee,O,P,V,k,14,u[30]),V=p(V,ee,O,P,re,20,u[31]),P=g(P,V,ee,O,S,4,u[32]),O=g(O,P,V,ee,Q,11,u[33]),ee=g(ee,O,P,V,q,16,u[34]),V=g(V,ee,O,P,j,23,u[35]),P=g(P,V,ee,O,T,4,u[36]),O=g(O,P,V,ee,R,11,u[37]),ee=g(ee,O,P,V,k,16,u[38]),V=g(V,ee,O,P,J,23,u[39]),P=g(P,V,ee,O,H,4,u[40]),O=g(O,P,V,ee,B,11,u[41]),ee=g(ee,O,P,V,D,16,u[42]),V=g(V,ee,O,P,L,23,u[43]),P=g(P,V,ee,O,W,4,u[44]),O=g(O,P,V,ee,re,11,u[45]),ee=g(ee,O,P,V,$,16,u[46]),V=g(V,ee,O,P,M,23,u[47]),P=_(P,V,ee,O,B,6,u[48]),O=_(O,P,V,ee,k,10,u[49]),ee=_(ee,O,P,V,j,15,u[50]),V=_(V,ee,O,P,S,21,u[51]),P=_(P,V,ee,O,re,6,u[52]),O=_(O,P,V,ee,D,10,u[53]),ee=_(ee,O,P,V,J,15,u[54]),V=_(V,ee,O,P,T,21,u[55]),P=_(P,V,ee,O,Q,6,u[56]),O=_(O,P,V,ee,$,10,u[57]),ee=_(ee,O,P,V,L,15,u[58]),V=_(V,ee,O,P,H,21,u[59]),P=_(P,V,ee,O,R,6,u[60]),O=_(O,P,V,ee,q,10,u[61]),ee=_(ee,O,P,V,M,15,u[62]),V=_(V,ee,O,P,W,21,u[63]),C[0]=C[0]+P|0,C[1]=C[1]+V|0,C[2]=C[2]+ee|0,C[3]=C[3]+O|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),C=v;m[(w+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,E.sigBytes=(m.length+1)*4,this._process();for(var B=this._hash,T=B.words,M=0;M<4;M++){var D=T[M];T[M]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return B},clone:function(){var E=l.clone.call(this);return E._hash=this._hash.clone(),E}});function A(E,m,v,w,x,C,B){var T=E+(m&v|~m&w)+x+B;return(T<<C|T>>>32-C)+m}function p(E,m,v,w,x,C,B){var T=E+(m&w|v&~w)+x+B;return(T<<C|T>>>32-C)+m}function g(E,m,v,w,x,C,B){var T=E+(m^v^w)+x+B;return(T<<C|T>>>32-C)+m}function _(E,m,v,w,x,C,B){var T=E+(v^(m|~w))+x+B;return(T<<C|T>>>32-C)+m}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(Np)),Np.exports}var Up={exports:{}},kp;function Qp(){return kp||(kp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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 C=(g<<5|g>>>27)+v+h[w];w<20?C+=(_&E|~_&m)+1518500249:w<40?C+=(_^E^m)+1859775393:w<60?C+=(_&E|_&m|E&m)-1894007588:C+=(_^E^m)-899497514,v=m,m=E,E=_<<30|_>>>2,_=g,g=C}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})}(Up)),Up.exports}var Fp={exports:{}},Op;function I8(){return Op||(Op=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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],C=E[4],B=E[5],T=E[6],M=E[7],D=0;D<64;D++){if(D<16)A[D]=g[_+D]|0;else{var R=A[D-15],S=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,L=A[D-2],k=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;A[D]=S+A[D-7]+k+A[D-16]}var Q=C&B^~C&T,W=m&v^m&w^v&w,J=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),q=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),re=M+q+Q+d[D]+A[D],H=J+W;M=T,T=B,B=C,C=x+re|0,x=w,w=v,v=m,m=re+H|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]+C|0,E[5]=E[5]+B|0,E[6]=E[6]+T|0,E[7]=E[7]+M|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})}(Fp)),Fp.exports}var zp={exports:{}},Gp;function Bb(){return Gp||(Gp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),I8())})(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})}(zp)),zp.exports}var Hp={exports:{}},Vp;function jp(){return Vp||(Vp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),tc())})(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],C=m[3],B=m[4],T=m[5],M=m[6],D=m[7],R=v.high,S=v.low,L=w.high,k=w.low,Q=x.high,W=x.low,J=C.high,q=C.low,re=B.high,H=B.low,j=T.high,$=T.low,P=M.high,V=M.low,ee=D.high,O=D.low,ce=R,fe=S,Ae=L,pe=k,De=Q,Qe=W,wt=J,ut=q,ht=re,X=H,u0=j,dt=$,ft=P,qe=V,It=ee,je=O,z=0;z<80;z++){var U,se,_e=p[z];if(z<16)se=_e.high=_[E+z*2]|0,U=_e.low=_[E+z*2+1]|0;else{var Ee=p[z-15],ve=Ee.high,Ye=Ee.low,Pe=(ve>>>1|Ye<<31)^(ve>>>8|Ye<<24)^ve>>>7,Ge=(Ye>>>1|ve<<31)^(Ye>>>8|ve<<24)^(Ye>>>7|ve<<25),pt=p[z-2],we=pt.high,ke=pt.low,ge=(we>>>19|ke<<13)^(we<<3|ke>>>29)^we>>>6,Le=(ke>>>19|we<<13)^(ke<<3|we>>>29)^(ke>>>6|we<<26),Te=p[z-7],nt=Te.high,et=Te.low,At=p[z-16],Z=At.high,Re=At.low;U=Ge+et,se=Pe+nt+(U>>>0<Ge>>>0?1:0),U=U+Le,se=se+ge+(U>>>0<Le>>>0?1:0),U=U+Re,se=se+Z+(U>>>0<Re>>>0?1:0),_e.high=se,_e.low=U}var de=ht&u0^~ht&ft,ye=X&dt^~X&qe,be=ce&Ae^ce&De^Ae&De,Ne=fe&pe^fe&Qe^pe&Qe,Et=(ce>>>28|fe<<4)^(ce<<30|fe>>>2)^(ce<<25|fe>>>7),jt=(fe>>>28|ce<<4)^(fe<<30|ce>>>2)^(fe<<25|ce>>>7),_0=(ht>>>14|X<<18)^(ht>>>18|X<<14)^(ht<<23|X>>>9),bt=(X>>>14|ht<<18)^(X>>>18|ht<<14)^(X<<23|ht>>>9),rr=A[z],nr=rr.high,Hi=rr.low,g0=je+bt,q0=It+_0+(g0>>>0<je>>>0?1:0),g0=g0+ye,q0=q0+de+(g0>>>0<ye>>>0?1:0),g0=g0+Hi,q0=q0+nr+(g0>>>0<Hi>>>0?1:0),g0=g0+U,q0=q0+se+(g0>>>0<U>>>0?1:0),Cn=jt+Ne,Vi=Et+be+(Cn>>>0<jt>>>0?1:0);It=ft,je=qe,ft=u0,qe=dt,u0=ht,dt=X,X=ut+g0|0,ht=wt+q0+(X>>>0<ut>>>0?1:0)|0,wt=De,ut=Qe,De=Ae,Qe=pe,Ae=ce,pe=fe,fe=g0+Cn|0,ce=q0+Vi+(fe>>>0<g0>>>0?1:0)|0}S=v.low=S+fe,v.high=R+ce+(S>>>0<fe>>>0?1:0),k=w.low=k+pe,w.high=L+Ae+(k>>>0<pe>>>0?1:0),W=x.low=W+Qe,x.high=Q+De+(W>>>0<Qe>>>0?1:0),q=C.low=q+ut,C.high=J+wt+(q>>>0<ut>>>0?1:0),H=B.low=H+X,B.high=re+ht+(H>>>0<X>>>0?1:0),$=T.low=$+dt,T.high=j+u0+($>>>0<dt>>>0?1:0),V=M.low=V+qe,M.high=P+ft+(V>>>0<qe>>>0?1:0),O=D.low=O+je,D.high=ee+It+(O>>>0<je>>>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})}(Hp)),Hp.exports}var Wp={exports:{}},Yp;function bb(){return Yp||(Yp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),tc(),jp())})(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})}(Wp)),Wp.exports}var qp={exports:{}},Xp;function Rb(){return Xp||(Xp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),tc())})(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,C=(2*m+3*v)%5;m=x,v=C}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 B=1,T=0;T<24;T++){for(var M=0,D=0,R=0;R<7;R++){if(B&1){var S=(1<<R)-1;S<32?D^=1<<S:M^=1<<S-32}B&128?B=B<<1^113:B<<=1}g[T]=u.create(M,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,C=0;C<x;C++){var B=m[v+2*C],T=m[v+2*C+1];B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var M=w[C];M.high^=T,M.low^=B}for(var D=0;D<24;D++){for(var R=0;R<5;R++){for(var S=0,L=0,k=0;k<5;k++){var M=w[R+5*k];S^=M.high,L^=M.low}var Q=_[R];Q.high=S,Q.low=L}for(var R=0;R<5;R++)for(var W=_[(R+4)%5],J=_[(R+1)%5],q=J.high,re=J.low,S=W.high^(q<<1|re>>>31),L=W.low^(re<<1|q>>>31),k=0;k<5;k++){var M=w[R+5*k];M.high^=S,M.low^=L}for(var H=1;H<25;H++){var S,L,M=w[H],j=M.high,$=M.low,P=A[H];P<32?(S=j<<P|$>>>32-P,L=$<<P|j>>>32-P):(S=$<<P-32|j>>>64-P,L=j<<P-32|$>>>64-P);var V=_[p[H]];V.high=S,V.low=L}var ee=_[0],O=w[0];ee.high=O.high,ee.low=O.low;for(var R=0;R<5;R++)for(var k=0;k<5;k++){var H=R+5*k,M=w[H],ce=_[H],fe=_[(R+1)%5+5*k],Ae=_[(R+2)%5+5*k];M.high=ce.high^~fe.high&Ae.high,M.low=ce.low^~fe.low&Ae.low}var M=w[0],pe=g[D];M.high^=pe.high,M.low^=pe.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 C=this._state,B=this.cfg.outputLength/8,T=B/8,M=[],D=0;D<T;D++){var R=C[D],S=R.high,L=R.low;S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,M.push(L),M.push(S)}return new o.init(M,B)},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})}(qp)),qp.exports}var Jp={exports:{}},Kp;function Db(){return Kp||(Kp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(yt,function(t){/** @preserve
|
|
3960
|
+
`;continue}if((R=D.match(x))&&(M.gamma=parseFloat(R[1])),(R=D.match(C))&&(M.exposure=parseFloat(R[1])),(R=D.match(B))&&(M.valid|=2,M.format=R[1]),(R=D.match(T))&&(M.valid|=4,M.height=parseInt(R[1],10),M.width=parseInt(R[2],10)),M.valid&2&&M.valid&4)break}return M.valid&2||t(3,"missing format specifier"),M.valid&4||t(3,"missing image size specifier"),M},o=function(v,w,x){const C=w;if(C<8||C>32767||v[0]!==2||v[1]!==2||v[2]&128)return new Uint8Array(v);C!==(v[2]<<8|v[3])&&t(3,"wrong scanline width");const B=new Uint8Array(4*w*x);B.length||t(4,"unable to allocate buffer space");let T=0,M=0;const D=4*C,R=new Uint8Array(4),S=new Uint8Array(D);let L=x;for(;L>0&&M<v.byteLength;){M+4>v.byteLength&&t(1),R[0]=v[M++],R[1]=v[M++],R[2]=v[M++],R[3]=v[M++],(R[0]!=2||R[1]!=2||(R[2]<<8|R[3])!=C)&&t(3,"bad rgbe scanline format");let k=0,Q;for(;k<D&&M<v.byteLength;){Q=v[M++];const J=Q>128;if(J&&(Q-=128),(Q===0||k+Q>D)&&t(3,"bad scanline data"),J){const q=v[M++];for(let re=0;re<Q;re++)S[k++]=q}else S.set(v.subarray(M,M+Q),k),k+=Q,M+=Q}const W=C;for(let J=0;J<W;J++){let q=0;B[T]=S[J+q],q+=C,B[T+1]=S[J+q],q+=C,B[T+2]=S[J+q],q+=C,B[T+3]=S[J+q],T+=4}L--}return B},l=function(v,w,x,C){const B=v[w+3],T=Math.pow(2,B-128)/255;x[C+0]=v[w+0]*T,x[C+1]=v[w+1]*T,x[C+2]=v[w+2]*T,x[C+3]=1},h=function(v,w,x,C){const B=v[w+3],T=Math.pow(2,B-128)/255;x[C+0]=Co.toHalfFloat(Math.min(v[w+0]*T,65504)),x[C+1]=Co.toHalfFloat(Math.min(v[w+1]*T,65504)),x[C+2]=Co.toHalfFloat(Math.min(v[w+2]*T,65504)),x[C+3]=Co.toHalfFloat(1)},u=new Uint8Array(e);u.pos=0;const d=s(u),A=d.width,p=d.height,g=o(u.subarray(u.pos),A,p);let _,E,m;switch(this.type){case Jt:m=g.length/4;const v=new Float32Array(m*4);for(let x=0;x<m;x++)l(g,x*4,v,x*4);_=v,E=Jt;break;case f0:m=g.length/4;const w=new Uint16Array(m*4);for(let x=0;x<m;x++)h(g,x*4,w,x*4);_=w,E=f0;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:A,height:p,data:_,header:d.string,gamma:d.gamma,exposure:d.exposure,type:E}}setDataType(e){return this.type=e,this}load(e,t,n,i){function s(o,l){switch(o.type){case Jt:case f0:o.colorSpace=H0,o.minFilter=Gt,o.magFilter=Gt,o.generateMipmaps=!1,o.flipY=!0;break}t&&t(o,l)}return super.load(e,s,n,i)}}var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yb(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Eb(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 Ep={exports:{}};function xb(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 xp={exports:{}};const wb={},Cb=Object.freeze(Object.defineProperty({__proto__:null,default:wb},Symbol.toStringTag,{value:"Module"})),Ib=Eb(Cb);var wp;function Tt(){return wp||(wp=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 xb=="function")try{s=Ib}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 C;return w.prototype=x,C=new w,w.prototype=null,C}}(),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,C=w.words,B=this.sigBytes,T=w.sigBytes;if(this.clamp(),B%4)for(var M=0;M<T;M++){var D=C[M>>>2]>>>24-M%4*8&255;x[B+M>>>2]|=D<<24-(B+M)%4*8}else for(var R=0;R<T;R+=4)x[B+R>>>2]=C[R>>>2];return this.sigBytes+=T,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=[],C=0;C<w;C+=4)x.push(o());return new A.init(x,w)}}),p=h.enc={},g=p.Hex={stringify:function(w){for(var x=w.words,C=w.sigBytes,B=[],T=0;T<C;T++){var M=x[T>>>2]>>>24-T%4*8&255;B.push((M>>>4).toString(16)),B.push((M&15).toString(16))}return B.join("")},parse:function(w){for(var x=w.length,C=[],B=0;B<x;B+=2)C[B>>>3]|=parseInt(w.substr(B,2),16)<<24-B%8*4;return new A.init(C,x/2)}},_=p.Latin1={stringify:function(w){for(var x=w.words,C=w.sigBytes,B=[],T=0;T<C;T++){var M=x[T>>>2]>>>24-T%4*8&255;B.push(String.fromCharCode(M))}return B.join("")},parse:function(w){for(var x=w.length,C=[],B=0;B<x;B++)C[B>>>2]|=(w.charCodeAt(B)&255)<<24-B%4*8;return new A.init(C,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,C=this._data,B=C.words,T=C.sigBytes,M=this.blockSize,D=M*4,R=T/D;w?R=n.ceil(R):R=n.max((R|0)-this._minBufferSize,0);var S=R*M,L=n.min(S*4,T);if(S){for(var k=0;k<S;k+=M)this._doProcessBlock(B,k);x=B.splice(0,S),C.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,C){return new w.init(C).finalize(x)}},_createHmacHelper:function(w){return function(x,C){return new v.HMAC.init(w,C).finalize(x)}}});var v=h.algo={};return h}(Math);return t})}(xp)),xp.exports}var Cp={exports:{}},Ip;function tc(){return Ip||(Ip=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(Cp)),Cp.exports}var Mp={exports:{}},Sp;function Mb(){return Sp||(Sp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(Mp)),Mp.exports}var Tp={exports:{}},Bp;function Sb(){return Bp||(Bp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(Tp)),Tp.exports}var bp={exports:{}},Rp;function wa(){return Rp||(Rp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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})}(bp)),bp.exports}var Dp={exports:{}},Lp;function Tb(){return Lp||(Lp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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 C=p.charAt(64);if(C)for(;g.length%4;)g.push(C);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})}(Dp)),Dp.exports}var Np={exports:{}},Pp;function Ca(){return Pp||(Pp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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 C=this._hash.words,B=E[m+0],T=E[m+1],M=E[m+2],D=E[m+3],R=E[m+4],S=E[m+5],L=E[m+6],k=E[m+7],Q=E[m+8],W=E[m+9],J=E[m+10],q=E[m+11],re=E[m+12],H=E[m+13],j=E[m+14],$=E[m+15],P=C[0],V=C[1],ee=C[2],O=C[3];P=A(P,V,ee,O,B,7,u[0]),O=A(O,P,V,ee,T,12,u[1]),ee=A(ee,O,P,V,M,17,u[2]),V=A(V,ee,O,P,D,22,u[3]),P=A(P,V,ee,O,R,7,u[4]),O=A(O,P,V,ee,S,12,u[5]),ee=A(ee,O,P,V,L,17,u[6]),V=A(V,ee,O,P,k,22,u[7]),P=A(P,V,ee,O,Q,7,u[8]),O=A(O,P,V,ee,W,12,u[9]),ee=A(ee,O,P,V,J,17,u[10]),V=A(V,ee,O,P,q,22,u[11]),P=A(P,V,ee,O,re,7,u[12]),O=A(O,P,V,ee,H,12,u[13]),ee=A(ee,O,P,V,j,17,u[14]),V=A(V,ee,O,P,$,22,u[15]),P=p(P,V,ee,O,T,5,u[16]),O=p(O,P,V,ee,L,9,u[17]),ee=p(ee,O,P,V,q,14,u[18]),V=p(V,ee,O,P,B,20,u[19]),P=p(P,V,ee,O,S,5,u[20]),O=p(O,P,V,ee,J,9,u[21]),ee=p(ee,O,P,V,$,14,u[22]),V=p(V,ee,O,P,R,20,u[23]),P=p(P,V,ee,O,W,5,u[24]),O=p(O,P,V,ee,j,9,u[25]),ee=p(ee,O,P,V,D,14,u[26]),V=p(V,ee,O,P,Q,20,u[27]),P=p(P,V,ee,O,H,5,u[28]),O=p(O,P,V,ee,M,9,u[29]),ee=p(ee,O,P,V,k,14,u[30]),V=p(V,ee,O,P,re,20,u[31]),P=g(P,V,ee,O,S,4,u[32]),O=g(O,P,V,ee,Q,11,u[33]),ee=g(ee,O,P,V,q,16,u[34]),V=g(V,ee,O,P,j,23,u[35]),P=g(P,V,ee,O,T,4,u[36]),O=g(O,P,V,ee,R,11,u[37]),ee=g(ee,O,P,V,k,16,u[38]),V=g(V,ee,O,P,J,23,u[39]),P=g(P,V,ee,O,H,4,u[40]),O=g(O,P,V,ee,B,11,u[41]),ee=g(ee,O,P,V,D,16,u[42]),V=g(V,ee,O,P,L,23,u[43]),P=g(P,V,ee,O,W,4,u[44]),O=g(O,P,V,ee,re,11,u[45]),ee=g(ee,O,P,V,$,16,u[46]),V=g(V,ee,O,P,M,23,u[47]),P=_(P,V,ee,O,B,6,u[48]),O=_(O,P,V,ee,k,10,u[49]),ee=_(ee,O,P,V,j,15,u[50]),V=_(V,ee,O,P,S,21,u[51]),P=_(P,V,ee,O,re,6,u[52]),O=_(O,P,V,ee,D,10,u[53]),ee=_(ee,O,P,V,J,15,u[54]),V=_(V,ee,O,P,T,21,u[55]),P=_(P,V,ee,O,Q,6,u[56]),O=_(O,P,V,ee,$,10,u[57]),ee=_(ee,O,P,V,L,15,u[58]),V=_(V,ee,O,P,H,21,u[59]),P=_(P,V,ee,O,R,6,u[60]),O=_(O,P,V,ee,q,10,u[61]),ee=_(ee,O,P,V,M,15,u[62]),V=_(V,ee,O,P,W,21,u[63]),C[0]=C[0]+P|0,C[1]=C[1]+V|0,C[2]=C[2]+ee|0,C[3]=C[3]+O|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),C=v;m[(w+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,E.sigBytes=(m.length+1)*4,this._process();for(var B=this._hash,T=B.words,M=0;M<4;M++){var D=T[M];T[M]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return B},clone:function(){var E=l.clone.call(this);return E._hash=this._hash.clone(),E}});function A(E,m,v,w,x,C,B){var T=E+(m&v|~m&w)+x+B;return(T<<C|T>>>32-C)+m}function p(E,m,v,w,x,C,B){var T=E+(m&w|v&~w)+x+B;return(T<<C|T>>>32-C)+m}function g(E,m,v,w,x,C,B){var T=E+(m^v^w)+x+B;return(T<<C|T>>>32-C)+m}function _(E,m,v,w,x,C,B){var T=E+(v^(m|~w))+x+B;return(T<<C|T>>>32-C)+m}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(Np)),Np.exports}var Up={exports:{}},kp;function Qp(){return kp||(kp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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 C=(g<<5|g>>>27)+v+h[w];w<20?C+=(_&E|~_&m)+1518500249:w<40?C+=(_^E^m)+1859775393:w<60?C+=(_&E|_&m|E&m)-1894007588:C+=(_^E^m)-899497514,v=m,m=E,E=_<<30|_>>>2,_=g,g=C}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})}(Up)),Up.exports}var Fp={exports:{}},Op;function I8(){return Op||(Op=1,function(r,e){(function(t,n){r.exports=n(Tt())})(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],C=E[4],B=E[5],T=E[6],M=E[7],D=0;D<64;D++){if(D<16)A[D]=g[_+D]|0;else{var R=A[D-15],S=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,L=A[D-2],k=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;A[D]=S+A[D-7]+k+A[D-16]}var Q=C&B^~C&T,W=m&v^m&w^v&w,J=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),q=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),re=M+q+Q+d[D]+A[D],H=J+W;M=T,T=B,B=C,C=x+re|0,x=w,w=v,v=m,m=re+H|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]+C|0,E[5]=E[5]+B|0,E[6]=E[6]+T|0,E[7]=E[7]+M|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})}(Fp)),Fp.exports}var zp={exports:{}},Gp;function Bb(){return Gp||(Gp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),I8())})(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})}(zp)),zp.exports}var Hp={exports:{}},Vp;function jp(){return Vp||(Vp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),tc())})(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],C=m[3],B=m[4],T=m[5],M=m[6],D=m[7],R=v.high,S=v.low,L=w.high,k=w.low,Q=x.high,W=x.low,J=C.high,q=C.low,re=B.high,H=B.low,j=T.high,$=T.low,P=M.high,V=M.low,ee=D.high,O=D.low,ce=R,fe=S,Ae=L,pe=k,Re=Q,ke=W,wt=J,ut=q,ht=re,X=H,u0=j,dt=$,ft=P,qe=V,It=ee,je=O,z=0;z<80;z++){var U,se,ye=p[z];if(z<16)se=ye.high=_[E+z*2]|0,U=ye.low=_[E+z*2+1]|0;else{var Ee=p[z-15],_e=Ee.high,Ye=Ee.low,Pe=(_e>>>1|Ye<<31)^(_e>>>8|Ye<<24)^_e>>>7,Ge=(Ye>>>1|_e<<31)^(Ye>>>8|_e<<24)^(Ye>>>7|_e<<25),pt=p[z-2],we=pt.high,Qe=pt.low,ge=(we>>>19|Qe<<13)^(we<<3|Qe>>>29)^we>>>6,De=(Qe>>>19|we<<13)^(Qe<<3|we>>>29)^(Qe>>>6|we<<26),Se=p[z-7],nt=Se.high,et=Se.low,At=p[z-16],Z=At.high,Le=At.low;U=Ge+et,se=Pe+nt+(U>>>0<Ge>>>0?1:0),U=U+De,se=se+ge+(U>>>0<De>>>0?1:0),U=U+Le,se=se+Z+(U>>>0<Le>>>0?1:0),ye.high=se,ye.low=U}var ue=ht&u0^~ht&ft,ve=X&dt^~X&qe,be=ce&Ae^ce&Re^Ae&Re,Ne=fe&pe^fe&ke^pe&ke,Et=(ce>>>28|fe<<4)^(ce<<30|fe>>>2)^(ce<<25|fe>>>7),jt=(fe>>>28|ce<<4)^(fe<<30|ce>>>2)^(fe<<25|ce>>>7),_0=(ht>>>14|X<<18)^(ht>>>18|X<<14)^(ht<<23|X>>>9),bt=(X>>>14|ht<<18)^(X>>>18|ht<<14)^(X<<23|ht>>>9),rr=A[z],nr=rr.high,Hi=rr.low,g0=je+bt,q0=It+_0+(g0>>>0<je>>>0?1:0),g0=g0+ve,q0=q0+ue+(g0>>>0<ve>>>0?1:0),g0=g0+Hi,q0=q0+nr+(g0>>>0<Hi>>>0?1:0),g0=g0+U,q0=q0+se+(g0>>>0<U>>>0?1:0),Cn=jt+Ne,Vi=Et+be+(Cn>>>0<jt>>>0?1:0);It=ft,je=qe,ft=u0,qe=dt,u0=ht,dt=X,X=ut+g0|0,ht=wt+q0+(X>>>0<ut>>>0?1:0)|0,wt=Re,ut=ke,Re=Ae,ke=pe,Ae=ce,pe=fe,fe=g0+Cn|0,ce=q0+Vi+(fe>>>0<g0>>>0?1:0)|0}S=v.low=S+fe,v.high=R+ce+(S>>>0<fe>>>0?1:0),k=w.low=k+pe,w.high=L+Ae+(k>>>0<pe>>>0?1:0),W=x.low=W+ke,x.high=Q+Re+(W>>>0<ke>>>0?1:0),q=C.low=q+ut,C.high=J+wt+(q>>>0<ut>>>0?1:0),H=B.low=H+X,B.high=re+ht+(H>>>0<X>>>0?1:0),$=T.low=$+dt,T.high=j+u0+($>>>0<dt>>>0?1:0),V=M.low=V+qe,M.high=P+ft+(V>>>0<qe>>>0?1:0),O=D.low=O+je,D.high=ee+It+(O>>>0<je>>>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})}(Hp)),Hp.exports}var Wp={exports:{}},Yp;function bb(){return Yp||(Yp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),tc(),jp())})(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})}(Wp)),Wp.exports}var qp={exports:{}},Xp;function Rb(){return Xp||(Xp=1,function(r,e){(function(t,n,i){r.exports=n(Tt(),tc())})(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,C=(2*m+3*v)%5;m=x,v=C}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 B=1,T=0;T<24;T++){for(var M=0,D=0,R=0;R<7;R++){if(B&1){var S=(1<<R)-1;S<32?D^=1<<S:M^=1<<S-32}B&128?B=B<<1^113:B<<=1}g[T]=u.create(M,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,C=0;C<x;C++){var B=m[v+2*C],T=m[v+2*C+1];B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var M=w[C];M.high^=T,M.low^=B}for(var D=0;D<24;D++){for(var R=0;R<5;R++){for(var S=0,L=0,k=0;k<5;k++){var M=w[R+5*k];S^=M.high,L^=M.low}var Q=_[R];Q.high=S,Q.low=L}for(var R=0;R<5;R++)for(var W=_[(R+4)%5],J=_[(R+1)%5],q=J.high,re=J.low,S=W.high^(q<<1|re>>>31),L=W.low^(re<<1|q>>>31),k=0;k<5;k++){var M=w[R+5*k];M.high^=S,M.low^=L}for(var H=1;H<25;H++){var S,L,M=w[H],j=M.high,$=M.low,P=A[H];P<32?(S=j<<P|$>>>32-P,L=$<<P|j>>>32-P):(S=$<<P-32|j>>>64-P,L=j<<P-32|$>>>64-P);var V=_[p[H]];V.high=S,V.low=L}var ee=_[0],O=w[0];ee.high=O.high,ee.low=O.low;for(var R=0;R<5;R++)for(var k=0;k<5;k++){var H=R+5*k,M=w[H],ce=_[H],fe=_[(R+1)%5+5*k],Ae=_[(R+2)%5+5*k];M.high=ce.high^~fe.high&Ae.high,M.low=ce.low^~fe.low&Ae.low}var M=w[0],pe=g[D];M.high^=pe.high,M.low^=pe.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 C=this._state,B=this.cfg.outputLength/8,T=B/8,M=[],D=0;D<T;D++){var R=C[D],S=R.high,L=R.low;S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,M.push(L),M.push(S)}return new o.init(M,B)},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})}(qp)),qp.exports}var Jp={exports:{}},Kp;function Db(){return Kp||(Kp=1,function(r,e){(function(t,n){r.exports=n(Tt())})(yt,function(t){/** @preserve
|
|
3961
3961
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
3962
3962
|
|
|
3963
3963
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -4699,9 +4699,9 @@ struct BVH {
|
|
|
4699
4699
|
}`};class SP{constructor(e,t){me(this,"scene"),me(this,"renderer"),me(this,"shadowGroup"),me(this,"shadowCamera"),me(this,"renderTarget"),me(this,"renderTargetBlur"),me(this,"depthMaterial"),me(this,"horizontalBlurMaterial"),me(this,"verticalBlurMaterial"),me(this,"debugGroup"),me(this,"gridHelper"),me(this,"planeWireframe"),me(this,"debugEnabled",!0),me(this,"PLANE_WIDTH",2.5),me(this,"PLANE_HEIGHT",2.5),me(this,"CAMERA_HEIGHT",.4),this.scene=e,this.renderer=t,this.initialiseComponents()}initialiseComponents(){this.setupShadowGroup(),this.setupRenderTargets(),this.createShadowPlanes(),this.setupShadowCamera(),this.setupMaterials(),this.updateShadowCamera()}setupShadowGroup(){var e;this.shadowGroup=new cs,this.shadowGroup.position.y=-.315,(e=this.scene)==null||e.add(this.shadowGroup)}setupRenderTargets(){this.renderTarget=new Br(256,256),this.renderTarget.texture.generateMipmaps=!1,this.renderTargetBlur=new Br(256,256),this.renderTargetBlur.texture.generateMipmaps=!1}createShadowPlanes(){var e,t,n;const i=new dl(this.PLANE_WIDTH,this.PLANE_HEIGHT).rotateX(Math.PI/2),s=new Kn({map:(e=this.renderTarget)==null?void 0:e.texture,opacity:F9.shadow.opacity,transparent:!0,depthWrite:!1}),o=new S0(i,s);o.renderOrder=1,o.scale.y=-1,o.name="shadowPlane",(t=this.shadowGroup)==null||t.add(o);const l=new S0(i);l.visible=!1,l.name="blurPlane",(n=this.shadowGroup)==null||n.add(l)}setupShadowCamera(){var e;this.shadowCamera=new gl(-this.PLANE_WIDTH/2,this.PLANE_WIDTH/2,this.PLANE_HEIGHT/2,-this.PLANE_HEIGHT/2,0,this.CAMERA_HEIGHT),this.shadowCamera.rotation.x=Math.PI/2,this.shadowCamera.name="shadowCamera",(e=this.shadowGroup)==null||e.add(this.shadowCamera)}setupMaterials(){this.setupDepthMaterial(),this.setupBlurMaterials()}setupDepthMaterial(){this.depthMaterial=new Pd;const e={value:F9.shadow.darkness};this.depthMaterial.userData.darkness=e,this.depthMaterial.onBeforeCompile=t=>{t.uniforms.darkness=e,t.fragmentShader=`
|
|
4700
4700
|
uniform float darkness;
|
|
4701
4701
|
${t.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * darkness );")}
|
|
4702
|
-
`},this.depthMaterial.depthTest=!1,this.depthMaterial.depthWrite=!1}setupBlurMaterials(){this.horizontalBlurMaterial=new T0(IP),this.verticalBlurMaterial=new T0(MP),this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1}updateShadowCamera(){this.shadowCamera&&(this.shadowCamera.far=.125,this.shadowCamera.updateProjectionMatrix())}blurShadow(e){var t,n,i,s,o,l,h;const u=(t=this.shadowGroup)==null?void 0:t.getObjectByName("blurPlane");u.visible=!0,u.material=this.horizontalBlurMaterial,u.material.uniforms.tDiffuse.value=(n=this.renderTarget)==null?void 0:n.texture,this.horizontalBlurMaterial&&(this.horizontalBlurMaterial.uniforms.h.value=e*1/256),(i=this.renderer)==null||i.setRenderTarget(this.renderTargetBlur),(s=this.renderer)==null||s.render(u,this.shadowCamera),u.material=this.verticalBlurMaterial,u.material.uniforms.tDiffuse.value=(o=this.renderTargetBlur)==null?void 0:o.texture,this.verticalBlurMaterial&&(this.verticalBlurMaterial.uniforms.v.value=e*1/256),(l=this.renderer)==null||l.setRenderTarget(this.renderTarget),(h=this.renderer)==null||h.render(u,this.shadowCamera),u.visible=!1}render(){if(!this.scene||!this.renderer)return;const e=this.scene.background;if(this.scene.background=null,this.scene.overrideMaterial=this.depthMaterial,!this.renderer||!this.shadowCamera)return;const t=this.renderer.getClearAlpha();this.renderer.setClearAlpha(0),this.renderer.clear(),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,this.shadowCamera),this.scene.overrideMaterial=null,this.blurShadow(F9.shadow.blur),this.blurShadow(F9.shadow.blur*.4),this.renderer.setRenderTarget(null),this.renderer.setClearAlpha(t),this.scene.background=e}dispose(){var e,t,n,i,s,o;(e=this.renderTarget)==null||e.dispose(),(t=this.renderTargetBlur)==null||t.dispose(),(n=this.depthMaterial)==null||n.dispose(),(i=this.horizontalBlurMaterial)==null||i.dispose(),(s=this.verticalBlurMaterial)==null||s.dispose(),this.debugGroup&&((o=this.scene)==null||o.remove(this.debugGroup))}}class TP extends Fo{constructor(e,t,n=null,i=null,s=null){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=i,this.clearAlpha=s,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new We}render(e,t,n){const i=e.autoClear;e.autoClear=!1;let s,o;this.overrideMaterial!==null&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor,e.getClearAlpha())),this.clearAlpha!==null&&(s=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear===!0&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor!==null&&e.setClearColor(this._oldClearColor),this.clearAlpha!==null&&e.setClearAlpha(s),this.overrideMaterial!==null&&(this.scene.overrideMaterial=o),e.autoClear=i}}class BP{constructor(){me(this,"rendererCore"),me(this,"sceneManager"),me(this,"bloomEffect"),me(this,"shadowEffect"),me(this,"pointerEvents"),me(this,"isInitialised",!1),me(this,"isInovati",!1),me(this,"viewerOnly",!1),me(this,"handleResize",()=>{var e;this.isInitialised&&(this.rendererCore.resizeRenderer(),(e=this.sceneManager)==null||e.handleResize())}),this.rendererCore=new XS}async initialise(e,t,n,i){if(this.isInitialised)return;this.isInovati=n??!1,this.viewerOnly=i??!1;const s=this.rendererCore.initialiseRenderer(e);this.sceneManager=new EP(this.rendererCore.getRenderer(),s,this.isInovati),await this.sceneManager.initialiseScene(t).then(([o,l])=>{o&&l&&(this.initEffects(o,l),this.pointerEvents=new xP(l,o,s),this.setupEventHandlers(),this.isInitialised=!0)}),this.sceneManager.handleResize()}initEffects(e,t){const n=new TP(e,t);if(this.isInovati){this.bloomEffect=new CP(this.rendererCore.getRenderer(),n,e);const i=this.bloomEffect.getBloomMixPass();this.rendererCore.SetupComposerWithBloom(n,i)}else this.rendererCore.setupMSAA(n);this.shadowEffect=new SP(e,this.rendererCore.getRenderer())}async startRendering(){this.startRenderLoop()}setupEventHandlers(){window.addEventListener("resize",this.handleResize),!(!this.pointerEvents||this.viewerOnly)&&this.pointerEvents.initialiseEventListeners()}startRenderLoop(){const e=()=>{this.sceneManager&&(this.sceneManager.updateControls(),this.rendererCore.resizeRenderer()&&this.sceneManager.handleResize()),this.shadowEffect&&this.shadowEffect.render(),this.isInovati&&this.bloomEffect&&this.bloomEffect.render(),this.rendererCore.render(),requestAnimationFrame(e)};e()}loadFirstFrame(e,t,n){var i;return((i=this.sceneManager)==null?void 0:i.loadFirstFrame(e,t,n))??Promise.reject(new Error("Scene manager not initialised"))}loadLocalFrame(e){var t;return((t=this.sceneManager)==null?void 0:t.loadLocalFrame(e))??Promise.reject(new Error("Scene manager not initialised"))}changeFrame(e,t,n){var i;return((i=this.sceneManager)==null?void 0:i.changeFrame(e,t,n))??Promise.reject(new Error("Scene manager not initialised"))}changeLens(e,t,n,i){var s;return((s=this.sceneManager)==null?void 0:s.changeLens(e,t,n,i))??Promise.reject(new Error("Scene manager not initialised"))}changeLensShape(e){var t;return((t=this.sceneManager)==null?void 0:t.changeLensShape(e))??Promise.reject(new Error("Scene manager not initialised"))}changeOrbital(e){var t;return((t=this.sceneManager)==null?void 0:t.changeOrbital(e))??Promise.reject(new Error("Scene manager not initialised"))}async changeGemType(e,t,n){var i;await((i=this.sceneManager)==null?void 0:i.changeGemType(e,t,n).then(s=>{this.bloomEffect&&s&&this.bloomEffect.updateComposers(this.rendererCore.getFinalComposer())}))}changeStudType(e,t){var n;return((n=this.sceneManager)==null?void 0:n.changeStudType(e,t))??Promise.reject(new Error("Scene manager not initialised"))}async flashFocusOnZone(e,t,n){var i;await((i=this.sceneManager)==null?void 0:i.flashFocusOnZone(e,t,n).then(s=>{this.bloomEffect&&s&&this.bloomEffect.updateComposers(this.rendererCore.getFinalComposer())}))}snapCameraToPosition(e){var t;return((t=this.sceneManager)==null?void 0:t.snapCameraToPosition(e))??Promise.reject(new Error("Scene manager not initialised"))}cleanUp(){var e,t,n,i;window.removeEventListener("resize",this.handleResize),(e=this.pointerEvents)==null||e.dispose(),this.rendererCore.dispose(),(t=this.sceneManager)==null||t.dispose(),(n=this.bloomEffect)==null||n.dispose(),(i=this.shadowEffect)==null||i.dispose()}}class bP{constructor(){me(this,"customRenderer"),this.customRenderer=new BP}async Init(e,t,n,i){this.customRenderer.isInitialised||await this.customRenderer.initialise(e,t,n,i).then(()=>{this.customRenderer.startRendering()})}loadFirstFrame(e,t,n){try{return this.customRenderer.loadFirstFrame(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}loadLocalFrame(e){try{return this.customRenderer.loadLocalFrame(e)}catch(t){return console.error(t),Promise.reject(t)}}changeFrame(e,t,n){try{return this.customRenderer.changeFrame(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}changeLens(e,t,n,i){try{return this.customRenderer.changeLens(e,t,n,i)}catch(s){return console.error(s),Promise.reject(s)}}changeLensShape(e){try{return this.customRenderer.changeLensShape(e)}catch(t){return console.error(t),Promise.reject(t)}}changeOrbital(e){try{return this.customRenderer.changeOrbital(e)}catch(t){return console.error(t),Promise.reject(t)}}changeGemType(e,t,n){try{return this.customRenderer.changeGemType(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}changeStudType(e,t){try{return this.customRenderer.changeStudType(e,t)}catch(n){return console.error(n),Promise.reject(n)}}flashFocusOnZone(e,t,n){try{return this.customRenderer.flashFocusOnZone(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}snapCamToPos(e){try{return this.customRenderer.snapCameraToPosition(e)}catch(t){return console.error(t),Promise.reject(t)}}}class Rc{constructor(e){me(this,"orgId"),me(this,"rendererService"),me(this,"isLoading",!1),me(this,"userContainerId"),me(this,"containerElement",null),me(this,"defaultSelectorId","dita-3dconfig-element"),me(this,"defaultCanvasStyle",{width:"100%",height:"100%"}),me(this,"customisationArr",[]),me(this,"assetDetails",null),me(this,"viewerOnly",!1),this.userContainerId=e.userContainerId,this.rendererService=new bP,this.orgId=e.orgId??""}async loadLocalFrame(e){try{return await this.rendererService.Init(this.userContainerId??this.defaultSelectorId,e.autoRotateSpeed),await this.rendererService.loadLocalFrame(e.glbFile),this}catch(t){return console.error(t),this}}async changeLocalFrame(e){try{return this.rendererService.loadLocalFrame(e.glbFile)}catch(t){console.error(t)}}async loadFrame(e){this.assetDetails=e.data.assetDetails,this.customisationArr=e.data.customisation,this.viewerOnly=e.data.viewerOnly;try{return await this.rendererService.Init(this.userContainerId??this.defaultSelectorId,e.autoRotateSpeed,e.forInovati,e.data.viewerOnly??!1),await this.rendererService.loadFirstFrame(this.orgId,this.assetDetails,this.customisationArr),this}catch(t){return console.error(t),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)}changeLensShape(e){return this.rendererService.changeLensShape(e)}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)}snapCameraToPos(e){return this.rendererService.snapCamToPos(e)}focusOnZone(e,t,n,i){return this.rendererService.flashFocusOnZone(e,t,i)}unmount(){this.containerElement&&(this.containerElement.innerHTML="",this.containerElement.style.height="0px",this.containerElement.style.width="auto")}}class Dm{constructor(e,t){me(this,"authService"),me(this,"localDOMService"),e?this.localDOMService=new Rc({userContainerId:t}):this.authService=new Ny}async Init(e){this.authService&&(await this.authService.Init(e),Ka.setJWT(this.authService.authPayload.JWT))}async getDOMServiceInstance(e){return this.localDOMService?this.localDOMService:new Rc({userContainerId:e})}async loadBySKU(e){const t=await z2.FetchAssetBySKUOrBarcode({sku:e.SKU,barcode:null});return await this.renderAsset({data:{assetDetails:t,customisation:t.customisation}})}async renderAsset(e){var t;return new Rc({orgId:(t=this.authService)==null?void 0:t.authPayload.ORGID,userContainerId:e.containerId}).loadFrame({containerId:e.containerId,data:{assetDetails:e.data.assetDetails,customisation:e.data.customisation}})}async getInstance(e){var t;return new Rc({orgId:(t=this.authService)==null?void 0:t.authPayload.ORGID,userContainerId:e.containerId})}}window.ThreeDConfigurator=Dm;const $k="",a0=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),eQ="";var Dc=(r=>(r.Front="Front",r.Back="Back",r.Left="Left",r.Right="Right",r.Top="Top",r.Bottom="Bottom",r))(Dc||{}),Cr=(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))(Cr||{});const RP="data:image/png;base64,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",DP={position:"absolute",left:"-8%",top:"15%",height:"70px",width:"70px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",cursor:"default",zIndex:1e3},LP={position:"absolute",left:"-10%",top:"22%",height:"55px",width:"55px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",cursor:"default",zIndex:1e3};function NP({frameList:r,selectedFrame:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeFrame:s}){const o=Fe.useRef(null),l=Fe.useRef(null),h=()=>{o.current&&(o.current.textContent=Cr.EnteredFramesListSection)};return Fe.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:a0?"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.jsxs("button",{"aria-labelledby":(e==null?void 0:e._id)===u._id?"sprie-config-frameName":"",style:{border:"0",cursor:t?"default":"pointer",width:a0?45:60,height:a0?45:60},onClick:()=>u.available&&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 ${a0?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===u._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}}),!u.available&&Se.jsx("img",{src:RP,style:a0?LP:DP})]}),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 PP({lensList:r,selectedLens:e,selectedDitaLens:t,modelLoading:n,isSelected:i,paletteEntered:s,onChangeLens:o}){const l=Fe.useRef(null),h=Fe.useRef(null),u=()=>{l.current&&(l.current.textContent=Cr.EnteredLensListSection)};return Fe.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:a0?"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:a0?45:60,height:a0?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 ${a0?"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 tQ="";function UP({heading:r,isSelected:e,onEngravingLinkClicked:t,onChecked:n,onTextAdded:i,paletteEntered:s}){const[o,l]=Fe.useState(""),[h,u]=Fe.useState(!1),[d,A]=Fe.useState(!1);Fe.useState(!1);const p=Fe.useRef(null),g=Fe.useRef(null),_=Fe.useRef(null);Fe.useEffect(()=>{n(h),h&&p.current?(p.current.style.backgroundColor="#ffffff",_.current&&(_.current.textContent=Cr.EngravingInputAvailable)):!h&&p.current&&(p.current.style.backgroundColor="transparent",_.current&&(_.current.textContent=Cr.EngravingInputHidden),l(""))},[h]),Fe.useEffect(()=>{d&&o!=""&&i(o)},[d]),Fe.useEffect(()=>{var v;s&&((v=g.current)==null||v.focus())},[s]);const E=()=>{_.current&&(_.current.textContent=Cr.EnteredEngravingSection)},m=v=>{var w;v.key==="Enter"&&(i(o),(w=p.current)==null||w.blur(),_.current&&(_.current.textContent=Cr.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 ",r?r.toLowerCase():"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":Cr.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 rQ="";function kP({totalSteps:r,currentStep:e}){return Se.jsx("div",{className:"step-tracker-block",style:{margin:a0?"auto":""}})}function QP({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 FP({setShowAddToCart:r,setSelectedChild:e,setSectionEntered:t,children:n}){var g;const[i,s]=Fe.useState(0),o=O2.Children.toArray(n),l=i===o.length-1,h=Fe.useRef(null),u=(g=o.map(_=>_))==null?void 0:g.map(_=>_.props.heading),d=()=>{s(_=>_===0?O2.Children.count(n)-1:_-1),h.current&&h.current.focus()},A=()=>{s(_=>_===O2.Children.count(n)-1?0:_+1),h.current&&h.current.focus()};Fe.useEffect(()=>{r(!!l)},[l]),Fe.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} -
|
|
4702
|
+
`},this.depthMaterial.depthTest=!1,this.depthMaterial.depthWrite=!1}setupBlurMaterials(){this.horizontalBlurMaterial=new T0(IP),this.verticalBlurMaterial=new T0(MP),this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1}updateShadowCamera(){this.shadowCamera&&(this.shadowCamera.far=.125,this.shadowCamera.updateProjectionMatrix())}blurShadow(e){var t,n,i,s,o,l,h;const u=(t=this.shadowGroup)==null?void 0:t.getObjectByName("blurPlane");u.visible=!0,u.material=this.horizontalBlurMaterial,u.material.uniforms.tDiffuse.value=(n=this.renderTarget)==null?void 0:n.texture,this.horizontalBlurMaterial&&(this.horizontalBlurMaterial.uniforms.h.value=e*1/256),(i=this.renderer)==null||i.setRenderTarget(this.renderTargetBlur),(s=this.renderer)==null||s.render(u,this.shadowCamera),u.material=this.verticalBlurMaterial,u.material.uniforms.tDiffuse.value=(o=this.renderTargetBlur)==null?void 0:o.texture,this.verticalBlurMaterial&&(this.verticalBlurMaterial.uniforms.v.value=e*1/256),(l=this.renderer)==null||l.setRenderTarget(this.renderTarget),(h=this.renderer)==null||h.render(u,this.shadowCamera),u.visible=!1}render(){if(!this.scene||!this.renderer)return;const e=this.scene.background;if(this.scene.background=null,this.scene.overrideMaterial=this.depthMaterial,!this.renderer||!this.shadowCamera)return;const t=this.renderer.getClearAlpha();this.renderer.setClearAlpha(0),this.renderer.clear(),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,this.shadowCamera),this.scene.overrideMaterial=null,this.blurShadow(F9.shadow.blur),this.blurShadow(F9.shadow.blur*.4),this.renderer.setRenderTarget(null),this.renderer.setClearAlpha(t),this.scene.background=e}dispose(){var e,t,n,i,s,o;(e=this.renderTarget)==null||e.dispose(),(t=this.renderTargetBlur)==null||t.dispose(),(n=this.depthMaterial)==null||n.dispose(),(i=this.horizontalBlurMaterial)==null||i.dispose(),(s=this.verticalBlurMaterial)==null||s.dispose(),this.debugGroup&&((o=this.scene)==null||o.remove(this.debugGroup))}}class TP extends Fo{constructor(e,t,n=null,i=null,s=null){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=i,this.clearAlpha=s,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new We}render(e,t,n){const i=e.autoClear;e.autoClear=!1;let s,o;this.overrideMaterial!==null&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor,e.getClearAlpha())),this.clearAlpha!==null&&(s=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear===!0&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor!==null&&e.setClearColor(this._oldClearColor),this.clearAlpha!==null&&e.setClearAlpha(s),this.overrideMaterial!==null&&(this.scene.overrideMaterial=o),e.autoClear=i}}class BP{constructor(){me(this,"rendererCore"),me(this,"sceneManager"),me(this,"bloomEffect"),me(this,"shadowEffect"),me(this,"pointerEvents"),me(this,"isInitialised",!1),me(this,"isInovati",!1),me(this,"viewerOnly",!1),me(this,"handleResize",()=>{var e;this.isInitialised&&(this.rendererCore.resizeRenderer(),(e=this.sceneManager)==null||e.handleResize())}),this.rendererCore=new XS}async initialise(e,t,n,i){if(this.isInitialised)return;this.isInovati=n??!1,this.viewerOnly=i??!1;const s=this.rendererCore.initialiseRenderer(e);this.sceneManager=new EP(this.rendererCore.getRenderer(),s,this.isInovati),await this.sceneManager.initialiseScene(t).then(([o,l])=>{o&&l&&(this.initEffects(o,l),this.pointerEvents=new xP(l,o,s),this.setupEventHandlers(),this.isInitialised=!0)}),this.sceneManager.handleResize()}initEffects(e,t){const n=new TP(e,t);if(this.isInovati){this.bloomEffect=new CP(this.rendererCore.getRenderer(),n,e);const i=this.bloomEffect.getBloomMixPass();this.rendererCore.SetupComposerWithBloom(n,i)}else this.rendererCore.setupMSAA(n);this.shadowEffect=new SP(e,this.rendererCore.getRenderer())}async startRendering(){this.startRenderLoop()}setupEventHandlers(){window.addEventListener("resize",this.handleResize),!(!this.pointerEvents||this.viewerOnly)&&this.pointerEvents.initialiseEventListeners()}startRenderLoop(){const e=()=>{this.sceneManager&&(this.sceneManager.updateControls(),this.rendererCore.resizeRenderer()&&this.sceneManager.handleResize()),this.shadowEffect&&this.shadowEffect.render(),this.isInovati&&this.bloomEffect&&this.bloomEffect.render(),this.rendererCore.render(),requestAnimationFrame(e)};e()}loadFirstFrame(e,t,n){var i;return((i=this.sceneManager)==null?void 0:i.loadFirstFrame(e,t,n))??Promise.reject(new Error("Scene manager not initialised"))}loadLocalFrame(e){var t;return((t=this.sceneManager)==null?void 0:t.loadLocalFrame(e))??Promise.reject(new Error("Scene manager not initialised"))}changeFrame(e,t,n){var i;return((i=this.sceneManager)==null?void 0:i.changeFrame(e,t,n))??Promise.reject(new Error("Scene manager not initialised"))}changeLens(e,t,n,i){var s;return((s=this.sceneManager)==null?void 0:s.changeLens(e,t,n,i))??Promise.reject(new Error("Scene manager not initialised"))}changeLensShape(e){var t;return((t=this.sceneManager)==null?void 0:t.changeLensShape(e))??Promise.reject(new Error("Scene manager not initialised"))}changeOrbital(e){var t;return((t=this.sceneManager)==null?void 0:t.changeOrbital(e))??Promise.reject(new Error("Scene manager not initialised"))}async changeGemType(e,t,n){var i;await((i=this.sceneManager)==null?void 0:i.changeGemType(e,t,n).then(s=>{this.bloomEffect&&s&&this.bloomEffect.updateComposers(this.rendererCore.getFinalComposer())}))}changeStudType(e,t){var n;return((n=this.sceneManager)==null?void 0:n.changeStudType(e,t))??Promise.reject(new Error("Scene manager not initialised"))}async flashFocusOnZone(e,t,n){var i;await((i=this.sceneManager)==null?void 0:i.flashFocusOnZone(e,t,n).then(s=>{this.bloomEffect&&s&&this.bloomEffect.updateComposers(this.rendererCore.getFinalComposer())}))}snapCameraToPosition(e){var t;return((t=this.sceneManager)==null?void 0:t.snapCameraToPosition(e))??Promise.reject(new Error("Scene manager not initialised"))}cleanUp(){var e,t,n,i;window.removeEventListener("resize",this.handleResize),(e=this.pointerEvents)==null||e.dispose(),this.rendererCore.dispose(),(t=this.sceneManager)==null||t.dispose(),(n=this.bloomEffect)==null||n.dispose(),(i=this.shadowEffect)==null||i.dispose()}}class bP{constructor(){me(this,"customRenderer"),this.customRenderer=new BP}async Init(e,t,n,i){this.customRenderer.isInitialised||await this.customRenderer.initialise(e,t,n,i).then(()=>{this.customRenderer.startRendering()})}loadFirstFrame(e,t,n){try{return this.customRenderer.loadFirstFrame(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}loadLocalFrame(e){try{return this.customRenderer.loadLocalFrame(e)}catch(t){return console.error(t),Promise.reject(t)}}changeFrame(e,t,n){try{return this.customRenderer.changeFrame(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}changeLens(e,t,n,i){try{return this.customRenderer.changeLens(e,t,n,i)}catch(s){return console.error(s),Promise.reject(s)}}changeLensShape(e){try{return this.customRenderer.changeLensShape(e)}catch(t){return console.error(t),Promise.reject(t)}}changeOrbital(e){try{return this.customRenderer.changeOrbital(e)}catch(t){return console.error(t),Promise.reject(t)}}changeGemType(e,t,n){try{return this.customRenderer.changeGemType(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}changeStudType(e,t){try{return this.customRenderer.changeStudType(e,t)}catch(n){return console.error(n),Promise.reject(n)}}flashFocusOnZone(e,t,n){try{return this.customRenderer.flashFocusOnZone(e,t,n)}catch(i){return console.error(i),Promise.reject(i)}}snapCamToPos(e){try{return this.customRenderer.snapCameraToPosition(e)}catch(t){return console.error(t),Promise.reject(t)}}}class Rc{constructor(e){me(this,"orgId"),me(this,"rendererService"),me(this,"isLoading",!1),me(this,"userContainerId"),me(this,"containerElement",null),me(this,"defaultSelectorId","dita-3dconfig-element"),me(this,"defaultCanvasStyle",{width:"100%",height:"100%"}),me(this,"customisationArr",[]),me(this,"assetDetails",null),me(this,"viewerOnly",!1),this.userContainerId=e.userContainerId,this.rendererService=new bP,this.orgId=e.orgId??""}async loadLocalFrame(e){try{return await this.rendererService.Init(this.userContainerId??this.defaultSelectorId,e.autoRotateSpeed),await this.rendererService.loadLocalFrame(e.glbFile),this}catch(t){return console.error(t),this}}async changeLocalFrame(e){try{return this.rendererService.loadLocalFrame(e.glbFile)}catch(t){console.error(t)}}async loadFrame(e){this.assetDetails=e.data.assetDetails,this.customisationArr=e.data.customisation,this.viewerOnly=e.data.viewerOnly;try{return await this.rendererService.Init(this.userContainerId??this.defaultSelectorId,e.autoRotateSpeed,e.forInovati,e.data.viewerOnly??!1),await this.rendererService.loadFirstFrame(this.orgId,this.assetDetails,this.customisationArr),this}catch(t){return console.error(t),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)}changeLensShape(e){return this.rendererService.changeLensShape(e)}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)}snapCameraToPos(e){return this.rendererService.snapCamToPos(e)}focusOnZone(e,t,n,i){return this.rendererService.flashFocusOnZone(e,t,i)}unmount(){this.containerElement&&(this.containerElement.innerHTML="",this.containerElement.style.height="0px",this.containerElement.style.width="auto")}}class Dm{constructor(e,t){me(this,"authService"),me(this,"localDOMService"),e?this.localDOMService=new Rc({userContainerId:t}):this.authService=new Ny}async Init(e){this.authService&&(await this.authService.Init(e),Ka.setJWT(this.authService.authPayload.JWT))}async getDOMServiceInstance(e){return this.localDOMService?this.localDOMService:new Rc({userContainerId:e})}async loadBySKU(e){const t=await z2.FetchAssetBySKUOrBarcode({sku:e.SKU,barcode:null});return await this.renderAsset({data:{assetDetails:t,customisation:t.customisation}})}async renderAsset(e){var t;return new Rc({orgId:(t=this.authService)==null?void 0:t.authPayload.ORGID,userContainerId:e.containerId}).loadFrame({containerId:e.containerId,data:{assetDetails:e.data.assetDetails,customisation:e.data.customisation}})}async getInstance(e){var t;return new Rc({orgId:(t=this.authService)==null?void 0:t.authPayload.ORGID,userContainerId:e.containerId})}}window.ThreeDConfigurator=Dm;const $k="",a0=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),eQ="";var Dc=(r=>(r.Front="Front",r.Back="Back",r.Left="Left",r.Right="Right",r.Top="Top",r.Bottom="Bottom",r))(Dc||{}),Cr=(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))(Cr||{});const RP="data:image/png;base64,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",DP={position:"absolute",left:"-8%",top:"15%",height:"70px",width:"70px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",cursor:"default",zIndex:1e3},LP={position:"absolute",left:"-10%",top:"22%",height:"55px",width:"55px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",cursor:"default",zIndex:1e3};function NP({frameList:r,selectedFrame:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeFrame:s}){const o=Fe.useRef(null),l=Fe.useRef(null),h=()=>{o.current&&(o.current.textContent=Cr.EnteredFramesListSection)};return Fe.useEffect(()=>{i&&l.current&&l.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[i]),Te.jsxs("div",{className:"sprie-config-palette",ref:l,style:{gap:a0?"3rem":"5rem",display:n?"flex":"none",padding:"0 3rem"},children:[Te.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:o}),r==null?void 0:r.map(u=>Te.jsxs("div",{className:"sprie-config-palette-img-box",children:[Te.jsxs("button",{"aria-labelledby":(e==null?void 0:e._id)===u._id?"sprie-config-frameName":"",style:{border:"0",cursor:t?"default":"pointer",width:a0?45:60,height:a0?45:60},onClick:()=>u.available&&s(u),onFocus:()=>h(),disabled:t,children:[Te.jsx("img",{"aria-label":`Select frame ${u.name}`,src:u.variantImage,alt:u.name+"image",className:`sprie-config-image ${a0?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===u._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}}),!u.available&&Te.jsx("img",{src:RP,style:a0?LP:DP})]}),Te.jsxs("p",{className:"sprie-config-palette-img-text",children:[Te.jsx("span",{className:"sprie-config-palette-imgName",children:u.name}),Te.jsx("span",{id:"sprie-config-frameName",className:"sprie-config-sr-only",children:`Selected frame ${u.name}`})]})]},u._id))]})}function PP({lensList:r,selectedLens:e,selectedDitaLens:t,modelLoading:n,isSelected:i,paletteEntered:s,onChangeLens:o}){const l=Fe.useRef(null),h=Fe.useRef(null),u=()=>{l.current&&(l.current.textContent=Cr.EnteredLensListSection)};return Fe.useEffect(()=>{s&&h.current&&h.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[s]),Te.jsxs("div",{className:"sprie-config-palette",ref:h,style:{display:i?"flex":"none",padding:"0 3rem",gap:a0?"3rem":"5rem"},children:[Te.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:l}),r==null?void 0:r.map(d=>Te.jsxs("div",{className:"sprie-config-palette-img-box",children:[Te.jsx("button",{"aria-labelledby":(e==null?void 0:e._id)===d._id?"sprie-config-lensName":"",style:{border:"0",cursor:n?"default":"pointer",width:a0?45:60,height:a0?45:60},onClick:()=>o(d),onFocus:u,disabled:n,children:Te.jsx("img",{"aria-label":`Select lens ${d.name}`,src:d.thumbnail,alt:d.name+"image",className:`sprie-config-image ${a0?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===d._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),Te.jsxs("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.2rem",textAlign:"center"},children:[Te.jsx("span",{className:"sprie-config-palette-imgName",children:`${d.name}`}),Te.jsx("br",{}),(e==null?void 0:e._id)===d._id&&Te.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})`}),Te.jsxs("span",{id:"sprie-config-lensName",className:"sprie-config-sr-only",children:[" ",`Selected lens ${d.name}`]})]})]},d._id))]})}const tQ="";function UP({heading:r,isSelected:e,onEngravingLinkClicked:t,onChecked:n,onTextAdded:i,paletteEntered:s}){const[o,l]=Fe.useState(""),[h,u]=Fe.useState(!1),[d,A]=Fe.useState(!1);Fe.useState(!1);const p=Fe.useRef(null),g=Fe.useRef(null),_=Fe.useRef(null);Fe.useEffect(()=>{n(h),h&&p.current?(p.current.style.backgroundColor="#ffffff",_.current&&(_.current.textContent=Cr.EngravingInputAvailable)):!h&&p.current&&(p.current.style.backgroundColor="transparent",_.current&&(_.current.textContent=Cr.EngravingInputHidden),l(""))},[h]),Fe.useEffect(()=>{d&&o!=""&&i(o)},[d]),Fe.useEffect(()=>{var v;s&&((v=g.current)==null||v.focus())},[s]);const E=()=>{_.current&&(_.current.textContent=Cr.EnteredEngravingSection)},m=v=>{var w;v.key==="Enter"&&(i(o),(w=p.current)==null||w.blur(),_.current&&(_.current.textContent=Cr.AddedEngravingText+o))};return Te.jsxs("div",{className:"sprie-config-engraving-block",style:{display:e?"flex":"none",marginTop:".5rem"},children:[Te.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:_}),Te.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".8rem"},children:[Te.jsx("input",{type:"checkbox",ref:g,className:"sprie-config-engraving-checkbox",onChange:v=>{u(v.target.checked)},onFocus:E,checked:h}),Te.jsxs("p",{style:{fontSize:".9rem",color:"#4d4d4d",fontWeight:"500",margin:"0"},children:["Add ",r?r.toLowerCase():"Laser Engraving"," ",Te.jsx("span",{style:{fontWeight:"400"},children:"(OPTIONAL)"})]})]}),Te.jsxs("div",{className:"sprie-config-engraving-inputField-block",children:[Te.jsx("input",{"aria-label":Cr.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)}),Te.jsx("span",{className:"sprie-config-engraving-inputInfo",children:`${o.length}/15 characters`})]})]})}const rQ="";function kP({totalSteps:r,currentStep:e}){return Te.jsx("div",{className:"step-tracker-block",style:{margin:a0?"auto":""}})}function QP({nextSlide:r,previousSlide:e,currentIndex:t,stepsName:n,isLastStep:i}){const s=()=>{e()},o=()=>{r()};return Te.jsxs("div",{className:"carousel-header",children:[Te.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:Te.jsx("i",{className:"arrow left-arrow",style:{padding:".25rem"}})}),Te.jsxs("p",{children:[Te.jsx("span",{className:"step-syntax",children:`STEP ${t+1} of ${n.length} : `}),Te.jsx("span",{className:"select-syntax",children:n[t]})]}),Te.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:Te.jsx("i",{className:"arrow right-arrow",style:{padding:".25rem"}})})]})}function FP({setShowAddToCart:r,setSelectedChild:e,setSectionEntered:t,children:n}){var g;const[i,s]=Fe.useState(0),o=O2.Children.toArray(n),l=i===o.length-1,h=Fe.useRef(null),u=(g=o.map(_=>_))==null?void 0:g.map(_=>_.props.heading),d=()=>{s(_=>_===0?O2.Children.count(n)-1:_-1),h.current&&h.current.focus()},A=()=>{s(_=>_===O2.Children.count(n)-1?0:_+1),h.current&&h.current.focus()};Fe.useEffect(()=>{r(!!l)},[l]),Fe.useEffect(()=>{e(i)},[i]);const p=_=>{(_.key==="Enter"||_.key===" ")&&_.target===h.current&&t(i)};return Te.jsxs("div",{className:"carousel",children:[Te.jsx("span",{className:"sprie-config-sr-only",id:"sprie-config-step-selector",children:`Customisation Step Selector. ${l?"This is an optional":""} Step ${i+1} -
|
|
4703
4703
|
${o[i].props.heading}.
|
|
4704
|
-
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(QP,{nextSlide:A,previousSlide:d,currentIndex:i,stepsName:u,isLastStep:l}),Se.jsx(kP,{totalSteps:u==null?void 0:u.length,currentStep:i+1})]}),Se.jsx("div",{className:"carousel-container",style:{paddingTop:a0?"":"1rem"},children:o.map((_,E)=>Se.jsx("div",{className:"carousel-item",style:{transform:`translateX(-${i*100}%)`},children:_},E))})]})}const nQ="";function Lm({conditionRequired:r,onButtonClick:e}){const[t,n]=Fe.useState(!1),i=Fe.useRef(null),s=Fe.useRef(null);return Fe.useEffect(()=>{s.current&&(s.current.disabled=!t)},[t]),Fe.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 OP({orbitalList:r,selectedOrbital:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeOrbital:s}){const o=Fe.useRef(null),l=Fe.useRef(null),h=()=>{o.current&&(o.current.textContent=Cr.EnteredOrbitalsListSection)};return Fe.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:a0?"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:a0?45:60,height:a0?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 ${a0?"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 zP="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMzIwLjAwMDAwMHB0IiBoZWlnaHQ9IjY2LjAwMDAwMHB0IiB2aWV3Qm94PSIwIDAgMzIwLjAwMDAwMCA2Ni4wMDAwMDAiCiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0Ij4KCjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLDY2LjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIKZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTAgNjUxIGMwIC02IDkgLTExIDIxIC0xMSAxMSAwIDI5IC01IDQwIC0xMCAxOCAtMTAgMTkgLTI0IDE5IC0zMDAKMCAtMjc2IC0xIC0yOTAgLTE5IC0zMDAgLTExIC01IC0yOSAtMTAgLTQwIC0xMCAtMTIgMCAtMjEgLTQgLTIxIC0xMCAwIC0xNAo0NDUgLTEzIDUxMiAxIDEwNyAyMyAxOTAgODUgMjM5IDE3OSAyMCAzNyAyNCA2MCAyNCAxMzUgMCA3OCAtNCA5NyAtMjggMTQ3Ci0zNCA3MCAtMTAwIDEzMCAtMTc2IDE2MCAtNTIgMjEgLTc1IDIzIC0zMTMgMjYgLTE4MCAyIC0yNTggMCAtMjU4IC03eiBtNDcwCi0zNiBjMTUgLTggMzggLTI3IDQ5IC00MSAyMCAtMjUgMjEgLTM5IDIxIC0yMzggMCAtMTk0IC0yIC0yMTQgLTIwIC0yNDQgLTExCi0xOCAtMzYgLTQwIC01NSAtNDggLTQ2IC0xOSAtMTM1IC0xOCAtMTYzIDIgLTIyIDE1IC0yMiAxNyAtMjIgMzAwIGwwIDI4NCA4MAowIGM1MiAwIDkxIC01IDExMCAtMTV6Ii8+CjxwYXRoIGQ9Ik05ODAgNjUwIGMwIC01IDExIC0xMCAyNCAtMTAgNTUgMCA1NiAtNyA1NiAtMzEwIDAgLTMwMyAtMSAtMzEwIC01NgotMzEwIC0xMyAwIC0yNCAtNCAtMjQgLTEwIDAgLTYgNjcgLTEwIDE4MCAtMTAgMTEzIDAgMTgwIDQgMTgwIDEwIDAgNiAtMTEgMTAKLTIzIDEwIC0xMyAwIC0zMSA4IC00MCAxOCAtMTUgMTYgLTE3IDUyIC0xNyAyOTQgMCAyNTQgMSAyNzYgMTggMjkxIDEwIDEwIDI4CjE3IDQwIDE3IDEyIDAgMjIgNSAyMiAxMCAwIDYgLTY3IDEwIC0xODAgMTAgLTExMyAwIC0xODAgLTQgLTE4MCAtMTB6Ii8+CjxwYXRoIGQ9Ik0xNTI2IDYwMSBjLTI1IC0zMyAtNDYgLTY0IC00NiAtNzAgMCAtNiAyNCA1IDU0IDI0IDUzIDM0IDE1OSA3NQoxOTQgNzUgMTAgMCAyOCAtMTAgNDAgLTIzIDIxIC0yMyAyMiAtMzAgMjIgLTI4OSAwIC0yODkgLTIgLTI5OCAtNTYgLTI5OCAtMTMKMCAtMjQgLTQgLTI0IC0xMCAwIC02IDY3IC0xMCAxODAgLTEwIDExMyAwIDE4MCA0IDE4MCAxMCAwIDYgLTExIDEwIC0yNCAxMAotNTQgMCAtNTYgOSAtNTYgMjk0IDAgMjUxIDEgMjY1IDIxIDI5MCAxMSAxNCAzMCAyNiA0MiAyNiAzNyAtMSAxNTMgLTQ2IDIwMQotNzggMjUgLTE3IDQ2IC0yNyA0NiAtMjEgMCA2IC0yMSAzNyAtNDYgNzAgbC00NyA1OSAtMzE3IDAgLTMxNyAwIC00NyAtNTl6Ii8+CjxwYXRoIGQ9Ik0yNDU1IDY1MCBjMyAtNSAxNSAtMTAgMjYgLTEwIDMwIDAgNjUgLTI3IDk3IC03NiBsMjkgLTQzIC05MCAtMTc4CmMtMTM2IC0yNzAgLTE2MyAtMzEzIC0xOTggLTMyMCAtNTkgLTExIC0yNiAtMjMgNjYgLTIzIDg5IDAgMTIxIDExIDc1IDI1IC0yOQo5IC0yNiA1NSAxMCAxMjYgbDMxIDYwIDE1MSAtMyAxNTEgLTMgMzkgLTczIGMzMCAtNTkgMzYgLTc3IDI4IC05MyAtNiAtMTAKLTIwIC0xOSAtMzAgLTE5IC0xMSAwIC0yMCAtNCAtMjAgLTEwIDAgLTYgNzAgLTEwIDE5MCAtMTAgMTIwIDAgMTkwIDQgMTkwIDEwCjAgNiAtMTEgMTAgLTI0IDEwIC0xNCAwIC0zNiAxMCAtNTAgMjMgLTE1IDEyIC0xMDYgMTU1IC0yMDQgMzE3IGwtMTc3IDI5NQotMTQ4IDMgYy0xMDAgMiAtMTQ2IC0xIC0xNDIgLTh6IG0yNTggLTM5OCBjLTM1IC0yIC05MiAtMiAtMTI3IDAgbC02NCAzIDYwCjExMyA2MCAxMTMgNjcgLTExMyA2NyAtMTEzIC02MyAtM3oiLz4KPC9nPgo8L3N2Zz4K",GP="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA4ODYgNjk4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA4ODYgNjk4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzkxODQ3RTt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik04NDAuMDEsNDEuMDFjLTM2LjcxLTMxLjU2LTEwOC45NC01Ny45Ny0yNDQuNi00LjU2Yy0yMC40Nyw4LjA2LTQxLjQ2LDE3LjU3LTYyLjc1LDI4LjM2CgljMTkuMzgtNC42Niw0MzEuNTItMTAxLDE3NS42MSwxOTkuNDJsLTAuMDQsMGMtMjUuODUsMzUuNS01Ny44Miw3Mi4wOC05NC40MiwxMDcuOTdsLTMyLjcyLTI4LjE0bC02LjQ0LDE0MS43NmwxNjQuODQtNS41NwoJbC00NC4zNC0zOC4xMmM2NS41NC02My43NCwxMTcuODUtMTI5Ljk0LDE1MC4yMi0xOTAuNzdDOTA3LjQ0LDEzNC42OSw4NzYuNzEsNzIuNTcsODQwLjAxLDQxLjAxeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTYyLjE3LDQyNS42N2MtNjQuNDcsNDYuMi0xMzIuNjcsODYuMjItMTk4LjQzLDExNi43NmMtMC4wOSwwLjA0LTAuMTcsMC4wOC0wLjI1LDAuMTMKCUMtMTkuMjcsNzMwLjcyLDczLjg2LDQ0MS4xMyw4OC4wNyw0MDEuNDVsLTIuMDktMS41MWMtMTQuNjcsMTcuOTMtMjcuNiwzNS42MS0zOC41Myw1Mi44NEMtMjQuNCw1NjYsMTEuMTYsNjI2LjI3LDUzLjY0LDY1Ni44OQoJYzQyLjQ4LDMwLjYzLDEyNi4wNyw1Ni4yNSwyODMuMDUsNC40M2M5OS0zMi42OSwyMDguNTgtODkuNywzMTAuMDYtMTYxLjE5bC04My43Ny0wLjQ2TDU2Mi4xNyw0MjUuNjd6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMTIuOSwxOTcuNzRjMCwzNS41NC0yNS43Myw1Mi44MS00MS45OCw1Mi44MXYxLjAxYzIwLjY1LDAsNDYuMzcsMTUuOTEsNDYuMzcsNTEuNDUKCWMwLDM3LjkxLTM0LjE5LDYzLjk4LTgzLjYxLDYzLjk4Yy00My42NywwLTcxLjA5LTE3LjI3LTgzLjk1LTU0Ljg0bDQyLjMxLTE4Ljk2YzQuNzQsMjQuMzcsMTcuMjYsMzYuMjIsNDEuOTgsMzYuMjIKCWMyMy43LDAsMzcuOTEtMTIuODcsMzcuNTctMzIuNWMtMC4zNC0yMC45OS0xMy4yLTI4Ljc4LTM5Ljk0LTI4Ljc4aC0xMS4xN3YtMzIuNWg5LjQ4YzI0LjM3LDAsMzYuNTYtOS44MiwzNi41Ni0yOS43OQoJYzAuMzQtMjAuNjUtMTEuNTEtMzEuNDgtMzEuODItMzEuNDhjLTIwLjY1LDAtMzMuODUsMTAuODMtMzYuOSwzMS44MmwtNDEuNjQtMTUuMjNjOC44LTM2LjksNDAuNjItNTQuMTYsODAuNTYtNTQuMTYKCUMxODUuODIsMTM2LjgxLDIxMi45LDE2Mi41NCwyMTIuOSwxOTcuNzR6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0zOTYuOTgsMTg1LjU2bC0zOS4yNywxOC4yOGMtNS40Mi0xNy42LTE3LjI2LTI4LjQzLTM4LjkzLTI4LjQzYy0yOC43OCwwLTQ5LjA4LDMwLjgtNDkuMDgsNzYuMTZ2NS43NmgxLjAxCgljNy40NS0yMy4wMiwzMS4xNC0zMy41MSw1Ni44Ny0zMy41MWM0Mi45OSwwLDczLjEyLDI3LjQyLDczLjEyLDcwLjQxYzAsNDQuMzQtMzAuOCw3Mi43OC04Mi42LDcyLjc4CgljLTU4LjIzLDAtOTAuMzgtNDIuOTktOTAuMzgtMTE1LjA5YzAtNzcuNTIsNDAuNjItMTE1LjA5LDk0LjExLTExNS4wOUMzNTcuNzEsMTM2LjgxLDM4NC4xMiwxNTAuMzUsMzk2Ljk4LDE4NS41NnogTTI4MC41MywyOTMuNTQKCWMwLDIyLjM0LDE1LjIzLDM2LjIyLDM4LjI1LDM2LjIyYzI0LjAzLDAsMzcuOTEtMTMuMiwzNy45MS0zNi4yMmMwLTIyLTEzLjg4LTM1LjU0LTM3LjkxLTM1LjU0CglDMjk1Ljc2LDI1OCwyODAuNTMsMjcyLjIyLDI4MC41MywyOTMuNTR6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MTQuNzgsMjUxLjkxYzAtNzUuNDksMzAuMTMtMTE1LjA5LDg5LjM3LTExNS4wOXM4OS4zNywzOS42LDg5LjM3LDExNS4wOVM1NjMuMzgsMzY3LDUwNC4xNSwzNjcKCVM0MTQuNzgsMzI3LjM5LDQxNC43OCwyNTEuOTF6IE01NDYuOCwyNTEuOTFjMC01My4xNS0xMy44OC03Ny41Mi00Mi42NS03Ny41MmMtMjguNzcsMC00Mi42NSwyNC4zNy00Mi42NSw3Ny41MgoJYzAsNTMuMTUsMTMuODgsNzcuNTIsNDIuNjUsNzcuNTJDNTMyLjkyLDMyOS40Myw1NDYuOCwzMDUuMDUsNTQ2LjgsMjUxLjkxeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTg4LjIsMTI4LjEzYzAtMTguNjMsMTMuNzgtMzIuMDIsMzIuOTktMzIuMDJjMTkuMjEsMCwzMi45OSwxMy4zOSwzMi45OSwzMi4wMnMtMTMuNzgsMzIuMDItMzIuOTksMzIuMDIKCUM2MDEuOTcsMTYwLjE0LDU4OC4yLDE0Ni43Niw1ODguMiwxMjguMTN6IE02NDAuNTksMTI4LjEzYzAtMTEuMjUtOC4xNS0xOS40LTE5LjQtMTkuNHMtMTkuNCw4LjE1LTE5LjQsMTkuNHM4LjE1LDE5LjQsMTkuNCwxOS40CglTNjQwLjU5LDEzOS4zOCw2NDAuNTksMTI4LjEzeiIvPgo8L3N2Zz4K",HP="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgNjQgNjQiIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiPjxwYXRoIGQ9Ik0gMTYgMTQgQyAxNS40ODggMTQgMTQuOTc2OTM4IDE0LjE5NDkzNyAxNC41ODU5MzggMTQuNTg1OTM4IEMgMTMuODA0OTM3IDE1LjM2NjkzNyAxMy44MDQ5MzcgMTYuNjMzMDYzIDE0LjU4NTkzOCAxNy40MTQwNjIgTCAyOS4xNzE4NzUgMzIgTCAxNC41ODU5MzggNDYuNTg1OTM4IEMgMTMuODA0OTM4IDQ3LjM2NjkzOCAxMy44MDQ5MzcgNDguNjMzMDYzIDE0LjU4NTkzOCA0OS40MTQwNjIgQyAxNC45NzY5MzcgNDkuODA1MDYyIDE1LjQ4OCA1MCAxNiA1MCBDIDE2LjUxMiA1MCAxNy4wMjMwNjIgNDkuODA1MDYyIDE3LjQxNDA2MiA0OS40MTQwNjIgTCAzMiAzNC44MjgxMjUgTCA0Ni41ODU5MzggNDkuNDE0MDYyIEMgNDcuMzY2OTM4IDUwLjE5NTA2MyA0OC42MzMwNjMgNTAuMTk1MDYyIDQ5LjQxNDA2MiA0OS40MTQwNjIgQyA1MC4xOTUwNjMgNDguNjMzMDYyIDUwLjE5NTA2MiA0Ny4zNjY5MzcgNDkuNDE0MDYyIDQ2LjU4NTkzOCBMIDM0LjgyODEyNSAzMiBMIDQ5LjQxNDA2MiAxNy40MTQwNjIgQyA1MC4xOTUwNjMgMTYuNjMzMDYzIDUwLjE5NTA2MiAxNS4zNjY5MzggNDkuNDE0MDYyIDE0LjU4NTkzOCBDIDQ4LjYzMzA2MiAxMy44MDQ5MzggNDcuMzY2OTM3IDEzLjgwNDkzOCA0Ni41ODU5MzggMTQuNTg1OTM4IEwgMzIgMjkuMTcxODc1IEwgMTcuNDE0MDYyIDE0LjU4NTkzOCBDIDE3LjAyMzA2MiAxNC4xOTQ5MzggMTYuNTEyIDE0IDE2IDE0IHoiLz48L3N2Zz4=",iQ="";function VP({snapCameraTo:r}){const e=Object.keys(Dc).map(s=>({label:Dc[s],isDisabled:!0})),[t,n]=Fe.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(Dc[s.label])},children:s.label},o))})}function jP({frameName:r,removeDefaultLensFromLensList:e,customEvent:t,apiService:n,frameList:i,lensList:s,orbitalList:o,showOrbitalList:l,viewerOnly:h,domService:u,ThreeDConfigurator:d,dataVariants:A,dataLenses:p,dataOrbitals:g,firstDitaVariant:_,modelLoading:E,setModelLoading:m}){const[v,w]=Fe.useState(0),[x,C]=Fe.useState(),[B,T]=Fe.useState(),[M,D]=Fe.useState(),[R,S]=Fe.useState(),[L,k]=Fe.useState(!1);Fe.useState(!1),Fe.useState(!1);const[Q,W]=Fe.useState(a0?L?35:30:L?28:25),[J,q]=Fe.useState(a0?10:8),[re,H]=Fe.useState(),[j,$]=Fe.useState(),[P,V]=Fe.useState(),[ee,O]=Fe.useState(!1),[ce,fe]=Fe.useState("placeholder"),[Ae,pe]=Fe.useState(0),De=Fe.useRef(null),Qe=Fe.useRef(),wt=Fe.useRef(null);Qe.current=u;const ut={variantId:0,variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",variantSku:"lens-default",polarized:"No",available:!0};let ht,X,u0;const dt=ge=>{Qe.current&&(Qe.current.snapCameraToPos(ge),ke(Cr[`ChangedView${ge}`]))},ft=async(ge,Le)=>{if(ge._id===(B==null?void 0:B._id)&&!Le||!Qe.current)return;const Te=qe(ge)??(s==null?void 0:s[0]),nt=M??Te;m(!0),Qe.current.changeFrame(ge,[nt,R]).then(()=>{m(!1)}),T(ge),H(A==null?void 0:A.find(et=>et.variantSku===ge.sku)),ke(`${Cr.ChangedFrame}${ge.name}`)},qe=ge=>ge==null?void 0:ge.customisation.find(Te=>Te.type==="Lens"),It=async ge=>{var et;if(!Qe.current||ge===M)return;const Le=ge.sku.includes("lens-default"),Te=qe(B),nt=z();if(!Te&&Le?(m(!0),Qe.current.changeLens([ge,R],!0,B).then(()=>{m(!1)})):!Te&&!Le?M!=null&&M.sku.includes("lens-default")?(m(!0),Qe.current.changeLens([ge,R],!0,B).then(()=>{m(!1)})):Qe.current.changeLens([ge,R],!1,B):Te&&Le?Qe.current.changeLens([Te,R],!1,B):Qe.current.changeLens([ge,R],!1,B),ge.sku.includes("lens-default"))$(ut),ke(`${Cr.ChangedLens}${ut.variantName}`);else{const At=(et=ge.metadata.find(Re=>Re.key===nt))==null?void 0:et.value,Z=p==null?void 0:p.find(Re=>Re.variantId===Number.parseInt(At));$(Z),ke(`${Cr.ChangedLens}${ge.name}. Price will increase by ${j==null?void 0:j.variantPrice} ${j==null?void 0:j.priceCurrency}`)}D(ge)},je=async ge=>{Qe.current&&ge!==R&&(m(!0),await Qe.current.changeOrbital(ge).then(()=>{V(g==null?void 0:g.find(Le=>Le.variantId===Number(ge.sku))),m(!1)}),S(ge),ke(`${Cr.ChangedOrbital}${ge.name}`))},z=()=>{var Te;if(!B)return;const ge=(Te=B.metadata.find(nt=>nt.key==="baseCurve"))==null?void 0:Te.value;let Le="variantId";return ge==="2B"?Le="2bVariantId":ge==="6B"&&(Le="6bVariantId"),Le},U=B?qe(B):void 0,se=!l&&!M&&U&&s?s.find(ge=>ge.sku===U.sku||ge._id===U._id):void 0,_e=Fe.useMemo(()=>{var et,At;if(M)return;const ge=se;if(!ge||!B)return;if(ge.sku.includes("lens-default"))return ut;const Le=(et=B.metadata.find(Z=>Z.key==="baseCurve"))==null?void 0:et.value;let Te="variantId";Le==="2B"?Te="2bVariantId":Le==="6B"&&(Te="6bVariantId");const nt=(At=ge.metadata.find(Z=>Z.key===Te))==null?void 0:At.value;return nt?p==null?void 0:p.find(Z=>Z.variantId===Number.parseInt(nt,10)):p==null?void 0:p.find(Z=>Z.variantSku===ge.sku)},[M,se,B,p]),Ee=M??se,ve=()=>{let ge=0,Le=0;re&&(ge=re.variantPrice);const Te=j??_e;return Te&&(Le=Te.variantPrice),ge+Le},Ye=ge=>{O(ge)},Pe=ge=>{fe(ge)},Ge=()=>{var ge,Le;a0?(ge=document.querySelector('[id$="main-laser-etch-popover"]'))==null||ge.setAttribute("open",""):(Le=document.querySelector('[id$="main-laser-etch-drawer"]'))==null||Le.setAttribute("open","")},pt=()=>{if(l&&!P||!(B&&Ee)||B.name.toLowerCase().includes("default")||Ee.name.toLowerCase().includes("default"))return;const ge=B.metadata.find(be=>be.key==="variantId"),Le=B.metadata.find(be=>be.key==="baseCurve");let Te="variantId";Le&&Le.value==="2B"?Te="2bVariantId":Le&&Le.value==="6B"&&(Te="6bVariantId");const nt=Ee.metadata.find(be=>be.key===Te),et=ge?Number(ge.value):null,At=nt?Number(nt.value):null,Z=P!=null&&P.variantId?Number(P.variantId):null,Re={frameIdentifier:et,lensIdentifier:At,orbitalIdentifier:Z};t.emitEvent("onAddToCart",Re);const de=new Date().getTime(),ye=[];if(At&&nt){const be={id:At,quantity:1,properties:{_uniqueTimestamp:de}};ye.push(be)}if(Z&&(P!=null&&P.variantId)){const be={id:Z,quantity:1,properties:{_uniqueTimestamp:de}};ye.push(be)}if(ee){const be={id:44745490890985,quantity:1,properties:{_uniqueTimestamp:de}};ye.push(be)}if(ge){const be={id:et,quantity:1,properties:ee?{_uniqueTimestamp:de,customText:ce}:{_uniqueTimestamp:de}};ye.push(be)}n.HandleShopifyAddToCart(ye,de)},we=()=>{var ge,Le;a0?(ge=document.querySelector(".popover.hidden-lap-and-up.popover-full"))==null||ge.removeAttribute("open"):(Le=document.querySelector(".drawer.drawer--full.hidden-phone.lens-customizer"))==null||Le.removeAttribute("open")};Fe.useEffect(()=>{W(a0?L?35:30:L?28:25)},[L]),Fe.useEffect(()=>{i&&(l?i&&!ht&&(ht=i==null?void 0:i.find(ge=>ge.sku==="7806-G-SMK-PLD-52-Zx"),T(ht)):(ht=i==null?void 0:i.find(ge=>ge.available),T(ht),H(A==null?void 0:A.find(ge=>ge.variantSku===ht.sku))))},[i]),Fe.useEffect(()=>{if(!(!B||!s)){if(l)s&&!M&&(X=s.find(ge=>ge._id==="65111d718d4c652ece493034"),It(X)),o&&!R&&(u0=o.find(ge=>ge._id==="660c1c0231c23bd36b188fd4"),je(u0));else if(!M){const ge=B.customisation.find(Le=>Le.type==="Lens");ge&&!ge.sku.includes("lens-default")?e():ge||console.log("no custom lens found")}}},[B,s]),Fe.useEffect(()=>{H(_)},[_]),Fe.useEffect(()=>{},[ee,ce]),Fe.useEffect(()=>{pe(ve())},[re,j,_e]);const ke=ge=>{wt.current&&(wt.current.textContent=ge)};return Se.jsxs("section",{id:"sprie-config-main-container",ref:De,children:[!h&&Se.jsxs("header",{id:"sprie-config-main-header",style:{height:`${J}%`},children:[Se.jsxs("div",{id:"sprie-config-header-content",children:[Se.jsx("img",{src:zP,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:we,"aria-label":"close frame customizer",children:Se.jsx("img",{src:HP,alt:"close",style:{width:"2rem",height:"2rem"}})})]}),Se.jsx("span",{className:"sprie-config-sr-only",ref:wt,"aria-live":"assertive"}),Se.jsxs("section",{tabIndex:0,"aria-label":"3D viewer",onFocus:()=>ke(Cr.EnteredViewer),id:"sprie-config-viewer-container",style:{height:`${h?100:100-(Q+J+(a0?8.5:0))}%`},children:[!h&&Se.jsx("img",{src:GP,alt:"360deg-logo",width:44,height:34}),!h&&Se.jsx(VP,{snapCameraTo:dt}),Se.jsx("div",{style:{width:"100%",height:"100%"},id:"holder-canvas"}),E&&Se.jsx("div",{className:"sprie-config-loadingFrame sprie-config-loadingFrame--viewerOverlay",children:Se.jsx("div",{className:"sprie-config-loader"})})]}),!h&&Se.jsxs("section",{id:"Sprie-config-Cust-block",style:{height:`${Q}%`},children:[Se.jsxs(FP,{setShowAddToCart:k,setSelectedChild:w,setSectionEntered:C,children:[Se.jsx(NP,{modelLoading:E,frameList:i,selectedFrame:B,isSelected:v===0,onChangeFrame:ft,heading:"SELECT FRAME COLOR",paletteEntered:x===0}),l&&Se.jsx(OP,{orbitalList:o,selectedOrbital:R,modelLoading:E,isSelected:v===1,onChangeOrbital:je,heading:"SELECT ORBITAL COLOR",paletteEntered:x===1}),Se.jsx(PP,{modelLoading:E,lensList:s,selectedLens:Ee,selectedDitaLens:j??_e,isSelected:v===(l?2:1),paletteEntered:x===(l?2:1),onChangeLens:It,heading:"SELECT LENS COLOR"}),Se.jsx(UP,{heading:"LASER ENGRAVING",isSelected:v===(l?3:2),paletteEntered:x===(l?3:2),onEngravingLinkClicked:Ge,onChecked:Ye,onTextAdded:Pe})]}),Se.jsxs("div",{className:"sprie-config-price-block",children:[Se.jsx("p",{id:"sprie-config-price-text",style:{bottom:a0?"100%":"",margin:"0 0.8rem 0.5rem 0"},children:`${Ae}.00 ${re==null?void 0:re.priceCurrency} `}),!a0&&L&&Se.jsx(Lm,{conditionRequired:!0,onButtonClick:pt}),L&&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."})]}),a0&&L&&Se.jsx("div",{style:{position:"absolute",bottom:"0%",width:"100%"},children:Se.jsx(Lm,{conditionRequired:!0,onButtonClick:pt})})]})]})}function WP({apiService:r,sku:e,events:t,viewerOnly:n=!1,lensSku:i,appControlService:s}){var H;const o=Fe.useRef(),[l,h]=Fe.useState(null),[u,d]=Fe.useState(!1),A=(l==null?void 0:l.frameName)||"",p=(l==null?void 0:l.frameList)||null,g=(l==null?void 0:l.lensList)||null,_=(l==null?void 0:l.orbitalList)||null,[E,m]=Fe.useState(!1),[v,w]=Fe.useState(Ja.Customizer),[x,C]=Fe.useState(void 0),[B,T]=Fe.useState(void 0),[M,D]=Fe.useState(void 0),R=Fe.useRef(void 0),S=Fe.useRef(void 0);Fe.useEffect(()=>{R.current=M},[M]),Fe.useEffect(()=>{S.current=B},[B]);const L=!0,k=async()=>{var $,P;o.current||(o.current=new Dm,await(($=o.current)==null?void 0:$.Init(r.apiKey)));const j=await((P=o.current)==null?void 0:P.getInstance({containerId:"holder-canvas"}));C(j)},Q=async(j,$)=>{var P,V;if(x){d(!0),await new Promise(ee=>requestAnimationFrame(()=>ee()));try{if(E)await x.changeFrame(j,j==null?void 0:j.customisation);else{await x.loadFrame({containerId:"holder-canvas",data:{assetDetails:j,customisation:j==null?void 0:j.customisation,viewerOnly:$}}),m(!0);const ee=((P=j.variants)==null?void 0:P.find(O=>O.sku===j.sku))??((V=j.variants)==null?void 0:V[0]);ee&&D(ee)}}finally{await new Promise(ee=>requestAnimationFrame(()=>requestAnimationFrame(()=>ee()))),d(!1)}}},W=async(j,$)=>{var ce,fe;const P=(ce=R.current)==null?void 0:ce.sku,V=(fe=S.current)==null?void 0:fe.sku,ee=!!(j&&j!==P),O=!!($&&$!==V);if(!(!ee&&!O)){d(!0),await new Promise(Ae=>requestAnimationFrame(()=>Ae()));try{if(ee){const Ae=O?g==null?void 0:g.find(pe=>$.includes(pe.sku)):void 0;await q(j,Ae)}else await J($)}finally{await new Promise(Ae=>requestAnimationFrame(()=>requestAnimationFrame(()=>Ae()))),d(!1)}}},J=async j=>{if(!x)return;const $=g==null?void 0:g.find(V=>j.includes(V.sku)||V.sku===j);if(!$){console.log("Lens not found in Sprie Catalogue : ",j);return}const P=R.current??(p==null?void 0:p[0]);await x.changeLens([$,void 0],!1,P),T($),S.current=$},q=async(j,$)=>{if(!x)return;const P=p==null?void 0:p.find(V=>j.includes(V.sku));if(!P){console.log("Frame variant not found in Sprie Catalogue : ",j);return}await x.changeFrame(P,[$||S.current,void 0]),D(P),R.current=P,$&&(T($),S.current=$)},re=()=>{if(!g||v!==Ja.Lancier||!g.some($=>$.sku.includes("lens-default")))return;const j=g.filter($=>!$.sku.includes("lens-default"));h({...l,lensList:j})};return Fe.useEffect(()=>(s.registerChangeRxConfiguration((j,$)=>W(j,$)),()=>s.reset()),[s,x,g,p]),Fe.useEffect(()=>((async()=>await k())(),()=>{o.current=void 0}),[r,e]),Fe.useEffect(()=>((async()=>{var V,ee;if(!x)return;e.includes("7806")&&e.endsWith("x")&&(e="7806-G-SMK-PLD-52-Zx");const j=await r.FetchAssetBySKUOrBarcode({sku:e,barcode:null}),$=((V=j==null?void 0:j.customisation)==null?void 0:V.filter(O=>O.type==="Orbital").length)>0,P=j!=null&&j.group.name.toLowerCase().includes("lsa")?Ja.Lancier:i?Ja.RxViewer:Ja.Customizer;if(w(P),n)if(i){const O=await r.FetchCustomisationList("Lens",!$,v),ce=(ee=O==null?void 0:O.data)==null?void 0:ee.find(De=>i.includes(De.sku)),fe=[...(j==null?void 0:j.customisation)??[]],Ae=fe.findIndex(De=>De.type==="Lens");Ae!==-1?fe[Ae]=ce:fe.push(ce);const pe={...j,customisation:fe};await Q(pe,n),T(ce),h({frameList:j==null?void 0:j.variants,lensList:O==null?void 0:O.data,orbitalList:null,frameName:j==null?void 0:j.group.name,showOrbitals:!1,domService:x,dataVariants:null,dataLenses:null,dataOrbitals:null})}else await Q(j,n),h({frameList:j==null?void 0:j.variants,lensList:null,orbitalList:null,frameName:j==null?void 0:j.group.name,showOrbitals:!1,domService:x,dataVariants:null,dataLenses:null,dataOrbitals:null});else{const O=await r.FetchCustomisationList("Lens",!$,P),ce=await r.FetchCustomisationList("Orbital",!$,P);let fe=await r.PopulateDataList("data-variants");fe==null||fe.forEach(pe=>{var Qe;let De=(Qe=j==null?void 0:j.variants)==null?void 0:Qe.find(wt=>wt.sku===pe.variantSku);De?De.available=pe.available:pe.available=L});let Ae=j==null?void 0:j.variants;Ae==null||Ae.forEach(pe=>{(fe==null?void 0:fe.find(Qe=>Qe.variantSku===pe.sku))||(pe.available=L)}),await Q(j,n),h({frameList:j==null?void 0:j.variants,lensList:O==null?void 0:O.data,orbitalList:ce==null?void 0:ce.data,frameName:j==null?void 0:j.group.name,showOrbitals:$,domService:x,dataVariants:fe,dataLenses:await r.PopulateDataList("data-lenses"),dataOrbitals:await r.PopulateDataList("data-orbital")})}})(),()=>{o.current=void 0}),[x]),Se.jsxs(Se.Fragment,{children:[!n&&(!p||!g)&&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(jP,{customEvent:t,frameName:A,apiService:r,frameList:p,lensList:g,orbitalList:_,showOrbitalList:(l==null?void 0:l.showOrbitals)||!1,viewerOnly:n,ThreeDConfigurator:o.current,domService:l==null?void 0:l.domService,dataVariants:l==null?void 0:l.dataVariants,dataLenses:l==null?void 0:l.dataLenses,dataOrbitals:l==null?void 0:l.dataOrbitals,firstDitaVariant:(H=l==null?void 0:l.dataVariants)==null?void 0:H.find(j=>j.variantSku==e),removeDefaultLensFromLensList:re,modelLoading:u,setModelLoading:d})]})}var Bh={},Nm={exports:{}},Fr={},bh={exports:{}},Rh={};/**
|
|
4704
|
+
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.")}),Te.jsxs("div",{tabIndex:0,style:{height:"30%",alignContent:"center"},"aria-labelledby":"sprie-config-step-selector",onKeyDown:p,ref:h,children:[Te.jsx(QP,{nextSlide:A,previousSlide:d,currentIndex:i,stepsName:u,isLastStep:l}),Te.jsx(kP,{totalSteps:u==null?void 0:u.length,currentStep:i+1})]}),Te.jsx("div",{className:"carousel-container",style:{paddingTop:a0?"":"1rem"},children:o.map((_,E)=>Te.jsx("div",{className:"carousel-item",style:{transform:`translateX(-${i*100}%)`},children:_},E))})]})}const nQ="";function Lm({conditionRequired:r,onButtonClick:e}){const[t,n]=Fe.useState(!1),i=Fe.useRef(null),s=Fe.useRef(null);return Fe.useEffect(()=>{s.current&&(s.current.disabled=!t)},[t]),Fe.useEffect(()=>{i.current&&(i.current.style.display=r?"flex":"none"),s.current&&(s.current.disabled=r)},[r]),Te.jsxs("div",{className:"sprie-config-add-to-cart-block",children:[Te.jsxs("label",{htmlFor:"Sprie-Config-return-policy-checkbox",id:"Sprie-Config-return-policy-label",ref:i,style:{display:"none"},children:[Te.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}),Te.jsx("p",{id:"sprie-config-return-policy-desc",children:"I agree this customized Item cannot be returned or exchanged."})]}),Te.jsx("button",{className:"sprie-config-add-to-cart-btn",ref:s,onClick:e,children:"ADD TO CART"})]})}function OP({orbitalList:r,selectedOrbital:e,modelLoading:t,isSelected:n,paletteEntered:i,onChangeOrbital:s}){const o=Fe.useRef(null),l=Fe.useRef(null),h=()=>{o.current&&(o.current.textContent=Cr.EnteredOrbitalsListSection)};return Fe.useEffect(()=>{i&&l.current&&l.current.querySelectorAll(".sprie-config-palette-img-box")[0].firstChild.focus()},[i]),Te.jsxs("div",{className:"sprie-config-palette",ref:l,style:{display:n?"flex":"none",padding:"0 3rem",gap:a0?"3rem":"5rem"},children:[Te.jsx("span",{className:"sprie-config-sr-only","aria-live":"assertive",ref:o}),r==null?void 0:r.map(u=>Te.jsxs("div",{className:"sprie-config-palette-img-box",children:[Te.jsx("button",{"aria-labelledby":(e==null?void 0:e._id)===u._id?"sprie-config-orbitalName":"",style:{border:"0",cursor:t?"default":"pointer",width:a0?45:60,height:a0?45:60},onClick:()=>s(u),onFocus:h,disabled:t,children:Te.jsx("img",{"aria-label":`Select orbital ${u.name}`,src:u.thumbnail,alt:u.name+"image",className:`sprie-config-image ${a0?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===u._id?"2px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),Te.jsxs("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.5rem"},children:[Te.jsx("span",{className:"sprie-config-palette-imgName",children:u.name}),Te.jsx("span",{id:"sprie-config-orbitalName",className:"sprie-config-sr-only",children:`Selected orbital ${u.name}`})]})]},u._id))]})}const zP="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMzIwLjAwMDAwMHB0IiBoZWlnaHQ9IjY2LjAwMDAwMHB0IiB2aWV3Qm94PSIwIDAgMzIwLjAwMDAwMCA2Ni4wMDAwMDAiCiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0Ij4KCjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLDY2LjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIKZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTAgNjUxIGMwIC02IDkgLTExIDIxIC0xMSAxMSAwIDI5IC01IDQwIC0xMCAxOCAtMTAgMTkgLTI0IDE5IC0zMDAKMCAtMjc2IC0xIC0yOTAgLTE5IC0zMDAgLTExIC01IC0yOSAtMTAgLTQwIC0xMCAtMTIgMCAtMjEgLTQgLTIxIC0xMCAwIC0xNAo0NDUgLTEzIDUxMiAxIDEwNyAyMyAxOTAgODUgMjM5IDE3OSAyMCAzNyAyNCA2MCAyNCAxMzUgMCA3OCAtNCA5NyAtMjggMTQ3Ci0zNCA3MCAtMTAwIDEzMCAtMTc2IDE2MCAtNTIgMjEgLTc1IDIzIC0zMTMgMjYgLTE4MCAyIC0yNTggMCAtMjU4IC03eiBtNDcwCi0zNiBjMTUgLTggMzggLTI3IDQ5IC00MSAyMCAtMjUgMjEgLTM5IDIxIC0yMzggMCAtMTk0IC0yIC0yMTQgLTIwIC0yNDQgLTExCi0xOCAtMzYgLTQwIC01NSAtNDggLTQ2IC0xOSAtMTM1IC0xOCAtMTYzIDIgLTIyIDE1IC0yMiAxNyAtMjIgMzAwIGwwIDI4NCA4MAowIGM1MiAwIDkxIC01IDExMCAtMTV6Ii8+CjxwYXRoIGQ9Ik05ODAgNjUwIGMwIC01IDExIC0xMCAyNCAtMTAgNTUgMCA1NiAtNyA1NiAtMzEwIDAgLTMwMyAtMSAtMzEwIC01NgotMzEwIC0xMyAwIC0yNCAtNCAtMjQgLTEwIDAgLTYgNjcgLTEwIDE4MCAtMTAgMTEzIDAgMTgwIDQgMTgwIDEwIDAgNiAtMTEgMTAKLTIzIDEwIC0xMyAwIC0zMSA4IC00MCAxOCAtMTUgMTYgLTE3IDUyIC0xNyAyOTQgMCAyNTQgMSAyNzYgMTggMjkxIDEwIDEwIDI4CjE3IDQwIDE3IDEyIDAgMjIgNSAyMiAxMCAwIDYgLTY3IDEwIC0xODAgMTAgLTExMyAwIC0xODAgLTQgLTE4MCAtMTB6Ii8+CjxwYXRoIGQ9Ik0xNTI2IDYwMSBjLTI1IC0zMyAtNDYgLTY0IC00NiAtNzAgMCAtNiAyNCA1IDU0IDI0IDUzIDM0IDE1OSA3NQoxOTQgNzUgMTAgMCAyOCAtMTAgNDAgLTIzIDIxIC0yMyAyMiAtMzAgMjIgLTI4OSAwIC0yODkgLTIgLTI5OCAtNTYgLTI5OCAtMTMKMCAtMjQgLTQgLTI0IC0xMCAwIC02IDY3IC0xMCAxODAgLTEwIDExMyAwIDE4MCA0IDE4MCAxMCAwIDYgLTExIDEwIC0yNCAxMAotNTQgMCAtNTYgOSAtNTYgMjk0IDAgMjUxIDEgMjY1IDIxIDI5MCAxMSAxNCAzMCAyNiA0MiAyNiAzNyAtMSAxNTMgLTQ2IDIwMQotNzggMjUgLTE3IDQ2IC0yNyA0NiAtMjEgMCA2IC0yMSAzNyAtNDYgNzAgbC00NyA1OSAtMzE3IDAgLTMxNyAwIC00NyAtNTl6Ii8+CjxwYXRoIGQ9Ik0yNDU1IDY1MCBjMyAtNSAxNSAtMTAgMjYgLTEwIDMwIDAgNjUgLTI3IDk3IC03NiBsMjkgLTQzIC05MCAtMTc4CmMtMTM2IC0yNzAgLTE2MyAtMzEzIC0xOTggLTMyMCAtNTkgLTExIC0yNiAtMjMgNjYgLTIzIDg5IDAgMTIxIDExIDc1IDI1IC0yOQo5IC0yNiA1NSAxMCAxMjYgbDMxIDYwIDE1MSAtMyAxNTEgLTMgMzkgLTczIGMzMCAtNTkgMzYgLTc3IDI4IC05MyAtNiAtMTAKLTIwIC0xOSAtMzAgLTE5IC0xMSAwIC0yMCAtNCAtMjAgLTEwIDAgLTYgNzAgLTEwIDE5MCAtMTAgMTIwIDAgMTkwIDQgMTkwIDEwCjAgNiAtMTEgMTAgLTI0IDEwIC0xNCAwIC0zNiAxMCAtNTAgMjMgLTE1IDEyIC0xMDYgMTU1IC0yMDQgMzE3IGwtMTc3IDI5NQotMTQ4IDMgYy0xMDAgMiAtMTQ2IC0xIC0xNDIgLTh6IG0yNTggLTM5OCBjLTM1IC0yIC05MiAtMiAtMTI3IDAgbC02NCAzIDYwCjExMyA2MCAxMTMgNjcgLTExMyA2NyAtMTEzIC02MyAtM3oiLz4KPC9nPgo8L3N2Zz4K",GP="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA4ODYgNjk4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA4ODYgNjk4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzkxODQ3RTt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik04NDAuMDEsNDEuMDFjLTM2LjcxLTMxLjU2LTEwOC45NC01Ny45Ny0yNDQuNi00LjU2Yy0yMC40Nyw4LjA2LTQxLjQ2LDE3LjU3LTYyLjc1LDI4LjM2CgljMTkuMzgtNC42Niw0MzEuNTItMTAxLDE3NS42MSwxOTkuNDJsLTAuMDQsMGMtMjUuODUsMzUuNS01Ny44Miw3Mi4wOC05NC40MiwxMDcuOTdsLTMyLjcyLTI4LjE0bC02LjQ0LDE0MS43NmwxNjQuODQtNS41NwoJbC00NC4zNC0zOC4xMmM2NS41NC02My43NCwxMTcuODUtMTI5Ljk0LDE1MC4yMi0xOTAuNzdDOTA3LjQ0LDEzNC42OSw4NzYuNzEsNzIuNTcsODQwLjAxLDQxLjAxeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTYyLjE3LDQyNS42N2MtNjQuNDcsNDYuMi0xMzIuNjcsODYuMjItMTk4LjQzLDExNi43NmMtMC4wOSwwLjA0LTAuMTcsMC4wOC0wLjI1LDAuMTMKCUMtMTkuMjcsNzMwLjcyLDczLjg2LDQ0MS4xMyw4OC4wNyw0MDEuNDVsLTIuMDktMS41MWMtMTQuNjcsMTcuOTMtMjcuNiwzNS42MS0zOC41Myw1Mi44NEMtMjQuNCw1NjYsMTEuMTYsNjI2LjI3LDUzLjY0LDY1Ni44OQoJYzQyLjQ4LDMwLjYzLDEyNi4wNyw1Ni4yNSwyODMuMDUsNC40M2M5OS0zMi42OSwyMDguNTgtODkuNywzMTAuMDYtMTYxLjE5bC04My43Ny0wLjQ2TDU2Mi4xNyw0MjUuNjd6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMTIuOSwxOTcuNzRjMCwzNS41NC0yNS43Myw1Mi44MS00MS45OCw1Mi44MXYxLjAxYzIwLjY1LDAsNDYuMzcsMTUuOTEsNDYuMzcsNTEuNDUKCWMwLDM3LjkxLTM0LjE5LDYzLjk4LTgzLjYxLDYzLjk4Yy00My42NywwLTcxLjA5LTE3LjI3LTgzLjk1LTU0Ljg0bDQyLjMxLTE4Ljk2YzQuNzQsMjQuMzcsMTcuMjYsMzYuMjIsNDEuOTgsMzYuMjIKCWMyMy43LDAsMzcuOTEtMTIuODcsMzcuNTctMzIuNWMtMC4zNC0yMC45OS0xMy4yLTI4Ljc4LTM5Ljk0LTI4Ljc4aC0xMS4xN3YtMzIuNWg5LjQ4YzI0LjM3LDAsMzYuNTYtOS44MiwzNi41Ni0yOS43OQoJYzAuMzQtMjAuNjUtMTEuNTEtMzEuNDgtMzEuODItMzEuNDhjLTIwLjY1LDAtMzMuODUsMTAuODMtMzYuOSwzMS44MmwtNDEuNjQtMTUuMjNjOC44LTM2LjksNDAuNjItNTQuMTYsODAuNTYtNTQuMTYKCUMxODUuODIsMTM2LjgxLDIxMi45LDE2Mi41NCwyMTIuOSwxOTcuNzR6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0zOTYuOTgsMTg1LjU2bC0zOS4yNywxOC4yOGMtNS40Mi0xNy42LTE3LjI2LTI4LjQzLTM4LjkzLTI4LjQzYy0yOC43OCwwLTQ5LjA4LDMwLjgtNDkuMDgsNzYuMTZ2NS43NmgxLjAxCgljNy40NS0yMy4wMiwzMS4xNC0zMy41MSw1Ni44Ny0zMy41MWM0Mi45OSwwLDczLjEyLDI3LjQyLDczLjEyLDcwLjQxYzAsNDQuMzQtMzAuOCw3Mi43OC04Mi42LDcyLjc4CgljLTU4LjIzLDAtOTAuMzgtNDIuOTktOTAuMzgtMTE1LjA5YzAtNzcuNTIsNDAuNjItMTE1LjA5LDk0LjExLTExNS4wOUMzNTcuNzEsMTM2LjgxLDM4NC4xMiwxNTAuMzUsMzk2Ljk4LDE4NS41NnogTTI4MC41MywyOTMuNTQKCWMwLDIyLjM0LDE1LjIzLDM2LjIyLDM4LjI1LDM2LjIyYzI0LjAzLDAsMzcuOTEtMTMuMiwzNy45MS0zNi4yMmMwLTIyLTEzLjg4LTM1LjU0LTM3LjkxLTM1LjU0CglDMjk1Ljc2LDI1OCwyODAuNTMsMjcyLjIyLDI4MC41MywyOTMuNTR6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MTQuNzgsMjUxLjkxYzAtNzUuNDksMzAuMTMtMTE1LjA5LDg5LjM3LTExNS4wOXM4OS4zNywzOS42LDg5LjM3LDExNS4wOVM1NjMuMzgsMzY3LDUwNC4xNSwzNjcKCVM0MTQuNzgsMzI3LjM5LDQxNC43OCwyNTEuOTF6IE01NDYuOCwyNTEuOTFjMC01My4xNS0xMy44OC03Ny41Mi00Mi42NS03Ny41MmMtMjguNzcsMC00Mi42NSwyNC4zNy00Mi42NSw3Ny41MgoJYzAsNTMuMTUsMTMuODgsNzcuNTIsNDIuNjUsNzcuNTJDNTMyLjkyLDMyOS40Myw1NDYuOCwzMDUuMDUsNTQ2LjgsMjUxLjkxeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTg4LjIsMTI4LjEzYzAtMTguNjMsMTMuNzgtMzIuMDIsMzIuOTktMzIuMDJjMTkuMjEsMCwzMi45OSwxMy4zOSwzMi45OSwzMi4wMnMtMTMuNzgsMzIuMDItMzIuOTksMzIuMDIKCUM2MDEuOTcsMTYwLjE0LDU4OC4yLDE0Ni43Niw1ODguMiwxMjguMTN6IE02NDAuNTksMTI4LjEzYzAtMTEuMjUtOC4xNS0xOS40LTE5LjQtMTkuNHMtMTkuNCw4LjE1LTE5LjQsMTkuNHM4LjE1LDE5LjQsMTkuNCwxOS40CglTNjQwLjU5LDEzOS4zOCw2NDAuNTksMTI4LjEzeiIvPgo8L3N2Zz4K",HP="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgNjQgNjQiIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiPjxwYXRoIGQ9Ik0gMTYgMTQgQyAxNS40ODggMTQgMTQuOTc2OTM4IDE0LjE5NDkzNyAxNC41ODU5MzggMTQuNTg1OTM4IEMgMTMuODA0OTM3IDE1LjM2NjkzNyAxMy44MDQ5MzcgMTYuNjMzMDYzIDE0LjU4NTkzOCAxNy40MTQwNjIgTCAyOS4xNzE4NzUgMzIgTCAxNC41ODU5MzggNDYuNTg1OTM4IEMgMTMuODA0OTM4IDQ3LjM2NjkzOCAxMy44MDQ5MzcgNDguNjMzMDYzIDE0LjU4NTkzOCA0OS40MTQwNjIgQyAxNC45NzY5MzcgNDkuODA1MDYyIDE1LjQ4OCA1MCAxNiA1MCBDIDE2LjUxMiA1MCAxNy4wMjMwNjIgNDkuODA1MDYyIDE3LjQxNDA2MiA0OS40MTQwNjIgTCAzMiAzNC44MjgxMjUgTCA0Ni41ODU5MzggNDkuNDE0MDYyIEMgNDcuMzY2OTM4IDUwLjE5NTA2MyA0OC42MzMwNjMgNTAuMTk1MDYyIDQ5LjQxNDA2MiA0OS40MTQwNjIgQyA1MC4xOTUwNjMgNDguNjMzMDYyIDUwLjE5NTA2MiA0Ny4zNjY5MzcgNDkuNDE0MDYyIDQ2LjU4NTkzOCBMIDM0LjgyODEyNSAzMiBMIDQ5LjQxNDA2MiAxNy40MTQwNjIgQyA1MC4xOTUwNjMgMTYuNjMzMDYzIDUwLjE5NTA2MiAxNS4zNjY5MzggNDkuNDE0MDYyIDE0LjU4NTkzOCBDIDQ4LjYzMzA2MiAxMy44MDQ5MzggNDcuMzY2OTM3IDEzLjgwNDkzOCA0Ni41ODU5MzggMTQuNTg1OTM4IEwgMzIgMjkuMTcxODc1IEwgMTcuNDE0MDYyIDE0LjU4NTkzOCBDIDE3LjAyMzA2MiAxNC4xOTQ5MzggMTYuNTEyIDE0IDE2IDE0IHoiLz48L3N2Zz4=",iQ="";function VP({snapCameraTo:r}){const e=Object.keys(Dc).map(s=>({label:Dc[s],isDisabled:!0})),[t,n]=Fe.useState(),i=s=>{n(s),r(s)};return Te.jsx("div",{className:"sprie-3d-snap-button-block",children:e.map((s,o)=>Te.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(Dc[s.label])},children:s.label},o))})}function jP({frameName:r,removeDefaultLensFromLensList:e,customEvent:t,apiService:n,frameList:i,lensList:s,orbitalList:o,showOrbitalList:l,viewerOnly:h,domService:u,ThreeDConfigurator:d,dataVariants:A,dataLenses:p,dataOrbitals:g,firstDitaVariant:_,modelLoading:E,setModelLoading:m}){const[v,w]=Fe.useState(0),[x,C]=Fe.useState(),[B,T]=Fe.useState(),[M,D]=Fe.useState(),[R,S]=Fe.useState(),[L,k]=Fe.useState(!1);Fe.useState(!1),Fe.useState(!1);const[Q,W]=Fe.useState(a0?L?35:30:L?28:25),[J,q]=Fe.useState(a0?10:8),[re,H]=Fe.useState(),[j,$]=Fe.useState(),[P,V]=Fe.useState(),[ee,O]=Fe.useState(!1),[ce,fe]=Fe.useState("placeholder"),[Ae,pe]=Fe.useState(0),Re=Fe.useRef(null),ke=Fe.useRef(),wt=Fe.useRef(null);ke.current=u;const ut={variantId:0,variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",variantSku:"lens-default",polarized:"No",available:!0};let ht,X,u0;const dt=ge=>{ke.current&&(ke.current.snapCameraToPos(ge),Qe(Cr[`ChangedView${ge}`]))},ft=async(ge,De)=>{if(ge._id===(B==null?void 0:B._id)&&!De||!ke.current)return;const Se=qe(ge)??(s==null?void 0:s[0]),nt=M??Se;m(!0),ke.current.changeFrame(ge,[nt,R]).then(()=>{m(!1)}),T(ge),H(A==null?void 0:A.find(et=>et.variantSku===ge.sku)),Qe(`${Cr.ChangedFrame}${ge.name}`)},qe=ge=>ge==null?void 0:ge.customisation.find(Se=>Se.type==="Lens"),It=async ge=>{var Z;if(!ke.current||ge===M)return;const De=ge.sku.includes("lens-default"),Se=qe(B),nt=M??Se,et=!nt||nt.sku.includes("lens-default"),At=z();if(!Se&&De?(m(!0),ke.current.changeLens([ge,R],!0,B).then(()=>{m(!1)})):!Se&&!De?et?(m(!0),ke.current.changeLens([ge,R],!0,B).then(()=>{m(!1)})):ke.current.changeLens([ge,R],!1,B):Se&&De?ke.current.changeLens([Se,R],!1,B):et?(m(!0),ke.current.changeLens([ge,R],!0,B).then(()=>{m(!1)})):ke.current.changeLens([ge,R],!1,B),ge.sku.includes("lens-default"))$(ut),Qe(`${Cr.ChangedLens}${ut.variantName}`);else{const Le=(Z=ge.metadata.find(ve=>ve.key===At))==null?void 0:Z.value,ue=p==null?void 0:p.find(ve=>ve.variantId===Number.parseInt(Le));$(ue),Qe(`${Cr.ChangedLens}${ge.name}. Price will increase by ${j==null?void 0:j.variantPrice} ${j==null?void 0:j.priceCurrency}`)}D(ge)},je=async ge=>{ke.current&&ge!==R&&(m(!0),await ke.current.changeOrbital(ge).then(()=>{V(g==null?void 0:g.find(De=>De.variantId===Number(ge.sku))),m(!1)}),S(ge),Qe(`${Cr.ChangedOrbital}${ge.name}`))},z=()=>{var Se;if(!B)return;const ge=(Se=B.metadata.find(nt=>nt.key==="baseCurve"))==null?void 0:Se.value;let De="variantId";return ge==="2B"?De="2bVariantId":ge==="6B"&&(De="6bVariantId"),De},U=B?qe(B):void 0,se=!l&&!M&&U&&s?s.find(ge=>ge.sku===U.sku||ge._id===U._id):void 0,ye=Fe.useMemo(()=>{var et,At;if(M)return;const ge=se;if(!ge||!B)return;if(ge.sku.includes("lens-default"))return ut;const De=(et=B.metadata.find(Z=>Z.key==="baseCurve"))==null?void 0:et.value;let Se="variantId";De==="2B"?Se="2bVariantId":De==="6B"&&(Se="6bVariantId");const nt=(At=ge.metadata.find(Z=>Z.key===Se))==null?void 0:At.value;return nt?p==null?void 0:p.find(Z=>Z.variantId===Number.parseInt(nt,10)):p==null?void 0:p.find(Z=>Z.variantSku===ge.sku)},[M,se,B,p]),Ee=M??se,_e=()=>{let ge=0,De=0;re&&(ge=re.variantPrice);const Se=j??ye;return Se&&(De=Se.variantPrice),ge+De},Ye=ge=>{O(ge)},Pe=ge=>{fe(ge)},Ge=()=>{var ge,De;a0?(ge=document.querySelector('[id$="main-laser-etch-popover"]'))==null||ge.setAttribute("open",""):(De=document.querySelector('[id$="main-laser-etch-drawer"]'))==null||De.setAttribute("open","")},pt=()=>{if(l&&!P||!(B&&Ee)||B.name.toLowerCase().includes("default")||Ee.name.toLowerCase().includes("default"))return;const ge=B.metadata.find(be=>be.key==="variantId"),De=B.metadata.find(be=>be.key==="baseCurve");let Se="variantId";De&&De.value==="2B"?Se="2bVariantId":De&&De.value==="6B"&&(Se="6bVariantId");const nt=Ee.metadata.find(be=>be.key===Se),et=ge?Number(ge.value):null,At=nt?Number(nt.value):null,Z=P!=null&&P.variantId?Number(P.variantId):null,Le={frameIdentifier:et,lensIdentifier:At,orbitalIdentifier:Z};t.emitEvent("onAddToCart",Le);const ue=new Date().getTime(),ve=[];if(At&&nt){const be={id:At,quantity:1,properties:{_uniqueTimestamp:ue}};ve.push(be)}if(Z&&(P!=null&&P.variantId)){const be={id:Z,quantity:1,properties:{_uniqueTimestamp:ue}};ve.push(be)}if(ee){const be={id:44745490890985,quantity:1,properties:{_uniqueTimestamp:ue}};ve.push(be)}if(ge){const be={id:et,quantity:1,properties:ee?{_uniqueTimestamp:ue,customText:ce}:{_uniqueTimestamp:ue}};ve.push(be)}n.HandleShopifyAddToCart(ve,ue)},we=()=>{var ge,De;a0?(ge=document.querySelector(".popover.hidden-lap-and-up.popover-full"))==null||ge.removeAttribute("open"):(De=document.querySelector(".drawer.drawer--full.hidden-phone.lens-customizer"))==null||De.removeAttribute("open")};Fe.useEffect(()=>{W(a0?L?35:30:L?28:25)},[L]),Fe.useEffect(()=>{i&&(l?i&&!ht&&(ht=i==null?void 0:i.find(ge=>ge.sku==="7806-G-SMK-PLD-52-Zx"),T(ht)):(ht=i==null?void 0:i.find(ge=>ge.available),T(ht),H(A==null?void 0:A.find(ge=>ge.variantSku===ht.sku))))},[i]),Fe.useEffect(()=>{if(!(!B||!s)){if(l)s&&!M&&(X=s.find(ge=>ge._id==="65111d718d4c652ece493034"),It(X)),o&&!R&&(u0=o.find(ge=>ge._id==="660c1c0231c23bd36b188fd4"),je(u0));else if(!M){const ge=B.customisation.find(De=>De.type==="Lens");ge&&!ge.sku.includes("lens-default")?e():ge||console.log("no custom lens found")}}},[B,s]),Fe.useEffect(()=>{H(_)},[_]),Fe.useEffect(()=>{},[ee,ce]),Fe.useEffect(()=>{pe(_e())},[re,j,ye]);const Qe=ge=>{wt.current&&(wt.current.textContent=ge)};return Te.jsxs("section",{id:"sprie-config-main-container",ref:Re,children:[!h&&Te.jsxs("header",{id:"sprie-config-main-header",style:{height:`${J}%`},children:[Te.jsxs("div",{id:"sprie-config-header-content",children:[Te.jsx("img",{src:zP,alt:"dita-logo",width:97,height:20}),Te.jsxs("p",{style:{margin:"0"},className:"sprie-config-mainHeader-frameName",children:[r," CUSTOMIZER"]})]}),Te.jsx("button",{className:"sprie-config-main-header-close",onClick:we,"aria-label":"close frame customizer",children:Te.jsx("img",{src:HP,alt:"close",style:{width:"2rem",height:"2rem"}})})]}),Te.jsx("span",{className:"sprie-config-sr-only",ref:wt,"aria-live":"assertive"}),Te.jsxs("section",{tabIndex:0,"aria-label":"3D viewer",onFocus:()=>Qe(Cr.EnteredViewer),id:"sprie-config-viewer-container",style:{height:`${h?100:100-(Q+J+(a0?8.5:0))}%`},children:[!h&&Te.jsx("img",{src:GP,alt:"360deg-logo",width:44,height:34}),!h&&Te.jsx(VP,{snapCameraTo:dt}),Te.jsx("div",{style:{width:"100%",height:"100%"},id:"holder-canvas"}),E&&Te.jsx("div",{className:"sprie-config-loadingFrame sprie-config-loadingFrame--viewerOverlay",children:Te.jsx("div",{className:"sprie-config-loader"})})]}),!h&&Te.jsxs("section",{id:"Sprie-config-Cust-block",style:{height:`${Q}%`},children:[Te.jsxs(FP,{setShowAddToCart:k,setSelectedChild:w,setSectionEntered:C,children:[Te.jsx(NP,{modelLoading:E,frameList:i,selectedFrame:B,isSelected:v===0,onChangeFrame:ft,heading:"SELECT FRAME COLOR",paletteEntered:x===0}),l&&Te.jsx(OP,{orbitalList:o,selectedOrbital:R,modelLoading:E,isSelected:v===1,onChangeOrbital:je,heading:"SELECT ORBITAL COLOR",paletteEntered:x===1}),Te.jsx(PP,{modelLoading:E,lensList:s,selectedLens:Ee,selectedDitaLens:j??ye,isSelected:v===(l?2:1),paletteEntered:x===(l?2:1),onChangeLens:It,heading:"SELECT LENS COLOR"}),Te.jsx(UP,{heading:"LASER ENGRAVING",isSelected:v===(l?3:2),paletteEntered:x===(l?3:2),onEngravingLinkClicked:Ge,onChecked:Ye,onTextAdded:Pe})]}),Te.jsxs("div",{className:"sprie-config-price-block",children:[Te.jsx("p",{id:"sprie-config-price-text",style:{bottom:a0?"100%":"",margin:"0 0.8rem 0.5rem 0"},children:`${Ae}.00 ${re==null?void 0:re.priceCurrency} `}),!a0&&L&&Te.jsx(Lm,{conditionRequired:!0,onButtonClick:pt}),L&&Te.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."})]}),a0&&L&&Te.jsx("div",{style:{position:"absolute",bottom:"0%",width:"100%"},children:Te.jsx(Lm,{conditionRequired:!0,onButtonClick:pt})})]})]})}function WP({apiService:r,sku:e,events:t,viewerOnly:n=!1,lensSku:i,appControlService:s}){var H;const o=Fe.useRef(),[l,h]=Fe.useState(null),[u,d]=Fe.useState(!1),A=(l==null?void 0:l.frameName)||"",p=(l==null?void 0:l.frameList)||null,g=(l==null?void 0:l.lensList)||null,_=(l==null?void 0:l.orbitalList)||null,[E,m]=Fe.useState(!1),[v,w]=Fe.useState(Ja.Customizer),[x,C]=Fe.useState(void 0),[B,T]=Fe.useState(void 0),[M,D]=Fe.useState(void 0),R=Fe.useRef(void 0),S=Fe.useRef(void 0);Fe.useEffect(()=>{R.current=M},[M]),Fe.useEffect(()=>{S.current=B},[B]);const L=!0,k=async()=>{var $,P;o.current||(o.current=new Dm,await(($=o.current)==null?void 0:$.Init(r.apiKey)));const j=await((P=o.current)==null?void 0:P.getInstance({containerId:"holder-canvas"}));C(j)},Q=async(j,$)=>{var P,V;if(x){d(!0),await new Promise(ee=>requestAnimationFrame(()=>ee()));try{if(E)await x.changeFrame(j,j==null?void 0:j.customisation);else{await x.loadFrame({containerId:"holder-canvas",data:{assetDetails:j,customisation:j==null?void 0:j.customisation,viewerOnly:$}}),m(!0);const ee=((P=j.variants)==null?void 0:P.find(O=>O.sku===j.sku))??((V=j.variants)==null?void 0:V[0]);ee&&D(ee)}}finally{await new Promise(ee=>requestAnimationFrame(()=>requestAnimationFrame(()=>ee()))),d(!1)}}},W=async(j,$)=>{var ce,fe;const P=(ce=R.current)==null?void 0:ce.sku,V=(fe=S.current)==null?void 0:fe.sku,ee=!!(j&&j!==P),O=!!($&&$!==V);if(!(!ee&&!O)){d(!0),await new Promise(Ae=>requestAnimationFrame(()=>Ae()));try{if(ee){const Ae=O?g==null?void 0:g.find(pe=>$.includes(pe.sku)):void 0;await q(j,Ae)}else await J($)}finally{await new Promise(Ae=>requestAnimationFrame(()=>requestAnimationFrame(()=>Ae()))),d(!1)}}},J=async j=>{if(!x)return;const $=g==null?void 0:g.find(V=>j.includes(V.sku)||V.sku===j);if(!$){console.log("Lens not found in Sprie Catalogue : ",j);return}const P=R.current??(p==null?void 0:p[0]);await x.changeLens([$,void 0],!1,P),T($),S.current=$},q=async(j,$)=>{if(!x)return;const P=p==null?void 0:p.find(V=>j.includes(V.sku));if(!P){console.log("Frame variant not found in Sprie Catalogue : ",j);return}await x.changeFrame(P,[$||S.current,void 0]),D(P),R.current=P,$&&(T($),S.current=$)},re=()=>{if(!g||v!==Ja.Lancier||!g.some($=>$.sku.includes("lens-default")))return;const j=g.filter($=>!$.sku.includes("lens-default"));h({...l,lensList:j})};return Fe.useEffect(()=>(s.registerChangeRxConfiguration((j,$)=>W(j,$)),()=>s.reset()),[s,x,g,p]),Fe.useEffect(()=>((async()=>await k())(),()=>{o.current=void 0}),[r,e]),Fe.useEffect(()=>((async()=>{var V,ee;if(!x)return;e.includes("7806")&&e.endsWith("x")&&(e="7806-G-SMK-PLD-52-Zx");const j=await r.FetchAssetBySKUOrBarcode({sku:e,barcode:null}),$=((V=j==null?void 0:j.customisation)==null?void 0:V.filter(O=>O.type==="Orbital").length)>0,P=j!=null&&j.group.name.toLowerCase().includes("lsa")?Ja.Lancier:i?Ja.RxViewer:Ja.Customizer;if(w(P),n)if(i){const O=await r.FetchCustomisationList("Lens",!$,v),ce=(ee=O==null?void 0:O.data)==null?void 0:ee.find(Re=>i.includes(Re.sku)),fe=[...(j==null?void 0:j.customisation)??[]],Ae=fe.findIndex(Re=>Re.type==="Lens");Ae!==-1?fe[Ae]=ce:fe.push(ce);const pe={...j,customisation:fe};await Q(pe,n),T(ce),h({frameList:j==null?void 0:j.variants,lensList:O==null?void 0:O.data,orbitalList:null,frameName:j==null?void 0:j.group.name,showOrbitals:!1,domService:x,dataVariants:null,dataLenses:null,dataOrbitals:null})}else await Q(j,n),h({frameList:j==null?void 0:j.variants,lensList:null,orbitalList:null,frameName:j==null?void 0:j.group.name,showOrbitals:!1,domService:x,dataVariants:null,dataLenses:null,dataOrbitals:null});else{const O=await r.FetchCustomisationList("Lens",!$,P),ce=await r.FetchCustomisationList("Orbital",!$,P);let fe=await r.PopulateDataList("data-variants");fe==null||fe.forEach(pe=>{var ke;let Re=(ke=j==null?void 0:j.variants)==null?void 0:ke.find(wt=>wt.sku===pe.variantSku);Re?Re.available=pe.available:pe.available=L});let Ae=j==null?void 0:j.variants;Ae==null||Ae.forEach(pe=>{(fe==null?void 0:fe.find(ke=>ke.variantSku===pe.sku))||(pe.available=L)}),await Q(j,n),h({frameList:j==null?void 0:j.variants,lensList:O==null?void 0:O.data,orbitalList:ce==null?void 0:ce.data,frameName:j==null?void 0:j.group.name,showOrbitals:$,domService:x,dataVariants:fe,dataLenses:await r.PopulateDataList("data-lenses"),dataOrbitals:await r.PopulateDataList("data-orbital")})}})(),()=>{o.current=void 0}),[x]),Te.jsxs(Te.Fragment,{children:[!n&&(!p||!g)&&Te.jsxs("div",{children:[Te.jsx("span",{id:"sprie-config-loader-srtext",className:"sprie-config-sr-only",children:"Loading frame customiser"}),Te.jsx("div",{className:"sprie-config-loadingBox","aria-labelledby":"sprie-config-loader-srtext",children:"Loading..."})]}),Te.jsx(jP,{customEvent:t,frameName:A,apiService:r,frameList:p,lensList:g,orbitalList:_,showOrbitalList:(l==null?void 0:l.showOrbitals)||!1,viewerOnly:n,ThreeDConfigurator:o.current,domService:l==null?void 0:l.domService,dataVariants:l==null?void 0:l.dataVariants,dataLenses:l==null?void 0:l.dataLenses,dataOrbitals:l==null?void 0:l.dataOrbitals,firstDitaVariant:(H=l==null?void 0:l.dataVariants)==null?void 0:H.find(j=>j.variantSku==e),removeDefaultLensFromLensList:re,modelLoading:u,setModelLoading:d})]})}var Bh={},Nm={exports:{}},Fr={},bh={exports:{}},Rh={};/**
|
|
4705
4705
|
* @license React
|
|
4706
4706
|
* scheduler.production.min.js
|
|
4707
4707
|
*
|
|
@@ -4718,10 +4718,10 @@ struct BVH {
|
|
|
4718
4718
|
* This source code is licensed under the MIT license found in the
|
|
4719
4719
|
* LICENSE file in the root directory of this source tree.
|
|
4720
4720
|
*/var km;function XP(){if(km)return Fr;km=1;var r=Fe,e=qP();function t(a){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function s(a,c){o(a,c),o(a+"Capture",c)}function o(a,c){for(i[a]=c,a=0;a<c.length;a++)n.add(c[a])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},A={};function p(a){return h.call(A,a)?!0:h.call(d,a)?!1:u.test(a)?A[a]=!0:(d[a]=!0,!1)}function g(a,c,f,y){if(f!==null&&f.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return y?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function _(a,c,f,y){if(c===null||typeof c>"u"||g(a,c,f,y))return!0;if(y)return!1;if(f!==null)switch(f.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function E(a,c,f,y,I,b,N){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=y,this.attributeNamespace=I,this.mustUseProperty=f,this.propertyName=a,this.type=c,this.sanitizeURL=b,this.removeEmptyString=N}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){m[a]=new E(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var c=a[0];m[c]=new E(c,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){m[a]=new E(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){m[a]=new E(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){m[a]=new E(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){m[a]=new E(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){m[a]=new E(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){m[a]=new E(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){m[a]=new E(a,5,!1,a.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function w(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var c=a.replace(v,w);m[c]=new E(c,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(v,w);m[c]=new E(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(v,w);m[c]=new E(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){m[a]=new E(a,1,!1,a.toLowerCase(),null,!1,!1)}),m.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){m[a]=new E(a,1,!1,a.toLowerCase(),null,!0,!0)});function x(a,c,f,y){var I=m.hasOwnProperty(c)?m[c]:null;(I!==null?I.type!==0:y||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(_(c,f,I,y)&&(f=null),y||I===null?p(c)&&(f===null?a.removeAttribute(c):a.setAttribute(c,""+f)):I.mustUseProperty?a[I.propertyName]=f===null?I.type===3?!1:"":f:(c=I.attributeName,y=I.attributeNamespace,f===null?a.removeAttribute(c):(I=I.type,f=I===3||I===4&&f===!0?"":""+f,y?a.setAttributeNS(y,c,f):a.setAttribute(c,f))))}var C=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),T=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),L=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),H=Symbol.iterator;function j(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var $=Object.assign,P;function V(a){if(P===void 0)try{throw Error()}catch(f){var c=f.stack.trim().match(/\n( *(at )?)/);P=c&&c[1]||""}return`
|
|
4721
|
-
`+P+a}var ee=!1;function O(a,c){if(!a||ee)return"";ee=!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(
|
|
4721
|
+
`+P+a}var ee=!1;function O(a,c){if(!a||ee)return"";ee=!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(de){var y=de}Reflect.construct(a,[],c)}else{try{c.call()}catch(de){y=de}a.call(c.prototype)}else{try{throw Error()}catch(de){y=de}a()}}catch(de){if(de&&y&&typeof de.stack=="string"){for(var I=de.stack.split(`
|
|
4722
4722
|
`),b=y.stack.split(`
|
|
4723
4723
|
`),N=I.length-1,Y=b.length-1;1<=N&&0<=Y&&I[N]!==b[Y];)Y--;for(;1<=N&&0<=Y;N--,Y--)if(I[N]!==b[Y]){if(N!==1||Y!==1)do if(N--,Y--,0>Y||I[N]!==b[Y]){var K=`
|
|
4724
|
-
`+I[N].replace(" at new "," at ");return a.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",a.displayName)),K}while(1<=N&&0<=Y);break}}}finally{ee=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?V(a):""}function ce(a){switch(a.tag){case 5:return V(a.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return a=O(a.type,!1),a;case 11:return a=O(a.type.render,!1),a;case 1:return a=O(a.type,!0),a;default:return""}}function fe(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 M:return"Fragment";case T:return"Portal";case R:return"Profiler";case D:return"StrictMode";case Q:return"Suspense";case W:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case L:return(a.displayName||"Context")+".Consumer";case S:return(a._context.displayName||"Context")+".Provider";case k:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case J:return c=a.displayName||null,c!==null?c:fe(a.type)||"Memo";case q:c=a._payload,a=a._init;try{return fe(a(c))}catch{}}return null}function Ae(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 fe(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 pe(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function De(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function Qe(a){var c=De(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 I=f.get,b=f.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return I.call(this)},set:function(N){y=""+N,b.call(this,N)}}),Object.defineProperty(a,c,{enumerable:f.enumerable}),{getValue:function(){return y},setValue:function(N){y=""+N},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function wt(a){a._valueTracker||(a._valueTracker=Qe(a))}function ut(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),y="";return a&&(y=De(a)?a.checked?"true":"false":a.value),a=y,a!==f?(c.setValue(a),!0):!1}function ht(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 X(a,c){var f=c.checked;return $({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function u0(a,c){var f=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;f=pe(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 dt(a,c){c=c.checked,c!=null&&x(a,"checked",c,!1)}function ft(a,c){dt(a,c);var f=pe(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")?It(a,c.type,f):c.hasOwnProperty("defaultValue")&&It(a,c.type,pe(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function qe(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 It(a,c,f){(c!=="number"||ht(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var je=Array.isArray;function z(a,c,f,y){if(a=a.options,c){c={};for(var I=0;I<f.length;I++)c["$"+f[I]]=!0;for(f=0;f<a.length;f++)I=c.hasOwnProperty("$"+a[f].value),a[f].selected!==I&&(a[f].selected=I),I&&y&&(a[f].defaultSelected=!0)}else{for(f=""+pe(f),c=null,I=0;I<a.length;I++){if(a[I].value===f){a[I].selected=!0,y&&(a[I].defaultSelected=!0);return}c!==null||a[I].disabled||(c=a[I])}c!==null&&(c.selected=!0)}}function U(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(t(91));return $({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function se(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(je(f)){if(1<f.length)throw Error(t(93));f=f[0]}c=f}c==null&&(c=""),f=c}a._wrapperState={initialValue:pe(f)}}function _e(a,c){var f=pe(c.value),y=pe(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 Ee(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 Ye(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 Pe,Ge=function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,f,y,I){MSApp.execUnsafeLocalFunction(function(){return a(c,f,y,I)})}:a}(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(Pe=Pe||document.createElement("div"),Pe.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Pe.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function pt(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var we={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},ke=["Webkit","ms","Moz","O"];Object.keys(we).forEach(function(a){ke.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),we[c]=we[a]})});function ge(a,c,f){return c==null||typeof c=="boolean"||c===""?"":f||typeof c!="number"||c===0||we.hasOwnProperty(a)&&we[a]?(""+c).trim():c+"px"}function Le(a,c){a=a.style;for(var f in c)if(c.hasOwnProperty(f)){var y=f.indexOf("--")===0,I=ge(f,c[f],y);f==="float"&&(f="cssFloat"),y?a.setProperty(f,I):a[f]=I}}var Te=$({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 nt(a,c){if(c){if(Te[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 et(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 At=null;function Z(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Re=null,de=null,ye=null;function be(a){if(a=I2(a)){if(typeof Re!="function")throw Error(t(280));var c=a.stateNode;c&&(c=nu(c),Re(a.stateNode,a.type,c))}}function Ne(a){de?ye?ye.push(a):ye=[a]:de=a}function Et(){if(de){var a=de,c=ye;if(ye=de=null,be(a),c)for(a=0;a<c.length;a++)be(c[a])}}function jt(a,c){return a(c)}function _0(){}var bt=!1;function rr(a,c,f){if(bt)return a(c,f);bt=!0;try{return jt(a,c,f)}finally{bt=!1,(de!==null||ye!==null)&&(_0(),Et())}}function nr(a,c){var f=a.stateNode;if(f===null)return null;var y=nu(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 Hi=!1;if(l)try{var g0={};Object.defineProperty(g0,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",g0,g0),window.removeEventListener("test",g0,g0)}catch{Hi=!1}function q0(a,c,f,y,I,b,N,Y,K){var he=Array.prototype.slice.call(arguments,3);try{c.apply(f,he)}catch(Ie){this.onError(Ie)}}var Cn=!1,Vi=null,ka=!1,Ds=null,Pc={onError:function(a){Cn=!0,Vi=a}};function y1(a,c,f,y,I,b,N,Y,K){Cn=!1,Vi=null,q0.apply(Pc,arguments)}function Uc(a,c,f,y,I,b,N,Y,K){if(y1.apply(this,arguments),Cn){if(Cn){var he=Vi;Cn=!1,Vi=null}else throw Error(t(198));ka||(ka=!0,Ds=he)}}function ui(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 kc(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 Qc(a){if(ui(a)!==a)throw Error(t(188))}function Ph(a){var c=a.alternate;if(!c){if(c=ui(a),c===null)throw Error(t(188));return c!==a?null:a}for(var f=a,y=c;;){var I=f.return;if(I===null)break;var b=I.alternate;if(b===null){if(y=I.return,y!==null){f=y;continue}break}if(I.child===b.child){for(b=I.child;b;){if(b===f)return Qc(I),a;if(b===y)return Qc(I),c;b=b.sibling}throw Error(t(188))}if(f.return!==y.return)f=I,y=b;else{for(var N=!1,Y=I.child;Y;){if(Y===f){N=!0,f=I,y=b;break}if(Y===y){N=!0,y=I,f=b;break}Y=Y.sibling}if(!N){for(Y=b.child;Y;){if(Y===f){N=!0,f=b,y=I;break}if(Y===y){N=!0,y=b,f=I;break}Y=Y.sibling}if(!N)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 Fc(a){return a=Ph(a),a!==null?Oc(a):null}function Oc(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=Oc(a);if(c!==null)return c;a=a.sibling}return null}var zc=e.unstable_scheduleCallback,F=e.unstable_cancelCallback,ie=e.unstable_shouldYield,ue=e.unstable_requestPaint,oe=e.unstable_now,ne=e.unstable_getCurrentPriorityLevel,Ce=e.unstable_ImmediatePriority,ze=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,lt=e.unstable_IdlePriority,at=null,rt=null;function Dt(a){if(rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(at,a,void 0,(a.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:Wt,y0=Math.log,Qt=Math.LN2;function Wt(a){return a>>>=0,a===0?32:31-(y0(a)/Qt|0)|0}var tt=64,D0=4194304;function sn(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 hr(a,c){var f=a.pendingLanes;if(f===0)return 0;var y=0,I=a.suspendedLanes,b=a.pingedLanes,N=f&268435455;if(N!==0){var Y=N&~I;Y!==0?y=sn(Y):(b&=N,b!==0&&(y=sn(b)))}else N=f&~I,N!==0?y=sn(N):b!==0&&(y=sn(b));if(y===0)return 0;if(c!==0&&c!==y&&!(c&I)&&(I=y&-y,b=c&-c,I>=b||I===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-_t(c),I=1<<f,y|=a[f],c&=~I;return y}function Ls(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 Ir(a,c){for(var f=a.suspendedLanes,y=a.pingedLanes,I=a.expirationTimes,b=a.pendingLanes;0<b;){var N=31-_t(b),Y=1<<N,K=I[N];K===-1?(!(Y&f)||Y&y)&&(I[N]=Ls(Y,c)):K<=c&&(a.expiredLanes|=Y),b&=~Y}}function ji(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Xt(){var a=tt;return tt<<=1,!(tt&4194240)&&(tt=64),a}function dr(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function X0(a,c,f){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-_t(c),a[c]=f}function F0(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 I=31-_t(f),b=1<<I;c[I]=0,y[I]=-1,a[I]=-1,f&=~b}}function Mr(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var y=31-_t(f),I=1<<y;I&c|a[y]&c&&(a[y]|=c),f&=~I}}var Lt=0;function hi(a){return a&=-a,1<a?4<a?a&268435455?16:536870912:4:1}var $m,Uh,ev,tv,rv,kh=!1,Gc=[],Ns=null,Ps=null,Us=null,c2=new Map,u2=new Map,ks=[],AU="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 nv(a,c){switch(a){case"focusin":case"focusout":Ns=null;break;case"dragenter":case"dragleave":Ps=null;break;case"mouseover":case"mouseout":Us=null;break;case"pointerover":case"pointerout":c2.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":u2.delete(c.pointerId)}}function h2(a,c,f,y,I,b){return a===null||a.nativeEvent!==b?(a={blockedOn:c,domEventName:f,eventSystemFlags:y,nativeEvent:b,targetContainers:[I]},c!==null&&(c=I2(c),c!==null&&Uh(c)),a):(a.eventSystemFlags|=y,c=a.targetContainers,I!==null&&c.indexOf(I)===-1&&c.push(I),a)}function gU(a,c,f,y,I){switch(c){case"focusin":return Ns=h2(Ns,a,c,f,y,I),!0;case"dragenter":return Ps=h2(Ps,a,c,f,y,I),!0;case"mouseover":return Us=h2(Us,a,c,f,y,I),!0;case"pointerover":var b=I.pointerId;return c2.set(b,h2(c2.get(b)||null,a,c,f,y,I)),!0;case"gotpointercapture":return b=I.pointerId,u2.set(b,h2(u2.get(b)||null,a,c,f,y,I)),!0}return!1}function iv(a){var c=Qa(a.target);if(c!==null){var f=ui(c);if(f!==null){if(c=f.tag,c===13){if(c=kc(f),c!==null){a.blockedOn=c,rv(a.priority,function(){ev(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 Hc(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=Fh(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);At=y,f.target.dispatchEvent(y),At=null}else return c=I2(f),c!==null&&Uh(c),a.blockedOn=f,!1;c.shift()}return!0}function sv(a,c,f){Hc(a)&&f.delete(c)}function mU(){kh=!1,Ns!==null&&Hc(Ns)&&(Ns=null),Ps!==null&&Hc(Ps)&&(Ps=null),Us!==null&&Hc(Us)&&(Us=null),c2.forEach(sv),u2.forEach(sv)}function d2(a,c){a.blockedOn===c&&(a.blockedOn=null,kh||(kh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,mU)))}function f2(a){function c(I){return d2(I,a)}if(0<Gc.length){d2(Gc[0],a);for(var f=1;f<Gc.length;f++){var y=Gc[f];y.blockedOn===a&&(y.blockedOn=null)}}for(Ns!==null&&d2(Ns,a),Ps!==null&&d2(Ps,a),Us!==null&&d2(Us,a),c2.forEach(c),u2.forEach(c),f=0;f<ks.length;f++)y=ks[f],y.blockedOn===a&&(y.blockedOn=null);for(;0<ks.length&&(f=ks[0],f.blockedOn===null);)iv(f),f.blockedOn===null&&ks.shift()}var E1=C.ReactCurrentBatchConfig,Vc=!0;function vU(a,c,f,y){var I=Lt,b=E1.transition;E1.transition=null;try{Lt=1,Qh(a,c,f,y)}finally{Lt=I,E1.transition=b}}function _U(a,c,f,y){var I=Lt,b=E1.transition;E1.transition=null;try{Lt=4,Qh(a,c,f,y)}finally{Lt=I,E1.transition=b}}function Qh(a,c,f,y){if(Vc){var I=Fh(a,c,f,y);if(I===null)r5(a,c,y,jc,f),nv(a,y);else if(gU(I,a,c,f,y))y.stopPropagation();else if(nv(a,y),c&4&&-1<AU.indexOf(a)){for(;I!==null;){var b=I2(I);if(b!==null&&$m(b),b=Fh(a,c,f,y),b===null&&r5(a,c,y,jc,f),b===I)break;I=b}I!==null&&y.stopPropagation()}else r5(a,c,y,null,f)}}var jc=null;function Fh(a,c,f,y){if(jc=null,a=Z(y),a=Qa(a),a!==null)if(c=ui(a),c===null)a=null;else if(f=c.tag,f===13){if(a=kc(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 jc=a,null}function av(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(ne()){case Ce:return 1;case ze:return 4;case Oe:case Ze:return 16;case lt:return 536870912;default:return 16}default:return 16}}var Qs=null,Oh=null,Wc=null;function ov(){if(Wc)return Wc;var a,c=Oh,f=c.length,y,I="value"in Qs?Qs.value:Qs.textContent,b=I.length;for(a=0;a<f&&c[a]===I[a];a++);var N=f-a;for(y=1;y<=N&&c[f-y]===I[b-y];y++);return Wc=I.slice(a,1<y?1-y:void 0)}function Yc(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 qc(){return!0}function lv(){return!1}function an(a){function c(f,y,I,b,N){this._reactName=f,this._targetInst=I,this.type=y,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var Y in a)a.hasOwnProperty(Y)&&(f=a[Y],this[Y]=f?f(b):b[Y]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?qc:lv,this.isPropagationStopped=lv,this}return $(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=qc)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=qc)},persist:function(){},isPersistent:qc}),c}var x1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zh=an(x1),p2=$({},x1,{view:0,detail:0}),yU=an(p2),Gh,Hh,A2,Xc=$({},p2,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jh,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!==A2&&(A2&&a.type==="mousemove"?(Gh=a.screenX-A2.screenX,Hh=a.screenY-A2.screenY):Hh=Gh=0,A2=a),Gh)},movementY:function(a){return"movementY"in a?a.movementY:Hh}}),cv=an(Xc),EU=$({},Xc,{dataTransfer:0}),xU=an(EU),wU=$({},p2,{relatedTarget:0}),Vh=an(wU),CU=$({},x1,{animationName:0,elapsedTime:0,pseudoElement:0}),IU=an(CU),MU=$({},x1,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),SU=an(MU),TU=$({},x1,{data:0}),uv=an(TU),BU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bU={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"},RU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DU(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=RU[a])?!!c[a]:!1}function jh(){return DU}var LU=$({},p2,{key:function(a){if(a.key){var c=BU[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Yc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?bU[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jh,charCode:function(a){return a.type==="keypress"?Yc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Yc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),NU=an(LU),PU=$({},Xc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hv=an(PU),UU=$({},p2,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jh}),kU=an(UU),QU=$({},x1,{propertyName:0,elapsedTime:0,pseudoElement:0}),FU=an(QU),OU=$({},Xc,{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}),zU=an(OU),GU=[9,13,27,32],Wh=l&&"CompositionEvent"in window,g2=null;l&&"documentMode"in document&&(g2=document.documentMode);var HU=l&&"TextEvent"in window&&!g2,dv=l&&(!Wh||g2&&8<g2&&11>=g2),fv=String.fromCharCode(32),pv=!1;function Av(a,c){switch(a){case"keyup":return GU.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gv(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var w1=!1;function VU(a,c){switch(a){case"compositionend":return gv(c);case"keypress":return c.which!==32?null:(pv=!0,fv);case"textInput":return a=c.data,a===fv&&pv?null:a;default:return null}}function jU(a,c){if(w1)return a==="compositionend"||!Wh&&Av(a,c)?(a=ov(),Wc=Oh=Qs=null,w1=!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 dv&&c.locale!=="ko"?null:c.data;default:return null}}var WU={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 mv(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!WU[a.type]:c==="textarea"}function vv(a,c,f,y){Ne(y),c=eu(c,"onChange"),0<c.length&&(f=new zh("onChange","change",null,f,y),a.push({event:f,listeners:c}))}var m2=null,v2=null;function YU(a){Uv(a,0)}function Jc(a){var c=T1(a);if(ut(c))return a}function qU(a,c){if(a==="change")return c}var _v=!1;if(l){var Yh;if(l){var qh="oninput"in document;if(!qh){var yv=document.createElement("div");yv.setAttribute("oninput","return;"),qh=typeof yv.oninput=="function"}Yh=qh}else Yh=!1;_v=Yh&&(!document.documentMode||9<document.documentMode)}function Ev(){m2&&(m2.detachEvent("onpropertychange",xv),v2=m2=null)}function xv(a){if(a.propertyName==="value"&&Jc(v2)){var c=[];vv(c,v2,a,Z(a)),rr(YU,c)}}function XU(a,c,f){a==="focusin"?(Ev(),m2=c,v2=f,m2.attachEvent("onpropertychange",xv)):a==="focusout"&&Ev()}function JU(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Jc(v2)}function KU(a,c){if(a==="click")return Jc(c)}function ZU(a,c){if(a==="input"||a==="change")return Jc(c)}function $U(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var Hn=typeof Object.is=="function"?Object.is:$U;function _2(a,c){if(Hn(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 I=f[y];if(!h.call(c,I)||!Hn(a[I],c[I]))return!1}return!0}function wv(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Cv(a,c){var f=wv(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=wv(f)}}function Iv(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?Iv(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function Mv(){for(var a=window,c=ht();c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=ht(a.document)}return c}function Xh(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 ek(a){var c=Mv(),f=a.focusedElem,y=a.selectionRange;if(c!==f&&f&&f.ownerDocument&&Iv(f.ownerDocument.documentElement,f)){if(y!==null&&Xh(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 I=f.textContent.length,b=Math.min(y.start,I);y=y.end===void 0?b:Math.min(y.end,I),!a.extend&&b>y&&(I=y,y=b,b=I),I=Cv(f,b);var N=Cv(f,y);I&&N&&(a.rangeCount!==1||a.anchorNode!==I.node||a.anchorOffset!==I.offset||a.focusNode!==N.node||a.focusOffset!==N.offset)&&(c=c.createRange(),c.setStart(I.node,I.offset),a.removeAllRanges(),b>y?(a.addRange(c),a.extend(N.node,N.offset)):(c.setEnd(N.node,N.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 tk=l&&"documentMode"in document&&11>=document.documentMode,C1=null,Jh=null,y2=null,Kh=!1;function Sv(a,c,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Kh||C1==null||C1!==ht(y)||(y=C1,"selectionStart"in y&&Xh(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}),y2&&_2(y2,y)||(y2=y,y=eu(Jh,"onSelect"),0<y.length&&(c=new zh("onSelect","select",null,c,f),a.push({event:c,listeners:y}),c.target=C1)))}function Kc(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var I1={animationend:Kc("Animation","AnimationEnd"),animationiteration:Kc("Animation","AnimationIteration"),animationstart:Kc("Animation","AnimationStart"),transitionend:Kc("Transition","TransitionEnd")},Zh={},Tv={};l&&(Tv=document.createElement("div").style,"AnimationEvent"in window||(delete I1.animationend.animation,delete I1.animationiteration.animation,delete I1.animationstart.animation),"TransitionEvent"in window||delete I1.transitionend.transition);function Zc(a){if(Zh[a])return Zh[a];if(!I1[a])return a;var c=I1[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in Tv)return Zh[a]=c[f];return a}var Bv=Zc("animationend"),bv=Zc("animationiteration"),Rv=Zc("animationstart"),Dv=Zc("transitionend"),Lv=new Map,Nv="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 Fs(a,c){Lv.set(a,c),s(c,[a])}for(var $h=0;$h<Nv.length;$h++){var e5=Nv[$h],rk=e5.toLowerCase(),nk=e5[0].toUpperCase()+e5.slice(1);Fs(rk,"on"+nk)}Fs(Bv,"onAnimationEnd"),Fs(bv,"onAnimationIteration"),Fs(Rv,"onAnimationStart"),Fs("dblclick","onDoubleClick"),Fs("focusin","onFocus"),Fs("focusout","onBlur"),Fs(Dv,"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 E2="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(" "),ik=new Set("cancel close invalid load scroll toggle".split(" ").concat(E2));function Pv(a,c,f){var y=a.type||"unknown-event";a.currentTarget=f,Uc(y,c,void 0,a),a.currentTarget=null}function Uv(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],I=y.event;y=y.listeners;e:{var b=void 0;if(c)for(var N=y.length-1;0<=N;N--){var Y=y[N],K=Y.instance,he=Y.currentTarget;if(Y=Y.listener,K!==b&&I.isPropagationStopped())break e;Pv(I,Y,he),b=K}else for(N=0;N<y.length;N++){if(Y=y[N],K=Y.instance,he=Y.currentTarget,Y=Y.listener,K!==b&&I.isPropagationStopped())break e;Pv(I,Y,he),b=K}}}if(ka)throw a=Ds,ka=!1,Ds=null,a}function t0(a,c){var f=c[l5];f===void 0&&(f=c[l5]=new Set);var y=a+"__bubble";f.has(y)||(kv(c,a,2,!1),f.add(y))}function t5(a,c,f){var y=0;c&&(y|=4),kv(f,a,y,c)}var $c="_reactListening"+Math.random().toString(36).slice(2);function x2(a){if(!a[$c]){a[$c]=!0,n.forEach(function(f){f!=="selectionchange"&&(ik.has(f)||t5(f,!1,a),t5(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[$c]||(c[$c]=!0,t5("selectionchange",!1,c))}}function kv(a,c,f,y){switch(av(c)){case 1:var I=vU;break;case 4:I=_U;break;default:I=Qh}f=I.bind(null,c,f,a),I=void 0,!Hi||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(I=!0),y?I!==void 0?a.addEventListener(c,f,{capture:!0,passive:I}):a.addEventListener(c,f,!0):I!==void 0?a.addEventListener(c,f,{passive:I}):a.addEventListener(c,f,!1)}function r5(a,c,f,y,I){var b=y;if(!(c&1)&&!(c&2)&&y!==null)e:for(;;){if(y===null)return;var N=y.tag;if(N===3||N===4){var Y=y.stateNode.containerInfo;if(Y===I||Y.nodeType===8&&Y.parentNode===I)break;if(N===4)for(N=y.return;N!==null;){var K=N.tag;if((K===3||K===4)&&(K=N.stateNode.containerInfo,K===I||K.nodeType===8&&K.parentNode===I))return;N=N.return}for(;Y!==null;){if(N=Qa(Y),N===null)return;if(K=N.tag,K===5||K===6){y=b=N;continue e}Y=Y.parentNode}}y=y.return}rr(function(){var he=b,Ie=Z(f),Me=[];e:{var xe=Lv.get(a);if(xe!==void 0){var He=zh,Je=a;switch(a){case"keypress":if(Yc(f)===0)break e;case"keydown":case"keyup":He=NU;break;case"focusin":Je="focus",He=Vh;break;case"focusout":Je="blur",He=Vh;break;case"beforeblur":case"afterblur":He=Vh;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":He=cv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=xU;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=kU;break;case Bv:case bv:case Rv:He=IU;break;case Dv:He=FU;break;case"scroll":He=yU;break;case"wheel":He=zU;break;case"copy":case"cut":case"paste":He=SU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=hv}var Ke=(c&4)!==0,E0=!Ke&&a==="scroll",ae=Ke?xe!==null?xe+"Capture":null:xe;Ke=[];for(var te=he,le;te!==null;){le=te;var Be=le.stateNode;if(le.tag===5&&Be!==null&&(le=Be,ae!==null&&(Be=nr(te,ae),Be!=null&&Ke.push(w2(te,Be,le)))),E0)break;te=te.return}0<Ke.length&&(xe=new He(xe,Je,null,f,Ie),Me.push({event:xe,listeners:Ke}))}}if(!(c&7)){e:{if(xe=a==="mouseover"||a==="pointerover",He=a==="mouseout"||a==="pointerout",xe&&f!==At&&(Je=f.relatedTarget||f.fromElement)&&(Qa(Je)||Je[Wi]))break e;if((He||xe)&&(xe=Ie.window===Ie?Ie:(xe=Ie.ownerDocument)?xe.defaultView||xe.parentWindow:window,He?(Je=f.relatedTarget||f.toElement,He=he,Je=Je?Qa(Je):null,Je!==null&&(E0=ui(Je),Je!==E0||Je.tag!==5&&Je.tag!==6)&&(Je=null)):(He=null,Je=he),He!==Je)){if(Ke=cv,Be="onMouseLeave",ae="onMouseEnter",te="mouse",(a==="pointerout"||a==="pointerover")&&(Ke=hv,Be="onPointerLeave",ae="onPointerEnter",te="pointer"),E0=He==null?xe:T1(He),le=Je==null?xe:T1(Je),xe=new Ke(Be,te+"leave",He,f,Ie),xe.target=E0,xe.relatedTarget=le,Be=null,Qa(Ie)===he&&(Ke=new Ke(ae,te+"enter",Je,f,Ie),Ke.target=le,Ke.relatedTarget=E0,Be=Ke),E0=Be,He&&Je)t:{for(Ke=He,ae=Je,te=0,le=Ke;le;le=M1(le))te++;for(le=0,Be=ae;Be;Be=M1(Be))le++;for(;0<te-le;)Ke=M1(Ke),te--;for(;0<le-te;)ae=M1(ae),le--;for(;te--;){if(Ke===ae||ae!==null&&Ke===ae.alternate)break t;Ke=M1(Ke),ae=M1(ae)}Ke=null}else Ke=null;He!==null&&Qv(Me,xe,He,Ke,!1),Je!==null&&E0!==null&&Qv(Me,E0,Je,Ke,!0)}}e:{if(xe=he?T1(he):window,He=xe.nodeName&&xe.nodeName.toLowerCase(),He==="select"||He==="input"&&xe.type==="file")var $e=qU;else if(mv(xe))if(_v)$e=ZU;else{$e=JU;var it=XU}else(He=xe.nodeName)&&He.toLowerCase()==="input"&&(xe.type==="checkbox"||xe.type==="radio")&&($e=KU);if($e&&($e=$e(a,he))){vv(Me,$e,f,Ie);break e}it&&it(a,xe,he),a==="focusout"&&(it=xe._wrapperState)&&it.controlled&&xe.type==="number"&&It(xe,"number",xe.value)}switch(it=he?T1(he):window,a){case"focusin":(mv(it)||it.contentEditable==="true")&&(C1=it,Jh=he,y2=null);break;case"focusout":y2=Jh=C1=null;break;case"mousedown":Kh=!0;break;case"contextmenu":case"mouseup":case"dragend":Kh=!1,Sv(Me,f,Ie);break;case"selectionchange":if(tk)break;case"keydown":case"keyup":Sv(Me,f,Ie)}var st;if(Wh)e:{switch(a){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else w1?Av(a,f)&&(ct="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(ct="onCompositionStart");ct&&(dv&&f.locale!=="ko"&&(w1||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&w1&&(st=ov()):(Qs=Ie,Oh="value"in Qs?Qs.value:Qs.textContent,w1=!0)),it=eu(he,ct),0<it.length&&(ct=new uv(ct,a,null,f,Ie),Me.push({event:ct,listeners:it}),st?ct.data=st:(st=gv(f),st!==null&&(ct.data=st)))),(st=HU?VU(a,f):jU(a,f))&&(he=eu(he,"onBeforeInput"),0<he.length&&(Ie=new uv("onBeforeInput","beforeinput",null,f,Ie),Me.push({event:Ie,listeners:he}),Ie.data=st))}Uv(Me,c)})}function w2(a,c,f){return{instance:a,listener:c,currentTarget:f}}function eu(a,c){for(var f=c+"Capture",y=[];a!==null;){var I=a,b=I.stateNode;I.tag===5&&b!==null&&(I=b,b=nr(a,f),b!=null&&y.unshift(w2(a,b,I)),b=nr(a,c),b!=null&&y.push(w2(a,b,I))),a=a.return}return y}function M1(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function Qv(a,c,f,y,I){for(var b=c._reactName,N=[];f!==null&&f!==y;){var Y=f,K=Y.alternate,he=Y.stateNode;if(K!==null&&K===y)break;Y.tag===5&&he!==null&&(Y=he,I?(K=nr(f,b),K!=null&&N.unshift(w2(f,K,Y))):I||(K=nr(f,b),K!=null&&N.push(w2(f,K,Y)))),f=f.return}N.length!==0&&a.push({event:c,listeners:N})}var sk=/\r\n?/g,ak=/\u0000|\uFFFD/g;function Fv(a){return(typeof a=="string"?a:""+a).replace(sk,`
|
|
4725
|
-
`).replace(ak,"")}function tu(a,c,f){if(c=Fv(c),Fv(a)!==c&&f)throw Error(t(425))}function ru(){}var n5=null,i5=null;function s5(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 a5=typeof setTimeout=="function"?setTimeout:void 0,ok=typeof clearTimeout=="function"?clearTimeout:void 0,Ov=typeof Promise=="function"?Promise:void 0,lk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ov<"u"?function(a){return Ov.resolve(null).then(a).catch(ck)}:a5;function ck(a){setTimeout(function(){throw a})}function o5(a,c){var f=c,y=0;do{var I=f.nextSibling;if(a.removeChild(f),I&&I.nodeType===8)if(f=I.data,f==="/$"){if(y===0){a.removeChild(I),f2(c);return}y--}else f!=="$"&&f!=="$?"&&f!=="$!"||y++;f=I}while(f);f2(c)}function Os(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 zv(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 S1=Math.random().toString(36).slice(2),di="__reactFiber$"+S1,C2="__reactProps$"+S1,Wi="__reactContainer$"+S1,l5="__reactEvents$"+S1,uk="__reactListeners$"+S1,hk="__reactHandles$"+S1;function Qa(a){var c=a[di];if(c)return c;for(var f=a.parentNode;f;){if(c=f[Wi]||f[di]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=zv(a);a!==null;){if(f=a[di])return f;a=zv(a)}return c}a=f,f=a.parentNode}return null}function I2(a){return a=a[di]||a[Wi],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function T1(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(t(33))}function nu(a){return a[C2]||null}var c5=[],B1=-1;function zs(a){return{current:a}}function r0(a){0>B1||(a.current=c5[B1],c5[B1]=null,B1--)}function Zt(a,c){B1++,c5[B1]=a.current,a.current=c}var Gs={},fr=zs(Gs),Or=zs(!1),Fa=Gs;function b1(a,c){var f=a.type.contextTypes;if(!f)return Gs;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var I={},b;for(b in f)I[b]=c[b];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=I),I}function zr(a){return a=a.childContextTypes,a!=null}function iu(){r0(Or),r0(fr)}function Gv(a,c,f){if(fr.current!==Gs)throw Error(t(168));Zt(fr,c),Zt(Or,f)}function Hv(a,c,f){var y=a.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return f;y=y.getChildContext();for(var I in y)if(!(I in c))throw Error(t(108,Ae(a)||"Unknown",I));return $({},f,y)}function su(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Gs,Fa=fr.current,Zt(fr,a),Zt(Or,Or.current),!0}function Vv(a,c,f){var y=a.stateNode;if(!y)throw Error(t(169));f?(a=Hv(a,c,Fa),y.__reactInternalMemoizedMergedChildContext=a,r0(Or),r0(fr),Zt(fr,a)):r0(Or),Zt(Or,f)}var Yi=null,au=!1,u5=!1;function jv(a){Yi===null?Yi=[a]:Yi.push(a)}function dk(a){au=!0,jv(a)}function Hs(){if(!u5&&Yi!==null){u5=!0;var a=0,c=Lt;try{var f=Yi;for(Lt=1;a<f.length;a++){var y=f[a];do y=y(!0);while(y!==null)}Yi=null,au=!1}catch(I){throw Yi!==null&&(Yi=Yi.slice(a+1)),zc(Ce,Hs),I}finally{Lt=c,u5=!1}}return null}var R1=[],D1=0,ou=null,lu=0,In=[],Mn=0,Oa=null,qi=1,Xi="";function za(a,c){R1[D1++]=lu,R1[D1++]=ou,ou=a,lu=c}function Wv(a,c,f){In[Mn++]=qi,In[Mn++]=Xi,In[Mn++]=Oa,Oa=a;var y=qi;a=Xi;var I=32-_t(y)-1;y&=~(1<<I),f+=1;var b=32-_t(c)+I;if(30<b){var N=I-I%5;b=(y&(1<<N)-1).toString(32),y>>=N,I-=N,qi=1<<32-_t(c)+I|f<<I|y,Xi=b+a}else qi=1<<b|f<<I|y,Xi=a}function h5(a){a.return!==null&&(za(a,1),Wv(a,1,0))}function d5(a){for(;a===ou;)ou=R1[--D1],R1[D1]=null,lu=R1[--D1],R1[D1]=null;for(;a===Oa;)Oa=In[--Mn],In[Mn]=null,Xi=In[--Mn],In[Mn]=null,qi=In[--Mn],In[Mn]=null}var on=null,ln=null,o0=!1,Vn=null;function Yv(a,c){var f=bn(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 qv(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,on=a,ln=Os(c.firstChild),!0):!1;case 6:return c=a.pendingProps===""||c.nodeType!==3?null:c,c!==null?(a.stateNode=c,on=a,ln=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(f=Oa!==null?{id:qi,overflow:Xi}:null,a.memoizedState={dehydrated:c,treeContext:f,retryLane:1073741824},f=bn(18,null,null,0),f.stateNode=c,f.return=a,a.child=f,on=a,ln=null,!0):!1;default:return!1}}function f5(a){return(a.mode&1)!==0&&(a.flags&128)===0}function p5(a){if(o0){var c=ln;if(c){var f=c;if(!qv(a,c)){if(f5(a))throw Error(t(418));c=Os(f.nextSibling);var y=on;c&&qv(a,c)?Yv(y,f):(a.flags=a.flags&-4097|2,o0=!1,on=a)}}else{if(f5(a))throw Error(t(418));a.flags=a.flags&-4097|2,o0=!1,on=a}}}function Xv(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;on=a}function cu(a){if(a!==on)return!1;if(!o0)return Xv(a),o0=!0,!1;var c;if((c=a.tag!==3)&&!(c=a.tag!==5)&&(c=a.type,c=c!=="head"&&c!=="body"&&!s5(a.type,a.memoizedProps)),c&&(c=ln)){if(f5(a))throw Jv(),Error(t(418));for(;c;)Yv(a,c),c=Os(c.nextSibling)}if(Xv(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){ln=Os(a.nextSibling);break e}c--}else f!=="$"&&f!=="$!"&&f!=="$?"||c++}a=a.nextSibling}ln=null}}else ln=on?Os(a.stateNode.nextSibling):null;return!0}function Jv(){for(var a=ln;a;)a=Os(a.nextSibling)}function L1(){ln=on=null,o0=!1}function A5(a){Vn===null?Vn=[a]:Vn.push(a)}var fk=C.ReactCurrentBatchConfig;function M2(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 I=y,b=""+a;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===b?c.ref:(c=function(N){var Y=I.refs;N===null?delete Y[b]:Y[b]=N},c._stringRef=b,c)}if(typeof a!="string")throw Error(t(284));if(!f._owner)throw Error(t(290,a))}return a}function uu(a,c){throw a=Object.prototype.toString.call(c),Error(t(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a))}function Kv(a){var c=a._init;return c(a._payload)}function Zv(a){function c(ae,te){if(a){var le=ae.deletions;le===null?(ae.deletions=[te],ae.flags|=16):le.push(te)}}function f(ae,te){if(!a)return null;for(;te!==null;)c(ae,te),te=te.sibling;return null}function y(ae,te){for(ae=new Map;te!==null;)te.key!==null?ae.set(te.key,te):ae.set(te.index,te),te=te.sibling;return ae}function I(ae,te){return ae=Ks(ae,te),ae.index=0,ae.sibling=null,ae}function b(ae,te,le){return ae.index=le,a?(le=ae.alternate,le!==null?(le=le.index,le<te?(ae.flags|=2,te):le):(ae.flags|=2,te)):(ae.flags|=1048576,te)}function N(ae){return a&&ae.alternate===null&&(ae.flags|=2),ae}function Y(ae,te,le,Be){return te===null||te.tag!==6?(te=a6(le,ae.mode,Be),te.return=ae,te):(te=I(te,le),te.return=ae,te)}function K(ae,te,le,Be){var $e=le.type;return $e===M?Ie(ae,te,le.props.children,Be,le.key):te!==null&&(te.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===q&&Kv($e)===te.type)?(Be=I(te,le.props),Be.ref=M2(ae,te,le),Be.return=ae,Be):(Be=Nu(le.type,le.key,le.props,null,ae.mode,Be),Be.ref=M2(ae,te,le),Be.return=ae,Be)}function he(ae,te,le,Be){return te===null||te.tag!==4||te.stateNode.containerInfo!==le.containerInfo||te.stateNode.implementation!==le.implementation?(te=o6(le,ae.mode,Be),te.return=ae,te):(te=I(te,le.children||[]),te.return=ae,te)}function Ie(ae,te,le,Be,$e){return te===null||te.tag!==7?(te=Xa(le,ae.mode,Be,$e),te.return=ae,te):(te=I(te,le),te.return=ae,te)}function Me(ae,te,le){if(typeof te=="string"&&te!==""||typeof te=="number")return te=a6(""+te,ae.mode,le),te.return=ae,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case B:return le=Nu(te.type,te.key,te.props,null,ae.mode,le),le.ref=M2(ae,null,te),le.return=ae,le;case T:return te=o6(te,ae.mode,le),te.return=ae,te;case q:var Be=te._init;return Me(ae,Be(te._payload),le)}if(je(te)||j(te))return te=Xa(te,ae.mode,le,null),te.return=ae,te;uu(ae,te)}return null}function xe(ae,te,le,Be){var $e=te!==null?te.key:null;if(typeof le=="string"&&le!==""||typeof le=="number")return $e!==null?null:Y(ae,te,""+le,Be);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case B:return le.key===$e?K(ae,te,le,Be):null;case T:return le.key===$e?he(ae,te,le,Be):null;case q:return $e=le._init,xe(ae,te,$e(le._payload),Be)}if(je(le)||j(le))return $e!==null?null:Ie(ae,te,le,Be,null);uu(ae,le)}return null}function He(ae,te,le,Be,$e){if(typeof Be=="string"&&Be!==""||typeof Be=="number")return ae=ae.get(le)||null,Y(te,ae,""+Be,$e);if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case B:return ae=ae.get(Be.key===null?le:Be.key)||null,K(te,ae,Be,$e);case T:return ae=ae.get(Be.key===null?le:Be.key)||null,he(te,ae,Be,$e);case q:var it=Be._init;return He(ae,te,le,it(Be._payload),$e)}if(je(Be)||j(Be))return ae=ae.get(le)||null,Ie(te,ae,Be,$e,null);uu(te,Be)}return null}function Je(ae,te,le,Be){for(var $e=null,it=null,st=te,ct=te=0,Z0=null;st!==null&&ct<le.length;ct++){st.index>ct?(Z0=st,st=null):Z0=st.sibling;var Pt=xe(ae,st,le[ct],Be);if(Pt===null){st===null&&(st=Z0);break}a&&st&&Pt.alternate===null&&c(ae,st),te=b(Pt,te,ct),it===null?$e=Pt:it.sibling=Pt,it=Pt,st=Z0}if(ct===le.length)return f(ae,st),o0&&za(ae,ct),$e;if(st===null){for(;ct<le.length;ct++)st=Me(ae,le[ct],Be),st!==null&&(te=b(st,te,ct),it===null?$e=st:it.sibling=st,it=st);return o0&&za(ae,ct),$e}for(st=y(ae,st);ct<le.length;ct++)Z0=He(st,ae,ct,le[ct],Be),Z0!==null&&(a&&Z0.alternate!==null&&st.delete(Z0.key===null?ct:Z0.key),te=b(Z0,te,ct),it===null?$e=Z0:it.sibling=Z0,it=Z0);return a&&st.forEach(function(Zs){return c(ae,Zs)}),o0&&za(ae,ct),$e}function Ke(ae,te,le,Be){var $e=j(le);if(typeof $e!="function")throw Error(t(150));if(le=$e.call(le),le==null)throw Error(t(151));for(var it=$e=null,st=te,ct=te=0,Z0=null,Pt=le.next();st!==null&&!Pt.done;ct++,Pt=le.next()){st.index>ct?(Z0=st,st=null):Z0=st.sibling;var Zs=xe(ae,st,Pt.value,Be);if(Zs===null){st===null&&(st=Z0);break}a&&st&&Zs.alternate===null&&c(ae,st),te=b(Zs,te,ct),it===null?$e=Zs:it.sibling=Zs,it=Zs,st=Z0}if(Pt.done)return f(ae,st),o0&&za(ae,ct),$e;if(st===null){for(;!Pt.done;ct++,Pt=le.next())Pt=Me(ae,Pt.value,Be),Pt!==null&&(te=b(Pt,te,ct),it===null?$e=Pt:it.sibling=Pt,it=Pt);return o0&&za(ae,ct),$e}for(st=y(ae,st);!Pt.done;ct++,Pt=le.next())Pt=He(st,ae,ct,Pt.value,Be),Pt!==null&&(a&&Pt.alternate!==null&&st.delete(Pt.key===null?ct:Pt.key),te=b(Pt,te,ct),it===null?$e=Pt:it.sibling=Pt,it=Pt);return a&&st.forEach(function(Wk){return c(ae,Wk)}),o0&&za(ae,ct),$e}function E0(ae,te,le,Be){if(typeof le=="object"&&le!==null&&le.type===M&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case B:e:{for(var $e=le.key,it=te;it!==null;){if(it.key===$e){if($e=le.type,$e===M){if(it.tag===7){f(ae,it.sibling),te=I(it,le.props.children),te.return=ae,ae=te;break e}}else if(it.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===q&&Kv($e)===it.type){f(ae,it.sibling),te=I(it,le.props),te.ref=M2(ae,it,le),te.return=ae,ae=te;break e}f(ae,it);break}else c(ae,it);it=it.sibling}le.type===M?(te=Xa(le.props.children,ae.mode,Be,le.key),te.return=ae,ae=te):(Be=Nu(le.type,le.key,le.props,null,ae.mode,Be),Be.ref=M2(ae,te,le),Be.return=ae,ae=Be)}return N(ae);case T:e:{for(it=le.key;te!==null;){if(te.key===it)if(te.tag===4&&te.stateNode.containerInfo===le.containerInfo&&te.stateNode.implementation===le.implementation){f(ae,te.sibling),te=I(te,le.children||[]),te.return=ae,ae=te;break e}else{f(ae,te);break}else c(ae,te);te=te.sibling}te=o6(le,ae.mode,Be),te.return=ae,ae=te}return N(ae);case q:return it=le._init,E0(ae,te,it(le._payload),Be)}if(je(le))return Je(ae,te,le,Be);if(j(le))return Ke(ae,te,le,Be);uu(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,te!==null&&te.tag===6?(f(ae,te.sibling),te=I(te,le),te.return=ae,ae=te):(f(ae,te),te=a6(le,ae.mode,Be),te.return=ae,ae=te),N(ae)):f(ae,te)}return E0}var N1=Zv(!0),$v=Zv(!1),hu=zs(null),du=null,P1=null,g5=null;function m5(){g5=P1=du=null}function v5(a){var c=hu.current;r0(hu),a._currentValue=c}function _5(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 U1(a,c){du=a,g5=P1=null,a=a.dependencies,a!==null&&a.firstContext!==null&&(a.lanes&c&&(Gr=!0),a.firstContext=null)}function Sn(a){var c=a._currentValue;if(g5!==a)if(a={context:a,memoizedValue:c,next:null},P1===null){if(du===null)throw Error(t(308));P1=a,du.dependencies={lanes:0,firstContext:a}}else P1=P1.next=a;return c}var Ga=null;function y5(a){Ga===null?Ga=[a]:Ga.push(a)}function e_(a,c,f,y){var I=c.interleaved;return I===null?(f.next=f,y5(c)):(f.next=I.next,I.next=f),c.interleaved=f,Ji(a,y)}function Ji(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 Vs=!1;function E5(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function t_(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 Ki(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function js(a,c,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,Nt&2){var I=y.pending;return I===null?c.next=c:(c.next=I.next,I.next=c),y.pending=c,Ji(a,f)}return I=y.interleaved,I===null?(c.next=c,y5(y)):(c.next=I.next,I.next=c),y.interleaved=c,Ji(a,f)}function fu(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,Mr(a,f)}}function r_(a,c){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var I=null,b=null;if(f=f.firstBaseUpdate,f!==null){do{var N={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};b===null?I=b=N:b=b.next=N,f=f.next}while(f!==null);b===null?I=b=c:b=b.next=c}else I=b=c;f={baseState:y.baseState,firstBaseUpdate:I,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 pu(a,c,f,y){var I=a.updateQueue;Vs=!1;var b=I.firstBaseUpdate,N=I.lastBaseUpdate,Y=I.shared.pending;if(Y!==null){I.shared.pending=null;var K=Y,he=K.next;K.next=null,N===null?b=he:N.next=he,N=K;var Ie=a.alternate;Ie!==null&&(Ie=Ie.updateQueue,Y=Ie.lastBaseUpdate,Y!==N&&(Y===null?Ie.firstBaseUpdate=he:Y.next=he,Ie.lastBaseUpdate=K))}if(b!==null){var Me=I.baseState;N=0,Ie=he=K=null,Y=b;do{var xe=Y.lane,He=Y.eventTime;if((y&xe)===xe){Ie!==null&&(Ie=Ie.next={eventTime:He,lane:0,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null});e:{var Je=a,Ke=Y;switch(xe=c,He=f,Ke.tag){case 1:if(Je=Ke.payload,typeof Je=="function"){Me=Je.call(He,Me,xe);break e}Me=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=Ke.payload,xe=typeof Je=="function"?Je.call(He,Me,xe):Je,xe==null)break e;Me=$({},Me,xe);break e;case 2:Vs=!0}}Y.callback!==null&&Y.lane!==0&&(a.flags|=64,xe=I.effects,xe===null?I.effects=[Y]:xe.push(Y))}else He={eventTime:He,lane:xe,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},Ie===null?(he=Ie=He,K=Me):Ie=Ie.next=He,N|=xe;if(Y=Y.next,Y===null){if(Y=I.shared.pending,Y===null)break;xe=Y,Y=xe.next,xe.next=null,I.lastBaseUpdate=xe,I.shared.pending=null}}while(1);if(Ie===null&&(K=Me),I.baseState=K,I.firstBaseUpdate=he,I.lastBaseUpdate=Ie,c=I.shared.interleaved,c!==null){I=c;do N|=I.lane,I=I.next;while(I!==c)}else b===null&&(I.shared.lanes=0);ja|=N,a.lanes=N,a.memoizedState=Me}}function n_(a,c,f){if(a=c.effects,c.effects=null,a!==null)for(c=0;c<a.length;c++){var y=a[c],I=y.callback;if(I!==null){if(y.callback=null,y=f,typeof I!="function")throw Error(t(191,I));I.call(y)}}}var S2={},fi=zs(S2),T2=zs(S2),B2=zs(S2);function Ha(a){if(a===S2)throw Error(t(174));return a}function x5(a,c){switch(Zt(B2,c),Zt(T2,a),Zt(fi,S2),a=c.nodeType,a){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:Ye(null,"");break;default:a=a===8?c.parentNode:c,c=a.namespaceURI||null,a=a.tagName,c=Ye(c,a)}r0(fi),Zt(fi,c)}function k1(){r0(fi),r0(T2),r0(B2)}function i_(a){Ha(B2.current);var c=Ha(fi.current),f=Ye(c,a.type);c!==f&&(Zt(T2,a),Zt(fi,f))}function w5(a){T2.current===a&&(r0(fi),r0(T2))}var h0=zs(0);function Au(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 C5=[];function I5(){for(var a=0;a<C5.length;a++)C5[a]._workInProgressVersionPrimary=null;C5.length=0}var gu=C.ReactCurrentDispatcher,M5=C.ReactCurrentBatchConfig,Va=0,d0=null,O0=null,J0=null,mu=!1,b2=!1,R2=0,pk=0;function pr(){throw Error(t(321))}function S5(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!Hn(a[f],c[f]))return!1;return!0}function T5(a,c,f,y,I,b){if(Va=b,d0=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,gu.current=a===null||a.memoizedState===null?vk:_k,a=f(y,I),b2){b=0;do{if(b2=!1,R2=0,25<=b)throw Error(t(301));b+=1,J0=O0=null,c.updateQueue=null,gu.current=yk,a=f(y,I)}while(b2)}if(gu.current=yu,c=O0!==null&&O0.next!==null,Va=0,J0=O0=d0=null,mu=!1,c)throw Error(t(300));return a}function B5(){var a=R2!==0;return R2=0,a}function pi(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return J0===null?d0.memoizedState=J0=a:J0=J0.next=a,J0}function Tn(){if(O0===null){var a=d0.alternate;a=a!==null?a.memoizedState:null}else a=O0.next;var c=J0===null?d0.memoizedState:J0.next;if(c!==null)J0=c,O0=a;else{if(a===null)throw Error(t(310));O0=a,a={memoizedState:O0.memoizedState,baseState:O0.baseState,baseQueue:O0.baseQueue,queue:O0.queue,next:null},J0===null?d0.memoizedState=J0=a:J0=J0.next=a}return J0}function D2(a,c){return typeof c=="function"?c(a):c}function b5(a){var c=Tn(),f=c.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=a;var y=O0,I=y.baseQueue,b=f.pending;if(b!==null){if(I!==null){var N=I.next;I.next=b.next,b.next=N}y.baseQueue=I=b,f.pending=null}if(I!==null){b=I.next,y=y.baseState;var Y=N=null,K=null,he=b;do{var Ie=he.lane;if((Va&Ie)===Ie)K!==null&&(K=K.next={lane:0,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),y=he.hasEagerState?he.eagerState:a(y,he.action);else{var Me={lane:Ie,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null};K===null?(Y=K=Me,N=y):K=K.next=Me,d0.lanes|=Ie,ja|=Ie}he=he.next}while(he!==null&&he!==b);K===null?N=y:K.next=Y,Hn(y,c.memoizedState)||(Gr=!0),c.memoizedState=y,c.baseState=N,c.baseQueue=K,f.lastRenderedState=y}if(a=f.interleaved,a!==null){I=a;do b=I.lane,d0.lanes|=b,ja|=b,I=I.next;while(I!==a)}else I===null&&(f.lanes=0);return[c.memoizedState,f.dispatch]}function R5(a){var c=Tn(),f=c.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=a;var y=f.dispatch,I=f.pending,b=c.memoizedState;if(I!==null){f.pending=null;var N=I=I.next;do b=a(b,N.action),N=N.next;while(N!==I);Hn(b,c.memoizedState)||(Gr=!0),c.memoizedState=b,c.baseQueue===null&&(c.baseState=b),f.lastRenderedState=b}return[b,y]}function s_(){}function a_(a,c){var f=d0,y=Tn(),I=c(),b=!Hn(y.memoizedState,I);if(b&&(y.memoizedState=I,Gr=!0),y=y.queue,D5(c_.bind(null,f,y,a),[a]),y.getSnapshot!==c||b||J0!==null&&J0.memoizedState.tag&1){if(f.flags|=2048,L2(9,l_.bind(null,f,y,I,c),void 0,null),K0===null)throw Error(t(349));Va&30||o_(f,c,I)}return I}function o_(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=d0.updateQueue,c===null?(c={lastEffect:null,stores:null},d0.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function l_(a,c,f,y){c.value=f,c.getSnapshot=y,u_(c)&&h_(a)}function c_(a,c,f){return f(function(){u_(c)&&h_(a)})}function u_(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!Hn(a,f)}catch{return!0}}function h_(a){var c=Ji(a,1);c!==null&&qn(c,a,1,-1)}function d_(a){var c=pi();return typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:D2,lastRenderedState:a},c.queue=a,a=a.dispatch=mk.bind(null,d0,a),[c.memoizedState,a]}function L2(a,c,f,y){return a={tag:a,create:c,destroy:f,deps:y,next:null},c=d0.updateQueue,c===null?(c={lastEffect:null,stores:null},d0.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 f_(){return Tn().memoizedState}function vu(a,c,f,y){var I=pi();d0.flags|=a,I.memoizedState=L2(1|c,f,void 0,y===void 0?null:y)}function _u(a,c,f,y){var I=Tn();y=y===void 0?null:y;var b=void 0;if(O0!==null){var N=O0.memoizedState;if(b=N.destroy,y!==null&&S5(y,N.deps)){I.memoizedState=L2(c,f,b,y);return}}d0.flags|=a,I.memoizedState=L2(1|c,f,b,y)}function p_(a,c){return vu(8390656,8,a,c)}function D5(a,c){return _u(2048,8,a,c)}function A_(a,c){return _u(4,2,a,c)}function g_(a,c){return _u(4,4,a,c)}function m_(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 v_(a,c,f){return f=f!=null?f.concat([a]):null,_u(4,4,m_.bind(null,c,a),f)}function L5(){}function __(a,c){var f=Tn();c=c===void 0?null:c;var y=f.memoizedState;return y!==null&&c!==null&&S5(c,y[1])?y[0]:(f.memoizedState=[a,c],a)}function y_(a,c){var f=Tn();c=c===void 0?null:c;var y=f.memoizedState;return y!==null&&c!==null&&S5(c,y[1])?y[0]:(a=a(),f.memoizedState=[a,c],a)}function E_(a,c,f){return Va&21?(Hn(f,c)||(f=Xt(),d0.lanes|=f,ja|=f,a.baseState=!0),c):(a.baseState&&(a.baseState=!1,Gr=!0),a.memoizedState=f)}function Ak(a,c){var f=Lt;Lt=f!==0&&4>f?f:4,a(!0);var y=M5.transition;M5.transition={};try{a(!1),c()}finally{Lt=f,M5.transition=y}}function x_(){return Tn().memoizedState}function gk(a,c,f){var y=Xs(a);if(f={lane:y,action:f,hasEagerState:!1,eagerState:null,next:null},w_(a))C_(c,f);else if(f=e_(a,c,f,y),f!==null){var I=Tr();qn(f,a,y,I),I_(f,c,y)}}function mk(a,c,f){var y=Xs(a),I={lane:y,action:f,hasEagerState:!1,eagerState:null,next:null};if(w_(a))C_(c,I);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=c.lastRenderedReducer,b!==null))try{var N=c.lastRenderedState,Y=b(N,f);if(I.hasEagerState=!0,I.eagerState=Y,Hn(Y,N)){var K=c.interleaved;K===null?(I.next=I,y5(c)):(I.next=K.next,K.next=I),c.interleaved=I;return}}catch{}finally{}f=e_(a,c,I,y),f!==null&&(I=Tr(),qn(f,a,y,I),I_(f,c,y))}}function w_(a){var c=a.alternate;return a===d0||c!==null&&c===d0}function C_(a,c){b2=mu=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function I_(a,c,f){if(f&4194240){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,Mr(a,f)}}var yu={readContext:Sn,useCallback:pr,useContext:pr,useEffect:pr,useImperativeHandle:pr,useInsertionEffect:pr,useLayoutEffect:pr,useMemo:pr,useReducer:pr,useRef:pr,useState:pr,useDebugValue:pr,useDeferredValue:pr,useTransition:pr,useMutableSource:pr,useSyncExternalStore:pr,useId:pr,unstable_isNewReconciler:!1},vk={readContext:Sn,useCallback:function(a,c){return pi().memoizedState=[a,c===void 0?null:c],a},useContext:Sn,useEffect:p_,useImperativeHandle:function(a,c,f){return f=f!=null?f.concat([a]):null,vu(4194308,4,m_.bind(null,c,a),f)},useLayoutEffect:function(a,c){return vu(4194308,4,a,c)},useInsertionEffect:function(a,c){return vu(4,2,a,c)},useMemo:function(a,c){var f=pi();return c=c===void 0?null:c,a=a(),f.memoizedState=[a,c],a},useReducer:function(a,c,f){var y=pi();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=gk.bind(null,d0,a),[y.memoizedState,a]},useRef:function(a){var c=pi();return a={current:a},c.memoizedState=a},useState:d_,useDebugValue:L5,useDeferredValue:function(a){return pi().memoizedState=a},useTransition:function(){var a=d_(!1),c=a[0];return a=Ak.bind(null,a[1]),pi().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,f){var y=d0,I=pi();if(o0){if(f===void 0)throw Error(t(407));f=f()}else{if(f=c(),K0===null)throw Error(t(349));Va&30||o_(y,c,f)}I.memoizedState=f;var b={value:f,getSnapshot:c};return I.queue=b,p_(c_.bind(null,y,b,a),[a]),y.flags|=2048,L2(9,l_.bind(null,y,b,f,c),void 0,null),f},useId:function(){var a=pi(),c=K0.identifierPrefix;if(o0){var f=Xi,y=qi;f=(y&~(1<<32-_t(y)-1)).toString(32)+f,c=":"+c+"R"+f,f=R2++,0<f&&(c+="H"+f.toString(32)),c+=":"}else f=pk++,c=":"+c+"r"+f.toString(32)+":";return a.memoizedState=c},unstable_isNewReconciler:!1},_k={readContext:Sn,useCallback:__,useContext:Sn,useEffect:D5,useImperativeHandle:v_,useInsertionEffect:A_,useLayoutEffect:g_,useMemo:y_,useReducer:b5,useRef:f_,useState:function(){return b5(D2)},useDebugValue:L5,useDeferredValue:function(a){var c=Tn();return E_(c,O0.memoizedState,a)},useTransition:function(){var a=b5(D2)[0],c=Tn().memoizedState;return[a,c]},useMutableSource:s_,useSyncExternalStore:a_,useId:x_,unstable_isNewReconciler:!1},yk={readContext:Sn,useCallback:__,useContext:Sn,useEffect:D5,useImperativeHandle:v_,useInsertionEffect:A_,useLayoutEffect:g_,useMemo:y_,useReducer:R5,useRef:f_,useState:function(){return R5(D2)},useDebugValue:L5,useDeferredValue:function(a){var c=Tn();return O0===null?c.memoizedState=a:E_(c,O0.memoizedState,a)},useTransition:function(){var a=R5(D2)[0],c=Tn().memoizedState;return[a,c]},useMutableSource:s_,useSyncExternalStore:a_,useId:x_,unstable_isNewReconciler:!1};function jn(a,c){if(a&&a.defaultProps){c=$({},c),a=a.defaultProps;for(var f in a)c[f]===void 0&&(c[f]=a[f]);return c}return c}function N5(a,c,f,y){c=a.memoizedState,f=f(y,c),f=f==null?c:$({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Eu={isMounted:function(a){return(a=a._reactInternals)?ui(a)===a:!1},enqueueSetState:function(a,c,f){a=a._reactInternals;var y=Tr(),I=Xs(a),b=Ki(y,I);b.payload=c,f!=null&&(b.callback=f),c=js(a,b,I),c!==null&&(qn(c,a,I,y),fu(c,a,I))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var y=Tr(),I=Xs(a),b=Ki(y,I);b.tag=1,b.payload=c,f!=null&&(b.callback=f),c=js(a,b,I),c!==null&&(qn(c,a,I,y),fu(c,a,I))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=Tr(),y=Xs(a),I=Ki(f,y);I.tag=2,c!=null&&(I.callback=c),c=js(a,I,y),c!==null&&(qn(c,a,y,f),fu(c,a,y))}};function M_(a,c,f,y,I,b,N){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,b,N):c.prototype&&c.prototype.isPureReactComponent?!_2(f,y)||!_2(I,b):!0}function S_(a,c,f){var y=!1,I=Gs,b=c.contextType;return typeof b=="object"&&b!==null?b=Sn(b):(I=zr(c)?Fa:fr.current,y=c.contextTypes,b=(y=y!=null)?b1(a,I):Gs),c=new c(f,b),a.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Eu,a.stateNode=c,c._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=I,a.__reactInternalMemoizedMaskedChildContext=b),c}function T_(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&&Eu.enqueueReplaceState(c,c.state,null)}function P5(a,c,f,y){var I=a.stateNode;I.props=f,I.state=a.memoizedState,I.refs={},E5(a);var b=c.contextType;typeof b=="object"&&b!==null?I.context=Sn(b):(b=zr(c)?Fa:fr.current,I.context=b1(a,b)),I.state=a.memoizedState,b=c.getDerivedStateFromProps,typeof b=="function"&&(N5(a,c,b,f),I.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(c=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),c!==I.state&&Eu.enqueueReplaceState(I,I.state,null),pu(a,f,I,y),I.state=a.memoizedState),typeof I.componentDidMount=="function"&&(a.flags|=4194308)}function Q1(a,c){try{var f="",y=c;do f+=ce(y),y=y.return;while(y);var I=f}catch(b){I=`
|
|
4724
|
+
`+I[N].replace(" at new "," at ");return a.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",a.displayName)),K}while(1<=N&&0<=Y);break}}}finally{ee=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?V(a):""}function ce(a){switch(a.tag){case 5:return V(a.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return a=O(a.type,!1),a;case 11:return a=O(a.type.render,!1),a;case 1:return a=O(a.type,!0),a;default:return""}}function fe(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 M:return"Fragment";case T:return"Portal";case R:return"Profiler";case D:return"StrictMode";case Q:return"Suspense";case W:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case L:return(a.displayName||"Context")+".Consumer";case S:return(a._context.displayName||"Context")+".Provider";case k:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case J:return c=a.displayName||null,c!==null?c:fe(a.type)||"Memo";case q:c=a._payload,a=a._init;try{return fe(a(c))}catch{}}return null}function Ae(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 fe(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 pe(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Re(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function ke(a){var c=Re(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 I=f.get,b=f.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return I.call(this)},set:function(N){y=""+N,b.call(this,N)}}),Object.defineProperty(a,c,{enumerable:f.enumerable}),{getValue:function(){return y},setValue:function(N){y=""+N},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function wt(a){a._valueTracker||(a._valueTracker=ke(a))}function ut(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),y="";return a&&(y=Re(a)?a.checked?"true":"false":a.value),a=y,a!==f?(c.setValue(a),!0):!1}function ht(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 X(a,c){var f=c.checked;return $({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function u0(a,c){var f=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;f=pe(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 dt(a,c){c=c.checked,c!=null&&x(a,"checked",c,!1)}function ft(a,c){dt(a,c);var f=pe(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")?It(a,c.type,f):c.hasOwnProperty("defaultValue")&&It(a,c.type,pe(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function qe(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 It(a,c,f){(c!=="number"||ht(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var je=Array.isArray;function z(a,c,f,y){if(a=a.options,c){c={};for(var I=0;I<f.length;I++)c["$"+f[I]]=!0;for(f=0;f<a.length;f++)I=c.hasOwnProperty("$"+a[f].value),a[f].selected!==I&&(a[f].selected=I),I&&y&&(a[f].defaultSelected=!0)}else{for(f=""+pe(f),c=null,I=0;I<a.length;I++){if(a[I].value===f){a[I].selected=!0,y&&(a[I].defaultSelected=!0);return}c!==null||a[I].disabled||(c=a[I])}c!==null&&(c.selected=!0)}}function U(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(t(91));return $({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function se(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(je(f)){if(1<f.length)throw Error(t(93));f=f[0]}c=f}c==null&&(c=""),f=c}a._wrapperState={initialValue:pe(f)}}function ye(a,c){var f=pe(c.value),y=pe(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 Ee(a){var c=a.textContent;c===a._wrapperState.initialValue&&c!==""&&c!==null&&(a.value=c)}function _e(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 Ye(a,c){return a==null||a==="http://www.w3.org/1999/xhtml"?_e(c):a==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Pe,Ge=function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,f,y,I){MSApp.execUnsafeLocalFunction(function(){return a(c,f,y,I)})}:a}(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(Pe=Pe||document.createElement("div"),Pe.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Pe.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function pt(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var we={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},Qe=["Webkit","ms","Moz","O"];Object.keys(we).forEach(function(a){Qe.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),we[c]=we[a]})});function ge(a,c,f){return c==null||typeof c=="boolean"||c===""?"":f||typeof c!="number"||c===0||we.hasOwnProperty(a)&&we[a]?(""+c).trim():c+"px"}function De(a,c){a=a.style;for(var f in c)if(c.hasOwnProperty(f)){var y=f.indexOf("--")===0,I=ge(f,c[f],y);f==="float"&&(f="cssFloat"),y?a.setProperty(f,I):a[f]=I}}var Se=$({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 nt(a,c){if(c){if(Se[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 et(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 At=null;function Z(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Le=null,ue=null,ve=null;function be(a){if(a=I2(a)){if(typeof Le!="function")throw Error(t(280));var c=a.stateNode;c&&(c=nu(c),Le(a.stateNode,a.type,c))}}function Ne(a){ue?ve?ve.push(a):ve=[a]:ue=a}function Et(){if(ue){var a=ue,c=ve;if(ve=ue=null,be(a),c)for(a=0;a<c.length;a++)be(c[a])}}function jt(a,c){return a(c)}function _0(){}var bt=!1;function rr(a,c,f){if(bt)return a(c,f);bt=!0;try{return jt(a,c,f)}finally{bt=!1,(ue!==null||ve!==null)&&(_0(),Et())}}function nr(a,c){var f=a.stateNode;if(f===null)return null;var y=nu(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 Hi=!1;if(l)try{var g0={};Object.defineProperty(g0,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",g0,g0),window.removeEventListener("test",g0,g0)}catch{Hi=!1}function q0(a,c,f,y,I,b,N,Y,K){var de=Array.prototype.slice.call(arguments,3);try{c.apply(f,de)}catch(Ie){this.onError(Ie)}}var Cn=!1,Vi=null,ka=!1,Ds=null,Pc={onError:function(a){Cn=!0,Vi=a}};function y1(a,c,f,y,I,b,N,Y,K){Cn=!1,Vi=null,q0.apply(Pc,arguments)}function Uc(a,c,f,y,I,b,N,Y,K){if(y1.apply(this,arguments),Cn){if(Cn){var de=Vi;Cn=!1,Vi=null}else throw Error(t(198));ka||(ka=!0,Ds=de)}}function ui(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 kc(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 Qc(a){if(ui(a)!==a)throw Error(t(188))}function Ph(a){var c=a.alternate;if(!c){if(c=ui(a),c===null)throw Error(t(188));return c!==a?null:a}for(var f=a,y=c;;){var I=f.return;if(I===null)break;var b=I.alternate;if(b===null){if(y=I.return,y!==null){f=y;continue}break}if(I.child===b.child){for(b=I.child;b;){if(b===f)return Qc(I),a;if(b===y)return Qc(I),c;b=b.sibling}throw Error(t(188))}if(f.return!==y.return)f=I,y=b;else{for(var N=!1,Y=I.child;Y;){if(Y===f){N=!0,f=I,y=b;break}if(Y===y){N=!0,y=I,f=b;break}Y=Y.sibling}if(!N){for(Y=b.child;Y;){if(Y===f){N=!0,f=b,y=I;break}if(Y===y){N=!0,y=b,f=I;break}Y=Y.sibling}if(!N)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 Fc(a){return a=Ph(a),a!==null?Oc(a):null}function Oc(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=Oc(a);if(c!==null)return c;a=a.sibling}return null}var zc=e.unstable_scheduleCallback,F=e.unstable_cancelCallback,ie=e.unstable_shouldYield,he=e.unstable_requestPaint,oe=e.unstable_now,ne=e.unstable_getCurrentPriorityLevel,Ce=e.unstable_ImmediatePriority,ze=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,lt=e.unstable_IdlePriority,at=null,rt=null;function Dt(a){if(rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(at,a,void 0,(a.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:Wt,y0=Math.log,Qt=Math.LN2;function Wt(a){return a>>>=0,a===0?32:31-(y0(a)/Qt|0)|0}var tt=64,D0=4194304;function sn(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 hr(a,c){var f=a.pendingLanes;if(f===0)return 0;var y=0,I=a.suspendedLanes,b=a.pingedLanes,N=f&268435455;if(N!==0){var Y=N&~I;Y!==0?y=sn(Y):(b&=N,b!==0&&(y=sn(b)))}else N=f&~I,N!==0?y=sn(N):b!==0&&(y=sn(b));if(y===0)return 0;if(c!==0&&c!==y&&!(c&I)&&(I=y&-y,b=c&-c,I>=b||I===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-_t(c),I=1<<f,y|=a[f],c&=~I;return y}function Ls(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 Ir(a,c){for(var f=a.suspendedLanes,y=a.pingedLanes,I=a.expirationTimes,b=a.pendingLanes;0<b;){var N=31-_t(b),Y=1<<N,K=I[N];K===-1?(!(Y&f)||Y&y)&&(I[N]=Ls(Y,c)):K<=c&&(a.expiredLanes|=Y),b&=~Y}}function ji(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Xt(){var a=tt;return tt<<=1,!(tt&4194240)&&(tt=64),a}function dr(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function X0(a,c,f){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-_t(c),a[c]=f}function F0(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 I=31-_t(f),b=1<<I;c[I]=0,y[I]=-1,a[I]=-1,f&=~b}}function Mr(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var y=31-_t(f),I=1<<y;I&c|a[y]&c&&(a[y]|=c),f&=~I}}var Lt=0;function hi(a){return a&=-a,1<a?4<a?a&268435455?16:536870912:4:1}var $m,Uh,ev,tv,rv,kh=!1,Gc=[],Ns=null,Ps=null,Us=null,c2=new Map,u2=new Map,ks=[],AU="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 nv(a,c){switch(a){case"focusin":case"focusout":Ns=null;break;case"dragenter":case"dragleave":Ps=null;break;case"mouseover":case"mouseout":Us=null;break;case"pointerover":case"pointerout":c2.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":u2.delete(c.pointerId)}}function h2(a,c,f,y,I,b){return a===null||a.nativeEvent!==b?(a={blockedOn:c,domEventName:f,eventSystemFlags:y,nativeEvent:b,targetContainers:[I]},c!==null&&(c=I2(c),c!==null&&Uh(c)),a):(a.eventSystemFlags|=y,c=a.targetContainers,I!==null&&c.indexOf(I)===-1&&c.push(I),a)}function gU(a,c,f,y,I){switch(c){case"focusin":return Ns=h2(Ns,a,c,f,y,I),!0;case"dragenter":return Ps=h2(Ps,a,c,f,y,I),!0;case"mouseover":return Us=h2(Us,a,c,f,y,I),!0;case"pointerover":var b=I.pointerId;return c2.set(b,h2(c2.get(b)||null,a,c,f,y,I)),!0;case"gotpointercapture":return b=I.pointerId,u2.set(b,h2(u2.get(b)||null,a,c,f,y,I)),!0}return!1}function iv(a){var c=Qa(a.target);if(c!==null){var f=ui(c);if(f!==null){if(c=f.tag,c===13){if(c=kc(f),c!==null){a.blockedOn=c,rv(a.priority,function(){ev(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 Hc(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=Fh(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);At=y,f.target.dispatchEvent(y),At=null}else return c=I2(f),c!==null&&Uh(c),a.blockedOn=f,!1;c.shift()}return!0}function sv(a,c,f){Hc(a)&&f.delete(c)}function mU(){kh=!1,Ns!==null&&Hc(Ns)&&(Ns=null),Ps!==null&&Hc(Ps)&&(Ps=null),Us!==null&&Hc(Us)&&(Us=null),c2.forEach(sv),u2.forEach(sv)}function d2(a,c){a.blockedOn===c&&(a.blockedOn=null,kh||(kh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,mU)))}function f2(a){function c(I){return d2(I,a)}if(0<Gc.length){d2(Gc[0],a);for(var f=1;f<Gc.length;f++){var y=Gc[f];y.blockedOn===a&&(y.blockedOn=null)}}for(Ns!==null&&d2(Ns,a),Ps!==null&&d2(Ps,a),Us!==null&&d2(Us,a),c2.forEach(c),u2.forEach(c),f=0;f<ks.length;f++)y=ks[f],y.blockedOn===a&&(y.blockedOn=null);for(;0<ks.length&&(f=ks[0],f.blockedOn===null);)iv(f),f.blockedOn===null&&ks.shift()}var E1=C.ReactCurrentBatchConfig,Vc=!0;function vU(a,c,f,y){var I=Lt,b=E1.transition;E1.transition=null;try{Lt=1,Qh(a,c,f,y)}finally{Lt=I,E1.transition=b}}function _U(a,c,f,y){var I=Lt,b=E1.transition;E1.transition=null;try{Lt=4,Qh(a,c,f,y)}finally{Lt=I,E1.transition=b}}function Qh(a,c,f,y){if(Vc){var I=Fh(a,c,f,y);if(I===null)r5(a,c,y,jc,f),nv(a,y);else if(gU(I,a,c,f,y))y.stopPropagation();else if(nv(a,y),c&4&&-1<AU.indexOf(a)){for(;I!==null;){var b=I2(I);if(b!==null&&$m(b),b=Fh(a,c,f,y),b===null&&r5(a,c,y,jc,f),b===I)break;I=b}I!==null&&y.stopPropagation()}else r5(a,c,y,null,f)}}var jc=null;function Fh(a,c,f,y){if(jc=null,a=Z(y),a=Qa(a),a!==null)if(c=ui(a),c===null)a=null;else if(f=c.tag,f===13){if(a=kc(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 jc=a,null}function av(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(ne()){case Ce:return 1;case ze:return 4;case Oe:case Ze:return 16;case lt:return 536870912;default:return 16}default:return 16}}var Qs=null,Oh=null,Wc=null;function ov(){if(Wc)return Wc;var a,c=Oh,f=c.length,y,I="value"in Qs?Qs.value:Qs.textContent,b=I.length;for(a=0;a<f&&c[a]===I[a];a++);var N=f-a;for(y=1;y<=N&&c[f-y]===I[b-y];y++);return Wc=I.slice(a,1<y?1-y:void 0)}function Yc(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 qc(){return!0}function lv(){return!1}function an(a){function c(f,y,I,b,N){this._reactName=f,this._targetInst=I,this.type=y,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var Y in a)a.hasOwnProperty(Y)&&(f=a[Y],this[Y]=f?f(b):b[Y]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?qc:lv,this.isPropagationStopped=lv,this}return $(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=qc)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=qc)},persist:function(){},isPersistent:qc}),c}var x1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zh=an(x1),p2=$({},x1,{view:0,detail:0}),yU=an(p2),Gh,Hh,A2,Xc=$({},p2,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jh,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!==A2&&(A2&&a.type==="mousemove"?(Gh=a.screenX-A2.screenX,Hh=a.screenY-A2.screenY):Hh=Gh=0,A2=a),Gh)},movementY:function(a){return"movementY"in a?a.movementY:Hh}}),cv=an(Xc),EU=$({},Xc,{dataTransfer:0}),xU=an(EU),wU=$({},p2,{relatedTarget:0}),Vh=an(wU),CU=$({},x1,{animationName:0,elapsedTime:0,pseudoElement:0}),IU=an(CU),MU=$({},x1,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),SU=an(MU),TU=$({},x1,{data:0}),uv=an(TU),BU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bU={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"},RU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DU(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=RU[a])?!!c[a]:!1}function jh(){return DU}var LU=$({},p2,{key:function(a){if(a.key){var c=BU[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Yc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?bU[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jh,charCode:function(a){return a.type==="keypress"?Yc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Yc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),NU=an(LU),PU=$({},Xc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hv=an(PU),UU=$({},p2,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jh}),kU=an(UU),QU=$({},x1,{propertyName:0,elapsedTime:0,pseudoElement:0}),FU=an(QU),OU=$({},Xc,{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}),zU=an(OU),GU=[9,13,27,32],Wh=l&&"CompositionEvent"in window,g2=null;l&&"documentMode"in document&&(g2=document.documentMode);var HU=l&&"TextEvent"in window&&!g2,dv=l&&(!Wh||g2&&8<g2&&11>=g2),fv=String.fromCharCode(32),pv=!1;function Av(a,c){switch(a){case"keyup":return GU.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gv(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var w1=!1;function VU(a,c){switch(a){case"compositionend":return gv(c);case"keypress":return c.which!==32?null:(pv=!0,fv);case"textInput":return a=c.data,a===fv&&pv?null:a;default:return null}}function jU(a,c){if(w1)return a==="compositionend"||!Wh&&Av(a,c)?(a=ov(),Wc=Oh=Qs=null,w1=!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 dv&&c.locale!=="ko"?null:c.data;default:return null}}var WU={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 mv(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!WU[a.type]:c==="textarea"}function vv(a,c,f,y){Ne(y),c=eu(c,"onChange"),0<c.length&&(f=new zh("onChange","change",null,f,y),a.push({event:f,listeners:c}))}var m2=null,v2=null;function YU(a){Uv(a,0)}function Jc(a){var c=T1(a);if(ut(c))return a}function qU(a,c){if(a==="change")return c}var _v=!1;if(l){var Yh;if(l){var qh="oninput"in document;if(!qh){var yv=document.createElement("div");yv.setAttribute("oninput","return;"),qh=typeof yv.oninput=="function"}Yh=qh}else Yh=!1;_v=Yh&&(!document.documentMode||9<document.documentMode)}function Ev(){m2&&(m2.detachEvent("onpropertychange",xv),v2=m2=null)}function xv(a){if(a.propertyName==="value"&&Jc(v2)){var c=[];vv(c,v2,a,Z(a)),rr(YU,c)}}function XU(a,c,f){a==="focusin"?(Ev(),m2=c,v2=f,m2.attachEvent("onpropertychange",xv)):a==="focusout"&&Ev()}function JU(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Jc(v2)}function KU(a,c){if(a==="click")return Jc(c)}function ZU(a,c){if(a==="input"||a==="change")return Jc(c)}function $U(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var Hn=typeof Object.is=="function"?Object.is:$U;function _2(a,c){if(Hn(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 I=f[y];if(!h.call(c,I)||!Hn(a[I],c[I]))return!1}return!0}function wv(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Cv(a,c){var f=wv(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=wv(f)}}function Iv(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?Iv(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function Mv(){for(var a=window,c=ht();c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=ht(a.document)}return c}function Xh(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 ek(a){var c=Mv(),f=a.focusedElem,y=a.selectionRange;if(c!==f&&f&&f.ownerDocument&&Iv(f.ownerDocument.documentElement,f)){if(y!==null&&Xh(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 I=f.textContent.length,b=Math.min(y.start,I);y=y.end===void 0?b:Math.min(y.end,I),!a.extend&&b>y&&(I=y,y=b,b=I),I=Cv(f,b);var N=Cv(f,y);I&&N&&(a.rangeCount!==1||a.anchorNode!==I.node||a.anchorOffset!==I.offset||a.focusNode!==N.node||a.focusOffset!==N.offset)&&(c=c.createRange(),c.setStart(I.node,I.offset),a.removeAllRanges(),b>y?(a.addRange(c),a.extend(N.node,N.offset)):(c.setEnd(N.node,N.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 tk=l&&"documentMode"in document&&11>=document.documentMode,C1=null,Jh=null,y2=null,Kh=!1;function Sv(a,c,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Kh||C1==null||C1!==ht(y)||(y=C1,"selectionStart"in y&&Xh(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}),y2&&_2(y2,y)||(y2=y,y=eu(Jh,"onSelect"),0<y.length&&(c=new zh("onSelect","select",null,c,f),a.push({event:c,listeners:y}),c.target=C1)))}function Kc(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var I1={animationend:Kc("Animation","AnimationEnd"),animationiteration:Kc("Animation","AnimationIteration"),animationstart:Kc("Animation","AnimationStart"),transitionend:Kc("Transition","TransitionEnd")},Zh={},Tv={};l&&(Tv=document.createElement("div").style,"AnimationEvent"in window||(delete I1.animationend.animation,delete I1.animationiteration.animation,delete I1.animationstart.animation),"TransitionEvent"in window||delete I1.transitionend.transition);function Zc(a){if(Zh[a])return Zh[a];if(!I1[a])return a;var c=I1[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in Tv)return Zh[a]=c[f];return a}var Bv=Zc("animationend"),bv=Zc("animationiteration"),Rv=Zc("animationstart"),Dv=Zc("transitionend"),Lv=new Map,Nv="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 Fs(a,c){Lv.set(a,c),s(c,[a])}for(var $h=0;$h<Nv.length;$h++){var e5=Nv[$h],rk=e5.toLowerCase(),nk=e5[0].toUpperCase()+e5.slice(1);Fs(rk,"on"+nk)}Fs(Bv,"onAnimationEnd"),Fs(bv,"onAnimationIteration"),Fs(Rv,"onAnimationStart"),Fs("dblclick","onDoubleClick"),Fs("focusin","onFocus"),Fs("focusout","onBlur"),Fs(Dv,"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 E2="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(" "),ik=new Set("cancel close invalid load scroll toggle".split(" ").concat(E2));function Pv(a,c,f){var y=a.type||"unknown-event";a.currentTarget=f,Uc(y,c,void 0,a),a.currentTarget=null}function Uv(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],I=y.event;y=y.listeners;e:{var b=void 0;if(c)for(var N=y.length-1;0<=N;N--){var Y=y[N],K=Y.instance,de=Y.currentTarget;if(Y=Y.listener,K!==b&&I.isPropagationStopped())break e;Pv(I,Y,de),b=K}else for(N=0;N<y.length;N++){if(Y=y[N],K=Y.instance,de=Y.currentTarget,Y=Y.listener,K!==b&&I.isPropagationStopped())break e;Pv(I,Y,de),b=K}}}if(ka)throw a=Ds,ka=!1,Ds=null,a}function t0(a,c){var f=c[l5];f===void 0&&(f=c[l5]=new Set);var y=a+"__bubble";f.has(y)||(kv(c,a,2,!1),f.add(y))}function t5(a,c,f){var y=0;c&&(y|=4),kv(f,a,y,c)}var $c="_reactListening"+Math.random().toString(36).slice(2);function x2(a){if(!a[$c]){a[$c]=!0,n.forEach(function(f){f!=="selectionchange"&&(ik.has(f)||t5(f,!1,a),t5(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[$c]||(c[$c]=!0,t5("selectionchange",!1,c))}}function kv(a,c,f,y){switch(av(c)){case 1:var I=vU;break;case 4:I=_U;break;default:I=Qh}f=I.bind(null,c,f,a),I=void 0,!Hi||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(I=!0),y?I!==void 0?a.addEventListener(c,f,{capture:!0,passive:I}):a.addEventListener(c,f,!0):I!==void 0?a.addEventListener(c,f,{passive:I}):a.addEventListener(c,f,!1)}function r5(a,c,f,y,I){var b=y;if(!(c&1)&&!(c&2)&&y!==null)e:for(;;){if(y===null)return;var N=y.tag;if(N===3||N===4){var Y=y.stateNode.containerInfo;if(Y===I||Y.nodeType===8&&Y.parentNode===I)break;if(N===4)for(N=y.return;N!==null;){var K=N.tag;if((K===3||K===4)&&(K=N.stateNode.containerInfo,K===I||K.nodeType===8&&K.parentNode===I))return;N=N.return}for(;Y!==null;){if(N=Qa(Y),N===null)return;if(K=N.tag,K===5||K===6){y=b=N;continue e}Y=Y.parentNode}}y=y.return}rr(function(){var de=b,Ie=Z(f),Me=[];e:{var xe=Lv.get(a);if(xe!==void 0){var He=zh,Je=a;switch(a){case"keypress":if(Yc(f)===0)break e;case"keydown":case"keyup":He=NU;break;case"focusin":Je="focus",He=Vh;break;case"focusout":Je="blur",He=Vh;break;case"beforeblur":case"afterblur":He=Vh;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":He=cv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=xU;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=kU;break;case Bv:case bv:case Rv:He=IU;break;case Dv:He=FU;break;case"scroll":He=yU;break;case"wheel":He=zU;break;case"copy":case"cut":case"paste":He=SU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=hv}var Ke=(c&4)!==0,E0=!Ke&&a==="scroll",ae=Ke?xe!==null?xe+"Capture":null:xe;Ke=[];for(var te=de,le;te!==null;){le=te;var Be=le.stateNode;if(le.tag===5&&Be!==null&&(le=Be,ae!==null&&(Be=nr(te,ae),Be!=null&&Ke.push(w2(te,Be,le)))),E0)break;te=te.return}0<Ke.length&&(xe=new He(xe,Je,null,f,Ie),Me.push({event:xe,listeners:Ke}))}}if(!(c&7)){e:{if(xe=a==="mouseover"||a==="pointerover",He=a==="mouseout"||a==="pointerout",xe&&f!==At&&(Je=f.relatedTarget||f.fromElement)&&(Qa(Je)||Je[Wi]))break e;if((He||xe)&&(xe=Ie.window===Ie?Ie:(xe=Ie.ownerDocument)?xe.defaultView||xe.parentWindow:window,He?(Je=f.relatedTarget||f.toElement,He=de,Je=Je?Qa(Je):null,Je!==null&&(E0=ui(Je),Je!==E0||Je.tag!==5&&Je.tag!==6)&&(Je=null)):(He=null,Je=de),He!==Je)){if(Ke=cv,Be="onMouseLeave",ae="onMouseEnter",te="mouse",(a==="pointerout"||a==="pointerover")&&(Ke=hv,Be="onPointerLeave",ae="onPointerEnter",te="pointer"),E0=He==null?xe:T1(He),le=Je==null?xe:T1(Je),xe=new Ke(Be,te+"leave",He,f,Ie),xe.target=E0,xe.relatedTarget=le,Be=null,Qa(Ie)===de&&(Ke=new Ke(ae,te+"enter",Je,f,Ie),Ke.target=le,Ke.relatedTarget=E0,Be=Ke),E0=Be,He&&Je)t:{for(Ke=He,ae=Je,te=0,le=Ke;le;le=M1(le))te++;for(le=0,Be=ae;Be;Be=M1(Be))le++;for(;0<te-le;)Ke=M1(Ke),te--;for(;0<le-te;)ae=M1(ae),le--;for(;te--;){if(Ke===ae||ae!==null&&Ke===ae.alternate)break t;Ke=M1(Ke),ae=M1(ae)}Ke=null}else Ke=null;He!==null&&Qv(Me,xe,He,Ke,!1),Je!==null&&E0!==null&&Qv(Me,E0,Je,Ke,!0)}}e:{if(xe=de?T1(de):window,He=xe.nodeName&&xe.nodeName.toLowerCase(),He==="select"||He==="input"&&xe.type==="file")var $e=qU;else if(mv(xe))if(_v)$e=ZU;else{$e=JU;var it=XU}else(He=xe.nodeName)&&He.toLowerCase()==="input"&&(xe.type==="checkbox"||xe.type==="radio")&&($e=KU);if($e&&($e=$e(a,de))){vv(Me,$e,f,Ie);break e}it&&it(a,xe,de),a==="focusout"&&(it=xe._wrapperState)&&it.controlled&&xe.type==="number"&&It(xe,"number",xe.value)}switch(it=de?T1(de):window,a){case"focusin":(mv(it)||it.contentEditable==="true")&&(C1=it,Jh=de,y2=null);break;case"focusout":y2=Jh=C1=null;break;case"mousedown":Kh=!0;break;case"contextmenu":case"mouseup":case"dragend":Kh=!1,Sv(Me,f,Ie);break;case"selectionchange":if(tk)break;case"keydown":case"keyup":Sv(Me,f,Ie)}var st;if(Wh)e:{switch(a){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else w1?Av(a,f)&&(ct="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(ct="onCompositionStart");ct&&(dv&&f.locale!=="ko"&&(w1||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&w1&&(st=ov()):(Qs=Ie,Oh="value"in Qs?Qs.value:Qs.textContent,w1=!0)),it=eu(de,ct),0<it.length&&(ct=new uv(ct,a,null,f,Ie),Me.push({event:ct,listeners:it}),st?ct.data=st:(st=gv(f),st!==null&&(ct.data=st)))),(st=HU?VU(a,f):jU(a,f))&&(de=eu(de,"onBeforeInput"),0<de.length&&(Ie=new uv("onBeforeInput","beforeinput",null,f,Ie),Me.push({event:Ie,listeners:de}),Ie.data=st))}Uv(Me,c)})}function w2(a,c,f){return{instance:a,listener:c,currentTarget:f}}function eu(a,c){for(var f=c+"Capture",y=[];a!==null;){var I=a,b=I.stateNode;I.tag===5&&b!==null&&(I=b,b=nr(a,f),b!=null&&y.unshift(w2(a,b,I)),b=nr(a,c),b!=null&&y.push(w2(a,b,I))),a=a.return}return y}function M1(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function Qv(a,c,f,y,I){for(var b=c._reactName,N=[];f!==null&&f!==y;){var Y=f,K=Y.alternate,de=Y.stateNode;if(K!==null&&K===y)break;Y.tag===5&&de!==null&&(Y=de,I?(K=nr(f,b),K!=null&&N.unshift(w2(f,K,Y))):I||(K=nr(f,b),K!=null&&N.push(w2(f,K,Y)))),f=f.return}N.length!==0&&a.push({event:c,listeners:N})}var sk=/\r\n?/g,ak=/\u0000|\uFFFD/g;function Fv(a){return(typeof a=="string"?a:""+a).replace(sk,`
|
|
4725
|
+
`).replace(ak,"")}function tu(a,c,f){if(c=Fv(c),Fv(a)!==c&&f)throw Error(t(425))}function ru(){}var n5=null,i5=null;function s5(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 a5=typeof setTimeout=="function"?setTimeout:void 0,ok=typeof clearTimeout=="function"?clearTimeout:void 0,Ov=typeof Promise=="function"?Promise:void 0,lk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ov<"u"?function(a){return Ov.resolve(null).then(a).catch(ck)}:a5;function ck(a){setTimeout(function(){throw a})}function o5(a,c){var f=c,y=0;do{var I=f.nextSibling;if(a.removeChild(f),I&&I.nodeType===8)if(f=I.data,f==="/$"){if(y===0){a.removeChild(I),f2(c);return}y--}else f!=="$"&&f!=="$?"&&f!=="$!"||y++;f=I}while(f);f2(c)}function Os(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 zv(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 S1=Math.random().toString(36).slice(2),di="__reactFiber$"+S1,C2="__reactProps$"+S1,Wi="__reactContainer$"+S1,l5="__reactEvents$"+S1,uk="__reactListeners$"+S1,hk="__reactHandles$"+S1;function Qa(a){var c=a[di];if(c)return c;for(var f=a.parentNode;f;){if(c=f[Wi]||f[di]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=zv(a);a!==null;){if(f=a[di])return f;a=zv(a)}return c}a=f,f=a.parentNode}return null}function I2(a){return a=a[di]||a[Wi],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function T1(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(t(33))}function nu(a){return a[C2]||null}var c5=[],B1=-1;function zs(a){return{current:a}}function r0(a){0>B1||(a.current=c5[B1],c5[B1]=null,B1--)}function Zt(a,c){B1++,c5[B1]=a.current,a.current=c}var Gs={},fr=zs(Gs),Or=zs(!1),Fa=Gs;function b1(a,c){var f=a.type.contextTypes;if(!f)return Gs;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var I={},b;for(b in f)I[b]=c[b];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=I),I}function zr(a){return a=a.childContextTypes,a!=null}function iu(){r0(Or),r0(fr)}function Gv(a,c,f){if(fr.current!==Gs)throw Error(t(168));Zt(fr,c),Zt(Or,f)}function Hv(a,c,f){var y=a.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return f;y=y.getChildContext();for(var I in y)if(!(I in c))throw Error(t(108,Ae(a)||"Unknown",I));return $({},f,y)}function su(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Gs,Fa=fr.current,Zt(fr,a),Zt(Or,Or.current),!0}function Vv(a,c,f){var y=a.stateNode;if(!y)throw Error(t(169));f?(a=Hv(a,c,Fa),y.__reactInternalMemoizedMergedChildContext=a,r0(Or),r0(fr),Zt(fr,a)):r0(Or),Zt(Or,f)}var Yi=null,au=!1,u5=!1;function jv(a){Yi===null?Yi=[a]:Yi.push(a)}function dk(a){au=!0,jv(a)}function Hs(){if(!u5&&Yi!==null){u5=!0;var a=0,c=Lt;try{var f=Yi;for(Lt=1;a<f.length;a++){var y=f[a];do y=y(!0);while(y!==null)}Yi=null,au=!1}catch(I){throw Yi!==null&&(Yi=Yi.slice(a+1)),zc(Ce,Hs),I}finally{Lt=c,u5=!1}}return null}var R1=[],D1=0,ou=null,lu=0,In=[],Mn=0,Oa=null,qi=1,Xi="";function za(a,c){R1[D1++]=lu,R1[D1++]=ou,ou=a,lu=c}function Wv(a,c,f){In[Mn++]=qi,In[Mn++]=Xi,In[Mn++]=Oa,Oa=a;var y=qi;a=Xi;var I=32-_t(y)-1;y&=~(1<<I),f+=1;var b=32-_t(c)+I;if(30<b){var N=I-I%5;b=(y&(1<<N)-1).toString(32),y>>=N,I-=N,qi=1<<32-_t(c)+I|f<<I|y,Xi=b+a}else qi=1<<b|f<<I|y,Xi=a}function h5(a){a.return!==null&&(za(a,1),Wv(a,1,0))}function d5(a){for(;a===ou;)ou=R1[--D1],R1[D1]=null,lu=R1[--D1],R1[D1]=null;for(;a===Oa;)Oa=In[--Mn],In[Mn]=null,Xi=In[--Mn],In[Mn]=null,qi=In[--Mn],In[Mn]=null}var on=null,ln=null,o0=!1,Vn=null;function Yv(a,c){var f=bn(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 qv(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,on=a,ln=Os(c.firstChild),!0):!1;case 6:return c=a.pendingProps===""||c.nodeType!==3?null:c,c!==null?(a.stateNode=c,on=a,ln=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(f=Oa!==null?{id:qi,overflow:Xi}:null,a.memoizedState={dehydrated:c,treeContext:f,retryLane:1073741824},f=bn(18,null,null,0),f.stateNode=c,f.return=a,a.child=f,on=a,ln=null,!0):!1;default:return!1}}function f5(a){return(a.mode&1)!==0&&(a.flags&128)===0}function p5(a){if(o0){var c=ln;if(c){var f=c;if(!qv(a,c)){if(f5(a))throw Error(t(418));c=Os(f.nextSibling);var y=on;c&&qv(a,c)?Yv(y,f):(a.flags=a.flags&-4097|2,o0=!1,on=a)}}else{if(f5(a))throw Error(t(418));a.flags=a.flags&-4097|2,o0=!1,on=a}}}function Xv(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;on=a}function cu(a){if(a!==on)return!1;if(!o0)return Xv(a),o0=!0,!1;var c;if((c=a.tag!==3)&&!(c=a.tag!==5)&&(c=a.type,c=c!=="head"&&c!=="body"&&!s5(a.type,a.memoizedProps)),c&&(c=ln)){if(f5(a))throw Jv(),Error(t(418));for(;c;)Yv(a,c),c=Os(c.nextSibling)}if(Xv(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){ln=Os(a.nextSibling);break e}c--}else f!=="$"&&f!=="$!"&&f!=="$?"||c++}a=a.nextSibling}ln=null}}else ln=on?Os(a.stateNode.nextSibling):null;return!0}function Jv(){for(var a=ln;a;)a=Os(a.nextSibling)}function L1(){ln=on=null,o0=!1}function A5(a){Vn===null?Vn=[a]:Vn.push(a)}var fk=C.ReactCurrentBatchConfig;function M2(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 I=y,b=""+a;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===b?c.ref:(c=function(N){var Y=I.refs;N===null?delete Y[b]:Y[b]=N},c._stringRef=b,c)}if(typeof a!="string")throw Error(t(284));if(!f._owner)throw Error(t(290,a))}return a}function uu(a,c){throw a=Object.prototype.toString.call(c),Error(t(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a))}function Kv(a){var c=a._init;return c(a._payload)}function Zv(a){function c(ae,te){if(a){var le=ae.deletions;le===null?(ae.deletions=[te],ae.flags|=16):le.push(te)}}function f(ae,te){if(!a)return null;for(;te!==null;)c(ae,te),te=te.sibling;return null}function y(ae,te){for(ae=new Map;te!==null;)te.key!==null?ae.set(te.key,te):ae.set(te.index,te),te=te.sibling;return ae}function I(ae,te){return ae=Ks(ae,te),ae.index=0,ae.sibling=null,ae}function b(ae,te,le){return ae.index=le,a?(le=ae.alternate,le!==null?(le=le.index,le<te?(ae.flags|=2,te):le):(ae.flags|=2,te)):(ae.flags|=1048576,te)}function N(ae){return a&&ae.alternate===null&&(ae.flags|=2),ae}function Y(ae,te,le,Be){return te===null||te.tag!==6?(te=a6(le,ae.mode,Be),te.return=ae,te):(te=I(te,le),te.return=ae,te)}function K(ae,te,le,Be){var $e=le.type;return $e===M?Ie(ae,te,le.props.children,Be,le.key):te!==null&&(te.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===q&&Kv($e)===te.type)?(Be=I(te,le.props),Be.ref=M2(ae,te,le),Be.return=ae,Be):(Be=Nu(le.type,le.key,le.props,null,ae.mode,Be),Be.ref=M2(ae,te,le),Be.return=ae,Be)}function de(ae,te,le,Be){return te===null||te.tag!==4||te.stateNode.containerInfo!==le.containerInfo||te.stateNode.implementation!==le.implementation?(te=o6(le,ae.mode,Be),te.return=ae,te):(te=I(te,le.children||[]),te.return=ae,te)}function Ie(ae,te,le,Be,$e){return te===null||te.tag!==7?(te=Xa(le,ae.mode,Be,$e),te.return=ae,te):(te=I(te,le),te.return=ae,te)}function Me(ae,te,le){if(typeof te=="string"&&te!==""||typeof te=="number")return te=a6(""+te,ae.mode,le),te.return=ae,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case B:return le=Nu(te.type,te.key,te.props,null,ae.mode,le),le.ref=M2(ae,null,te),le.return=ae,le;case T:return te=o6(te,ae.mode,le),te.return=ae,te;case q:var Be=te._init;return Me(ae,Be(te._payload),le)}if(je(te)||j(te))return te=Xa(te,ae.mode,le,null),te.return=ae,te;uu(ae,te)}return null}function xe(ae,te,le,Be){var $e=te!==null?te.key:null;if(typeof le=="string"&&le!==""||typeof le=="number")return $e!==null?null:Y(ae,te,""+le,Be);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case B:return le.key===$e?K(ae,te,le,Be):null;case T:return le.key===$e?de(ae,te,le,Be):null;case q:return $e=le._init,xe(ae,te,$e(le._payload),Be)}if(je(le)||j(le))return $e!==null?null:Ie(ae,te,le,Be,null);uu(ae,le)}return null}function He(ae,te,le,Be,$e){if(typeof Be=="string"&&Be!==""||typeof Be=="number")return ae=ae.get(le)||null,Y(te,ae,""+Be,$e);if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case B:return ae=ae.get(Be.key===null?le:Be.key)||null,K(te,ae,Be,$e);case T:return ae=ae.get(Be.key===null?le:Be.key)||null,de(te,ae,Be,$e);case q:var it=Be._init;return He(ae,te,le,it(Be._payload),$e)}if(je(Be)||j(Be))return ae=ae.get(le)||null,Ie(te,ae,Be,$e,null);uu(te,Be)}return null}function Je(ae,te,le,Be){for(var $e=null,it=null,st=te,ct=te=0,Z0=null;st!==null&&ct<le.length;ct++){st.index>ct?(Z0=st,st=null):Z0=st.sibling;var Pt=xe(ae,st,le[ct],Be);if(Pt===null){st===null&&(st=Z0);break}a&&st&&Pt.alternate===null&&c(ae,st),te=b(Pt,te,ct),it===null?$e=Pt:it.sibling=Pt,it=Pt,st=Z0}if(ct===le.length)return f(ae,st),o0&&za(ae,ct),$e;if(st===null){for(;ct<le.length;ct++)st=Me(ae,le[ct],Be),st!==null&&(te=b(st,te,ct),it===null?$e=st:it.sibling=st,it=st);return o0&&za(ae,ct),$e}for(st=y(ae,st);ct<le.length;ct++)Z0=He(st,ae,ct,le[ct],Be),Z0!==null&&(a&&Z0.alternate!==null&&st.delete(Z0.key===null?ct:Z0.key),te=b(Z0,te,ct),it===null?$e=Z0:it.sibling=Z0,it=Z0);return a&&st.forEach(function(Zs){return c(ae,Zs)}),o0&&za(ae,ct),$e}function Ke(ae,te,le,Be){var $e=j(le);if(typeof $e!="function")throw Error(t(150));if(le=$e.call(le),le==null)throw Error(t(151));for(var it=$e=null,st=te,ct=te=0,Z0=null,Pt=le.next();st!==null&&!Pt.done;ct++,Pt=le.next()){st.index>ct?(Z0=st,st=null):Z0=st.sibling;var Zs=xe(ae,st,Pt.value,Be);if(Zs===null){st===null&&(st=Z0);break}a&&st&&Zs.alternate===null&&c(ae,st),te=b(Zs,te,ct),it===null?$e=Zs:it.sibling=Zs,it=Zs,st=Z0}if(Pt.done)return f(ae,st),o0&&za(ae,ct),$e;if(st===null){for(;!Pt.done;ct++,Pt=le.next())Pt=Me(ae,Pt.value,Be),Pt!==null&&(te=b(Pt,te,ct),it===null?$e=Pt:it.sibling=Pt,it=Pt);return o0&&za(ae,ct),$e}for(st=y(ae,st);!Pt.done;ct++,Pt=le.next())Pt=He(st,ae,ct,Pt.value,Be),Pt!==null&&(a&&Pt.alternate!==null&&st.delete(Pt.key===null?ct:Pt.key),te=b(Pt,te,ct),it===null?$e=Pt:it.sibling=Pt,it=Pt);return a&&st.forEach(function(Wk){return c(ae,Wk)}),o0&&za(ae,ct),$e}function E0(ae,te,le,Be){if(typeof le=="object"&&le!==null&&le.type===M&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case B:e:{for(var $e=le.key,it=te;it!==null;){if(it.key===$e){if($e=le.type,$e===M){if(it.tag===7){f(ae,it.sibling),te=I(it,le.props.children),te.return=ae,ae=te;break e}}else if(it.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===q&&Kv($e)===it.type){f(ae,it.sibling),te=I(it,le.props),te.ref=M2(ae,it,le),te.return=ae,ae=te;break e}f(ae,it);break}else c(ae,it);it=it.sibling}le.type===M?(te=Xa(le.props.children,ae.mode,Be,le.key),te.return=ae,ae=te):(Be=Nu(le.type,le.key,le.props,null,ae.mode,Be),Be.ref=M2(ae,te,le),Be.return=ae,ae=Be)}return N(ae);case T:e:{for(it=le.key;te!==null;){if(te.key===it)if(te.tag===4&&te.stateNode.containerInfo===le.containerInfo&&te.stateNode.implementation===le.implementation){f(ae,te.sibling),te=I(te,le.children||[]),te.return=ae,ae=te;break e}else{f(ae,te);break}else c(ae,te);te=te.sibling}te=o6(le,ae.mode,Be),te.return=ae,ae=te}return N(ae);case q:return it=le._init,E0(ae,te,it(le._payload),Be)}if(je(le))return Je(ae,te,le,Be);if(j(le))return Ke(ae,te,le,Be);uu(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,te!==null&&te.tag===6?(f(ae,te.sibling),te=I(te,le),te.return=ae,ae=te):(f(ae,te),te=a6(le,ae.mode,Be),te.return=ae,ae=te),N(ae)):f(ae,te)}return E0}var N1=Zv(!0),$v=Zv(!1),hu=zs(null),du=null,P1=null,g5=null;function m5(){g5=P1=du=null}function v5(a){var c=hu.current;r0(hu),a._currentValue=c}function _5(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 U1(a,c){du=a,g5=P1=null,a=a.dependencies,a!==null&&a.firstContext!==null&&(a.lanes&c&&(Gr=!0),a.firstContext=null)}function Sn(a){var c=a._currentValue;if(g5!==a)if(a={context:a,memoizedValue:c,next:null},P1===null){if(du===null)throw Error(t(308));P1=a,du.dependencies={lanes:0,firstContext:a}}else P1=P1.next=a;return c}var Ga=null;function y5(a){Ga===null?Ga=[a]:Ga.push(a)}function e_(a,c,f,y){var I=c.interleaved;return I===null?(f.next=f,y5(c)):(f.next=I.next,I.next=f),c.interleaved=f,Ji(a,y)}function Ji(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 Vs=!1;function E5(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function t_(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 Ki(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function js(a,c,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,Nt&2){var I=y.pending;return I===null?c.next=c:(c.next=I.next,I.next=c),y.pending=c,Ji(a,f)}return I=y.interleaved,I===null?(c.next=c,y5(y)):(c.next=I.next,I.next=c),y.interleaved=c,Ji(a,f)}function fu(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,Mr(a,f)}}function r_(a,c){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var I=null,b=null;if(f=f.firstBaseUpdate,f!==null){do{var N={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};b===null?I=b=N:b=b.next=N,f=f.next}while(f!==null);b===null?I=b=c:b=b.next=c}else I=b=c;f={baseState:y.baseState,firstBaseUpdate:I,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 pu(a,c,f,y){var I=a.updateQueue;Vs=!1;var b=I.firstBaseUpdate,N=I.lastBaseUpdate,Y=I.shared.pending;if(Y!==null){I.shared.pending=null;var K=Y,de=K.next;K.next=null,N===null?b=de:N.next=de,N=K;var Ie=a.alternate;Ie!==null&&(Ie=Ie.updateQueue,Y=Ie.lastBaseUpdate,Y!==N&&(Y===null?Ie.firstBaseUpdate=de:Y.next=de,Ie.lastBaseUpdate=K))}if(b!==null){var Me=I.baseState;N=0,Ie=de=K=null,Y=b;do{var xe=Y.lane,He=Y.eventTime;if((y&xe)===xe){Ie!==null&&(Ie=Ie.next={eventTime:He,lane:0,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null});e:{var Je=a,Ke=Y;switch(xe=c,He=f,Ke.tag){case 1:if(Je=Ke.payload,typeof Je=="function"){Me=Je.call(He,Me,xe);break e}Me=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=Ke.payload,xe=typeof Je=="function"?Je.call(He,Me,xe):Je,xe==null)break e;Me=$({},Me,xe);break e;case 2:Vs=!0}}Y.callback!==null&&Y.lane!==0&&(a.flags|=64,xe=I.effects,xe===null?I.effects=[Y]:xe.push(Y))}else He={eventTime:He,lane:xe,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},Ie===null?(de=Ie=He,K=Me):Ie=Ie.next=He,N|=xe;if(Y=Y.next,Y===null){if(Y=I.shared.pending,Y===null)break;xe=Y,Y=xe.next,xe.next=null,I.lastBaseUpdate=xe,I.shared.pending=null}}while(1);if(Ie===null&&(K=Me),I.baseState=K,I.firstBaseUpdate=de,I.lastBaseUpdate=Ie,c=I.shared.interleaved,c!==null){I=c;do N|=I.lane,I=I.next;while(I!==c)}else b===null&&(I.shared.lanes=0);ja|=N,a.lanes=N,a.memoizedState=Me}}function n_(a,c,f){if(a=c.effects,c.effects=null,a!==null)for(c=0;c<a.length;c++){var y=a[c],I=y.callback;if(I!==null){if(y.callback=null,y=f,typeof I!="function")throw Error(t(191,I));I.call(y)}}}var S2={},fi=zs(S2),T2=zs(S2),B2=zs(S2);function Ha(a){if(a===S2)throw Error(t(174));return a}function x5(a,c){switch(Zt(B2,c),Zt(T2,a),Zt(fi,S2),a=c.nodeType,a){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:Ye(null,"");break;default:a=a===8?c.parentNode:c,c=a.namespaceURI||null,a=a.tagName,c=Ye(c,a)}r0(fi),Zt(fi,c)}function k1(){r0(fi),r0(T2),r0(B2)}function i_(a){Ha(B2.current);var c=Ha(fi.current),f=Ye(c,a.type);c!==f&&(Zt(T2,a),Zt(fi,f))}function w5(a){T2.current===a&&(r0(fi),r0(T2))}var h0=zs(0);function Au(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 C5=[];function I5(){for(var a=0;a<C5.length;a++)C5[a]._workInProgressVersionPrimary=null;C5.length=0}var gu=C.ReactCurrentDispatcher,M5=C.ReactCurrentBatchConfig,Va=0,d0=null,O0=null,J0=null,mu=!1,b2=!1,R2=0,pk=0;function pr(){throw Error(t(321))}function S5(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!Hn(a[f],c[f]))return!1;return!0}function T5(a,c,f,y,I,b){if(Va=b,d0=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,gu.current=a===null||a.memoizedState===null?vk:_k,a=f(y,I),b2){b=0;do{if(b2=!1,R2=0,25<=b)throw Error(t(301));b+=1,J0=O0=null,c.updateQueue=null,gu.current=yk,a=f(y,I)}while(b2)}if(gu.current=yu,c=O0!==null&&O0.next!==null,Va=0,J0=O0=d0=null,mu=!1,c)throw Error(t(300));return a}function B5(){var a=R2!==0;return R2=0,a}function pi(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return J0===null?d0.memoizedState=J0=a:J0=J0.next=a,J0}function Tn(){if(O0===null){var a=d0.alternate;a=a!==null?a.memoizedState:null}else a=O0.next;var c=J0===null?d0.memoizedState:J0.next;if(c!==null)J0=c,O0=a;else{if(a===null)throw Error(t(310));O0=a,a={memoizedState:O0.memoizedState,baseState:O0.baseState,baseQueue:O0.baseQueue,queue:O0.queue,next:null},J0===null?d0.memoizedState=J0=a:J0=J0.next=a}return J0}function D2(a,c){return typeof c=="function"?c(a):c}function b5(a){var c=Tn(),f=c.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=a;var y=O0,I=y.baseQueue,b=f.pending;if(b!==null){if(I!==null){var N=I.next;I.next=b.next,b.next=N}y.baseQueue=I=b,f.pending=null}if(I!==null){b=I.next,y=y.baseState;var Y=N=null,K=null,de=b;do{var Ie=de.lane;if((Va&Ie)===Ie)K!==null&&(K=K.next={lane:0,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),y=de.hasEagerState?de.eagerState:a(y,de.action);else{var Me={lane:Ie,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null};K===null?(Y=K=Me,N=y):K=K.next=Me,d0.lanes|=Ie,ja|=Ie}de=de.next}while(de!==null&&de!==b);K===null?N=y:K.next=Y,Hn(y,c.memoizedState)||(Gr=!0),c.memoizedState=y,c.baseState=N,c.baseQueue=K,f.lastRenderedState=y}if(a=f.interleaved,a!==null){I=a;do b=I.lane,d0.lanes|=b,ja|=b,I=I.next;while(I!==a)}else I===null&&(f.lanes=0);return[c.memoizedState,f.dispatch]}function R5(a){var c=Tn(),f=c.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=a;var y=f.dispatch,I=f.pending,b=c.memoizedState;if(I!==null){f.pending=null;var N=I=I.next;do b=a(b,N.action),N=N.next;while(N!==I);Hn(b,c.memoizedState)||(Gr=!0),c.memoizedState=b,c.baseQueue===null&&(c.baseState=b),f.lastRenderedState=b}return[b,y]}function s_(){}function a_(a,c){var f=d0,y=Tn(),I=c(),b=!Hn(y.memoizedState,I);if(b&&(y.memoizedState=I,Gr=!0),y=y.queue,D5(c_.bind(null,f,y,a),[a]),y.getSnapshot!==c||b||J0!==null&&J0.memoizedState.tag&1){if(f.flags|=2048,L2(9,l_.bind(null,f,y,I,c),void 0,null),K0===null)throw Error(t(349));Va&30||o_(f,c,I)}return I}function o_(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=d0.updateQueue,c===null?(c={lastEffect:null,stores:null},d0.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function l_(a,c,f,y){c.value=f,c.getSnapshot=y,u_(c)&&h_(a)}function c_(a,c,f){return f(function(){u_(c)&&h_(a)})}function u_(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!Hn(a,f)}catch{return!0}}function h_(a){var c=Ji(a,1);c!==null&&qn(c,a,1,-1)}function d_(a){var c=pi();return typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:D2,lastRenderedState:a},c.queue=a,a=a.dispatch=mk.bind(null,d0,a),[c.memoizedState,a]}function L2(a,c,f,y){return a={tag:a,create:c,destroy:f,deps:y,next:null},c=d0.updateQueue,c===null?(c={lastEffect:null,stores:null},d0.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 f_(){return Tn().memoizedState}function vu(a,c,f,y){var I=pi();d0.flags|=a,I.memoizedState=L2(1|c,f,void 0,y===void 0?null:y)}function _u(a,c,f,y){var I=Tn();y=y===void 0?null:y;var b=void 0;if(O0!==null){var N=O0.memoizedState;if(b=N.destroy,y!==null&&S5(y,N.deps)){I.memoizedState=L2(c,f,b,y);return}}d0.flags|=a,I.memoizedState=L2(1|c,f,b,y)}function p_(a,c){return vu(8390656,8,a,c)}function D5(a,c){return _u(2048,8,a,c)}function A_(a,c){return _u(4,2,a,c)}function g_(a,c){return _u(4,4,a,c)}function m_(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 v_(a,c,f){return f=f!=null?f.concat([a]):null,_u(4,4,m_.bind(null,c,a),f)}function L5(){}function __(a,c){var f=Tn();c=c===void 0?null:c;var y=f.memoizedState;return y!==null&&c!==null&&S5(c,y[1])?y[0]:(f.memoizedState=[a,c],a)}function y_(a,c){var f=Tn();c=c===void 0?null:c;var y=f.memoizedState;return y!==null&&c!==null&&S5(c,y[1])?y[0]:(a=a(),f.memoizedState=[a,c],a)}function E_(a,c,f){return Va&21?(Hn(f,c)||(f=Xt(),d0.lanes|=f,ja|=f,a.baseState=!0),c):(a.baseState&&(a.baseState=!1,Gr=!0),a.memoizedState=f)}function Ak(a,c){var f=Lt;Lt=f!==0&&4>f?f:4,a(!0);var y=M5.transition;M5.transition={};try{a(!1),c()}finally{Lt=f,M5.transition=y}}function x_(){return Tn().memoizedState}function gk(a,c,f){var y=Xs(a);if(f={lane:y,action:f,hasEagerState:!1,eagerState:null,next:null},w_(a))C_(c,f);else if(f=e_(a,c,f,y),f!==null){var I=Tr();qn(f,a,y,I),I_(f,c,y)}}function mk(a,c,f){var y=Xs(a),I={lane:y,action:f,hasEagerState:!1,eagerState:null,next:null};if(w_(a))C_(c,I);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=c.lastRenderedReducer,b!==null))try{var N=c.lastRenderedState,Y=b(N,f);if(I.hasEagerState=!0,I.eagerState=Y,Hn(Y,N)){var K=c.interleaved;K===null?(I.next=I,y5(c)):(I.next=K.next,K.next=I),c.interleaved=I;return}}catch{}finally{}f=e_(a,c,I,y),f!==null&&(I=Tr(),qn(f,a,y,I),I_(f,c,y))}}function w_(a){var c=a.alternate;return a===d0||c!==null&&c===d0}function C_(a,c){b2=mu=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function I_(a,c,f){if(f&4194240){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,Mr(a,f)}}var yu={readContext:Sn,useCallback:pr,useContext:pr,useEffect:pr,useImperativeHandle:pr,useInsertionEffect:pr,useLayoutEffect:pr,useMemo:pr,useReducer:pr,useRef:pr,useState:pr,useDebugValue:pr,useDeferredValue:pr,useTransition:pr,useMutableSource:pr,useSyncExternalStore:pr,useId:pr,unstable_isNewReconciler:!1},vk={readContext:Sn,useCallback:function(a,c){return pi().memoizedState=[a,c===void 0?null:c],a},useContext:Sn,useEffect:p_,useImperativeHandle:function(a,c,f){return f=f!=null?f.concat([a]):null,vu(4194308,4,m_.bind(null,c,a),f)},useLayoutEffect:function(a,c){return vu(4194308,4,a,c)},useInsertionEffect:function(a,c){return vu(4,2,a,c)},useMemo:function(a,c){var f=pi();return c=c===void 0?null:c,a=a(),f.memoizedState=[a,c],a},useReducer:function(a,c,f){var y=pi();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=gk.bind(null,d0,a),[y.memoizedState,a]},useRef:function(a){var c=pi();return a={current:a},c.memoizedState=a},useState:d_,useDebugValue:L5,useDeferredValue:function(a){return pi().memoizedState=a},useTransition:function(){var a=d_(!1),c=a[0];return a=Ak.bind(null,a[1]),pi().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,f){var y=d0,I=pi();if(o0){if(f===void 0)throw Error(t(407));f=f()}else{if(f=c(),K0===null)throw Error(t(349));Va&30||o_(y,c,f)}I.memoizedState=f;var b={value:f,getSnapshot:c};return I.queue=b,p_(c_.bind(null,y,b,a),[a]),y.flags|=2048,L2(9,l_.bind(null,y,b,f,c),void 0,null),f},useId:function(){var a=pi(),c=K0.identifierPrefix;if(o0){var f=Xi,y=qi;f=(y&~(1<<32-_t(y)-1)).toString(32)+f,c=":"+c+"R"+f,f=R2++,0<f&&(c+="H"+f.toString(32)),c+=":"}else f=pk++,c=":"+c+"r"+f.toString(32)+":";return a.memoizedState=c},unstable_isNewReconciler:!1},_k={readContext:Sn,useCallback:__,useContext:Sn,useEffect:D5,useImperativeHandle:v_,useInsertionEffect:A_,useLayoutEffect:g_,useMemo:y_,useReducer:b5,useRef:f_,useState:function(){return b5(D2)},useDebugValue:L5,useDeferredValue:function(a){var c=Tn();return E_(c,O0.memoizedState,a)},useTransition:function(){var a=b5(D2)[0],c=Tn().memoizedState;return[a,c]},useMutableSource:s_,useSyncExternalStore:a_,useId:x_,unstable_isNewReconciler:!1},yk={readContext:Sn,useCallback:__,useContext:Sn,useEffect:D5,useImperativeHandle:v_,useInsertionEffect:A_,useLayoutEffect:g_,useMemo:y_,useReducer:R5,useRef:f_,useState:function(){return R5(D2)},useDebugValue:L5,useDeferredValue:function(a){var c=Tn();return O0===null?c.memoizedState=a:E_(c,O0.memoizedState,a)},useTransition:function(){var a=R5(D2)[0],c=Tn().memoizedState;return[a,c]},useMutableSource:s_,useSyncExternalStore:a_,useId:x_,unstable_isNewReconciler:!1};function jn(a,c){if(a&&a.defaultProps){c=$({},c),a=a.defaultProps;for(var f in a)c[f]===void 0&&(c[f]=a[f]);return c}return c}function N5(a,c,f,y){c=a.memoizedState,f=f(y,c),f=f==null?c:$({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Eu={isMounted:function(a){return(a=a._reactInternals)?ui(a)===a:!1},enqueueSetState:function(a,c,f){a=a._reactInternals;var y=Tr(),I=Xs(a),b=Ki(y,I);b.payload=c,f!=null&&(b.callback=f),c=js(a,b,I),c!==null&&(qn(c,a,I,y),fu(c,a,I))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var y=Tr(),I=Xs(a),b=Ki(y,I);b.tag=1,b.payload=c,f!=null&&(b.callback=f),c=js(a,b,I),c!==null&&(qn(c,a,I,y),fu(c,a,I))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=Tr(),y=Xs(a),I=Ki(f,y);I.tag=2,c!=null&&(I.callback=c),c=js(a,I,y),c!==null&&(qn(c,a,y,f),fu(c,a,y))}};function M_(a,c,f,y,I,b,N){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,b,N):c.prototype&&c.prototype.isPureReactComponent?!_2(f,y)||!_2(I,b):!0}function S_(a,c,f){var y=!1,I=Gs,b=c.contextType;return typeof b=="object"&&b!==null?b=Sn(b):(I=zr(c)?Fa:fr.current,y=c.contextTypes,b=(y=y!=null)?b1(a,I):Gs),c=new c(f,b),a.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Eu,a.stateNode=c,c._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=I,a.__reactInternalMemoizedMaskedChildContext=b),c}function T_(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&&Eu.enqueueReplaceState(c,c.state,null)}function P5(a,c,f,y){var I=a.stateNode;I.props=f,I.state=a.memoizedState,I.refs={},E5(a);var b=c.contextType;typeof b=="object"&&b!==null?I.context=Sn(b):(b=zr(c)?Fa:fr.current,I.context=b1(a,b)),I.state=a.memoizedState,b=c.getDerivedStateFromProps,typeof b=="function"&&(N5(a,c,b,f),I.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(c=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),c!==I.state&&Eu.enqueueReplaceState(I,I.state,null),pu(a,f,I,y),I.state=a.memoizedState),typeof I.componentDidMount=="function"&&(a.flags|=4194308)}function Q1(a,c){try{var f="",y=c;do f+=ce(y),y=y.return;while(y);var I=f}catch(b){I=`
|
|
4726
4726
|
Error generating stack: `+b.message+`
|
|
4727
|
-
`+b.stack}return{value:a,source:c,stack:I,digest:null}}function U5(a,c,f){return{value:a,source:null,stack:f??null,digest:c??null}}function k5(a,c){try{console.error(c.value)}catch(f){setTimeout(function(){throw f})}}var Ek=typeof WeakMap=="function"?WeakMap:Map;function B_(a,c,f){f=Ki(-1,f),f.tag=3,f.payload={element:null};var y=c.value;return f.callback=function(){Tu||(Tu=!0,Z5=y),k5(a,c)},f}function b_(a,c,f){f=Ki(-1,f),f.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var I=c.value;f.payload=function(){return y(I)},f.callback=function(){k5(a,c)}}var b=a.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(f.callback=function(){k5(a,c),typeof y!="function"&&(Ys===null?Ys=new Set([this]):Ys.add(this));var N=c.stack;this.componentDidCatch(c.value,{componentStack:N!==null?N:""})}),f}function R_(a,c,f){var y=a.pingCache;if(y===null){y=a.pingCache=new Ek;var I=new Set;y.set(c,I)}else I=y.get(c),I===void 0&&(I=new Set,y.set(c,I));I.has(f)||(I.add(f),a=Pk.bind(null,a,c,f),c.then(a,a))}function D_(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 L_(a,c,f,y,I){return a.mode&1?(a.flags|=65536,a.lanes=I,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=Ki(-1,1),c.tag=2,js(f,c,1))),f.lanes|=1),a)}var xk=C.ReactCurrentOwner,Gr=!1;function Sr(a,c,f,y){c.child=a===null?$v(c,null,f,y):N1(c,a.child,f,y)}function N_(a,c,f,y,I){f=f.render;var b=c.ref;return U1(c,I),y=T5(a,c,f,y,b,I),f=B5(),a!==null&&!Gr?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~I,Zi(a,c,I)):(o0&&f&&h5(c),c.flags|=1,Sr(a,c,y,I),c.child)}function P_(a,c,f,y,I){if(a===null){var b=f.type;return typeof b=="function"&&!s6(b)&&b.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(c.tag=15,c.type=b,U_(a,c,b,y,I)):(a=Nu(f.type,null,y,c,c.mode,I),a.ref=c.ref,a.return=c,c.child=a)}if(b=a.child,!(a.lanes&I)){var N=b.memoizedProps;if(f=f.compare,f=f!==null?f:_2,f(N,y)&&a.ref===c.ref)return Zi(a,c,I)}return c.flags|=1,a=Ks(b,y),a.ref=c.ref,a.return=c,c.child=a}function U_(a,c,f,y,I){if(a!==null){var b=a.memoizedProps;if(_2(b,y)&&a.ref===c.ref)if(Gr=!1,c.pendingProps=y=b,(a.lanes&I)!==0)a.flags&131072&&(Gr=!0);else return c.lanes=a.lanes,Zi(a,c,I)}return Q5(a,c,f,y,I)}function k_(a,c,f){var y=c.pendingProps,I=y.children,b=a!==null?a.memoizedState:null;if(y.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(O1,cn),cn|=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,Zt(O1,cn),cn|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=b!==null?b.baseLanes:f,Zt(O1,cn),cn|=y}else b!==null?(y=b.baseLanes|f,c.memoizedState=null):y=f,Zt(O1,cn),cn|=y;return Sr(a,c,I,f),c.child}function Q_(a,c){var f=c.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(c.flags|=512,c.flags|=2097152)}function Q5(a,c,f,y,I){var b=zr(f)?Fa:fr.current;return b=b1(c,b),U1(c,I),f=T5(a,c,f,y,b,I),y=B5(),a!==null&&!Gr?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~I,Zi(a,c,I)):(o0&&y&&h5(c),c.flags|=1,Sr(a,c,f,I),c.child)}function F_(a,c,f,y,I){if(zr(f)){var b=!0;su(c)}else b=!1;if(U1(c,I),c.stateNode===null)wu(a,c),S_(c,f,y),P5(c,f,y,I),y=!0;else if(a===null){var N=c.stateNode,Y=c.memoizedProps;N.props=Y;var K=N.context,he=f.contextType;typeof he=="object"&&he!==null?he=Sn(he):(he=zr(f)?Fa:fr.current,he=b1(c,he));var Ie=f.getDerivedStateFromProps,Me=typeof Ie=="function"||typeof N.getSnapshotBeforeUpdate=="function";Me||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Y!==y||K!==he)&&T_(c,N,y,he),Vs=!1;var xe=c.memoizedState;N.state=xe,pu(c,y,N,I),K=c.memoizedState,Y!==y||xe!==K||Or.current||Vs?(typeof Ie=="function"&&(N5(c,f,Ie,y),K=c.memoizedState),(Y=Vs||M_(c,f,Y,y,xe,K,he))?(Me||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(c.flags|=4194308)):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=K),N.props=y,N.state=K,N.context=he,y=Y):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{N=c.stateNode,t_(a,c),Y=c.memoizedProps,he=c.type===c.elementType?Y:jn(c.type,Y),N.props=he,Me=c.pendingProps,xe=N.context,K=f.contextType,typeof K=="object"&&K!==null?K=Sn(K):(K=zr(f)?Fa:fr.current,K=b1(c,K));var He=f.getDerivedStateFromProps;(Ie=typeof He=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Y!==Me||xe!==K)&&T_(c,N,y,K),Vs=!1,xe=c.memoizedState,N.state=xe,pu(c,y,N,I);var Je=c.memoizedState;Y!==Me||xe!==Je||Or.current||Vs?(typeof He=="function"&&(N5(c,f,He,y),Je=c.memoizedState),(he=Vs||M_(c,f,he,y,xe,Je,K)||!1)?(Ie||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(y,Je,K),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(y,Je,K)),typeof N.componentDidUpdate=="function"&&(c.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof N.componentDidUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=Je),N.props=y,N.state=Je,N.context=K,y=he):(typeof N.componentDidUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),y=!1)}return F5(a,c,f,y,b,I)}function F5(a,c,f,y,I,b){Q_(a,c);var N=(c.flags&128)!==0;if(!y&&!N)return I&&Vv(c,f,!1),Zi(a,c,b);y=c.stateNode,xk.current=c;var Y=N&&typeof f.getDerivedStateFromError!="function"?null:y.render();return c.flags|=1,a!==null&&N?(c.child=N1(c,a.child,null,b),c.child=N1(c,null,Y,b)):Sr(a,c,Y,b),c.memoizedState=y.state,I&&Vv(c,f,!0),c.child}function O_(a){var c=a.stateNode;c.pendingContext?Gv(a,c.pendingContext,c.pendingContext!==c.context):c.context&&Gv(a,c.context,!1),x5(a,c.containerInfo)}function z_(a,c,f,y,I){return L1(),A5(I),c.flags|=256,Sr(a,c,f,y),c.child}var O5={dehydrated:null,treeContext:null,retryLane:0};function z5(a){return{baseLanes:a,cachePool:null,transitions:null}}function G_(a,c,f){var y=c.pendingProps,I=h0.current,b=!1,N=(c.flags&128)!==0,Y;if((Y=N)||(Y=a!==null&&a.memoizedState===null?!1:(I&2)!==0),Y?(b=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(I|=1),Zt(h0,I&1),a===null)return p5(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):(N=y.children,a=y.fallback,b?(y=c.mode,b=c.child,N={mode:"hidden",children:N},!(y&1)&&b!==null?(b.childLanes=0,b.pendingProps=N):b=Pu(N,y,0,null),a=Xa(a,y,f,null),b.return=c,a.return=c,b.sibling=a,c.child=b,c.child.memoizedState=z5(f),c.memoizedState=O5,a):G5(c,N));if(I=a.memoizedState,I!==null&&(Y=I.dehydrated,Y!==null))return wk(a,c,N,y,Y,I,f);if(b){b=y.fallback,N=c.mode,I=a.child,Y=I.sibling;var K={mode:"hidden",children:y.children};return!(N&1)&&c.child!==I?(y=c.child,y.childLanes=0,y.pendingProps=K,c.deletions=null):(y=Ks(I,K),y.subtreeFlags=I.subtreeFlags&14680064),Y!==null?b=Ks(Y,b):(b=Xa(b,N,f,null),b.flags|=2),b.return=c,y.return=c,y.sibling=b,c.child=y,y=b,b=c.child,N=a.child.memoizedState,N=N===null?z5(f):{baseLanes:N.baseLanes|f,cachePool:null,transitions:N.transitions},b.memoizedState=N,b.childLanes=a.childLanes&~f,c.memoizedState=O5,y}return b=a.child,a=b.sibling,y=Ks(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 G5(a,c){return c=Pu({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function xu(a,c,f,y){return y!==null&&A5(y),N1(c,a.child,null,f),a=G5(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function wk(a,c,f,y,I,b,N){if(f)return c.flags&256?(c.flags&=-257,y=U5(Error(t(422))),xu(a,c,N,y)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(b=y.fallback,I=c.mode,y=Pu({mode:"visible",children:y.children},I,0,null),b=Xa(b,I,N,null),b.flags|=2,y.return=c,b.return=c,y.sibling=b,c.child=y,c.mode&1&&N1(c,a.child,null,N),c.child.memoizedState=z5(N),c.memoizedState=O5,b);if(!(c.mode&1))return xu(a,c,N,null);if(I.data==="$!"){if(y=I.nextSibling&&I.nextSibling.dataset,y)var Y=y.dgst;return y=Y,b=Error(t(419)),y=U5(b,y,void 0),xu(a,c,N,y)}if(Y=(N&a.childLanes)!==0,Gr||Y){if(y=K0,y!==null){switch(N&-N){case 4:I=2;break;case 16:I=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:I=32;break;case 536870912:I=268435456;break;default:I=0}I=I&(y.suspendedLanes|N)?0:I,I!==0&&I!==b.retryLane&&(b.retryLane=I,Ji(a,I),qn(y,a,I,-1))}return i6(),y=U5(Error(t(421))),xu(a,c,N,y)}return I.data==="$?"?(c.flags|=128,c.child=a.child,c=Uk.bind(null,a),I._reactRetry=c,null):(a=b.treeContext,ln=Os(I.nextSibling),on=c,o0=!0,Vn=null,a!==null&&(In[Mn++]=qi,In[Mn++]=Xi,In[Mn++]=Oa,qi=a.id,Xi=a.overflow,Oa=c),c=G5(c,y.children),c.flags|=4096,c)}function H_(a,c,f){a.lanes|=c;var y=a.alternate;y!==null&&(y.lanes|=c),_5(a.return,c,f)}function H5(a,c,f,y,I){var b=a.memoizedState;b===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:I}:(b.isBackwards=c,b.rendering=null,b.renderingStartTime=0,b.last=y,b.tail=f,b.tailMode=I)}function V_(a,c,f){var y=c.pendingProps,I=y.revealOrder,b=y.tail;if(Sr(a,c,y.children,f),y=h0.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&&H_(a,f,c);else if(a.tag===19)H_(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(Zt(h0,y),!(c.mode&1))c.memoizedState=null;else switch(I){case"forwards":for(f=c.child,I=null;f!==null;)a=f.alternate,a!==null&&Au(a)===null&&(I=f),f=f.sibling;f=I,f===null?(I=c.child,c.child=null):(I=f.sibling,f.sibling=null),H5(c,!1,I,f,b);break;case"backwards":for(f=null,I=c.child,c.child=null;I!==null;){if(a=I.alternate,a!==null&&Au(a)===null){c.child=I;break}a=I.sibling,I.sibling=f,f=I,I=a}H5(c,!0,f,null,b);break;case"together":H5(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function wu(a,c){!(c.mode&1)&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function Zi(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),ja|=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=Ks(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=Ks(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function Ck(a,c,f){switch(c.tag){case 3:O_(c),L1();break;case 5:i_(c);break;case 1:zr(c.type)&&su(c);break;case 4:x5(c,c.stateNode.containerInfo);break;case 10:var y=c.type._context,I=c.memoizedProps.value;Zt(hu,y._currentValue),y._currentValue=I;break;case 13:if(y=c.memoizedState,y!==null)return y.dehydrated!==null?(Zt(h0,h0.current&1),c.flags|=128,null):f&c.child.childLanes?G_(a,c,f):(Zt(h0,h0.current&1),a=Zi(a,c,f),a!==null?a.sibling:null);Zt(h0,h0.current&1);break;case 19:if(y=(f&c.childLanes)!==0,a.flags&128){if(y)return V_(a,c,f);c.flags|=128}if(I=c.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Zt(h0,h0.current),y)break;return null;case 22:case 23:return c.lanes=0,k_(a,c,f)}return Zi(a,c,f)}var j_,V5,W_,Y_;j_=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}},V5=function(){},W_=function(a,c,f,y){var I=a.memoizedProps;if(I!==y){a=c.stateNode,Ha(fi.current);var b=null;switch(f){case"input":I=X(a,I),y=X(a,y),b=[];break;case"select":I=$({},I,{value:void 0}),y=$({},y,{value:void 0}),b=[];break;case"textarea":I=U(a,I),y=U(a,y),b=[];break;default:typeof I.onClick!="function"&&typeof y.onClick=="function"&&(a.onclick=ru)}nt(f,y);var N;f=null;for(he in I)if(!y.hasOwnProperty(he)&&I.hasOwnProperty(he)&&I[he]!=null)if(he==="style"){var Y=I[he];for(N in Y)Y.hasOwnProperty(N)&&(f||(f={}),f[N]="")}else he!=="dangerouslySetInnerHTML"&&he!=="children"&&he!=="suppressContentEditableWarning"&&he!=="suppressHydrationWarning"&&he!=="autoFocus"&&(i.hasOwnProperty(he)?b||(b=[]):(b=b||[]).push(he,null));for(he in y){var K=y[he];if(Y=I!=null?I[he]:void 0,y.hasOwnProperty(he)&&K!==Y&&(K!=null||Y!=null))if(he==="style")if(Y){for(N in Y)!Y.hasOwnProperty(N)||K&&K.hasOwnProperty(N)||(f||(f={}),f[N]="");for(N in K)K.hasOwnProperty(N)&&Y[N]!==K[N]&&(f||(f={}),f[N]=K[N])}else f||(b||(b=[]),b.push(he,f)),f=K;else he==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,Y=Y?Y.__html:void 0,K!=null&&Y!==K&&(b=b||[]).push(he,K)):he==="children"?typeof K!="string"&&typeof K!="number"||(b=b||[]).push(he,""+K):he!=="suppressContentEditableWarning"&&he!=="suppressHydrationWarning"&&(i.hasOwnProperty(he)?(K!=null&&he==="onScroll"&&t0("scroll",a),b||Y===K||(b=[])):(b=b||[]).push(he,K))}f&&(b=b||[]).push("style",f);var he=b;(c.updateQueue=he)&&(c.flags|=4)}},Y_=function(a,c,f,y){f!==y&&(c.flags|=4)};function N2(a,c){if(!o0)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 Ar(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(c)for(var I=a.child;I!==null;)f|=I.lanes|I.childLanes,y|=I.subtreeFlags&14680064,y|=I.flags&14680064,I.return=a,I=I.sibling;else for(I=a.child;I!==null;)f|=I.lanes|I.childLanes,y|=I.subtreeFlags,y|=I.flags,I.return=a,I=I.sibling;return a.subtreeFlags|=y,a.childLanes=f,c}function Ik(a,c,f){var y=c.pendingProps;switch(d5(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ar(c),null;case 1:return zr(c.type)&&iu(),Ar(c),null;case 3:return y=c.stateNode,k1(),r0(Or),r0(fr),I5(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(cu(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&!(c.flags&256)||(c.flags|=1024,Vn!==null&&(t6(Vn),Vn=null))),V5(a,c),Ar(c),null;case 5:w5(c);var I=Ha(B2.current);if(f=c.type,a!==null&&c.stateNode!=null)W_(a,c,f,y,I),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!y){if(c.stateNode===null)throw Error(t(166));return Ar(c),null}if(a=Ha(fi.current),cu(c)){y=c.stateNode,f=c.type;var b=c.memoizedProps;switch(y[di]=c,y[C2]=b,a=(c.mode&1)!==0,f){case"dialog":t0("cancel",y),t0("close",y);break;case"iframe":case"object":case"embed":t0("load",y);break;case"video":case"audio":for(I=0;I<E2.length;I++)t0(E2[I],y);break;case"source":t0("error",y);break;case"img":case"image":case"link":t0("error",y),t0("load",y);break;case"details":t0("toggle",y);break;case"input":u0(y,b),t0("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!b.multiple},t0("invalid",y);break;case"textarea":se(y,b),t0("invalid",y)}nt(f,b),I=null;for(var N in b)if(b.hasOwnProperty(N)){var Y=b[N];N==="children"?typeof Y=="string"?y.textContent!==Y&&(b.suppressHydrationWarning!==!0&&tu(y.textContent,Y,a),I=["children",Y]):typeof Y=="number"&&y.textContent!==""+Y&&(b.suppressHydrationWarning!==!0&&tu(y.textContent,Y,a),I=["children",""+Y]):i.hasOwnProperty(N)&&Y!=null&&N==="onScroll"&&t0("scroll",y)}switch(f){case"input":wt(y),qe(y,b,!0);break;case"textarea":wt(y),Ee(y);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(y.onclick=ru)}y=I,c.updateQueue=y,y!==null&&(c.flags|=4)}else{N=I.nodeType===9?I:I.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=ve(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=N.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof y.is=="string"?a=N.createElement(f,{is:y.is}):(a=N.createElement(f),f==="select"&&(N=a,y.multiple?N.multiple=!0:y.size&&(N.size=y.size))):a=N.createElementNS(a,f),a[di]=c,a[C2]=y,j_(a,c,!1,!1),c.stateNode=a;e:{switch(N=et(f,y),f){case"dialog":t0("cancel",a),t0("close",a),I=y;break;case"iframe":case"object":case"embed":t0("load",a),I=y;break;case"video":case"audio":for(I=0;I<E2.length;I++)t0(E2[I],a);I=y;break;case"source":t0("error",a),I=y;break;case"img":case"image":case"link":t0("error",a),t0("load",a),I=y;break;case"details":t0("toggle",a),I=y;break;case"input":u0(a,y),I=X(a,y),t0("invalid",a);break;case"option":I=y;break;case"select":a._wrapperState={wasMultiple:!!y.multiple},I=$({},y,{value:void 0}),t0("invalid",a);break;case"textarea":se(a,y),I=U(a,y),t0("invalid",a);break;default:I=y}nt(f,I),Y=I;for(b in Y)if(Y.hasOwnProperty(b)){var K=Y[b];b==="style"?Le(a,K):b==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,K!=null&&Ge(a,K)):b==="children"?typeof K=="string"?(f!=="textarea"||K!=="")&&pt(a,K):typeof K=="number"&&pt(a,""+K):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(i.hasOwnProperty(b)?K!=null&&b==="onScroll"&&t0("scroll",a):K!=null&&x(a,b,K,N))}switch(f){case"input":wt(a),qe(a,y,!1);break;case"textarea":wt(a),Ee(a);break;case"option":y.value!=null&&a.setAttribute("value",""+pe(y.value));break;case"select":a.multiple=!!y.multiple,b=y.value,b!=null?z(a,!!y.multiple,b,!1):y.defaultValue!=null&&z(a,!!y.multiple,y.defaultValue,!0);break;default:typeof I.onClick=="function"&&(a.onclick=ru)}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 Ar(c),null;case 6:if(a&&c.stateNode!=null)Y_(a,c,a.memoizedProps,y);else{if(typeof y!="string"&&c.stateNode===null)throw Error(t(166));if(f=Ha(B2.current),Ha(fi.current),cu(c)){if(y=c.stateNode,f=c.memoizedProps,y[di]=c,(b=y.nodeValue!==f)&&(a=on,a!==null))switch(a.tag){case 3:tu(y.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&tu(y.nodeValue,f,(a.mode&1)!==0)}b&&(c.flags|=4)}else y=(f.nodeType===9?f:f.ownerDocument).createTextNode(y),y[di]=c,c.stateNode=y}return Ar(c),null;case 13:if(r0(h0),y=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(o0&&ln!==null&&c.mode&1&&!(c.flags&128))Jv(),L1(),c.flags|=98560,b=!1;else if(b=cu(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[di]=c}else L1(),!(c.flags&128)&&(c.memoizedState=null),c.flags|=4;Ar(c),b=!1}else Vn!==null&&(t6(Vn),Vn=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||h0.current&1?z0===0&&(z0=3):i6())),c.updateQueue!==null&&(c.flags|=4),Ar(c),null);case 4:return k1(),V5(a,c),a===null&&x2(c.stateNode.containerInfo),Ar(c),null;case 10:return v5(c.type._context),Ar(c),null;case 17:return zr(c.type)&&iu(),Ar(c),null;case 19:if(r0(h0),b=c.memoizedState,b===null)return Ar(c),null;if(y=(c.flags&128)!==0,N=b.rendering,N===null)if(y)N2(b,!1);else{if(z0!==0||a!==null&&a.flags&128)for(a=c.child;a!==null;){if(N=Au(a),N!==null){for(c.flags|=128,N2(b,!1),y=N.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,N=b.alternate,N===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=N.childLanes,b.lanes=N.lanes,b.child=N.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=N.memoizedProps,b.memoizedState=N.memoizedState,b.updateQueue=N.updateQueue,b.type=N.type,a=N.dependencies,b.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return Zt(h0,h0.current&1|2),c.child}a=a.sibling}b.tail!==null&&oe()>z1&&(c.flags|=128,y=!0,N2(b,!1),c.lanes=4194304)}else{if(!y)if(a=Au(N),a!==null){if(c.flags|=128,y=!0,f=a.updateQueue,f!==null&&(c.updateQueue=f,c.flags|=4),N2(b,!0),b.tail===null&&b.tailMode==="hidden"&&!N.alternate&&!o0)return Ar(c),null}else 2*oe()-b.renderingStartTime>z1&&f!==1073741824&&(c.flags|=128,y=!0,N2(b,!1),c.lanes=4194304);b.isBackwards?(N.sibling=c.child,c.child=N):(f=b.last,f!==null?f.sibling=N:c.child=N,b.last=N)}return b.tail!==null?(c=b.tail,b.rendering=c,b.tail=c.sibling,b.renderingStartTime=oe(),c.sibling=null,f=h0.current,Zt(h0,y?f&1|2:f&1),c):(Ar(c),null);case 22:case 23:return n6(),y=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==y&&(c.flags|=8192),y&&c.mode&1?cn&1073741824&&(Ar(c),c.subtreeFlags&6&&(c.flags|=8192)):Ar(c),null;case 24:return null;case 25:return null}throw Error(t(156,c.tag))}function Mk(a,c){switch(d5(c),c.tag){case 1:return zr(c.type)&&iu(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return k1(),r0(Or),r0(fr),I5(),a=c.flags,a&65536&&!(a&128)?(c.flags=a&-65537|128,c):null;case 5:return w5(c),null;case 13:if(r0(h0),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(t(340));L1()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return r0(h0),null;case 4:return k1(),null;case 10:return v5(c.type._context),null;case 22:case 23:return n6(),null;case 24:return null;default:return null}}var Cu=!1,gr=!1,Sk=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function F1(a,c){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(y){m0(a,c,y)}else f.current=null}function j5(a,c,f){try{f()}catch(y){m0(a,c,y)}}var q_=!1;function Tk(a,c){if(n5=Vc,a=Mv(),Xh(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 I=y.anchorOffset,b=y.focusNode;y=y.focusOffset;try{f.nodeType,b.nodeType}catch{f=null;break e}var N=0,Y=-1,K=-1,he=0,Ie=0,Me=a,xe=null;t:for(;;){for(var He;Me!==f||I!==0&&Me.nodeType!==3||(Y=N+I),Me!==b||y!==0&&Me.nodeType!==3||(K=N+y),Me.nodeType===3&&(N+=Me.nodeValue.length),(He=Me.firstChild)!==null;)xe=Me,Me=He;for(;;){if(Me===a)break t;if(xe===f&&++he===I&&(Y=N),xe===b&&++Ie===y&&(K=N),(He=Me.nextSibling)!==null)break;Me=xe,xe=Me.parentNode}Me=He}f=Y===-1||K===-1?null:{start:Y,end:K}}else f=null}f=f||{start:0,end:0}}else f=null;for(i5={focusedElem:a,selectionRange:f},Vc=!1,Xe=c;Xe!==null;)if(c=Xe,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,Xe=a;else for(;Xe!==null;){c=Xe;try{var Je=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(Je!==null){var Ke=Je.memoizedProps,E0=Je.memoizedState,ae=c.stateNode,te=ae.getSnapshotBeforeUpdate(c.elementType===c.type?Ke:jn(c.type,Ke),E0);ae.__reactInternalSnapshotBeforeUpdate=te}break;case 3:var le=c.stateNode.containerInfo;le.nodeType===1?le.textContent="":le.nodeType===9&&le.documentElement&&le.removeChild(le.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Be){m0(c,c.return,Be)}if(a=c.sibling,a!==null){a.return=c.return,Xe=a;break}Xe=c.return}return Je=q_,q_=!1,Je}function P2(a,c,f){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var I=y=y.next;do{if((I.tag&a)===a){var b=I.destroy;I.destroy=void 0,b!==void 0&&j5(c,f,b)}I=I.next}while(I!==y)}}function Iu(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 W5(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 X_(a){var c=a.alternate;c!==null&&(a.alternate=null,X_(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[di],delete c[C2],delete c[l5],delete c[uk],delete c[hk])),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 J_(a){return a.tag===5||a.tag===3||a.tag===4}function K_(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||J_(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 Y5(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=ru));else if(y!==4&&(a=a.child,a!==null))for(Y5(a,c,f),a=a.sibling;a!==null;)Y5(a,c,f),a=a.sibling}function q5(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(q5(a,c,f),a=a.sibling;a!==null;)q5(a,c,f),a=a.sibling}var ir=null,Wn=!1;function Ws(a,c,f){for(f=f.child;f!==null;)Z_(a,c,f),f=f.sibling}function Z_(a,c,f){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(at,f)}catch{}switch(f.tag){case 5:gr||F1(f,c);case 6:var y=ir,I=Wn;ir=null,Ws(a,c,f),ir=y,Wn=I,ir!==null&&(Wn?(a=ir,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):ir.removeChild(f.stateNode));break;case 18:ir!==null&&(Wn?(a=ir,f=f.stateNode,a.nodeType===8?o5(a.parentNode,f):a.nodeType===1&&o5(a,f),f2(a)):o5(ir,f.stateNode));break;case 4:y=ir,I=Wn,ir=f.stateNode.containerInfo,Wn=!0,Ws(a,c,f),ir=y,Wn=I;break;case 0:case 11:case 14:case 15:if(!gr&&(y=f.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){I=y=y.next;do{var b=I,N=b.destroy;b=b.tag,N!==void 0&&(b&2||b&4)&&j5(f,c,N),I=I.next}while(I!==y)}Ws(a,c,f);break;case 1:if(!gr&&(F1(f,c),y=f.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=f.memoizedProps,y.state=f.memoizedState,y.componentWillUnmount()}catch(Y){m0(f,c,Y)}Ws(a,c,f);break;case 21:Ws(a,c,f);break;case 22:f.mode&1?(gr=(y=gr)||f.memoizedState!==null,Ws(a,c,f),gr=y):Ws(a,c,f);break;default:Ws(a,c,f)}}function $_(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new Sk),c.forEach(function(y){var I=kk.bind(null,a,y);f.has(y)||(f.add(y),y.then(I,I))})}}function Yn(a,c){var f=c.deletions;if(f!==null)for(var y=0;y<f.length;y++){var I=f[y];try{var b=a,N=c,Y=N;e:for(;Y!==null;){switch(Y.tag){case 5:ir=Y.stateNode,Wn=!1;break e;case 3:ir=Y.stateNode.containerInfo,Wn=!0;break e;case 4:ir=Y.stateNode.containerInfo,Wn=!0;break e}Y=Y.return}if(ir===null)throw Error(t(160));Z_(b,N,I),ir=null,Wn=!1;var K=I.alternate;K!==null&&(K.return=null),I.return=null}catch(he){m0(I,c,he)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)ey(c,a),c=c.sibling}function ey(a,c){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Yn(c,a),Ai(a),y&4){try{P2(3,a,a.return),Iu(3,a)}catch(Ke){m0(a,a.return,Ke)}try{P2(5,a,a.return)}catch(Ke){m0(a,a.return,Ke)}}break;case 1:Yn(c,a),Ai(a),y&512&&f!==null&&F1(f,f.return);break;case 5:if(Yn(c,a),Ai(a),y&512&&f!==null&&F1(f,f.return),a.flags&32){var I=a.stateNode;try{pt(I,"")}catch(Ke){m0(a,a.return,Ke)}}if(y&4&&(I=a.stateNode,I!=null)){var b=a.memoizedProps,N=f!==null?f.memoizedProps:b,Y=a.type,K=a.updateQueue;if(a.updateQueue=null,K!==null)try{Y==="input"&&b.type==="radio"&&b.name!=null&&dt(I,b),et(Y,N);var he=et(Y,b);for(N=0;N<K.length;N+=2){var Ie=K[N],Me=K[N+1];Ie==="style"?Le(I,Me):Ie==="dangerouslySetInnerHTML"?Ge(I,Me):Ie==="children"?pt(I,Me):x(I,Ie,Me,he)}switch(Y){case"input":ft(I,b);break;case"textarea":_e(I,b);break;case"select":var xe=I._wrapperState.wasMultiple;I._wrapperState.wasMultiple=!!b.multiple;var He=b.value;He!=null?z(I,!!b.multiple,He,!1):xe!==!!b.multiple&&(b.defaultValue!=null?z(I,!!b.multiple,b.defaultValue,!0):z(I,!!b.multiple,b.multiple?[]:"",!1))}I[C2]=b}catch(Ke){m0(a,a.return,Ke)}}break;case 6:if(Yn(c,a),Ai(a),y&4){if(a.stateNode===null)throw Error(t(162));I=a.stateNode,b=a.memoizedProps;try{I.nodeValue=b}catch(Ke){m0(a,a.return,Ke)}}break;case 3:if(Yn(c,a),Ai(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{f2(c.containerInfo)}catch(Ke){m0(a,a.return,Ke)}break;case 4:Yn(c,a),Ai(a);break;case 13:Yn(c,a),Ai(a),I=a.child,I.flags&8192&&(b=I.memoizedState!==null,I.stateNode.isHidden=b,!b||I.alternate!==null&&I.alternate.memoizedState!==null||(K5=oe())),y&4&&$_(a);break;case 22:if(Ie=f!==null&&f.memoizedState!==null,a.mode&1?(gr=(he=gr)||Ie,Yn(c,a),gr=he):Yn(c,a),Ai(a),y&8192){if(he=a.memoizedState!==null,(a.stateNode.isHidden=he)&&!Ie&&a.mode&1)for(Xe=a,Ie=a.child;Ie!==null;){for(Me=Xe=Ie;Xe!==null;){switch(xe=Xe,He=xe.child,xe.tag){case 0:case 11:case 14:case 15:P2(4,xe,xe.return);break;case 1:F1(xe,xe.return);var Je=xe.stateNode;if(typeof Je.componentWillUnmount=="function"){y=xe,f=xe.return;try{c=y,Je.props=c.memoizedProps,Je.state=c.memoizedState,Je.componentWillUnmount()}catch(Ke){m0(y,f,Ke)}}break;case 5:F1(xe,xe.return);break;case 22:if(xe.memoizedState!==null){ny(Me);continue}}He!==null?(He.return=xe,Xe=He):ny(Me)}Ie=Ie.sibling}e:for(Ie=null,Me=a;;){if(Me.tag===5){if(Ie===null){Ie=Me;try{I=Me.stateNode,he?(b=I.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(Y=Me.stateNode,K=Me.memoizedProps.style,N=K!=null&&K.hasOwnProperty("display")?K.display:null,Y.style.display=ge("display",N))}catch(Ke){m0(a,a.return,Ke)}}}else if(Me.tag===6){if(Ie===null)try{Me.stateNode.nodeValue=he?"":Me.memoizedProps}catch(Ke){m0(a,a.return,Ke)}}else if((Me.tag!==22&&Me.tag!==23||Me.memoizedState===null||Me===a)&&Me.child!==null){Me.child.return=Me,Me=Me.child;continue}if(Me===a)break e;for(;Me.sibling===null;){if(Me.return===null||Me.return===a)break e;Ie===Me&&(Ie=null),Me=Me.return}Ie===Me&&(Ie=null),Me.sibling.return=Me.return,Me=Me.sibling}}break;case 19:Yn(c,a),Ai(a),y&4&&$_(a);break;case 21:break;default:Yn(c,a),Ai(a)}}function Ai(a){var c=a.flags;if(c&2){try{e:{for(var f=a.return;f!==null;){if(J_(f)){var y=f;break e}f=f.return}throw Error(t(160))}switch(y.tag){case 5:var I=y.stateNode;y.flags&32&&(pt(I,""),y.flags&=-33);var b=K_(a);q5(a,b,I);break;case 3:case 4:var N=y.stateNode.containerInfo,Y=K_(a);Y5(a,Y,N);break;default:throw Error(t(161))}}catch(K){m0(a,a.return,K)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function Bk(a,c,f){Xe=a,ty(a)}function ty(a,c,f){for(var y=(a.mode&1)!==0;Xe!==null;){var I=Xe,b=I.child;if(I.tag===22&&y){var N=I.memoizedState!==null||Cu;if(!N){var Y=I.alternate,K=Y!==null&&Y.memoizedState!==null||gr;Y=Cu;var he=gr;if(Cu=N,(gr=K)&&!he)for(Xe=I;Xe!==null;)N=Xe,K=N.child,N.tag===22&&N.memoizedState!==null?iy(I):K!==null?(K.return=N,Xe=K):iy(I);for(;b!==null;)Xe=b,ty(b),b=b.sibling;Xe=I,Cu=Y,gr=he}ry(a)}else I.subtreeFlags&8772&&b!==null?(b.return=I,Xe=b):ry(a)}}function ry(a){for(;Xe!==null;){var c=Xe;if(c.flags&8772){var f=c.alternate;try{if(c.flags&8772)switch(c.tag){case 0:case 11:case 15:gr||Iu(5,c);break;case 1:var y=c.stateNode;if(c.flags&4&&!gr)if(f===null)y.componentDidMount();else{var I=c.elementType===c.type?f.memoizedProps:jn(c.type,f.memoizedProps);y.componentDidUpdate(I,f.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var b=c.updateQueue;b!==null&&n_(c,b,y);break;case 3:var N=c.updateQueue;if(N!==null){if(f=null,c.child!==null)switch(c.child.tag){case 5:f=c.child.stateNode;break;case 1:f=c.child.stateNode}n_(c,N,f)}break;case 5:var Y=c.stateNode;if(f===null&&c.flags&4){f=Y;var K=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":K.autoFocus&&f.focus();break;case"img":K.src&&(f.src=K.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var he=c.alternate;if(he!==null){var Ie=he.memoizedState;if(Ie!==null){var Me=Ie.dehydrated;Me!==null&&f2(Me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}gr||c.flags&512&&W5(c)}catch(xe){m0(c,c.return,xe)}}if(c===a){Xe=null;break}if(f=c.sibling,f!==null){f.return=c.return,Xe=f;break}Xe=c.return}}function ny(a){for(;Xe!==null;){var c=Xe;if(c===a){Xe=null;break}var f=c.sibling;if(f!==null){f.return=c.return,Xe=f;break}Xe=c.return}}function iy(a){for(;Xe!==null;){var c=Xe;try{switch(c.tag){case 0:case 11:case 15:var f=c.return;try{Iu(4,c)}catch(K){m0(c,f,K)}break;case 1:var y=c.stateNode;if(typeof y.componentDidMount=="function"){var I=c.return;try{y.componentDidMount()}catch(K){m0(c,I,K)}}var b=c.return;try{W5(c)}catch(K){m0(c,b,K)}break;case 5:var N=c.return;try{W5(c)}catch(K){m0(c,N,K)}}}catch(K){m0(c,c.return,K)}if(c===a){Xe=null;break}var Y=c.sibling;if(Y!==null){Y.return=c.return,Xe=Y;break}Xe=c.return}}var bk=Math.ceil,Mu=C.ReactCurrentDispatcher,X5=C.ReactCurrentOwner,Bn=C.ReactCurrentBatchConfig,Nt=0,K0=null,L0=null,sr=0,cn=0,O1=zs(0),z0=0,U2=null,ja=0,Su=0,J5=0,k2=null,Hr=null,K5=0,z1=1/0,$i=null,Tu=!1,Z5=null,Ys=null,Bu=!1,qs=null,bu=0,Q2=0,$5=null,Ru=-1,Du=0;function Tr(){return Nt&6?oe():Ru!==-1?Ru:Ru=oe()}function Xs(a){return a.mode&1?Nt&2&&sr!==0?sr&-sr:fk.transition!==null?(Du===0&&(Du=Xt()),Du):(a=Lt,a!==0||(a=window.event,a=a===void 0?16:av(a.type)),a):1}function qn(a,c,f,y){if(50<Q2)throw Q2=0,$5=null,Error(t(185));X0(a,f,y),(!(Nt&2)||a!==K0)&&(a===K0&&(!(Nt&2)&&(Su|=f),z0===4&&Js(a,sr)),Vr(a,y),f===1&&Nt===0&&!(c.mode&1)&&(z1=oe()+500,au&&Hs()))}function Vr(a,c){var f=a.callbackNode;Ir(a,c);var y=hr(a,a===K0?sr:0);if(y===0)f!==null&&F(f),a.callbackNode=null,a.callbackPriority=0;else if(c=y&-y,a.callbackPriority!==c){if(f!=null&&F(f),c===1)a.tag===0?dk(ay.bind(null,a)):jv(ay.bind(null,a)),lk(function(){!(Nt&6)&&Hs()}),f=null;else{switch(hi(y)){case 1:f=Ce;break;case 4:f=ze;break;case 16:f=Oe;break;case 536870912:f=lt;break;default:f=Oe}f=py(f,sy.bind(null,a))}a.callbackPriority=c,a.callbackNode=f}}function sy(a,c){if(Ru=-1,Du=0,Nt&6)throw Error(t(327));var f=a.callbackNode;if(G1()&&a.callbackNode!==f)return null;var y=hr(a,a===K0?sr:0);if(y===0)return null;if(y&30||y&a.expiredLanes||c)c=Lu(a,y);else{c=y;var I=Nt;Nt|=2;var b=ly();(K0!==a||sr!==c)&&($i=null,z1=oe()+500,Ya(a,c));do try{Lk();break}catch(Y){oy(a,Y)}while(1);m5(),Mu.current=b,Nt=I,L0!==null?c=0:(K0=null,sr=0,c=z0)}if(c!==0){if(c===2&&(I=ji(a),I!==0&&(y=I,c=e6(a,I))),c===1)throw f=U2,Ya(a,0),Js(a,y),Vr(a,oe()),f;if(c===6)Js(a,y);else{if(I=a.current.alternate,!(y&30)&&!Rk(I)&&(c=Lu(a,y),c===2&&(b=ji(a),b!==0&&(y=b,c=e6(a,b))),c===1))throw f=U2,Ya(a,0),Js(a,y),Vr(a,oe()),f;switch(a.finishedWork=I,a.finishedLanes=y,c){case 0:case 1:throw Error(t(345));case 2:qa(a,Hr,$i);break;case 3:if(Js(a,y),(y&130023424)===y&&(c=K5+500-oe(),10<c)){if(hr(a,0)!==0)break;if(I=a.suspendedLanes,(I&y)!==y){Tr(),a.pingedLanes|=a.suspendedLanes&I;break}a.timeoutHandle=a5(qa.bind(null,a,Hr,$i),c);break}qa(a,Hr,$i);break;case 4:if(Js(a,y),(y&4194240)===y)break;for(c=a.eventTimes,I=-1;0<y;){var N=31-_t(y);b=1<<N,N=c[N],N>I&&(I=N),y&=~b}if(y=I,y=oe()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*bk(y/1960))-y,10<y){a.timeoutHandle=a5(qa.bind(null,a,Hr,$i),y);break}qa(a,Hr,$i);break;case 5:qa(a,Hr,$i);break;default:throw Error(t(329))}}}return Vr(a,oe()),a.callbackNode===f?sy.bind(null,a):null}function e6(a,c){var f=k2;return a.current.memoizedState.isDehydrated&&(Ya(a,c).flags|=256),a=Lu(a,c),a!==2&&(c=Hr,Hr=f,c!==null&&t6(c)),a}function t6(a){Hr===null?Hr=a:Hr.push.apply(Hr,a)}function Rk(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 I=f[y],b=I.getSnapshot;I=I.value;try{if(!Hn(b(),I))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 Js(a,c){for(c&=~J5,c&=~Su,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var f=31-_t(c),y=1<<f;a[f]=-1,c&=~y}}function ay(a){if(Nt&6)throw Error(t(327));G1();var c=hr(a,0);if(!(c&1))return Vr(a,oe()),null;var f=Lu(a,c);if(a.tag!==0&&f===2){var y=ji(a);y!==0&&(c=y,f=e6(a,y))}if(f===1)throw f=U2,Ya(a,0),Js(a,c),Vr(a,oe()),f;if(f===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,qa(a,Hr,$i),Vr(a,oe()),null}function r6(a,c){var f=Nt;Nt|=1;try{return a(c)}finally{Nt=f,Nt===0&&(z1=oe()+500,au&&Hs())}}function Wa(a){qs!==null&&qs.tag===0&&!(Nt&6)&&G1();var c=Nt;Nt|=1;var f=Bn.transition,y=Lt;try{if(Bn.transition=null,Lt=1,a)return a()}finally{Lt=y,Bn.transition=f,Nt=c,!(Nt&6)&&Hs()}}function n6(){cn=O1.current,r0(O1)}function Ya(a,c){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,ok(f)),L0!==null)for(f=L0.return;f!==null;){var y=f;switch(d5(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&iu();break;case 3:k1(),r0(Or),r0(fr),I5();break;case 5:w5(y);break;case 4:k1();break;case 13:r0(h0);break;case 19:r0(h0);break;case 10:v5(y.type._context);break;case 22:case 23:n6()}f=f.return}if(K0=a,L0=a=Ks(a.current,null),sr=cn=c,z0=0,U2=null,J5=Su=ja=0,Hr=k2=null,Ga!==null){for(c=0;c<Ga.length;c++)if(f=Ga[c],y=f.interleaved,y!==null){f.interleaved=null;var I=y.next,b=f.pending;if(b!==null){var N=b.next;b.next=I,y.next=N}f.pending=y}Ga=null}return a}function oy(a,c){do{var f=L0;try{if(m5(),gu.current=yu,mu){for(var y=d0.memoizedState;y!==null;){var I=y.queue;I!==null&&(I.pending=null),y=y.next}mu=!1}if(Va=0,J0=O0=d0=null,b2=!1,R2=0,X5.current=null,f===null||f.return===null){z0=1,U2=c,L0=null;break}e:{var b=a,N=f.return,Y=f,K=c;if(c=sr,Y.flags|=32768,K!==null&&typeof K=="object"&&typeof K.then=="function"){var he=K,Ie=Y,Me=Ie.tag;if(!(Ie.mode&1)&&(Me===0||Me===11||Me===15)){var xe=Ie.alternate;xe?(Ie.updateQueue=xe.updateQueue,Ie.memoizedState=xe.memoizedState,Ie.lanes=xe.lanes):(Ie.updateQueue=null,Ie.memoizedState=null)}var He=D_(N);if(He!==null){He.flags&=-257,L_(He,N,Y,b,c),He.mode&1&&R_(b,he,c),c=He,K=he;var Je=c.updateQueue;if(Je===null){var Ke=new Set;Ke.add(K),c.updateQueue=Ke}else Je.add(K);break e}else{if(!(c&1)){R_(b,he,c),i6();break e}K=Error(t(426))}}else if(o0&&Y.mode&1){var E0=D_(N);if(E0!==null){!(E0.flags&65536)&&(E0.flags|=256),L_(E0,N,Y,b,c),A5(Q1(K,Y));break e}}b=K=Q1(K,Y),z0!==4&&(z0=2),k2===null?k2=[b]:k2.push(b),b=N;do{switch(b.tag){case 3:b.flags|=65536,c&=-c,b.lanes|=c;var ae=B_(b,K,c);r_(b,ae);break e;case 1:Y=K;var te=b.type,le=b.stateNode;if(!(b.flags&128)&&(typeof te.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(Ys===null||!Ys.has(le)))){b.flags|=65536,c&=-c,b.lanes|=c;var Be=b_(b,Y,c);r_(b,Be);break e}}b=b.return}while(b!==null)}uy(f)}catch($e){c=$e,L0===f&&f!==null&&(L0=f=f.return);continue}break}while(1)}function ly(){var a=Mu.current;return Mu.current=yu,a===null?yu:a}function i6(){(z0===0||z0===3||z0===2)&&(z0=4),K0===null||!(ja&268435455)&&!(Su&268435455)||Js(K0,sr)}function Lu(a,c){var f=Nt;Nt|=2;var y=ly();(K0!==a||sr!==c)&&($i=null,Ya(a,c));do try{Dk();break}catch(I){oy(a,I)}while(1);if(m5(),Nt=f,Mu.current=y,L0!==null)throw Error(t(261));return K0=null,sr=0,z0}function Dk(){for(;L0!==null;)cy(L0)}function Lk(){for(;L0!==null&&!ie();)cy(L0)}function cy(a){var c=fy(a.alternate,a,cn);a.memoizedProps=a.pendingProps,c===null?uy(a):L0=c,X5.current=null}function uy(a){var c=a;do{var f=c.alternate;if(a=c.return,c.flags&32768){if(f=Mk(f,c),f!==null){f.flags&=32767,L0=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{z0=6,L0=null;return}}else if(f=Ik(f,c,cn),f!==null){L0=f;return}if(c=c.sibling,c!==null){L0=c;return}L0=c=a}while(c!==null);z0===0&&(z0=5)}function qa(a,c,f){var y=Lt,I=Bn.transition;try{Bn.transition=null,Lt=1,Nk(a,c,f,y)}finally{Bn.transition=I,Lt=y}return null}function Nk(a,c,f,y){do G1();while(qs!==null);if(Nt&6)throw Error(t(327));f=a.finishedWork;var I=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(F0(a,b),a===K0&&(L0=K0=null,sr=0),!(f.subtreeFlags&2064)&&!(f.flags&2064)||Bu||(Bu=!0,py(Oe,function(){return G1(),null})),b=(f.flags&15990)!==0,f.subtreeFlags&15990||b){b=Bn.transition,Bn.transition=null;var N=Lt;Lt=1;var Y=Nt;Nt|=4,X5.current=null,Tk(a,f),ey(f,a),ek(i5),Vc=!!n5,i5=n5=null,a.current=f,Bk(f),ue(),Nt=Y,Lt=N,Bn.transition=b}else a.current=f;if(Bu&&(Bu=!1,qs=a,bu=I),b=a.pendingLanes,b===0&&(Ys=null),Dt(f.stateNode),Vr(a,oe()),c!==null)for(y=a.onRecoverableError,f=0;f<c.length;f++)I=c[f],y(I.value,{componentStack:I.stack,digest:I.digest});if(Tu)throw Tu=!1,a=Z5,Z5=null,a;return bu&1&&a.tag!==0&&G1(),b=a.pendingLanes,b&1?a===$5?Q2++:(Q2=0,$5=a):Q2=0,Hs(),null}function G1(){if(qs!==null){var a=hi(bu),c=Bn.transition,f=Lt;try{if(Bn.transition=null,Lt=16>a?16:a,qs===null)var y=!1;else{if(a=qs,qs=null,bu=0,Nt&6)throw Error(t(331));var I=Nt;for(Nt|=4,Xe=a.current;Xe!==null;){var b=Xe,N=b.child;if(Xe.flags&16){var Y=b.deletions;if(Y!==null){for(var K=0;K<Y.length;K++){var he=Y[K];for(Xe=he;Xe!==null;){var Ie=Xe;switch(Ie.tag){case 0:case 11:case 15:P2(8,Ie,b)}var Me=Ie.child;if(Me!==null)Me.return=Ie,Xe=Me;else for(;Xe!==null;){Ie=Xe;var xe=Ie.sibling,He=Ie.return;if(X_(Ie),Ie===he){Xe=null;break}if(xe!==null){xe.return=He,Xe=xe;break}Xe=He}}}var Je=b.alternate;if(Je!==null){var Ke=Je.child;if(Ke!==null){Je.child=null;do{var E0=Ke.sibling;Ke.sibling=null,Ke=E0}while(Ke!==null)}}Xe=b}}if(b.subtreeFlags&2064&&N!==null)N.return=b,Xe=N;else e:for(;Xe!==null;){if(b=Xe,b.flags&2048)switch(b.tag){case 0:case 11:case 15:P2(9,b,b.return)}var ae=b.sibling;if(ae!==null){ae.return=b.return,Xe=ae;break e}Xe=b.return}}var te=a.current;for(Xe=te;Xe!==null;){N=Xe;var le=N.child;if(N.subtreeFlags&2064&&le!==null)le.return=N,Xe=le;else e:for(N=te;Xe!==null;){if(Y=Xe,Y.flags&2048)try{switch(Y.tag){case 0:case 11:case 15:Iu(9,Y)}}catch($e){m0(Y,Y.return,$e)}if(Y===N){Xe=null;break e}var Be=Y.sibling;if(Be!==null){Be.return=Y.return,Xe=Be;break e}Xe=Y.return}}if(Nt=I,Hs(),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(at,a)}catch{}y=!0}return y}finally{Lt=f,Bn.transition=c}}return!1}function hy(a,c,f){c=Q1(f,c),c=B_(a,c,1),a=js(a,c,1),c=Tr(),a!==null&&(X0(a,1,c),Vr(a,c))}function m0(a,c,f){if(a.tag===3)hy(a,a,f);else for(;c!==null;){if(c.tag===3){hy(c,a,f);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ys===null||!Ys.has(y))){a=Q1(f,a),a=b_(c,a,1),c=js(c,a,1),a=Tr(),c!==null&&(X0(c,1,a),Vr(c,a));break}}c=c.return}}function Pk(a,c,f){var y=a.pingCache;y!==null&&y.delete(c),c=Tr(),a.pingedLanes|=a.suspendedLanes&f,K0===a&&(sr&f)===f&&(z0===4||z0===3&&(sr&130023424)===sr&&500>oe()-K5?Ya(a,0):J5|=f),Vr(a,c)}function dy(a,c){c===0&&(a.mode&1?(c=D0,D0<<=1,!(D0&130023424)&&(D0=4194304)):c=1);var f=Tr();a=Ji(a,c),a!==null&&(X0(a,c,f),Vr(a,f))}function Uk(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),dy(a,f)}function kk(a,c){var f=0;switch(a.tag){case 13:var y=a.stateNode,I=a.memoizedState;I!==null&&(f=I.retryLane);break;case 19:y=a.stateNode;break;default:throw Error(t(314))}y!==null&&y.delete(c),dy(a,f)}var fy;fy=function(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps||Or.current)Gr=!0;else{if(!(a.lanes&f)&&!(c.flags&128))return Gr=!1,Ck(a,c,f);Gr=!!(a.flags&131072)}else Gr=!1,o0&&c.flags&1048576&&Wv(c,lu,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;wu(a,c),a=c.pendingProps;var I=b1(c,fr.current);U1(c,f),I=T5(null,c,y,a,I,f);var b=B5();return c.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,zr(y)?(b=!0,su(c)):b=!1,c.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,E5(c),I.updater=Eu,c.stateNode=I,I._reactInternals=c,P5(c,y,a,f),c=F5(null,c,y,!0,b,f)):(c.tag=0,o0&&b&&h5(c),Sr(null,c,I,f),c=c.child),c;case 16:y=c.elementType;e:{switch(wu(a,c),a=c.pendingProps,I=y._init,y=I(y._payload),c.type=y,I=c.tag=Fk(y),a=jn(y,a),I){case 0:c=Q5(null,c,y,a,f);break e;case 1:c=F_(null,c,y,a,f);break e;case 11:c=N_(null,c,y,a,f);break e;case 14:c=P_(null,c,y,jn(y.type,a),f);break e}throw Error(t(306,y,""))}return c;case 0:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),Q5(a,c,y,I,f);case 1:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),F_(a,c,y,I,f);case 3:e:{if(O_(c),a===null)throw Error(t(387));y=c.pendingProps,b=c.memoizedState,I=b.element,t_(a,c),pu(c,y,null,f);var N=c.memoizedState;if(y=N.element,b.isDehydrated)if(b={element:y,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},c.updateQueue.baseState=b,c.memoizedState=b,c.flags&256){I=Q1(Error(t(423)),c),c=z_(a,c,y,f,I);break e}else if(y!==I){I=Q1(Error(t(424)),c),c=z_(a,c,y,f,I);break e}else for(ln=Os(c.stateNode.containerInfo.firstChild),on=c,o0=!0,Vn=null,f=$v(c,null,y,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(L1(),y===I){c=Zi(a,c,f);break e}Sr(a,c,y,f)}c=c.child}return c;case 5:return i_(c),a===null&&p5(c),y=c.type,I=c.pendingProps,b=a!==null?a.memoizedProps:null,N=I.children,s5(y,I)?N=null:b!==null&&s5(y,b)&&(c.flags|=32),Q_(a,c),Sr(a,c,N,f),c.child;case 6:return a===null&&p5(c),null;case 13:return G_(a,c,f);case 4:return x5(c,c.stateNode.containerInfo),y=c.pendingProps,a===null?c.child=N1(c,null,y,f):Sr(a,c,y,f),c.child;case 11:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),N_(a,c,y,I,f);case 7:return Sr(a,c,c.pendingProps,f),c.child;case 8:return Sr(a,c,c.pendingProps.children,f),c.child;case 12:return Sr(a,c,c.pendingProps.children,f),c.child;case 10:e:{if(y=c.type._context,I=c.pendingProps,b=c.memoizedProps,N=I.value,Zt(hu,y._currentValue),y._currentValue=N,b!==null)if(Hn(b.value,N)){if(b.children===I.children&&!Or.current){c=Zi(a,c,f);break e}}else for(b=c.child,b!==null&&(b.return=c);b!==null;){var Y=b.dependencies;if(Y!==null){N=b.child;for(var K=Y.firstContext;K!==null;){if(K.context===y){if(b.tag===1){K=Ki(-1,f&-f),K.tag=2;var he=b.updateQueue;if(he!==null){he=he.shared;var Ie=he.pending;Ie===null?K.next=K:(K.next=Ie.next,Ie.next=K),he.pending=K}}b.lanes|=f,K=b.alternate,K!==null&&(K.lanes|=f),_5(b.return,f,c),Y.lanes|=f;break}K=K.next}}else if(b.tag===10)N=b.type===c.type?null:b.child;else if(b.tag===18){if(N=b.return,N===null)throw Error(t(341));N.lanes|=f,Y=N.alternate,Y!==null&&(Y.lanes|=f),_5(N,f,c),N=b.sibling}else N=b.child;if(N!==null)N.return=b;else for(N=b;N!==null;){if(N===c){N=null;break}if(b=N.sibling,b!==null){b.return=N.return,N=b;break}N=N.return}b=N}Sr(a,c,I.children,f),c=c.child}return c;case 9:return I=c.type,y=c.pendingProps.children,U1(c,f),I=Sn(I),y=y(I),c.flags|=1,Sr(a,c,y,f),c.child;case 14:return y=c.type,I=jn(y,c.pendingProps),I=jn(y.type,I),P_(a,c,y,I,f);case 15:return U_(a,c,c.type,c.pendingProps,f);case 17:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),wu(a,c),c.tag=1,zr(y)?(a=!0,su(c)):a=!1,U1(c,f),S_(c,y,I),P5(c,y,I,f),F5(null,c,y,!0,a,f);case 19:return V_(a,c,f);case 22:return k_(a,c,f)}throw Error(t(156,c.tag))};function py(a,c){return zc(a,c)}function Qk(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 bn(a,c,f,y){return new Qk(a,c,f,y)}function s6(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Fk(a){if(typeof a=="function")return s6(a)?1:0;if(a!=null){if(a=a.$$typeof,a===k)return 11;if(a===J)return 14}return 2}function Ks(a,c){var f=a.alternate;return f===null?(f=bn(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 Nu(a,c,f,y,I,b){var N=2;if(y=a,typeof a=="function")s6(a)&&(N=1);else if(typeof a=="string")N=5;else e:switch(a){case M:return Xa(f.children,I,b,c);case D:N=8,I|=8;break;case R:return a=bn(12,f,c,I|2),a.elementType=R,a.lanes=b,a;case Q:return a=bn(13,f,c,I),a.elementType=Q,a.lanes=b,a;case W:return a=bn(19,f,c,I),a.elementType=W,a.lanes=b,a;case re:return Pu(f,I,b,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case S:N=10;break e;case L:N=9;break e;case k:N=11;break e;case J:N=14;break e;case q:N=16,y=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return c=bn(N,f,c,I),c.elementType=a,c.type=y,c.lanes=b,c}function Xa(a,c,f,y){return a=bn(7,a,y,c),a.lanes=f,a}function Pu(a,c,f,y){return a=bn(22,a,y,c),a.elementType=re,a.lanes=f,a.stateNode={isHidden:!1},a}function a6(a,c,f){return a=bn(6,a,null,c),a.lanes=f,a}function o6(a,c,f){return c=bn(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function Ok(a,c,f,y,I){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=dr(0),this.expirationTimes=dr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.identifierPrefix=y,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function l6(a,c,f,y,I,b,N,Y,K){return a=new Ok(a,c,f,Y,K),c===1?(c=1,b===!0&&(c|=8)):c=0,b=bn(3,null,null,c),a.current=b,b.stateNode=a,b.memoizedState={element:y,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},E5(b),a}function zk(a,c,f){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:y==null?null:""+y,children:a,containerInfo:c,implementation:f}}function Ay(a){if(!a)return Gs;a=a._reactInternals;e:{if(ui(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(zr(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(zr(f))return Hv(a,f,c)}return c}function gy(a,c,f,y,I,b,N,Y,K){return a=l6(f,y,!0,a,I,b,N,Y,K),a.context=Ay(null),f=a.current,y=Tr(),I=Xs(f),b=Ki(y,I),b.callback=c??null,js(f,b,I),a.current.lanes=I,X0(a,I,y),Vr(a,y),a}function Uu(a,c,f,y){var I=c.current,b=Tr(),N=Xs(I);return f=Ay(f),c.context===null?c.context=f:c.pendingContext=f,c=Ki(b,N),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=js(I,c,N),a!==null&&(qn(a,I,N,b),fu(a,I,N)),N}function ku(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 my(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function c6(a,c){my(a,c),(a=a.alternate)&&my(a,c)}function Gk(){return null}var vy=typeof reportError=="function"?reportError:function(a){console.error(a)};function u6(a){this._internalRoot=a}Qu.prototype.render=u6.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(t(409));Uu(a,c,null,null)},Qu.prototype.unmount=u6.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;Wa(function(){Uu(null,a,null,null)}),c[Wi]=null}};function Qu(a){this._internalRoot=a}Qu.prototype.unstable_scheduleHydration=function(a){if(a){var c=tv();a={blockedOn:null,target:a,priority:c};for(var f=0;f<ks.length&&c!==0&&c<ks[f].priority;f++);ks.splice(f,0,a),f===0&&iv(a)}};function h6(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Fu(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function _y(){}function Hk(a,c,f,y,I){if(I){if(typeof y=="function"){var b=y;y=function(){var he=ku(N);b.call(he)}}var N=gy(c,y,a,0,null,!1,!1,"",_y);return a._reactRootContainer=N,a[Wi]=N.current,x2(a.nodeType===8?a.parentNode:a),Wa(),N}for(;I=a.lastChild;)a.removeChild(I);if(typeof y=="function"){var Y=y;y=function(){var he=ku(K);Y.call(he)}}var K=l6(a,0,!1,null,null,!1,!1,"",_y);return a._reactRootContainer=K,a[Wi]=K.current,x2(a.nodeType===8?a.parentNode:a),Wa(function(){Uu(c,K,f,y)}),K}function Ou(a,c,f,y,I){var b=f._reactRootContainer;if(b){var N=b;if(typeof I=="function"){var Y=I;I=function(){var K=ku(N);Y.call(K)}}Uu(c,N,a,I)}else N=Hk(f,c,a,I,y);return ku(N)}$m=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var f=sn(c.pendingLanes);f!==0&&(Mr(c,f|1),Vr(c,oe()),!(Nt&6)&&(z1=oe()+500,Hs()))}break;case 13:Wa(function(){var y=Ji(a,1);if(y!==null){var I=Tr();qn(y,a,1,I)}}),c6(a,1)}},Uh=function(a){if(a.tag===13){var c=Ji(a,134217728);if(c!==null){var f=Tr();qn(c,a,134217728,f)}c6(a,134217728)}},ev=function(a){if(a.tag===13){var c=Xs(a),f=Ji(a,c);if(f!==null){var y=Tr();qn(f,a,c,y)}c6(a,c)}},tv=function(){return Lt},rv=function(a,c){var f=Lt;try{return Lt=a,c()}finally{Lt=f}},Re=function(a,c,f){switch(c){case"input":if(ft(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 I=nu(y);if(!I)throw Error(t(90));ut(y),ft(y,I)}}}break;case"textarea":_e(a,f);break;case"select":c=f.value,c!=null&&z(a,!!f.multiple,c,!1)}},jt=r6,_0=Wa;var Vk={usingClientEntryPoint:!1,Events:[I2,T1,nu,Ne,Et,r6]},F2={findFiberByHostInstance:Qa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jk={bundleType:F2.bundleType,version:F2.version,rendererPackageName:F2.rendererPackageName,rendererConfig:F2.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=Fc(a),a===null?null:a.stateNode},findFiberByHostInstance:F2.findFiberByHostInstance||Gk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{at=zu.inject(jk),rt=zu}catch{}}return Fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vk,Fr.createPortal=function(a,c){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h6(c))throw Error(t(200));return zk(a,c,null,f)},Fr.createRoot=function(a,c){if(!h6(a))throw Error(t(299));var f=!1,y="",I=vy;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(I=c.onRecoverableError)),c=l6(a,1,!1,null,null,f,!1,y,I),a[Wi]=c.current,x2(a.nodeType===8?a.parentNode:a),new u6(c)},Fr.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=Fc(c),a=a===null?null:a.stateNode,a},Fr.flushSync=function(a){return Wa(a)},Fr.hydrate=function(a,c,f){if(!Fu(c))throw Error(t(200));return Ou(null,a,c,!0,f)},Fr.hydrateRoot=function(a,c,f){if(!h6(a))throw Error(t(405));var y=f!=null&&f.hydratedSources||null,I=!1,b="",N=vy;if(f!=null&&(f.unstable_strictMode===!0&&(I=!0),f.identifierPrefix!==void 0&&(b=f.identifierPrefix),f.onRecoverableError!==void 0&&(N=f.onRecoverableError)),c=gy(c,null,a,1,f??null,I,!1,b,N),a[Wi]=c.current,x2(a),y)for(a=0;a<y.length;a++)f=y[a],I=f._getVersion,I=I(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,I]:c.mutableSourceEagerHydrationData.push(f,I);return new Qu(c)},Fr.render=function(a,c,f){if(!Fu(c))throw Error(t(200));return Ou(null,a,c,!1,f)},Fr.unmountComponentAtNode=function(a){if(!Fu(a))throw Error(t(40));return a._reactRootContainer?(Wa(function(){Ou(null,null,a,!1,function(){a._reactRootContainer=null,a[Wi]=null})}),!0):!1},Fr.unstable_batchedUpdates=r6,Fr.unstable_renderSubtreeIntoContainer=function(a,c,f,y){if(!Fu(f))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Ou(a,c,f,!1,y)},Fr.version="18.3.1-next-f1338f8080-20240426",Fr}function Qm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qm)}catch(r){console.error(r)}}Qm(),Nm.exports=XP();var JP=Nm.exports,Fm=JP;Bh.createRoot=Fm.createRoot,Bh.hydrateRoot=Fm.hydrateRoot;class KP{constructor({apiService:e,events:t,appControlService:n}){Rt(this,"targetElement");Rt(this,"apiService");Rt(this,"events");Rt(this,"htmlTarget");Rt(this,"appControlService");this.apiService=e,this.events=t,this.appControlService=n}mount(e,t,n){if(!this.targetElement){const s=t.customId??"dita-3dconfig-element",o=document.getElementById(s);if(!o)throw new Error(`Element not found with id => '${s}' `);this.htmlTarget=o,this.htmlTarget.style.height="100%",this.htmlTarget.style.width="100%",this.targetElement=Bh.createRoot(document.getElementById(s))}const i=O2.createElement(WP,{apiService:this.apiService,events:this.events,sku:e,viewerOnly:t.viewerOnly,lensSku:n??void 0,appControlService:this.appControlService});this.targetElement.render(i)}unmount(){this.targetElement&&(this.appControlService.reset(),this.targetElement.unmount(),this.targetElement=void 0,this.htmlTarget&&(this.htmlTarget.style.height="0px",this.htmlTarget.style.width="auto"))}}var Dh={exports:{}},_1=typeof Reflect=="object"?Reflect:null,Om=_1&&typeof _1.apply=="function"?_1.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Lc;_1&&typeof _1.ownKeys=="function"?Lc=_1.ownKeys:Object.getOwnPropertySymbols?Lc=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Lc=function(e){return Object.getOwnPropertyNames(e)};function ZP(r){console&&console.warn&&console.warn(r)}var zm=Number.isNaN||function(e){return e!==e};function Vt(){Vt.init.call(this)}Dh.exports=Vt,Dh.exports.once=rU,Vt.EventEmitter=Vt,Vt.prototype._events=void 0,Vt.prototype._eventsCount=0,Vt.prototype._maxListeners=void 0;var Gm=10;function Nc(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Vt,"defaultMaxListeners",{enumerable:!0,get:function(){return Gm},set:function(r){if(typeof r!="number"||r<0||zm(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");Gm=r}}),Vt.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},Vt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||zm(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 Hm(r){return r._maxListeners===void 0?Vt.defaultMaxListeners:r._maxListeners}Vt.prototype.getMaxListeners=function(){return Hm(this)},Vt.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")Om(h,this,t);else for(var u=h.length,d=qm(h,u),n=0;n<u;++n)Om(d[n],this,t);return!0};function Vm(r,e,t,n){var i,s,o;if(Nc(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=Hm(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,ZP(l)}return r}Vt.prototype.addListener=function(e,t){return Vm(this,e,t,!1)},Vt.prototype.on=Vt.prototype.addListener,Vt.prototype.prependListener=function(e,t){return Vm(this,e,t,!0)};function $P(){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 jm(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=$P.bind(n);return i.listener=t,n.wrapFn=i,i}Vt.prototype.once=function(e,t){return Nc(t),this.on(e,jm(this,e,t)),this},Vt.prototype.prependOnceListener=function(e,t){return Nc(t),this.prependListener(e,jm(this,e,t)),this},Vt.prototype.removeListener=function(e,t){var n,i,s,o,l;if(Nc(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():eU(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this},Vt.prototype.off=Vt.prototype.removeListener,Vt.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 Wm(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?tU(i):qm(i,i.length)}Vt.prototype.listeners=function(e){return Wm(this,e,!0)},Vt.prototype.rawListeners=function(e){return Wm(this,e,!1)},Vt.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Ym.call(r,e)},Vt.prototype.listenerCount=Ym;function Ym(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}Vt.prototype.eventNames=function(){return this._eventsCount>0?Lc(this._events):[]};function qm(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function eU(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function tU(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function rU(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))}Xm(r,e,s,{once:!0}),e!=="error"&&nU(r,i,{once:!0})})}function nU(r,e,t){typeof r.on=="function"&&Xm(r,"error",e,t)}function Xm(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 iU=Dh.exports;const l2=class l2 extends iU.EventEmitter{emitEvent(e,t){Object.keys(l2.EVENTS).includes(e)&&this.emit(l2.EVENTS[e],t)}};Rt(l2,"EVENTS",{onAddToCart:"add-to-cart"});let Lh=l2;const sU={getCartUrl:((Km=window.Shopify)==null?void 0:Km.routes.root)+"cart.js",addToCartUrl:((Zm=window.Shopify)==null?void 0:Zm.routes.root)+"cart/add.js"},Jm=Object.freeze(sU);class aU{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()}}class oU{constructor(){Rt(this,"changeRxConfigurationHandler",null)}registerChangeRxConfiguration(e){this.changeRxConfigurationHandler=e}async changeRxConfiguration(e,t){var n;await((n=this.changeRxConfigurationHandler)==null?void 0:n.call(this,e,t))}reset(){this.changeRxConfigurationHandler=null}}const{log:lU,error:cU}=console,uU=(...r)=>{cU("❌ Sprie Error:",...r)},hU="&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&",dU={HOST:mi.host,STORE_PREFIX:mi.storePrefix},fU={addToCartUrl:Jm.addToCartUrl,getCartUrl:Jm.getCartUrl};let Nh=!1;class pU{constructor(){Rt(this,"sdkService");Rt(this,"apiService");Rt(this,"uiService");Rt(this,"events");Rt(this,"appControlService");this.events=new Lh,this.apiService=new xy(new $s(dU),new aU(fU)),this.appControlService=new oU,this.uiService=new KP({apiService:this.apiService,events:this.events,appControlService:this.appControlService});const e={apiService:this.apiService,config:mi,log:lU,logErr:uU,metaData:{appVersion:yy,previewUrlPrams:hU,targetClassName:"sprie-embed-element"}};this.sdkService=new wy(e),this.sdkService.Init().then(t=>{Nh=t})}isReadyToLoad(){return Nh}load(e,t){Nh?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,n){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!0,customId:t},n)}async changeRxConfiguration(e,t){await this.appControlService.changeRxConfiguration(e,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 pU})();
|
|
4727
|
+
`+b.stack}return{value:a,source:c,stack:I,digest:null}}function U5(a,c,f){return{value:a,source:null,stack:f??null,digest:c??null}}function k5(a,c){try{console.error(c.value)}catch(f){setTimeout(function(){throw f})}}var Ek=typeof WeakMap=="function"?WeakMap:Map;function B_(a,c,f){f=Ki(-1,f),f.tag=3,f.payload={element:null};var y=c.value;return f.callback=function(){Tu||(Tu=!0,Z5=y),k5(a,c)},f}function b_(a,c,f){f=Ki(-1,f),f.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var I=c.value;f.payload=function(){return y(I)},f.callback=function(){k5(a,c)}}var b=a.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(f.callback=function(){k5(a,c),typeof y!="function"&&(Ys===null?Ys=new Set([this]):Ys.add(this));var N=c.stack;this.componentDidCatch(c.value,{componentStack:N!==null?N:""})}),f}function R_(a,c,f){var y=a.pingCache;if(y===null){y=a.pingCache=new Ek;var I=new Set;y.set(c,I)}else I=y.get(c),I===void 0&&(I=new Set,y.set(c,I));I.has(f)||(I.add(f),a=Pk.bind(null,a,c,f),c.then(a,a))}function D_(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 L_(a,c,f,y,I){return a.mode&1?(a.flags|=65536,a.lanes=I,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=Ki(-1,1),c.tag=2,js(f,c,1))),f.lanes|=1),a)}var xk=C.ReactCurrentOwner,Gr=!1;function Sr(a,c,f,y){c.child=a===null?$v(c,null,f,y):N1(c,a.child,f,y)}function N_(a,c,f,y,I){f=f.render;var b=c.ref;return U1(c,I),y=T5(a,c,f,y,b,I),f=B5(),a!==null&&!Gr?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~I,Zi(a,c,I)):(o0&&f&&h5(c),c.flags|=1,Sr(a,c,y,I),c.child)}function P_(a,c,f,y,I){if(a===null){var b=f.type;return typeof b=="function"&&!s6(b)&&b.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(c.tag=15,c.type=b,U_(a,c,b,y,I)):(a=Nu(f.type,null,y,c,c.mode,I),a.ref=c.ref,a.return=c,c.child=a)}if(b=a.child,!(a.lanes&I)){var N=b.memoizedProps;if(f=f.compare,f=f!==null?f:_2,f(N,y)&&a.ref===c.ref)return Zi(a,c,I)}return c.flags|=1,a=Ks(b,y),a.ref=c.ref,a.return=c,c.child=a}function U_(a,c,f,y,I){if(a!==null){var b=a.memoizedProps;if(_2(b,y)&&a.ref===c.ref)if(Gr=!1,c.pendingProps=y=b,(a.lanes&I)!==0)a.flags&131072&&(Gr=!0);else return c.lanes=a.lanes,Zi(a,c,I)}return Q5(a,c,f,y,I)}function k_(a,c,f){var y=c.pendingProps,I=y.children,b=a!==null?a.memoizedState:null;if(y.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(O1,cn),cn|=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,Zt(O1,cn),cn|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=b!==null?b.baseLanes:f,Zt(O1,cn),cn|=y}else b!==null?(y=b.baseLanes|f,c.memoizedState=null):y=f,Zt(O1,cn),cn|=y;return Sr(a,c,I,f),c.child}function Q_(a,c){var f=c.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(c.flags|=512,c.flags|=2097152)}function Q5(a,c,f,y,I){var b=zr(f)?Fa:fr.current;return b=b1(c,b),U1(c,I),f=T5(a,c,f,y,b,I),y=B5(),a!==null&&!Gr?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~I,Zi(a,c,I)):(o0&&y&&h5(c),c.flags|=1,Sr(a,c,f,I),c.child)}function F_(a,c,f,y,I){if(zr(f)){var b=!0;su(c)}else b=!1;if(U1(c,I),c.stateNode===null)wu(a,c),S_(c,f,y),P5(c,f,y,I),y=!0;else if(a===null){var N=c.stateNode,Y=c.memoizedProps;N.props=Y;var K=N.context,de=f.contextType;typeof de=="object"&&de!==null?de=Sn(de):(de=zr(f)?Fa:fr.current,de=b1(c,de));var Ie=f.getDerivedStateFromProps,Me=typeof Ie=="function"||typeof N.getSnapshotBeforeUpdate=="function";Me||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Y!==y||K!==de)&&T_(c,N,y,de),Vs=!1;var xe=c.memoizedState;N.state=xe,pu(c,y,N,I),K=c.memoizedState,Y!==y||xe!==K||Or.current||Vs?(typeof Ie=="function"&&(N5(c,f,Ie,y),K=c.memoizedState),(Y=Vs||M_(c,f,Y,y,xe,K,de))?(Me||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(c.flags|=4194308)):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=K),N.props=y,N.state=K,N.context=de,y=Y):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{N=c.stateNode,t_(a,c),Y=c.memoizedProps,de=c.type===c.elementType?Y:jn(c.type,Y),N.props=de,Me=c.pendingProps,xe=N.context,K=f.contextType,typeof K=="object"&&K!==null?K=Sn(K):(K=zr(f)?Fa:fr.current,K=b1(c,K));var He=f.getDerivedStateFromProps;(Ie=typeof He=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Y!==Me||xe!==K)&&T_(c,N,y,K),Vs=!1,xe=c.memoizedState,N.state=xe,pu(c,y,N,I);var Je=c.memoizedState;Y!==Me||xe!==Je||Or.current||Vs?(typeof He=="function"&&(N5(c,f,He,y),Je=c.memoizedState),(de=Vs||M_(c,f,de,y,xe,Je,K)||!1)?(Ie||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(y,Je,K),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(y,Je,K)),typeof N.componentDidUpdate=="function"&&(c.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof N.componentDidUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=Je),N.props=y,N.state=Je,N.context=K,y=de):(typeof N.componentDidUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||Y===a.memoizedProps&&xe===a.memoizedState||(c.flags|=1024),y=!1)}return F5(a,c,f,y,b,I)}function F5(a,c,f,y,I,b){Q_(a,c);var N=(c.flags&128)!==0;if(!y&&!N)return I&&Vv(c,f,!1),Zi(a,c,b);y=c.stateNode,xk.current=c;var Y=N&&typeof f.getDerivedStateFromError!="function"?null:y.render();return c.flags|=1,a!==null&&N?(c.child=N1(c,a.child,null,b),c.child=N1(c,null,Y,b)):Sr(a,c,Y,b),c.memoizedState=y.state,I&&Vv(c,f,!0),c.child}function O_(a){var c=a.stateNode;c.pendingContext?Gv(a,c.pendingContext,c.pendingContext!==c.context):c.context&&Gv(a,c.context,!1),x5(a,c.containerInfo)}function z_(a,c,f,y,I){return L1(),A5(I),c.flags|=256,Sr(a,c,f,y),c.child}var O5={dehydrated:null,treeContext:null,retryLane:0};function z5(a){return{baseLanes:a,cachePool:null,transitions:null}}function G_(a,c,f){var y=c.pendingProps,I=h0.current,b=!1,N=(c.flags&128)!==0,Y;if((Y=N)||(Y=a!==null&&a.memoizedState===null?!1:(I&2)!==0),Y?(b=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(I|=1),Zt(h0,I&1),a===null)return p5(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):(N=y.children,a=y.fallback,b?(y=c.mode,b=c.child,N={mode:"hidden",children:N},!(y&1)&&b!==null?(b.childLanes=0,b.pendingProps=N):b=Pu(N,y,0,null),a=Xa(a,y,f,null),b.return=c,a.return=c,b.sibling=a,c.child=b,c.child.memoizedState=z5(f),c.memoizedState=O5,a):G5(c,N));if(I=a.memoizedState,I!==null&&(Y=I.dehydrated,Y!==null))return wk(a,c,N,y,Y,I,f);if(b){b=y.fallback,N=c.mode,I=a.child,Y=I.sibling;var K={mode:"hidden",children:y.children};return!(N&1)&&c.child!==I?(y=c.child,y.childLanes=0,y.pendingProps=K,c.deletions=null):(y=Ks(I,K),y.subtreeFlags=I.subtreeFlags&14680064),Y!==null?b=Ks(Y,b):(b=Xa(b,N,f,null),b.flags|=2),b.return=c,y.return=c,y.sibling=b,c.child=y,y=b,b=c.child,N=a.child.memoizedState,N=N===null?z5(f):{baseLanes:N.baseLanes|f,cachePool:null,transitions:N.transitions},b.memoizedState=N,b.childLanes=a.childLanes&~f,c.memoizedState=O5,y}return b=a.child,a=b.sibling,y=Ks(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 G5(a,c){return c=Pu({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function xu(a,c,f,y){return y!==null&&A5(y),N1(c,a.child,null,f),a=G5(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function wk(a,c,f,y,I,b,N){if(f)return c.flags&256?(c.flags&=-257,y=U5(Error(t(422))),xu(a,c,N,y)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(b=y.fallback,I=c.mode,y=Pu({mode:"visible",children:y.children},I,0,null),b=Xa(b,I,N,null),b.flags|=2,y.return=c,b.return=c,y.sibling=b,c.child=y,c.mode&1&&N1(c,a.child,null,N),c.child.memoizedState=z5(N),c.memoizedState=O5,b);if(!(c.mode&1))return xu(a,c,N,null);if(I.data==="$!"){if(y=I.nextSibling&&I.nextSibling.dataset,y)var Y=y.dgst;return y=Y,b=Error(t(419)),y=U5(b,y,void 0),xu(a,c,N,y)}if(Y=(N&a.childLanes)!==0,Gr||Y){if(y=K0,y!==null){switch(N&-N){case 4:I=2;break;case 16:I=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:I=32;break;case 536870912:I=268435456;break;default:I=0}I=I&(y.suspendedLanes|N)?0:I,I!==0&&I!==b.retryLane&&(b.retryLane=I,Ji(a,I),qn(y,a,I,-1))}return i6(),y=U5(Error(t(421))),xu(a,c,N,y)}return I.data==="$?"?(c.flags|=128,c.child=a.child,c=Uk.bind(null,a),I._reactRetry=c,null):(a=b.treeContext,ln=Os(I.nextSibling),on=c,o0=!0,Vn=null,a!==null&&(In[Mn++]=qi,In[Mn++]=Xi,In[Mn++]=Oa,qi=a.id,Xi=a.overflow,Oa=c),c=G5(c,y.children),c.flags|=4096,c)}function H_(a,c,f){a.lanes|=c;var y=a.alternate;y!==null&&(y.lanes|=c),_5(a.return,c,f)}function H5(a,c,f,y,I){var b=a.memoizedState;b===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:I}:(b.isBackwards=c,b.rendering=null,b.renderingStartTime=0,b.last=y,b.tail=f,b.tailMode=I)}function V_(a,c,f){var y=c.pendingProps,I=y.revealOrder,b=y.tail;if(Sr(a,c,y.children,f),y=h0.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&&H_(a,f,c);else if(a.tag===19)H_(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(Zt(h0,y),!(c.mode&1))c.memoizedState=null;else switch(I){case"forwards":for(f=c.child,I=null;f!==null;)a=f.alternate,a!==null&&Au(a)===null&&(I=f),f=f.sibling;f=I,f===null?(I=c.child,c.child=null):(I=f.sibling,f.sibling=null),H5(c,!1,I,f,b);break;case"backwards":for(f=null,I=c.child,c.child=null;I!==null;){if(a=I.alternate,a!==null&&Au(a)===null){c.child=I;break}a=I.sibling,I.sibling=f,f=I,I=a}H5(c,!0,f,null,b);break;case"together":H5(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function wu(a,c){!(c.mode&1)&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function Zi(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),ja|=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=Ks(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=Ks(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function Ck(a,c,f){switch(c.tag){case 3:O_(c),L1();break;case 5:i_(c);break;case 1:zr(c.type)&&su(c);break;case 4:x5(c,c.stateNode.containerInfo);break;case 10:var y=c.type._context,I=c.memoizedProps.value;Zt(hu,y._currentValue),y._currentValue=I;break;case 13:if(y=c.memoizedState,y!==null)return y.dehydrated!==null?(Zt(h0,h0.current&1),c.flags|=128,null):f&c.child.childLanes?G_(a,c,f):(Zt(h0,h0.current&1),a=Zi(a,c,f),a!==null?a.sibling:null);Zt(h0,h0.current&1);break;case 19:if(y=(f&c.childLanes)!==0,a.flags&128){if(y)return V_(a,c,f);c.flags|=128}if(I=c.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Zt(h0,h0.current),y)break;return null;case 22:case 23:return c.lanes=0,k_(a,c,f)}return Zi(a,c,f)}var j_,V5,W_,Y_;j_=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}},V5=function(){},W_=function(a,c,f,y){var I=a.memoizedProps;if(I!==y){a=c.stateNode,Ha(fi.current);var b=null;switch(f){case"input":I=X(a,I),y=X(a,y),b=[];break;case"select":I=$({},I,{value:void 0}),y=$({},y,{value:void 0}),b=[];break;case"textarea":I=U(a,I),y=U(a,y),b=[];break;default:typeof I.onClick!="function"&&typeof y.onClick=="function"&&(a.onclick=ru)}nt(f,y);var N;f=null;for(de in I)if(!y.hasOwnProperty(de)&&I.hasOwnProperty(de)&&I[de]!=null)if(de==="style"){var Y=I[de];for(N in Y)Y.hasOwnProperty(N)&&(f||(f={}),f[N]="")}else de!=="dangerouslySetInnerHTML"&&de!=="children"&&de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&de!=="autoFocus"&&(i.hasOwnProperty(de)?b||(b=[]):(b=b||[]).push(de,null));for(de in y){var K=y[de];if(Y=I!=null?I[de]:void 0,y.hasOwnProperty(de)&&K!==Y&&(K!=null||Y!=null))if(de==="style")if(Y){for(N in Y)!Y.hasOwnProperty(N)||K&&K.hasOwnProperty(N)||(f||(f={}),f[N]="");for(N in K)K.hasOwnProperty(N)&&Y[N]!==K[N]&&(f||(f={}),f[N]=K[N])}else f||(b||(b=[]),b.push(de,f)),f=K;else de==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,Y=Y?Y.__html:void 0,K!=null&&Y!==K&&(b=b||[]).push(de,K)):de==="children"?typeof K!="string"&&typeof K!="number"||(b=b||[]).push(de,""+K):de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&(i.hasOwnProperty(de)?(K!=null&&de==="onScroll"&&t0("scroll",a),b||Y===K||(b=[])):(b=b||[]).push(de,K))}f&&(b=b||[]).push("style",f);var de=b;(c.updateQueue=de)&&(c.flags|=4)}},Y_=function(a,c,f,y){f!==y&&(c.flags|=4)};function N2(a,c){if(!o0)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 Ar(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(c)for(var I=a.child;I!==null;)f|=I.lanes|I.childLanes,y|=I.subtreeFlags&14680064,y|=I.flags&14680064,I.return=a,I=I.sibling;else for(I=a.child;I!==null;)f|=I.lanes|I.childLanes,y|=I.subtreeFlags,y|=I.flags,I.return=a,I=I.sibling;return a.subtreeFlags|=y,a.childLanes=f,c}function Ik(a,c,f){var y=c.pendingProps;switch(d5(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ar(c),null;case 1:return zr(c.type)&&iu(),Ar(c),null;case 3:return y=c.stateNode,k1(),r0(Or),r0(fr),I5(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(cu(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&!(c.flags&256)||(c.flags|=1024,Vn!==null&&(t6(Vn),Vn=null))),V5(a,c),Ar(c),null;case 5:w5(c);var I=Ha(B2.current);if(f=c.type,a!==null&&c.stateNode!=null)W_(a,c,f,y,I),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!y){if(c.stateNode===null)throw Error(t(166));return Ar(c),null}if(a=Ha(fi.current),cu(c)){y=c.stateNode,f=c.type;var b=c.memoizedProps;switch(y[di]=c,y[C2]=b,a=(c.mode&1)!==0,f){case"dialog":t0("cancel",y),t0("close",y);break;case"iframe":case"object":case"embed":t0("load",y);break;case"video":case"audio":for(I=0;I<E2.length;I++)t0(E2[I],y);break;case"source":t0("error",y);break;case"img":case"image":case"link":t0("error",y),t0("load",y);break;case"details":t0("toggle",y);break;case"input":u0(y,b),t0("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!b.multiple},t0("invalid",y);break;case"textarea":se(y,b),t0("invalid",y)}nt(f,b),I=null;for(var N in b)if(b.hasOwnProperty(N)){var Y=b[N];N==="children"?typeof Y=="string"?y.textContent!==Y&&(b.suppressHydrationWarning!==!0&&tu(y.textContent,Y,a),I=["children",Y]):typeof Y=="number"&&y.textContent!==""+Y&&(b.suppressHydrationWarning!==!0&&tu(y.textContent,Y,a),I=["children",""+Y]):i.hasOwnProperty(N)&&Y!=null&&N==="onScroll"&&t0("scroll",y)}switch(f){case"input":wt(y),qe(y,b,!0);break;case"textarea":wt(y),Ee(y);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(y.onclick=ru)}y=I,c.updateQueue=y,y!==null&&(c.flags|=4)}else{N=I.nodeType===9?I:I.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=_e(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=N.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof y.is=="string"?a=N.createElement(f,{is:y.is}):(a=N.createElement(f),f==="select"&&(N=a,y.multiple?N.multiple=!0:y.size&&(N.size=y.size))):a=N.createElementNS(a,f),a[di]=c,a[C2]=y,j_(a,c,!1,!1),c.stateNode=a;e:{switch(N=et(f,y),f){case"dialog":t0("cancel",a),t0("close",a),I=y;break;case"iframe":case"object":case"embed":t0("load",a),I=y;break;case"video":case"audio":for(I=0;I<E2.length;I++)t0(E2[I],a);I=y;break;case"source":t0("error",a),I=y;break;case"img":case"image":case"link":t0("error",a),t0("load",a),I=y;break;case"details":t0("toggle",a),I=y;break;case"input":u0(a,y),I=X(a,y),t0("invalid",a);break;case"option":I=y;break;case"select":a._wrapperState={wasMultiple:!!y.multiple},I=$({},y,{value:void 0}),t0("invalid",a);break;case"textarea":se(a,y),I=U(a,y),t0("invalid",a);break;default:I=y}nt(f,I),Y=I;for(b in Y)if(Y.hasOwnProperty(b)){var K=Y[b];b==="style"?De(a,K):b==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,K!=null&&Ge(a,K)):b==="children"?typeof K=="string"?(f!=="textarea"||K!=="")&&pt(a,K):typeof K=="number"&&pt(a,""+K):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(i.hasOwnProperty(b)?K!=null&&b==="onScroll"&&t0("scroll",a):K!=null&&x(a,b,K,N))}switch(f){case"input":wt(a),qe(a,y,!1);break;case"textarea":wt(a),Ee(a);break;case"option":y.value!=null&&a.setAttribute("value",""+pe(y.value));break;case"select":a.multiple=!!y.multiple,b=y.value,b!=null?z(a,!!y.multiple,b,!1):y.defaultValue!=null&&z(a,!!y.multiple,y.defaultValue,!0);break;default:typeof I.onClick=="function"&&(a.onclick=ru)}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 Ar(c),null;case 6:if(a&&c.stateNode!=null)Y_(a,c,a.memoizedProps,y);else{if(typeof y!="string"&&c.stateNode===null)throw Error(t(166));if(f=Ha(B2.current),Ha(fi.current),cu(c)){if(y=c.stateNode,f=c.memoizedProps,y[di]=c,(b=y.nodeValue!==f)&&(a=on,a!==null))switch(a.tag){case 3:tu(y.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&tu(y.nodeValue,f,(a.mode&1)!==0)}b&&(c.flags|=4)}else y=(f.nodeType===9?f:f.ownerDocument).createTextNode(y),y[di]=c,c.stateNode=y}return Ar(c),null;case 13:if(r0(h0),y=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(o0&&ln!==null&&c.mode&1&&!(c.flags&128))Jv(),L1(),c.flags|=98560,b=!1;else if(b=cu(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[di]=c}else L1(),!(c.flags&128)&&(c.memoizedState=null),c.flags|=4;Ar(c),b=!1}else Vn!==null&&(t6(Vn),Vn=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||h0.current&1?z0===0&&(z0=3):i6())),c.updateQueue!==null&&(c.flags|=4),Ar(c),null);case 4:return k1(),V5(a,c),a===null&&x2(c.stateNode.containerInfo),Ar(c),null;case 10:return v5(c.type._context),Ar(c),null;case 17:return zr(c.type)&&iu(),Ar(c),null;case 19:if(r0(h0),b=c.memoizedState,b===null)return Ar(c),null;if(y=(c.flags&128)!==0,N=b.rendering,N===null)if(y)N2(b,!1);else{if(z0!==0||a!==null&&a.flags&128)for(a=c.child;a!==null;){if(N=Au(a),N!==null){for(c.flags|=128,N2(b,!1),y=N.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,N=b.alternate,N===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=N.childLanes,b.lanes=N.lanes,b.child=N.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=N.memoizedProps,b.memoizedState=N.memoizedState,b.updateQueue=N.updateQueue,b.type=N.type,a=N.dependencies,b.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return Zt(h0,h0.current&1|2),c.child}a=a.sibling}b.tail!==null&&oe()>z1&&(c.flags|=128,y=!0,N2(b,!1),c.lanes=4194304)}else{if(!y)if(a=Au(N),a!==null){if(c.flags|=128,y=!0,f=a.updateQueue,f!==null&&(c.updateQueue=f,c.flags|=4),N2(b,!0),b.tail===null&&b.tailMode==="hidden"&&!N.alternate&&!o0)return Ar(c),null}else 2*oe()-b.renderingStartTime>z1&&f!==1073741824&&(c.flags|=128,y=!0,N2(b,!1),c.lanes=4194304);b.isBackwards?(N.sibling=c.child,c.child=N):(f=b.last,f!==null?f.sibling=N:c.child=N,b.last=N)}return b.tail!==null?(c=b.tail,b.rendering=c,b.tail=c.sibling,b.renderingStartTime=oe(),c.sibling=null,f=h0.current,Zt(h0,y?f&1|2:f&1),c):(Ar(c),null);case 22:case 23:return n6(),y=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==y&&(c.flags|=8192),y&&c.mode&1?cn&1073741824&&(Ar(c),c.subtreeFlags&6&&(c.flags|=8192)):Ar(c),null;case 24:return null;case 25:return null}throw Error(t(156,c.tag))}function Mk(a,c){switch(d5(c),c.tag){case 1:return zr(c.type)&&iu(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return k1(),r0(Or),r0(fr),I5(),a=c.flags,a&65536&&!(a&128)?(c.flags=a&-65537|128,c):null;case 5:return w5(c),null;case 13:if(r0(h0),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(t(340));L1()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return r0(h0),null;case 4:return k1(),null;case 10:return v5(c.type._context),null;case 22:case 23:return n6(),null;case 24:return null;default:return null}}var Cu=!1,gr=!1,Sk=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function F1(a,c){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(y){m0(a,c,y)}else f.current=null}function j5(a,c,f){try{f()}catch(y){m0(a,c,y)}}var q_=!1;function Tk(a,c){if(n5=Vc,a=Mv(),Xh(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 I=y.anchorOffset,b=y.focusNode;y=y.focusOffset;try{f.nodeType,b.nodeType}catch{f=null;break e}var N=0,Y=-1,K=-1,de=0,Ie=0,Me=a,xe=null;t:for(;;){for(var He;Me!==f||I!==0&&Me.nodeType!==3||(Y=N+I),Me!==b||y!==0&&Me.nodeType!==3||(K=N+y),Me.nodeType===3&&(N+=Me.nodeValue.length),(He=Me.firstChild)!==null;)xe=Me,Me=He;for(;;){if(Me===a)break t;if(xe===f&&++de===I&&(Y=N),xe===b&&++Ie===y&&(K=N),(He=Me.nextSibling)!==null)break;Me=xe,xe=Me.parentNode}Me=He}f=Y===-1||K===-1?null:{start:Y,end:K}}else f=null}f=f||{start:0,end:0}}else f=null;for(i5={focusedElem:a,selectionRange:f},Vc=!1,Xe=c;Xe!==null;)if(c=Xe,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,Xe=a;else for(;Xe!==null;){c=Xe;try{var Je=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(Je!==null){var Ke=Je.memoizedProps,E0=Je.memoizedState,ae=c.stateNode,te=ae.getSnapshotBeforeUpdate(c.elementType===c.type?Ke:jn(c.type,Ke),E0);ae.__reactInternalSnapshotBeforeUpdate=te}break;case 3:var le=c.stateNode.containerInfo;le.nodeType===1?le.textContent="":le.nodeType===9&&le.documentElement&&le.removeChild(le.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Be){m0(c,c.return,Be)}if(a=c.sibling,a!==null){a.return=c.return,Xe=a;break}Xe=c.return}return Je=q_,q_=!1,Je}function P2(a,c,f){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var I=y=y.next;do{if((I.tag&a)===a){var b=I.destroy;I.destroy=void 0,b!==void 0&&j5(c,f,b)}I=I.next}while(I!==y)}}function Iu(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 W5(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 X_(a){var c=a.alternate;c!==null&&(a.alternate=null,X_(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[di],delete c[C2],delete c[l5],delete c[uk],delete c[hk])),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 J_(a){return a.tag===5||a.tag===3||a.tag===4}function K_(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||J_(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 Y5(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=ru));else if(y!==4&&(a=a.child,a!==null))for(Y5(a,c,f),a=a.sibling;a!==null;)Y5(a,c,f),a=a.sibling}function q5(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(q5(a,c,f),a=a.sibling;a!==null;)q5(a,c,f),a=a.sibling}var ir=null,Wn=!1;function Ws(a,c,f){for(f=f.child;f!==null;)Z_(a,c,f),f=f.sibling}function Z_(a,c,f){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(at,f)}catch{}switch(f.tag){case 5:gr||F1(f,c);case 6:var y=ir,I=Wn;ir=null,Ws(a,c,f),ir=y,Wn=I,ir!==null&&(Wn?(a=ir,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):ir.removeChild(f.stateNode));break;case 18:ir!==null&&(Wn?(a=ir,f=f.stateNode,a.nodeType===8?o5(a.parentNode,f):a.nodeType===1&&o5(a,f),f2(a)):o5(ir,f.stateNode));break;case 4:y=ir,I=Wn,ir=f.stateNode.containerInfo,Wn=!0,Ws(a,c,f),ir=y,Wn=I;break;case 0:case 11:case 14:case 15:if(!gr&&(y=f.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){I=y=y.next;do{var b=I,N=b.destroy;b=b.tag,N!==void 0&&(b&2||b&4)&&j5(f,c,N),I=I.next}while(I!==y)}Ws(a,c,f);break;case 1:if(!gr&&(F1(f,c),y=f.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=f.memoizedProps,y.state=f.memoizedState,y.componentWillUnmount()}catch(Y){m0(f,c,Y)}Ws(a,c,f);break;case 21:Ws(a,c,f);break;case 22:f.mode&1?(gr=(y=gr)||f.memoizedState!==null,Ws(a,c,f),gr=y):Ws(a,c,f);break;default:Ws(a,c,f)}}function $_(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new Sk),c.forEach(function(y){var I=kk.bind(null,a,y);f.has(y)||(f.add(y),y.then(I,I))})}}function Yn(a,c){var f=c.deletions;if(f!==null)for(var y=0;y<f.length;y++){var I=f[y];try{var b=a,N=c,Y=N;e:for(;Y!==null;){switch(Y.tag){case 5:ir=Y.stateNode,Wn=!1;break e;case 3:ir=Y.stateNode.containerInfo,Wn=!0;break e;case 4:ir=Y.stateNode.containerInfo,Wn=!0;break e}Y=Y.return}if(ir===null)throw Error(t(160));Z_(b,N,I),ir=null,Wn=!1;var K=I.alternate;K!==null&&(K.return=null),I.return=null}catch(de){m0(I,c,de)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)ey(c,a),c=c.sibling}function ey(a,c){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Yn(c,a),Ai(a),y&4){try{P2(3,a,a.return),Iu(3,a)}catch(Ke){m0(a,a.return,Ke)}try{P2(5,a,a.return)}catch(Ke){m0(a,a.return,Ke)}}break;case 1:Yn(c,a),Ai(a),y&512&&f!==null&&F1(f,f.return);break;case 5:if(Yn(c,a),Ai(a),y&512&&f!==null&&F1(f,f.return),a.flags&32){var I=a.stateNode;try{pt(I,"")}catch(Ke){m0(a,a.return,Ke)}}if(y&4&&(I=a.stateNode,I!=null)){var b=a.memoizedProps,N=f!==null?f.memoizedProps:b,Y=a.type,K=a.updateQueue;if(a.updateQueue=null,K!==null)try{Y==="input"&&b.type==="radio"&&b.name!=null&&dt(I,b),et(Y,N);var de=et(Y,b);for(N=0;N<K.length;N+=2){var Ie=K[N],Me=K[N+1];Ie==="style"?De(I,Me):Ie==="dangerouslySetInnerHTML"?Ge(I,Me):Ie==="children"?pt(I,Me):x(I,Ie,Me,de)}switch(Y){case"input":ft(I,b);break;case"textarea":ye(I,b);break;case"select":var xe=I._wrapperState.wasMultiple;I._wrapperState.wasMultiple=!!b.multiple;var He=b.value;He!=null?z(I,!!b.multiple,He,!1):xe!==!!b.multiple&&(b.defaultValue!=null?z(I,!!b.multiple,b.defaultValue,!0):z(I,!!b.multiple,b.multiple?[]:"",!1))}I[C2]=b}catch(Ke){m0(a,a.return,Ke)}}break;case 6:if(Yn(c,a),Ai(a),y&4){if(a.stateNode===null)throw Error(t(162));I=a.stateNode,b=a.memoizedProps;try{I.nodeValue=b}catch(Ke){m0(a,a.return,Ke)}}break;case 3:if(Yn(c,a),Ai(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{f2(c.containerInfo)}catch(Ke){m0(a,a.return,Ke)}break;case 4:Yn(c,a),Ai(a);break;case 13:Yn(c,a),Ai(a),I=a.child,I.flags&8192&&(b=I.memoizedState!==null,I.stateNode.isHidden=b,!b||I.alternate!==null&&I.alternate.memoizedState!==null||(K5=oe())),y&4&&$_(a);break;case 22:if(Ie=f!==null&&f.memoizedState!==null,a.mode&1?(gr=(de=gr)||Ie,Yn(c,a),gr=de):Yn(c,a),Ai(a),y&8192){if(de=a.memoizedState!==null,(a.stateNode.isHidden=de)&&!Ie&&a.mode&1)for(Xe=a,Ie=a.child;Ie!==null;){for(Me=Xe=Ie;Xe!==null;){switch(xe=Xe,He=xe.child,xe.tag){case 0:case 11:case 14:case 15:P2(4,xe,xe.return);break;case 1:F1(xe,xe.return);var Je=xe.stateNode;if(typeof Je.componentWillUnmount=="function"){y=xe,f=xe.return;try{c=y,Je.props=c.memoizedProps,Je.state=c.memoizedState,Je.componentWillUnmount()}catch(Ke){m0(y,f,Ke)}}break;case 5:F1(xe,xe.return);break;case 22:if(xe.memoizedState!==null){ny(Me);continue}}He!==null?(He.return=xe,Xe=He):ny(Me)}Ie=Ie.sibling}e:for(Ie=null,Me=a;;){if(Me.tag===5){if(Ie===null){Ie=Me;try{I=Me.stateNode,de?(b=I.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(Y=Me.stateNode,K=Me.memoizedProps.style,N=K!=null&&K.hasOwnProperty("display")?K.display:null,Y.style.display=ge("display",N))}catch(Ke){m0(a,a.return,Ke)}}}else if(Me.tag===6){if(Ie===null)try{Me.stateNode.nodeValue=de?"":Me.memoizedProps}catch(Ke){m0(a,a.return,Ke)}}else if((Me.tag!==22&&Me.tag!==23||Me.memoizedState===null||Me===a)&&Me.child!==null){Me.child.return=Me,Me=Me.child;continue}if(Me===a)break e;for(;Me.sibling===null;){if(Me.return===null||Me.return===a)break e;Ie===Me&&(Ie=null),Me=Me.return}Ie===Me&&(Ie=null),Me.sibling.return=Me.return,Me=Me.sibling}}break;case 19:Yn(c,a),Ai(a),y&4&&$_(a);break;case 21:break;default:Yn(c,a),Ai(a)}}function Ai(a){var c=a.flags;if(c&2){try{e:{for(var f=a.return;f!==null;){if(J_(f)){var y=f;break e}f=f.return}throw Error(t(160))}switch(y.tag){case 5:var I=y.stateNode;y.flags&32&&(pt(I,""),y.flags&=-33);var b=K_(a);q5(a,b,I);break;case 3:case 4:var N=y.stateNode.containerInfo,Y=K_(a);Y5(a,Y,N);break;default:throw Error(t(161))}}catch(K){m0(a,a.return,K)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function Bk(a,c,f){Xe=a,ty(a)}function ty(a,c,f){for(var y=(a.mode&1)!==0;Xe!==null;){var I=Xe,b=I.child;if(I.tag===22&&y){var N=I.memoizedState!==null||Cu;if(!N){var Y=I.alternate,K=Y!==null&&Y.memoizedState!==null||gr;Y=Cu;var de=gr;if(Cu=N,(gr=K)&&!de)for(Xe=I;Xe!==null;)N=Xe,K=N.child,N.tag===22&&N.memoizedState!==null?iy(I):K!==null?(K.return=N,Xe=K):iy(I);for(;b!==null;)Xe=b,ty(b),b=b.sibling;Xe=I,Cu=Y,gr=de}ry(a)}else I.subtreeFlags&8772&&b!==null?(b.return=I,Xe=b):ry(a)}}function ry(a){for(;Xe!==null;){var c=Xe;if(c.flags&8772){var f=c.alternate;try{if(c.flags&8772)switch(c.tag){case 0:case 11:case 15:gr||Iu(5,c);break;case 1:var y=c.stateNode;if(c.flags&4&&!gr)if(f===null)y.componentDidMount();else{var I=c.elementType===c.type?f.memoizedProps:jn(c.type,f.memoizedProps);y.componentDidUpdate(I,f.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var b=c.updateQueue;b!==null&&n_(c,b,y);break;case 3:var N=c.updateQueue;if(N!==null){if(f=null,c.child!==null)switch(c.child.tag){case 5:f=c.child.stateNode;break;case 1:f=c.child.stateNode}n_(c,N,f)}break;case 5:var Y=c.stateNode;if(f===null&&c.flags&4){f=Y;var K=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":K.autoFocus&&f.focus();break;case"img":K.src&&(f.src=K.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var de=c.alternate;if(de!==null){var Ie=de.memoizedState;if(Ie!==null){var Me=Ie.dehydrated;Me!==null&&f2(Me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}gr||c.flags&512&&W5(c)}catch(xe){m0(c,c.return,xe)}}if(c===a){Xe=null;break}if(f=c.sibling,f!==null){f.return=c.return,Xe=f;break}Xe=c.return}}function ny(a){for(;Xe!==null;){var c=Xe;if(c===a){Xe=null;break}var f=c.sibling;if(f!==null){f.return=c.return,Xe=f;break}Xe=c.return}}function iy(a){for(;Xe!==null;){var c=Xe;try{switch(c.tag){case 0:case 11:case 15:var f=c.return;try{Iu(4,c)}catch(K){m0(c,f,K)}break;case 1:var y=c.stateNode;if(typeof y.componentDidMount=="function"){var I=c.return;try{y.componentDidMount()}catch(K){m0(c,I,K)}}var b=c.return;try{W5(c)}catch(K){m0(c,b,K)}break;case 5:var N=c.return;try{W5(c)}catch(K){m0(c,N,K)}}}catch(K){m0(c,c.return,K)}if(c===a){Xe=null;break}var Y=c.sibling;if(Y!==null){Y.return=c.return,Xe=Y;break}Xe=c.return}}var bk=Math.ceil,Mu=C.ReactCurrentDispatcher,X5=C.ReactCurrentOwner,Bn=C.ReactCurrentBatchConfig,Nt=0,K0=null,L0=null,sr=0,cn=0,O1=zs(0),z0=0,U2=null,ja=0,Su=0,J5=0,k2=null,Hr=null,K5=0,z1=1/0,$i=null,Tu=!1,Z5=null,Ys=null,Bu=!1,qs=null,bu=0,Q2=0,$5=null,Ru=-1,Du=0;function Tr(){return Nt&6?oe():Ru!==-1?Ru:Ru=oe()}function Xs(a){return a.mode&1?Nt&2&&sr!==0?sr&-sr:fk.transition!==null?(Du===0&&(Du=Xt()),Du):(a=Lt,a!==0||(a=window.event,a=a===void 0?16:av(a.type)),a):1}function qn(a,c,f,y){if(50<Q2)throw Q2=0,$5=null,Error(t(185));X0(a,f,y),(!(Nt&2)||a!==K0)&&(a===K0&&(!(Nt&2)&&(Su|=f),z0===4&&Js(a,sr)),Vr(a,y),f===1&&Nt===0&&!(c.mode&1)&&(z1=oe()+500,au&&Hs()))}function Vr(a,c){var f=a.callbackNode;Ir(a,c);var y=hr(a,a===K0?sr:0);if(y===0)f!==null&&F(f),a.callbackNode=null,a.callbackPriority=0;else if(c=y&-y,a.callbackPriority!==c){if(f!=null&&F(f),c===1)a.tag===0?dk(ay.bind(null,a)):jv(ay.bind(null,a)),lk(function(){!(Nt&6)&&Hs()}),f=null;else{switch(hi(y)){case 1:f=Ce;break;case 4:f=ze;break;case 16:f=Oe;break;case 536870912:f=lt;break;default:f=Oe}f=py(f,sy.bind(null,a))}a.callbackPriority=c,a.callbackNode=f}}function sy(a,c){if(Ru=-1,Du=0,Nt&6)throw Error(t(327));var f=a.callbackNode;if(G1()&&a.callbackNode!==f)return null;var y=hr(a,a===K0?sr:0);if(y===0)return null;if(y&30||y&a.expiredLanes||c)c=Lu(a,y);else{c=y;var I=Nt;Nt|=2;var b=ly();(K0!==a||sr!==c)&&($i=null,z1=oe()+500,Ya(a,c));do try{Lk();break}catch(Y){oy(a,Y)}while(1);m5(),Mu.current=b,Nt=I,L0!==null?c=0:(K0=null,sr=0,c=z0)}if(c!==0){if(c===2&&(I=ji(a),I!==0&&(y=I,c=e6(a,I))),c===1)throw f=U2,Ya(a,0),Js(a,y),Vr(a,oe()),f;if(c===6)Js(a,y);else{if(I=a.current.alternate,!(y&30)&&!Rk(I)&&(c=Lu(a,y),c===2&&(b=ji(a),b!==0&&(y=b,c=e6(a,b))),c===1))throw f=U2,Ya(a,0),Js(a,y),Vr(a,oe()),f;switch(a.finishedWork=I,a.finishedLanes=y,c){case 0:case 1:throw Error(t(345));case 2:qa(a,Hr,$i);break;case 3:if(Js(a,y),(y&130023424)===y&&(c=K5+500-oe(),10<c)){if(hr(a,0)!==0)break;if(I=a.suspendedLanes,(I&y)!==y){Tr(),a.pingedLanes|=a.suspendedLanes&I;break}a.timeoutHandle=a5(qa.bind(null,a,Hr,$i),c);break}qa(a,Hr,$i);break;case 4:if(Js(a,y),(y&4194240)===y)break;for(c=a.eventTimes,I=-1;0<y;){var N=31-_t(y);b=1<<N,N=c[N],N>I&&(I=N),y&=~b}if(y=I,y=oe()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*bk(y/1960))-y,10<y){a.timeoutHandle=a5(qa.bind(null,a,Hr,$i),y);break}qa(a,Hr,$i);break;case 5:qa(a,Hr,$i);break;default:throw Error(t(329))}}}return Vr(a,oe()),a.callbackNode===f?sy.bind(null,a):null}function e6(a,c){var f=k2;return a.current.memoizedState.isDehydrated&&(Ya(a,c).flags|=256),a=Lu(a,c),a!==2&&(c=Hr,Hr=f,c!==null&&t6(c)),a}function t6(a){Hr===null?Hr=a:Hr.push.apply(Hr,a)}function Rk(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 I=f[y],b=I.getSnapshot;I=I.value;try{if(!Hn(b(),I))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 Js(a,c){for(c&=~J5,c&=~Su,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var f=31-_t(c),y=1<<f;a[f]=-1,c&=~y}}function ay(a){if(Nt&6)throw Error(t(327));G1();var c=hr(a,0);if(!(c&1))return Vr(a,oe()),null;var f=Lu(a,c);if(a.tag!==0&&f===2){var y=ji(a);y!==0&&(c=y,f=e6(a,y))}if(f===1)throw f=U2,Ya(a,0),Js(a,c),Vr(a,oe()),f;if(f===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,qa(a,Hr,$i),Vr(a,oe()),null}function r6(a,c){var f=Nt;Nt|=1;try{return a(c)}finally{Nt=f,Nt===0&&(z1=oe()+500,au&&Hs())}}function Wa(a){qs!==null&&qs.tag===0&&!(Nt&6)&&G1();var c=Nt;Nt|=1;var f=Bn.transition,y=Lt;try{if(Bn.transition=null,Lt=1,a)return a()}finally{Lt=y,Bn.transition=f,Nt=c,!(Nt&6)&&Hs()}}function n6(){cn=O1.current,r0(O1)}function Ya(a,c){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,ok(f)),L0!==null)for(f=L0.return;f!==null;){var y=f;switch(d5(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&iu();break;case 3:k1(),r0(Or),r0(fr),I5();break;case 5:w5(y);break;case 4:k1();break;case 13:r0(h0);break;case 19:r0(h0);break;case 10:v5(y.type._context);break;case 22:case 23:n6()}f=f.return}if(K0=a,L0=a=Ks(a.current,null),sr=cn=c,z0=0,U2=null,J5=Su=ja=0,Hr=k2=null,Ga!==null){for(c=0;c<Ga.length;c++)if(f=Ga[c],y=f.interleaved,y!==null){f.interleaved=null;var I=y.next,b=f.pending;if(b!==null){var N=b.next;b.next=I,y.next=N}f.pending=y}Ga=null}return a}function oy(a,c){do{var f=L0;try{if(m5(),gu.current=yu,mu){for(var y=d0.memoizedState;y!==null;){var I=y.queue;I!==null&&(I.pending=null),y=y.next}mu=!1}if(Va=0,J0=O0=d0=null,b2=!1,R2=0,X5.current=null,f===null||f.return===null){z0=1,U2=c,L0=null;break}e:{var b=a,N=f.return,Y=f,K=c;if(c=sr,Y.flags|=32768,K!==null&&typeof K=="object"&&typeof K.then=="function"){var de=K,Ie=Y,Me=Ie.tag;if(!(Ie.mode&1)&&(Me===0||Me===11||Me===15)){var xe=Ie.alternate;xe?(Ie.updateQueue=xe.updateQueue,Ie.memoizedState=xe.memoizedState,Ie.lanes=xe.lanes):(Ie.updateQueue=null,Ie.memoizedState=null)}var He=D_(N);if(He!==null){He.flags&=-257,L_(He,N,Y,b,c),He.mode&1&&R_(b,de,c),c=He,K=de;var Je=c.updateQueue;if(Je===null){var Ke=new Set;Ke.add(K),c.updateQueue=Ke}else Je.add(K);break e}else{if(!(c&1)){R_(b,de,c),i6();break e}K=Error(t(426))}}else if(o0&&Y.mode&1){var E0=D_(N);if(E0!==null){!(E0.flags&65536)&&(E0.flags|=256),L_(E0,N,Y,b,c),A5(Q1(K,Y));break e}}b=K=Q1(K,Y),z0!==4&&(z0=2),k2===null?k2=[b]:k2.push(b),b=N;do{switch(b.tag){case 3:b.flags|=65536,c&=-c,b.lanes|=c;var ae=B_(b,K,c);r_(b,ae);break e;case 1:Y=K;var te=b.type,le=b.stateNode;if(!(b.flags&128)&&(typeof te.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(Ys===null||!Ys.has(le)))){b.flags|=65536,c&=-c,b.lanes|=c;var Be=b_(b,Y,c);r_(b,Be);break e}}b=b.return}while(b!==null)}uy(f)}catch($e){c=$e,L0===f&&f!==null&&(L0=f=f.return);continue}break}while(1)}function ly(){var a=Mu.current;return Mu.current=yu,a===null?yu:a}function i6(){(z0===0||z0===3||z0===2)&&(z0=4),K0===null||!(ja&268435455)&&!(Su&268435455)||Js(K0,sr)}function Lu(a,c){var f=Nt;Nt|=2;var y=ly();(K0!==a||sr!==c)&&($i=null,Ya(a,c));do try{Dk();break}catch(I){oy(a,I)}while(1);if(m5(),Nt=f,Mu.current=y,L0!==null)throw Error(t(261));return K0=null,sr=0,z0}function Dk(){for(;L0!==null;)cy(L0)}function Lk(){for(;L0!==null&&!ie();)cy(L0)}function cy(a){var c=fy(a.alternate,a,cn);a.memoizedProps=a.pendingProps,c===null?uy(a):L0=c,X5.current=null}function uy(a){var c=a;do{var f=c.alternate;if(a=c.return,c.flags&32768){if(f=Mk(f,c),f!==null){f.flags&=32767,L0=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{z0=6,L0=null;return}}else if(f=Ik(f,c,cn),f!==null){L0=f;return}if(c=c.sibling,c!==null){L0=c;return}L0=c=a}while(c!==null);z0===0&&(z0=5)}function qa(a,c,f){var y=Lt,I=Bn.transition;try{Bn.transition=null,Lt=1,Nk(a,c,f,y)}finally{Bn.transition=I,Lt=y}return null}function Nk(a,c,f,y){do G1();while(qs!==null);if(Nt&6)throw Error(t(327));f=a.finishedWork;var I=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(F0(a,b),a===K0&&(L0=K0=null,sr=0),!(f.subtreeFlags&2064)&&!(f.flags&2064)||Bu||(Bu=!0,py(Oe,function(){return G1(),null})),b=(f.flags&15990)!==0,f.subtreeFlags&15990||b){b=Bn.transition,Bn.transition=null;var N=Lt;Lt=1;var Y=Nt;Nt|=4,X5.current=null,Tk(a,f),ey(f,a),ek(i5),Vc=!!n5,i5=n5=null,a.current=f,Bk(f),he(),Nt=Y,Lt=N,Bn.transition=b}else a.current=f;if(Bu&&(Bu=!1,qs=a,bu=I),b=a.pendingLanes,b===0&&(Ys=null),Dt(f.stateNode),Vr(a,oe()),c!==null)for(y=a.onRecoverableError,f=0;f<c.length;f++)I=c[f],y(I.value,{componentStack:I.stack,digest:I.digest});if(Tu)throw Tu=!1,a=Z5,Z5=null,a;return bu&1&&a.tag!==0&&G1(),b=a.pendingLanes,b&1?a===$5?Q2++:(Q2=0,$5=a):Q2=0,Hs(),null}function G1(){if(qs!==null){var a=hi(bu),c=Bn.transition,f=Lt;try{if(Bn.transition=null,Lt=16>a?16:a,qs===null)var y=!1;else{if(a=qs,qs=null,bu=0,Nt&6)throw Error(t(331));var I=Nt;for(Nt|=4,Xe=a.current;Xe!==null;){var b=Xe,N=b.child;if(Xe.flags&16){var Y=b.deletions;if(Y!==null){for(var K=0;K<Y.length;K++){var de=Y[K];for(Xe=de;Xe!==null;){var Ie=Xe;switch(Ie.tag){case 0:case 11:case 15:P2(8,Ie,b)}var Me=Ie.child;if(Me!==null)Me.return=Ie,Xe=Me;else for(;Xe!==null;){Ie=Xe;var xe=Ie.sibling,He=Ie.return;if(X_(Ie),Ie===de){Xe=null;break}if(xe!==null){xe.return=He,Xe=xe;break}Xe=He}}}var Je=b.alternate;if(Je!==null){var Ke=Je.child;if(Ke!==null){Je.child=null;do{var E0=Ke.sibling;Ke.sibling=null,Ke=E0}while(Ke!==null)}}Xe=b}}if(b.subtreeFlags&2064&&N!==null)N.return=b,Xe=N;else e:for(;Xe!==null;){if(b=Xe,b.flags&2048)switch(b.tag){case 0:case 11:case 15:P2(9,b,b.return)}var ae=b.sibling;if(ae!==null){ae.return=b.return,Xe=ae;break e}Xe=b.return}}var te=a.current;for(Xe=te;Xe!==null;){N=Xe;var le=N.child;if(N.subtreeFlags&2064&&le!==null)le.return=N,Xe=le;else e:for(N=te;Xe!==null;){if(Y=Xe,Y.flags&2048)try{switch(Y.tag){case 0:case 11:case 15:Iu(9,Y)}}catch($e){m0(Y,Y.return,$e)}if(Y===N){Xe=null;break e}var Be=Y.sibling;if(Be!==null){Be.return=Y.return,Xe=Be;break e}Xe=Y.return}}if(Nt=I,Hs(),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(at,a)}catch{}y=!0}return y}finally{Lt=f,Bn.transition=c}}return!1}function hy(a,c,f){c=Q1(f,c),c=B_(a,c,1),a=js(a,c,1),c=Tr(),a!==null&&(X0(a,1,c),Vr(a,c))}function m0(a,c,f){if(a.tag===3)hy(a,a,f);else for(;c!==null;){if(c.tag===3){hy(c,a,f);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ys===null||!Ys.has(y))){a=Q1(f,a),a=b_(c,a,1),c=js(c,a,1),a=Tr(),c!==null&&(X0(c,1,a),Vr(c,a));break}}c=c.return}}function Pk(a,c,f){var y=a.pingCache;y!==null&&y.delete(c),c=Tr(),a.pingedLanes|=a.suspendedLanes&f,K0===a&&(sr&f)===f&&(z0===4||z0===3&&(sr&130023424)===sr&&500>oe()-K5?Ya(a,0):J5|=f),Vr(a,c)}function dy(a,c){c===0&&(a.mode&1?(c=D0,D0<<=1,!(D0&130023424)&&(D0=4194304)):c=1);var f=Tr();a=Ji(a,c),a!==null&&(X0(a,c,f),Vr(a,f))}function Uk(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),dy(a,f)}function kk(a,c){var f=0;switch(a.tag){case 13:var y=a.stateNode,I=a.memoizedState;I!==null&&(f=I.retryLane);break;case 19:y=a.stateNode;break;default:throw Error(t(314))}y!==null&&y.delete(c),dy(a,f)}var fy;fy=function(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps||Or.current)Gr=!0;else{if(!(a.lanes&f)&&!(c.flags&128))return Gr=!1,Ck(a,c,f);Gr=!!(a.flags&131072)}else Gr=!1,o0&&c.flags&1048576&&Wv(c,lu,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;wu(a,c),a=c.pendingProps;var I=b1(c,fr.current);U1(c,f),I=T5(null,c,y,a,I,f);var b=B5();return c.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,zr(y)?(b=!0,su(c)):b=!1,c.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,E5(c),I.updater=Eu,c.stateNode=I,I._reactInternals=c,P5(c,y,a,f),c=F5(null,c,y,!0,b,f)):(c.tag=0,o0&&b&&h5(c),Sr(null,c,I,f),c=c.child),c;case 16:y=c.elementType;e:{switch(wu(a,c),a=c.pendingProps,I=y._init,y=I(y._payload),c.type=y,I=c.tag=Fk(y),a=jn(y,a),I){case 0:c=Q5(null,c,y,a,f);break e;case 1:c=F_(null,c,y,a,f);break e;case 11:c=N_(null,c,y,a,f);break e;case 14:c=P_(null,c,y,jn(y.type,a),f);break e}throw Error(t(306,y,""))}return c;case 0:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),Q5(a,c,y,I,f);case 1:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),F_(a,c,y,I,f);case 3:e:{if(O_(c),a===null)throw Error(t(387));y=c.pendingProps,b=c.memoizedState,I=b.element,t_(a,c),pu(c,y,null,f);var N=c.memoizedState;if(y=N.element,b.isDehydrated)if(b={element:y,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},c.updateQueue.baseState=b,c.memoizedState=b,c.flags&256){I=Q1(Error(t(423)),c),c=z_(a,c,y,f,I);break e}else if(y!==I){I=Q1(Error(t(424)),c),c=z_(a,c,y,f,I);break e}else for(ln=Os(c.stateNode.containerInfo.firstChild),on=c,o0=!0,Vn=null,f=$v(c,null,y,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(L1(),y===I){c=Zi(a,c,f);break e}Sr(a,c,y,f)}c=c.child}return c;case 5:return i_(c),a===null&&p5(c),y=c.type,I=c.pendingProps,b=a!==null?a.memoizedProps:null,N=I.children,s5(y,I)?N=null:b!==null&&s5(y,b)&&(c.flags|=32),Q_(a,c),Sr(a,c,N,f),c.child;case 6:return a===null&&p5(c),null;case 13:return G_(a,c,f);case 4:return x5(c,c.stateNode.containerInfo),y=c.pendingProps,a===null?c.child=N1(c,null,y,f):Sr(a,c,y,f),c.child;case 11:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),N_(a,c,y,I,f);case 7:return Sr(a,c,c.pendingProps,f),c.child;case 8:return Sr(a,c,c.pendingProps.children,f),c.child;case 12:return Sr(a,c,c.pendingProps.children,f),c.child;case 10:e:{if(y=c.type._context,I=c.pendingProps,b=c.memoizedProps,N=I.value,Zt(hu,y._currentValue),y._currentValue=N,b!==null)if(Hn(b.value,N)){if(b.children===I.children&&!Or.current){c=Zi(a,c,f);break e}}else for(b=c.child,b!==null&&(b.return=c);b!==null;){var Y=b.dependencies;if(Y!==null){N=b.child;for(var K=Y.firstContext;K!==null;){if(K.context===y){if(b.tag===1){K=Ki(-1,f&-f),K.tag=2;var de=b.updateQueue;if(de!==null){de=de.shared;var Ie=de.pending;Ie===null?K.next=K:(K.next=Ie.next,Ie.next=K),de.pending=K}}b.lanes|=f,K=b.alternate,K!==null&&(K.lanes|=f),_5(b.return,f,c),Y.lanes|=f;break}K=K.next}}else if(b.tag===10)N=b.type===c.type?null:b.child;else if(b.tag===18){if(N=b.return,N===null)throw Error(t(341));N.lanes|=f,Y=N.alternate,Y!==null&&(Y.lanes|=f),_5(N,f,c),N=b.sibling}else N=b.child;if(N!==null)N.return=b;else for(N=b;N!==null;){if(N===c){N=null;break}if(b=N.sibling,b!==null){b.return=N.return,N=b;break}N=N.return}b=N}Sr(a,c,I.children,f),c=c.child}return c;case 9:return I=c.type,y=c.pendingProps.children,U1(c,f),I=Sn(I),y=y(I),c.flags|=1,Sr(a,c,y,f),c.child;case 14:return y=c.type,I=jn(y,c.pendingProps),I=jn(y.type,I),P_(a,c,y,I,f);case 15:return U_(a,c,c.type,c.pendingProps,f);case 17:return y=c.type,I=c.pendingProps,I=c.elementType===y?I:jn(y,I),wu(a,c),c.tag=1,zr(y)?(a=!0,su(c)):a=!1,U1(c,f),S_(c,y,I),P5(c,y,I,f),F5(null,c,y,!0,a,f);case 19:return V_(a,c,f);case 22:return k_(a,c,f)}throw Error(t(156,c.tag))};function py(a,c){return zc(a,c)}function Qk(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 bn(a,c,f,y){return new Qk(a,c,f,y)}function s6(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Fk(a){if(typeof a=="function")return s6(a)?1:0;if(a!=null){if(a=a.$$typeof,a===k)return 11;if(a===J)return 14}return 2}function Ks(a,c){var f=a.alternate;return f===null?(f=bn(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 Nu(a,c,f,y,I,b){var N=2;if(y=a,typeof a=="function")s6(a)&&(N=1);else if(typeof a=="string")N=5;else e:switch(a){case M:return Xa(f.children,I,b,c);case D:N=8,I|=8;break;case R:return a=bn(12,f,c,I|2),a.elementType=R,a.lanes=b,a;case Q:return a=bn(13,f,c,I),a.elementType=Q,a.lanes=b,a;case W:return a=bn(19,f,c,I),a.elementType=W,a.lanes=b,a;case re:return Pu(f,I,b,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case S:N=10;break e;case L:N=9;break e;case k:N=11;break e;case J:N=14;break e;case q:N=16,y=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return c=bn(N,f,c,I),c.elementType=a,c.type=y,c.lanes=b,c}function Xa(a,c,f,y){return a=bn(7,a,y,c),a.lanes=f,a}function Pu(a,c,f,y){return a=bn(22,a,y,c),a.elementType=re,a.lanes=f,a.stateNode={isHidden:!1},a}function a6(a,c,f){return a=bn(6,a,null,c),a.lanes=f,a}function o6(a,c,f){return c=bn(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function Ok(a,c,f,y,I){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=dr(0),this.expirationTimes=dr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.identifierPrefix=y,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function l6(a,c,f,y,I,b,N,Y,K){return a=new Ok(a,c,f,Y,K),c===1?(c=1,b===!0&&(c|=8)):c=0,b=bn(3,null,null,c),a.current=b,b.stateNode=a,b.memoizedState={element:y,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},E5(b),a}function zk(a,c,f){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:y==null?null:""+y,children:a,containerInfo:c,implementation:f}}function Ay(a){if(!a)return Gs;a=a._reactInternals;e:{if(ui(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(zr(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(zr(f))return Hv(a,f,c)}return c}function gy(a,c,f,y,I,b,N,Y,K){return a=l6(f,y,!0,a,I,b,N,Y,K),a.context=Ay(null),f=a.current,y=Tr(),I=Xs(f),b=Ki(y,I),b.callback=c??null,js(f,b,I),a.current.lanes=I,X0(a,I,y),Vr(a,y),a}function Uu(a,c,f,y){var I=c.current,b=Tr(),N=Xs(I);return f=Ay(f),c.context===null?c.context=f:c.pendingContext=f,c=Ki(b,N),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=js(I,c,N),a!==null&&(qn(a,I,N,b),fu(a,I,N)),N}function ku(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 my(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function c6(a,c){my(a,c),(a=a.alternate)&&my(a,c)}function Gk(){return null}var vy=typeof reportError=="function"?reportError:function(a){console.error(a)};function u6(a){this._internalRoot=a}Qu.prototype.render=u6.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(t(409));Uu(a,c,null,null)},Qu.prototype.unmount=u6.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;Wa(function(){Uu(null,a,null,null)}),c[Wi]=null}};function Qu(a){this._internalRoot=a}Qu.prototype.unstable_scheduleHydration=function(a){if(a){var c=tv();a={blockedOn:null,target:a,priority:c};for(var f=0;f<ks.length&&c!==0&&c<ks[f].priority;f++);ks.splice(f,0,a),f===0&&iv(a)}};function h6(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Fu(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function _y(){}function Hk(a,c,f,y,I){if(I){if(typeof y=="function"){var b=y;y=function(){var de=ku(N);b.call(de)}}var N=gy(c,y,a,0,null,!1,!1,"",_y);return a._reactRootContainer=N,a[Wi]=N.current,x2(a.nodeType===8?a.parentNode:a),Wa(),N}for(;I=a.lastChild;)a.removeChild(I);if(typeof y=="function"){var Y=y;y=function(){var de=ku(K);Y.call(de)}}var K=l6(a,0,!1,null,null,!1,!1,"",_y);return a._reactRootContainer=K,a[Wi]=K.current,x2(a.nodeType===8?a.parentNode:a),Wa(function(){Uu(c,K,f,y)}),K}function Ou(a,c,f,y,I){var b=f._reactRootContainer;if(b){var N=b;if(typeof I=="function"){var Y=I;I=function(){var K=ku(N);Y.call(K)}}Uu(c,N,a,I)}else N=Hk(f,c,a,I,y);return ku(N)}$m=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var f=sn(c.pendingLanes);f!==0&&(Mr(c,f|1),Vr(c,oe()),!(Nt&6)&&(z1=oe()+500,Hs()))}break;case 13:Wa(function(){var y=Ji(a,1);if(y!==null){var I=Tr();qn(y,a,1,I)}}),c6(a,1)}},Uh=function(a){if(a.tag===13){var c=Ji(a,134217728);if(c!==null){var f=Tr();qn(c,a,134217728,f)}c6(a,134217728)}},ev=function(a){if(a.tag===13){var c=Xs(a),f=Ji(a,c);if(f!==null){var y=Tr();qn(f,a,c,y)}c6(a,c)}},tv=function(){return Lt},rv=function(a,c){var f=Lt;try{return Lt=a,c()}finally{Lt=f}},Le=function(a,c,f){switch(c){case"input":if(ft(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 I=nu(y);if(!I)throw Error(t(90));ut(y),ft(y,I)}}}break;case"textarea":ye(a,f);break;case"select":c=f.value,c!=null&&z(a,!!f.multiple,c,!1)}},jt=r6,_0=Wa;var Vk={usingClientEntryPoint:!1,Events:[I2,T1,nu,Ne,Et,r6]},F2={findFiberByHostInstance:Qa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jk={bundleType:F2.bundleType,version:F2.version,rendererPackageName:F2.rendererPackageName,rendererConfig:F2.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=Fc(a),a===null?null:a.stateNode},findFiberByHostInstance:F2.findFiberByHostInstance||Gk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{at=zu.inject(jk),rt=zu}catch{}}return Fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vk,Fr.createPortal=function(a,c){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h6(c))throw Error(t(200));return zk(a,c,null,f)},Fr.createRoot=function(a,c){if(!h6(a))throw Error(t(299));var f=!1,y="",I=vy;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(I=c.onRecoverableError)),c=l6(a,1,!1,null,null,f,!1,y,I),a[Wi]=c.current,x2(a.nodeType===8?a.parentNode:a),new u6(c)},Fr.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=Fc(c),a=a===null?null:a.stateNode,a},Fr.flushSync=function(a){return Wa(a)},Fr.hydrate=function(a,c,f){if(!Fu(c))throw Error(t(200));return Ou(null,a,c,!0,f)},Fr.hydrateRoot=function(a,c,f){if(!h6(a))throw Error(t(405));var y=f!=null&&f.hydratedSources||null,I=!1,b="",N=vy;if(f!=null&&(f.unstable_strictMode===!0&&(I=!0),f.identifierPrefix!==void 0&&(b=f.identifierPrefix),f.onRecoverableError!==void 0&&(N=f.onRecoverableError)),c=gy(c,null,a,1,f??null,I,!1,b,N),a[Wi]=c.current,x2(a),y)for(a=0;a<y.length;a++)f=y[a],I=f._getVersion,I=I(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,I]:c.mutableSourceEagerHydrationData.push(f,I);return new Qu(c)},Fr.render=function(a,c,f){if(!Fu(c))throw Error(t(200));return Ou(null,a,c,!1,f)},Fr.unmountComponentAtNode=function(a){if(!Fu(a))throw Error(t(40));return a._reactRootContainer?(Wa(function(){Ou(null,null,a,!1,function(){a._reactRootContainer=null,a[Wi]=null})}),!0):!1},Fr.unstable_batchedUpdates=r6,Fr.unstable_renderSubtreeIntoContainer=function(a,c,f,y){if(!Fu(f))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Ou(a,c,f,!1,y)},Fr.version="18.3.1-next-f1338f8080-20240426",Fr}function Qm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qm)}catch(r){console.error(r)}}Qm(),Nm.exports=XP();var JP=Nm.exports,Fm=JP;Bh.createRoot=Fm.createRoot,Bh.hydrateRoot=Fm.hydrateRoot;class KP{constructor({apiService:e,events:t,appControlService:n}){Rt(this,"targetElement");Rt(this,"apiService");Rt(this,"events");Rt(this,"htmlTarget");Rt(this,"appControlService");this.apiService=e,this.events=t,this.appControlService=n}mount(e,t,n){if(!this.targetElement){const s=t.customId??"dita-3dconfig-element",o=document.getElementById(s);if(!o)throw new Error(`Element not found with id => '${s}' `);this.htmlTarget=o,this.htmlTarget.style.height="100%",this.htmlTarget.style.width="100%",this.targetElement=Bh.createRoot(document.getElementById(s))}const i=O2.createElement(WP,{apiService:this.apiService,events:this.events,sku:e,viewerOnly:t.viewerOnly,lensSku:n??void 0,appControlService:this.appControlService});this.targetElement.render(i)}unmount(){this.targetElement&&(this.appControlService.reset(),this.targetElement.unmount(),this.targetElement=void 0,this.htmlTarget&&(this.htmlTarget.style.height="0px",this.htmlTarget.style.width="auto"))}}var Dh={exports:{}},_1=typeof Reflect=="object"?Reflect:null,Om=_1&&typeof _1.apply=="function"?_1.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Lc;_1&&typeof _1.ownKeys=="function"?Lc=_1.ownKeys:Object.getOwnPropertySymbols?Lc=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Lc=function(e){return Object.getOwnPropertyNames(e)};function ZP(r){console&&console.warn&&console.warn(r)}var zm=Number.isNaN||function(e){return e!==e};function Vt(){Vt.init.call(this)}Dh.exports=Vt,Dh.exports.once=rU,Vt.EventEmitter=Vt,Vt.prototype._events=void 0,Vt.prototype._eventsCount=0,Vt.prototype._maxListeners=void 0;var Gm=10;function Nc(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Vt,"defaultMaxListeners",{enumerable:!0,get:function(){return Gm},set:function(r){if(typeof r!="number"||r<0||zm(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");Gm=r}}),Vt.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},Vt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||zm(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 Hm(r){return r._maxListeners===void 0?Vt.defaultMaxListeners:r._maxListeners}Vt.prototype.getMaxListeners=function(){return Hm(this)},Vt.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")Om(h,this,t);else for(var u=h.length,d=qm(h,u),n=0;n<u;++n)Om(d[n],this,t);return!0};function Vm(r,e,t,n){var i,s,o;if(Nc(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=Hm(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,ZP(l)}return r}Vt.prototype.addListener=function(e,t){return Vm(this,e,t,!1)},Vt.prototype.on=Vt.prototype.addListener,Vt.prototype.prependListener=function(e,t){return Vm(this,e,t,!0)};function $P(){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 jm(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=$P.bind(n);return i.listener=t,n.wrapFn=i,i}Vt.prototype.once=function(e,t){return Nc(t),this.on(e,jm(this,e,t)),this},Vt.prototype.prependOnceListener=function(e,t){return Nc(t),this.prependListener(e,jm(this,e,t)),this},Vt.prototype.removeListener=function(e,t){var n,i,s,o,l;if(Nc(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():eU(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this},Vt.prototype.off=Vt.prototype.removeListener,Vt.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 Wm(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?tU(i):qm(i,i.length)}Vt.prototype.listeners=function(e){return Wm(this,e,!0)},Vt.prototype.rawListeners=function(e){return Wm(this,e,!1)},Vt.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Ym.call(r,e)},Vt.prototype.listenerCount=Ym;function Ym(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}Vt.prototype.eventNames=function(){return this._eventsCount>0?Lc(this._events):[]};function qm(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function eU(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function tU(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function rU(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))}Xm(r,e,s,{once:!0}),e!=="error"&&nU(r,i,{once:!0})})}function nU(r,e,t){typeof r.on=="function"&&Xm(r,"error",e,t)}function Xm(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 iU=Dh.exports;const l2=class l2 extends iU.EventEmitter{emitEvent(e,t){Object.keys(l2.EVENTS).includes(e)&&this.emit(l2.EVENTS[e],t)}};Rt(l2,"EVENTS",{onAddToCart:"add-to-cart"});let Lh=l2;const sU={getCartUrl:((Km=window.Shopify)==null?void 0:Km.routes.root)+"cart.js",addToCartUrl:((Zm=window.Shopify)==null?void 0:Zm.routes.root)+"cart/add.js"},Jm=Object.freeze(sU);class aU{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()}}class oU{constructor(){Rt(this,"changeRxConfigurationHandler",null)}registerChangeRxConfiguration(e){this.changeRxConfigurationHandler=e}async changeRxConfiguration(e,t){var n;await((n=this.changeRxConfigurationHandler)==null?void 0:n.call(this,e,t))}reset(){this.changeRxConfigurationHandler=null}}const{log:lU,error:cU}=console,uU=(...r)=>{cU("❌ Sprie Error:",...r)},hU="&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&",dU={HOST:mi.host,STORE_PREFIX:mi.storePrefix},fU={addToCartUrl:Jm.addToCartUrl,getCartUrl:Jm.getCartUrl};let Nh=!1;class pU{constructor(){Rt(this,"sdkService");Rt(this,"apiService");Rt(this,"uiService");Rt(this,"events");Rt(this,"appControlService");this.events=new Lh,this.apiService=new xy(new $s(dU),new aU(fU)),this.appControlService=new oU,this.uiService=new KP({apiService:this.apiService,events:this.events,appControlService:this.appControlService});const e={apiService:this.apiService,config:mi,log:lU,logErr:uU,metaData:{appVersion:yy,previewUrlPrams:hU,targetClassName:"sprie-embed-element"}};this.sdkService=new wy(e),this.sdkService.Init().then(t=>{Nh=t})}isReadyToLoad(){return Nh}load(e,t){Nh?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,n){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!0,customId:t},n)}async changeRxConfiguration(e,t){await this.appControlService.changeRxConfiguration(e,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 pU})();
|